Skip to main content

Trades

Note: Post Aug 1st, 2022, orderId has the format of uniform 17 digits whereas in the legacy system, orderId followed a natural growth pattern. TradeId starts at 60000000 and increments whereas in the legacy system, tradeId incremented with a smaller starting number.

Trade History

  • GET https://api.poloniex.com/trades

Get a list of all trades for an account. Interval between startTime and endTime cannot exceed 180 days. If only endTime is populated then startTime will default to 7 days before endTime. If only startTime is populated then endTime will be defaulted to 7 days after startTime. Rest of the trades will be archived before 180 days from current time.

Request ParameterData TypeRequiredDescription
limitIntegerfalseMax number of records that is returned. Default is 500. Max value is 1000.
endTimeLongfalse(milliseconds since UNIX epoch) trades filled after endTime will not be retrieved.
startTimeLongfalse(milliseconds since UNIX epoch) trades filled before startTime will not be retrieved.
fromLongfalseGlobally unique tradeid (use pageId value from response).
directionStringfalsePRE, NEXT The direction before or after ‘from'.
symbolsStringfalseone or multiple symbols separated by comma e.g. BTC_USDT,ETH_USDT
Response FieldData TypeDescription
idStringtrade id
symbolStringThe trading symbol, like BTC_USDT
accountTypeStringSPOT
orderIdStringthe associated order's id
sideStringorder's side: BUY, SELL
typeStringorder's type: LIMIT, MARKET, LIMIT_MAKER
matchRoleStringMAKER, TAKER
createTimeLongtrade create time
priceStringprice for the trade
quantityStringbase units for the trade
amountStringquote units for the trade
feeCurrencyStringfee currency name
feeAmountStringfee amount
pageIdStringA globally unique trade Id that can be used as query param in 'from' field
clientOrderIdStringOrder's clientOrderId
Example output:
[
{
"id": "62561238",
"symbol": "LINK_USDT",
"accountType": "SPOT",
"orderId": "32164923987566592",
"side": "SELL",
"type": "MARKET",
"matchRole": "TAKER",
"createTime": 1648635115525,
"price": "11",
"quantity": "0.5",
"amount": "5.5",
"feeCurrency": "USDT",
"feeAmount": "0.007975",
"pageId": "32164924331503616",
"clientOrderId": "myOwnId-321"
}
]

Trades by Order Id

  • GET https://api.poloniex.com/orders/{id}/trades

Get a list of all trades for an order specified by its orderId.

Request ParameterData TypeRequiredDescription
idStringtruethe associated order's id (order's clientOrderId is not supported)
Response FieldData TypeDescription
idStringtrade id
symbolStringThe trading symbol to trade,like 'BTC_USDT'…
accountTypeStringSPOT
orderIdStringthe associated order's id
sideStringorder's side: BUY、SELL
typeStringorder's type: LIMIT, MARKET,LIMIT_MAKER
matchRoleStringMAKER, TAKER
createTimeLongtrade create time
priceStringprice for the trade
quantityStringbase units for the trade
amountStringquote units for the trade
feeCurrencyStringfee currency name
feeAmountStringfee amount
pageIdStringA globally unique trade Id
clientOrderIdStringOrder's clientOrderId
Example output:
[
{
"id": "68561226",
"symbol": "LINK_USDT",
"accountType": "SPOT",
"orderId": "30249408733945856",
"side": "BUY",
"type": "LIMIT",
"matchRole": "MAKER",
"createTime": 1648200366864,
"price": "3.1",
"quantity": "1",
"amount": "3.1",
"feeCurrency": "LINK",
"feeAmount": "0.00145",
"pageId": "30341456333942784",
"clientOrderId": ""
}
]