Skip to main content

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

FieldTypeRequiredDescription
venuestringYesVenue to sync instruments from
symbolsarrayNoSpecific symbols to sync (syncs all if not provided)

Response

Returns sync status and summary.

FieldTypeDescription
venuestringVenue that was synced
syncedintegerNumber of instruments synced
addedintegerNumber of new instruments added
updatedintegerNumber 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 CodeErrorDescription
400Invalid requestInvalid venue specified
401UnauthorizedInvalid or expired access token
403ForbiddenInsufficient 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