Usage Instructions
Get Trading Pair List
- Call
/asset/public/v1/exchange/infoto get all available trading pairs - Filter trading pairs with
statusas"OPEN"from the returnedspotSymbolsarray - Record trading pair information such as
symbolId,pricePrecision,quantityPrecision, etc.
Get Order Book Data
- Get the
depthsarray from trading pair information - Select appropriate precision value as
scaleparameter - Call
/market/public/api/v1/spot/depthto get order book data
Get K-line Data
- Select appropriate
intervalparameter (e.g., 1m, 5m, 15m, 1h, 4h, 1d, etc.) - Set appropriate
limitparameter (maximum 1000) - Call
/market/public/api/v1/spot/klinesto get K-line data
Important Notes
- Rate Limiting: Market data interfaces have access rate limits, please control request frequency appropriately
- Data Precision: Price and quantity precision vary by trading pair, please adjust dynamically based on trading pair information
- Real-time Data: Order book and trade data are real-time, K-line data may have delays
- Caching Strategy: It is recommended to cache data that doesn’t change frequently (such as trading pair information)
Last updated on: