Get Trades
Get user trades
(Authentication type: KEYED, See Interface Permission)
Request Format
GET https://api-cloud.bitmart.com/contract/v1/ifcontract/userTrades
Request Limit
Request Parameter
Field | Type | Required? | Description |
---|---|---|---|
contractID | long | Yes | Contract ID |
offset | int | No | Offset |
size | int | No | The number of requests, if size is not transmitted or size is 0, the system returns a maximum of 60 records |
Request example
curl https://api-cloud.bitmart.com/contract/v1/ifcontract/userTrades?contractID=1&offset=0&size=100
Response Data
Field | Type | Description |
---|---|---|
order_id | int | taker order id |
trade_id | string | trade id |
contract_id | string | Contract ID |
deal_price | string | Price |
deal_vol | string | Volume |
make_fee | string | Maker fee |
take_fee | string | Taker fee |
created_at | string | Create time |
way | int | Order side 1: Open long (buy), 2: Close short (buy), 3: Close long (sell), 4: Open short (sell) |
fluctuation | string | Impact on the market |
Instruction
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"
}
]
}
}