Get a Batch of Trade Records of a Contract

/sapi/v1/market/history/trade

Request type: GET

Signature verification: No

Interface permission: Read

Rate Limit: For public interface to get market data such as Get Kline data, Get Market Data Overview, Get Contract Information,Get market in-depth data, Get premium index Kline, Get real-time forecast capital rate kline, Get basis data, Get the last Trade of a Contract and so on: (1)For restful interfaces, products, (future, coin margined swap, usdt margined Contracts)800 times/second for one IP at most

Interface description: The interface supports cross margin mode and isolated margin mode. The request parameter "contract_code" supports the contract code of futures, in that the format is BTC-USDT-210625; and supports contract type: BTC-USDT, BTC-USDT-CW, BTC-USDT-NW, BTC-USDT-CQ, BTC-USDT-NQ.

Request Address

Environment
Address

Online (preferred by aws customers)

Request Parameter

Parameter
Data Type
Required
Description
Value Range
Default Value

contract_code

string

true

contract code or contract type

swap: "BTC-USDT"... , future: "BTC-USDT-210625" ... or BTC-USDT-CW, BTC-USDT-NW, BTC-USDT-CQ, BTC-USDT-NQ

size

int

true

Number of Trading Records Acquisition

[1, 2000]

Response Parameter

Parameter
Data Type
Required
Description
Value Range

ch

string

true

Data belonged channel,Format: market.$contract_code.trade.detail

<data>

object array

true

amount

decimal

true

Quantity(Cont.). Sum of both buy and sell sides

direction

string

true

The direction to buy or sell is the direction of the taker (active transaction)

id

long

true

Unique Transaction Id(symbol level)

price

decimal

true

Price

ts

long

true

Order Creation Time

quantity

decimal

true

trading quantity(coin)

trade_turnover

decimal

true

trade turnover(quoted currency)

</data>

false

id

long

true

Unique Order Id(symbol level).

ts

long

true

Latest transaction time

</data>

false

status

string

true

"ok","error"

ts

long

true

Time of Respond Generation, Unit: Millisecond

Request Example

Response Example

Last updated