Get 24H Trade Summary for All Instruments
API Description
This interface provides a 24-hour trade summary for all available instruments on the exchange, including key metrics such as the latest transaction price, highest bid, lowest ask, 24-hour trading volume, etc.
Note: 24H Trade Summary for all instruments data is accessible via both RESTful and Websocket APIs. This page describes the RESTful API. For information on the Websocket API, please click here
Precautions
- This interface returns information for all instruments and does not require parameters to query a specific instrument. To access data for a specific instrument, please find it in the returned response.
- For real-time updates, it is recommended to use the Websocket interface.
Authentication
This is a public interface and does not require authentication. For details on using the RESTful API, please refer to Introduction > Authentication & Code Snippet > Spot > RESTful Public Interface.
Request Method
GET
Endpoint
/api/v1/public?command=returnTicker
Frequency Limit
The frequency limit for this interface is 80 requests/s per IP. In addition to this per-interface limit, a global rate limit is also enforced.
For detailed information on Global rate limits and API Rate Limiting Policy, please refer to the "Frequency Limit" section at click here
Request Parameters
This interface does not require any request parameter.
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| id | String | Currency pair ID i.e., 78: BTC_USDT. |
| last | String | Last price |
| lowestAsk | String | Ask |
| highestBid | String | Bid |
| percentChange | String | Price change |
| isFrozen | String | Frozen: 0: False 1: True |
| high24hr | String | 24h highest price |
| low24hr | String | 24h lowest price |
| baseVolume | String | 24h trading volume in quote currency |
Request Example
The following Python code shows how to get the 24-hour trade summary for all instruments.
Note: For a complete code example, please refer to Introduction > Authentication & Code Snippet > Spot > RESTful Public Interface.
api_url= "/api/v1/public?command=returnTicker"
params= {}
SpotRestfulPublic(api_url, params) # function SpotRestfulPublic() is defined in section (Introduction > Authentication & Code Snippet > Spot > RESTful Public Interface)
NOTE: For a complete Java code example, please refer to Introduction > Authentication & Code Snippet > Spot > RESTful Public Interface.
Response Example
The following is an example response returned by the above Python request. For brevity, only two instruments are shown below:
{'code': '200',
'data': {
'BTC_USDT':
{'percentChange': '0.0135',
'high24hr': '97371.79',
'last': '96903.7',
'highestBid': '96903.3200',
'id': 78,
'isFrozen': 0,
'baseVolume': '773209171.37',
'lowestAsk': '96904.3800',
'low24hr': '95420.6'},
'ETH_USDT':
{'percentChange': '0.0102',
'high24hr': '2757.0',
'last': '2731.02',
'highestBid': '2731.1400',
'id': 79,
'isFrozen': 0,
'baseVolume': '220037399.94',
'lowestAsk': '2731.2300',
'low24hr': '2680.51'}......}
'msg': 'SUCCESS',
'success': True,
'failed': False
}