Skip to main content

Get Last Trade Summary of an Instrument

API Description​

This interface allows querying the latest trade summary of a specified instrument, including the highest price, lowest price, maximum leverage, total trading volume, latest price and contract size.

Note: Last Trade Summary of an Instrument is only available via RESTful API.

Precautions​

  1. This interface supports querying the latest trade summary for a specific instrument. To query it for all instruments, please refer to Futures > Market Information > Get Last Trade Summary of All Instruments.
  2. To get the 24h real-time trade summary of an instrument, use the Websocket API under Futures > Market Information > Subscribe 24H Trade Summary

Authentication​

This is a public interface and does not require authentication. For details on using the RESTful API, please refer to Common > Authentication & Code Snippet > Futures > RESTful Public Interface.

Request Method​

GET

Endpoint​

/v1/perpumPublic/ticker

Frequency Limit​

The frequency limit for this interface is 5 requests/s per user ID and 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​

ParameterMandatoryTypeDescription
instrumenttrueStringNote: for USDT contracts, pass only the base currency name, for example BTCUSDT can use BTC; for USDC contracts, pass the full trading pair, for example BTC_USDC. This parameter is case-insensitive.
Note: For instruments that start with numbers (e.g., 1000PEPE), both uppercase and lowercase formats are valid.

Response Parameters​

ParameterTypeDescription
contract_idIntegerContract Type 1: Linear perpetual
nameStringInstrument name, e.g., BTCUSDT or BTCUSDC.
base_coinStringBase currency of the instrument, e.g., btc.
quote_coinStringQuote currency of the instrument, e.g., usdt or usdc.
price_coinStringBase currency of the instrument, e.g., btc.
max_leverageIntegerMaximum leverage allowed.
contract_sizeBigDecimalThe minimum contract size that can be traded.
last_priceBigDecimalLatest traded price of the contract.
highBigDecimalHighest price in the latest trade summary.
lowBigDecimalLowest price in the latest trade summary.
rise_fall_rateBigDecimalPrice change
total_volumeBigDecimalTotal trading volume of the contract.
fair_priceBigDecimalIndex price of the contract.

Request Example​

The following Python code shows how to get the latest trade summary of BTC.

Note: For a complete code example, please refer to Common > Authentication & Code Snippet > Futures > RESTful Public Interface.

api_url = "/v1/perpumPublic/ticker"

params = {"instrument": "BTC", }
FuturesRestfulPublic(api_url, params) # function FuturesRestfulPublic() is defined in section (Common > Authentication & Code Snippet > Futures > RESTful Public Interface)

Note: For a complete Java code example, please refer to Common > Authentication & Code Snippet > Futures > RESTful Public Interface.

Response Example​

The following is an example response returned by the above Python request:

{'code': 0,
'data': [{'fair_price': 97320.1,
'max_leverage': 125,
'total_volume': 0.0,
'price_coin': 'btc',
'contract_id': 1,
'base_coin': 'btc',
'high': 97362.5,
'rise_fall_rate': 0.009628,
'low': 95371.4,
'name': 'BTCUSDT',
'contract_size': 0.001,
'quote_coin': 'usdt',
'last_price': 97320.1}],
'msg': ''}