General API Information
- The following base endpoints are available. Please use whichever works best for your setup:
- The last 4 endpoints in the point above (
api1-api4) should give better performance but have less stability. - Responses are in JSON by default. To receive responses in SBE, refer to the SBE FAQ page.
- Data is returned in chronological order, unless noted otherwise.
- Without
startTimeorendTime, returns the most recent items up to the limit. - With
startTime, returns oldest items fromstartTimeup to the limit. - With
endTime, returns most recent items up toendTimeand the limit. - With both, behaves like
startTimebut does not exceedendTime.
- Without
- All time and timestamp related fields in the JSON responses are in milliseconds by default. To receive the information in microseconds, please add the header
X-MBX-TIME-UNIT:MICROSECONDorX-MBX-TIME-UNIT:microsecond. - We support HMAC, RSA, and Ed25519 keys. For more information, please see API Key types.
- Timestamp parameters (e.g.
startTime,endTime,timestamp) can be passed in milliseconds or microseconds. - For APIs that only send public market data, please use the base endpoint https://data-api.binance.vision. Please refer to Market Data Only page.
- If there are enums or terms you want clarification on, please see the SPOT Glossary for more information.
- APIs have a timeout of 10 seconds when processing a request. If a response from the Matching Engine takes longer than this, the API responds with "Timeout waiting for response from backend server. Send status unknown; execution status unknown." (-1007 TIMEOUT)
- This does not always mean that the request failed in the Matching Engine.
- If the status of the request has not appeared in User Data Stream, please perform an API query for its status.
- Please avoid SQL keywords in requests as they may trigger a security block by a WAF (Web Application Firewall) rule. See https://www.binance.com/en/support/faq/detail/360004492232 for more details.
- If your request contains a symbol name containing non-ASCII characters, then the response may contain non-ASCII characters encoded in UTF-8.
- Some endpoints may return asset and/or symbol names containing non-ASCII characters encoded in UTF-8 even if the request did not contain non-ASCII characters.