Skip to main content

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

  1. 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.
  2. 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

ParameterTypeDescription
idStringCurrency pair ID i.e., 78: BTC_USDT.
lastStringLast price
lowestAskStringAsk
highestBidStringBid
percentChangeStringPrice change
isFrozenStringFrozen:
0: False
1: True
high24hrString24h highest price
low24hrString24h lowest price
baseVolumeString24h 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
}