Sync Instruments
Synchronize instruments from an exchange.
Endpoint
POST /api/v3/market/instrument/sync
Description
Synchronizes trading instruments from a specific exchange. This fetches the latest instrument data from the exchange and updates the local database.
Authentication
Requires Bearer token authentication.
Authorization: Bearer {access_token}
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
venue | string | Yes | Venue to sync instruments from |
symbols | array | No | Specific symbols to sync (syncs all if not provided) |
Response
Returns sync status and summary.
| Field | Type | Description |
|---|---|---|
venue | string | Venue that was synced |
synced | integer | Number of instruments synced |
added | integer | Number of new instruments added |
updated | integer | Number of instruments updated |
Usage
import requests
headers = {"Authorization": f"Bearer {access_token}"}
# Sync all Binance instruments
response = requests.post(
"https://cadenza-api-uat.algo724.com/api/v3/market/instrument/sync",
headers=headers,
json={"venue": "BINANCE"}
)
result = response.json()["data"]
print(f"Synced {result['synced']} instruments")
# Sync specific symbols
response = requests.post(
"https://cadenza-api-uat.algo724.com/api/v3/market/instrument/sync",
headers=headers,
json={
"venue": "BINANCE",
"symbols": ["BTC/USDT", "ETH/USDT"]
}
)
curl -X POST https://cadenza-api-uat.algo724.com/api/v3/market/instrument/sync \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
-H "Content-Type: application/json" \
-d '{"venue": "BINANCE"}'
Example Response
{
"data": {
"venue": "BINANCE",
"synced": 500,
"added": 10,
"updated": 490
},
"success": true,
"errno": 0,
"error": null
}
Error Responses
| HTTP Code | Error | Description |
|---|---|---|
| 400 | Invalid request | Invalid venue specified |
| 401 | Unauthorized | Invalid or expired access token |
| 403 | Forbidden | Insufficient permissions |
Notes
- This operation may take some time for venues with many instruments
- Syncing updates instrument metadata like precision, limits, and trading rules
- Use specific symbols to sync only the instruments you need
- Regular syncing ensures your local data matches the exchange