Query Trades Info
POST/private/QueryTrades
Retrieve information about specific trades/fills.
API Key Permissions Required: Orders and trades - Query closed orders & trades
Request
- application/json
Body
required
Nonce used in construction of API-Sign
header
Comma delimited list of transaction IDs to query info about (20 maximum)
Whether or not to include trades related to position in output
Responses
- 200
Trades info retrieved.
- application/json
- Schema
- Example (from schema)
Schema
closing
— Trade closes all or part of a position
result object
Trade info
property name* Trade
Trade Info
Order responsible for execution of trade
Position responsible for execution of trade
Asset pair
Unix timestamp of trade
Type of order (buy/sell)
Order type
Average price order was executed at (quote currency)
Total cost of order (quote currency)
Total fee (quote currency)
Volume (base currency)
Initial margin (quote currency)
Amount of leverage used in trade
Comma delimited list of miscellaneous info:
List of ledger ids for entries associated with trade
Unique identifier of trade executed
true
if trade was executed with user as the maker, false
if taker
Position status (open/closed)
Only present if trade opened a position
Average price of closed portion of position (quote currency)
Only present if trade opened a position
Total cost of closed portion of position (quote currency)
Only present if trade opened a position
Total fee of closed portion of position (quote currency)
Only present if trade opened a position
Total fee of closed portion of position (quote currency)
Only present if trade opened a position
Total margin freed in closed portion of position (quote currency)
Only present if trade opened a position
Net profit/loss of closed portion of position (quote currency, quote currency scale)
Only present if trade opened a position
List of closing trades for position (if available)
Only present if trade opened a position
{
"error": [],
"result": {
"THVRQM-33VKH-UCI7BS": {
"ordertxid": "OQCLML-BW3P3-BUCMWZ",
"postxid": "TKH2SE-M7IF5-CFI7LT",
"pair": "XXBTZUSD",
"time": 1688667796.8802,
"type": "buy",
"ordertype": "limit",
"price": "30010.00000",
"cost": "600.20000",
"fee": "0.00000",
"vol": "0.02000000",
"margin": "0.00000",
"misc": "",
"trade_id": 93748276,
"maker": true
},
"TTEUX3-HDAAA-RC2RUO": {
"ordertxid": "OH76VO-UKWAD-PSBDX6",
"postxid": "TKH2SE-M7IF5-CFI7LT",
"pair": "XXBTZEUR",
"time": 1688082549.3138,
"type": "buy",
"ordertype": "limit",
"price": "27732.00000",
"cost": "0.20020",
"fee": "0.00000",
"vol": "0.00020000",
"margin": "0.00000",
"misc": "",
"trade_id": 74625834,
"maker": true
}
}
}