Get Contract Trades
Get contract trade history
(Authentication type: NONE, See Interface Permission)
Request Format
GET https://api-cloud.bitmart.com/contract/v1/ifcontract/trades
Request Limit
Request Parameter
Field | Type | Required? | Description |
---|---|---|---|
contractID | long | Yes | Contract ID |
Instruction
Request example
curl https://api-cloud.bitmart.com/contract/v1/ifcontract/trades?contractID=1
Response Data
Field | Type | Description |
---|---|---|
order_id | long | Order id |
trade_id | long | Trade id |
contract_id | long | Contract id |
deal_price | string | Price |
deal_vol | string | Filled number of contracts |
make_fee | string | Maker fee |
take_fee | string | Taker fee |
created_at | string | Create time |
way | string | Order direction |
1: Buy as taker, Open long buy, Open short sell | ||
2: Buy as taker, Open long buy, Close long sell | ||
3: Buy as taker, Close short buy, Open short sell | ||
4: Buy as taker, Close short buy, Close long sell | ||
5: Sell as taker, Open short sell, Open long buy | ||
6: Sell as taker, Open short sell, Close short buy | ||
7: Sell as taker, Close long sell, Open long buy | ||
8: Sell as taker, Close long sell, Close short buy | ||
fluctuation | string | Impact on the market |
Instruction
way 1~4: buyers are takers, way 5~8: sellers are takers.
Fluctuation is the impact on the market. Example: the latest price before this trade is 10, the price of this trade is 11, then the fluctuation is "1".
Example of returned data format
{
"code": 1000,
"trace":"886fb6ae-456b-4654-b4e0-d681ac05cea1",
"message": "OK",
"data": {
"trades": [
{
"order_id": 10116361,
"trade_id": 10116363,
"contract_id": 1,
"deal_price": "16",
"deal_vol": "10",
"make_fee": "0.04",
"take_fee": "0.12",
"created_at": null,
"way": 5,
"fluctuation": "0"
}
]
}
}