HTTP · Spot trading

Get Order History

Returns order history for the last 90 days.

GEThttps://api.koinsayang.com/api/v2/spot/trade/history-orders

Request parameters

NameTypeRequiredDescription
symbol
query
stringOptionalTrading pair, e.g. BTCUSDT
startTime
query
stringOptionalQuery start time (only data from the last 90 days can be returned. When accessing a managed sub-account, startTime cannot be earlier than the binding start time.)
endTime
query
stringOptionalQuery end time (the range between trigTime and endTime cannot exceed 90 days)
idLessThan
query
stringOptionalLast orderId of the previous page, for pagination
limit
query
stringOptionalNumber of records, default 100, max 100
orderId
query
stringOptionalOrder ID

Response fields

FieldTypeDescription
userIdstringAccount ID
symbolstringTrading pair
orderIdstringOrder ID
clientOidstringClient order ID
pricestringOrder price
sizestringOrder size (base coin when orderType = limit; quote coin when orderType = market)
orderTypestringOrder type (see enumeration values: Order type)
sidestringTrade side (see enumeration values: Trade side)
statusstringOrder status (see enumeration values: order status)
priceAvgstringFill price
baseVolumestringFilled quantity
quoteVolumestringTotal filled value
feeDetailstringFee details
cTimestringCreation time (Unix timestamp in milliseconds)
uTimestringUpdate time (Unix timestamp in milliseconds)

Response example

200 · application/json
{
"code": "00000",
"msg": "success",
"requestTime": 1764678133854,
"data": [
{
"userId": "1047900687810",
"symbol": "BTCUSDT",
"orderId": "1379717885420699648",
"clientOid": "osl-global-eth-usdtXMRX3ea35dac901112",
"price": "0",
"size": "10000.0000000000000000",
"orderType": "market",
"side": "buy",
"status": "filled",
"priceAvg": "115112.4727078081292952",
"baseVolume": "0.0868710000000000",
"quoteVolume": "9999.9356166000000000",
"feeDetail": "{\"BTC\":{\"deduction\":false,\"feeCoinCode\":\"BTC\",\"totalDeductionFee\":0,\"totalFee\":-0.000121619400,\"totalTaxFee\":-0.00018243}}",
"cTime": "1764676298480",
"uTime": "1764676298556"
}
]
}