Skip to main content

Get Historical Trades

Get historical market trades for a trading pair with advanced filtering options.

HTTP Request

GET /api/v1/spot/market/fills-history

Request Parameters

ParameterTypeRequiredDescription
symbolstringYesTrading pair symbol (e.g., BTCUSDT)
limitstringNoNumber of trades to return (default varies)
fromIdstringNoTrade ID to fetch from (for pagination)
startTimestringNoStart time in milliseconds
endTimestringNoEnd time in milliseconds

Request Example

Basic Request

curl -X GET "https://open-api.bydoxe.com/api/v1/spot/market/fills-history?symbol=BTCUSDT&limit=100"

Request with Time Range

curl -X GET "https://open-api.bydoxe.com/api/v1/spot/market/fills-history?symbol=BTCUSDT&startTime=1763400000000&endTime=1763459280833&limit=500"

Request with Pagination

curl -X GET "https://open-api.bydoxe.com/api/v1/spot/market/fills-history?symbol=BTCUSDT&fromId=123456&limit=100"

Response Parameters

ParameterTypeDescription
codestringResponse code
msgstringResponse message
requestTimenumberRequest timestamp in milliseconds
dataarrayArray of trade data
> symbolstringTrading pair symbol
> tradeIdstringUnique trade ID
> sidestringTrade side (BUY or SELL)
> pricestringTrade execution price
> sizestringTrade quantity
> tsstringTrade timestamp in milliseconds

Response Example

Success Response

{
"code": "00000",
"msg": "success",
"requestTime": 1732000000000,
"data": [
{
"symbol": "BTCUSDT",
"tradeId": "123456",
"side": "BUY",
"price": "91234.56",
"size": "0.001",
"ts": "1763459280833"
},
{
"symbol": "BTCUSDT",
"tradeId": "123457",
"side": "SELL",
"price": "91230.00",
"size": "0.002",
"ts": "1763459280500"
},
{
"symbol": "BTCUSDT",
"tradeId": "123458",
"side": "BUY",
"price": "91240.00",
"size": "0.0015",
"ts": "1763459280200"
}
]
}

Error Codes

CodeMessage
400172Parameter verification failed
50010Trade data not available