Get 24H Volume for Popular Instruments
API Description
This interface allow querying the 24-hour trading volume for popular instruments on the exchange. It provides aggregated volume data for major trading instruments, including BTC, ETH, LTC, and USDT, along with total market volume metrics.
Note: 24H volume for popular instruments data is only available via RESTful API.
Precautions
- This interface returns the trading volume for popular instruments over the past 24 hours. It does not require parameter to query a specific instrument. To access data for a specific instrument, please find it in the returned response.
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=return24hVolume
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 |
|---|---|---|
| data | Json | Data object containing the 24-hour trading volume for popular instruments. |
| totalETH | String | Total ETH traded in the last 24 hours. |
| totalUSDT | String | Total USDT traded in the last 24 hours. |
| totalBTC | String | Total BTC traded in the last 24 hours. |
| ETH_USDT | Json | Data object |
| -ETH | String | ETH trading volume in the ETH/USDT market. |
| -USDT | String | USDT trading volume in the ETH/USDT market. |
| LTC_CNYT | Json | Data object |
| -LTC | String | LTC trading volume in the LTC/CNYT market. |
| -CNYT | String | CNYT trading volume in the LTC/CNYT market. |
| ETC_CNYT | Json | Data object |
| -ETC | String | ETC trading volume in the ETC/CNYT market. |
| -CNYT | String | CNYT trading volume in the ETC/CNYT market. |
| CWT_CNYT | Json | Data object |
| -CWT | String | CWT trading volume in the CWT/CNYT market. |
| -CNYT | String | CNYT trading volume in the CWT/CNYT market. |
| BTC_CNYT | Json | Data object |
| -BTC | String | BTC trading volume in the BTC/CNYT market. |
| -CNYT | String | CNYT trading volume in the BTC/CNYT market. |
| BTC_USDT | Json | Data object |
| -BTC | String | BTC trading volume in the BTC/USDT market. |
| -USDT | String | USDT trading volume in the BTC/USDT market. |
| LTC_USDT | Json | Data object |
| -LTC | String | LTC trading volume in the LTC_USDT market. |
| -USDT | String | USDT trading volume in the LTC_USDT market. |
| msg | String | Response message, e.g., "SUCCESS" |
| success | Boolean | Indicates if the request was successful: true/false |
| failed | Boolean | Indicates if the request failed: true/false |
Request Example
The following Python code shows how to get the 24-hour trading volume for popular instruments.
Note: For a complete code example, please refer to Introduction > Authentication & Code Snippet > Spot > RESTful Public Interface.
api_url= "/api/v1/public?command=return24hVolume"
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.
{'code': '200',
'data': {'totalETH': '1118086.5235',
'totalUSDT': '2149633150.1000',
'ETH_USDT': {'ETH': '285517.372300', 'USDT': '548158874.9200'},
'LTC_CNYT': {'CNYT': '0.0000', 'LTC': '0.000000'},
'ETC_CNYT': {'ETC': '0.000000', 'CNYT': '0.0000'},
'totalBTC': '26283.6034',
'CWT_CNYT': {'CWT': '0.000000', 'CNYT': '0.0000'},
'BTC_CNYT': {'BTC': '0.000000', 'CNYT': '0.0000'},
'BTC_USDT': {'BTC': '20014.696800', 'USDT': '1594350194.0200'},
'LTC_USDT': {'USDT': '7124081.1600', 'LTC': '79505.491700'},
'ETH_CNYT': {'ETH': '0.000000', 'CNYT': '0.0000'}},
'msg': 'SUCCESS',
'success': True,
'failed': False}