The /api/markets/status endpoint allows you to check whether multiple markets have been resolved in a single request. This is useful for batch status checks and portfolio monitoring.
curl --request POST \ --url 'https://api.kuest.com/api/markets/status' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --data '{ "conditionIds": [ "0xabc123456789...", "0xdef456789abc...", "0xghi789abcdef..." ] }'```bash```javascript JavaScriptconst response = await fetch('https://api.kuest.com/api/markets/status', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' }, body: JSON.stringify({ conditionIds: [ '0xabc123456789...', '0xdef456789abc...', '0xghi789abcdef...' ] })});const data = await response.json();console.log(data);```bash```python Pythonimport requestsurl = 'https://api.kuest.com/api/markets/status'headers = { 'Content-Type': 'application/json', 'Accept': 'application/json'}payload = { 'conditionIds': [ '0xabc123456789...', '0xdef456789abc...', '0xghi789abcdef...' ]}response = requests.post(url, json=payload, headers=headers)data = response.json()print(data)```bash## Example Response```json{ "data": [ { "condition_id": "0xabc123456789...", "is_resolved": false }, { "condition_id": "0xdef456789abc...", "is_resolved": true }, { "condition_id": "0xghi789abcdef...", "is_resolved": false } ]}```bash## Empty Input ResponseIf no condition IDs are provided or all IDs are invalid:```json{ "data": []}```bash## Error Responses### 500 Internal Server Error```json{ "error": "An unexpected error occurred. Please try again later."}```bashReturned when the server encounters an unexpected error.## Notes- Condition IDs are automatically normalized to lowercase before lookup.- Duplicate condition IDs in the request are deduplicated automatically.- The endpoint accepts a maximum of 500 condition IDs per request. IDs beyond the 500 limit are ignored.- Invalid or non-existent condition IDs are silently filtered out and will not appear in the response.- Empty strings and whitespace-only strings are filtered out from the input.- The response `data` array only includes condition IDs that exist in the database.- This endpoint is optimized for bulk status checks and is more efficient than making individual requests.- Use this endpoint to determine which markets in a user's portfolio have been resolved and are ready for payout claims.