Find orders#
GET https://api.pro.anboto.xyz/api/v2/trading/order/find
Only matched order within 3 days will be return ApiKeyAuth required.
Query params#
startMs integerThe start time for the query as ms since epoch
endMs integerThe end time for the query as ms since epoch
limit integerThe maximum number of orders to return in the results
include_trades booleanWhether to include the fills (trades) of the matching orders
include_fees booleanWhether to include aggregated fees per currency for the matching orders
Headers#
| Header | ||
|---|---|---|
X-API-KEY |
string | required |
X-TIMESTAMP |
int64 ms | required |
X-SIGN |
string | required |
X-RECV-WINDOW |
int, default 5000 |
Responses#
| 200 | The list of matching orders. |
| 401 | Unauthorized: missing or unknown API key |
| 429 | Rate limit exceeded, retry later |
Response fields — OrderDetailsList#
The list of order details for separate orders.
orders[].order_id integerThe Anboto generated order id
orders[].client_order_id stringThe client provided order id
orders[].symbol stringThe order symbol in Anboto's symbology
orders[].status enumThe order status —
PENDING_NEW, ACCEPTED, REJECTED, PARTIALLY_FILLED, FILLED, PENDING_CANCEL, CANCELLED, PENDING_PAUSE, … (12 values)orders[].asset_class enumThe Asset category of the order. —
SPOT, FUTUREorders[].exchange enumThe exchanges available for order placement via the API —
BINANCE, HUOBI, GATEIO, KRAKEN, KUCOIN, OKX, BYBIT, BITGET, … (17 values)orders[].strategy enumThe execution strategy for the order. —
TWAP, VWAP, ICEBERG, POV, MARKET, LIMIT, IS, SCALEorders[].start_time numberThe time when the order start trading from epoch time in ms
orders[].end_time numberThe scheduled end of the execution from epoch time in ms while the order is working (e.g. start_time + duration for a TWAP); the time the order reached its terminal state once finished
orders[].quantity numberThe total quantity of the parent order in base asset, as placed. Absent for value-target (notional) orders, see target_value
orders[].filled_quantity number requiredThe absolute amount of the order quantity filled
orders[].leaves_quantity number requiredThe absolute amount of the parent order quantity remaining to be filled (quantity - filled_quantity, 0 once the order is terminal). This is the parent order's remainder, never the leaves of the child order currently working it
orders[].progress numberExecution progress of the parent order between 0 and 1: filled_quantity / quantity, or filled notional / target_value for value-target orders. Same computation as the WebSocket order topic orderProgress; 1 once FILLED. Absent when the parent order is not known
orders[].side enumThe side of the book to trade. —
BUY, SELLorders[].last_quantity number requiredThe last qty received in a fill from the exchange
orders[].last_price number requiredThe last price executed on the exchange
orders[].average_price number requiredThe average execution price of the order
orders[].limit_price numberThe limit price of the parent order, if one was set
orders[].clip_size_type enumThe clip size for the child orders. The default is AUTOMATIC —
ABSOLUTE, PERCENTAGE, AUTOMATIC, ORDER_COUNTorders[].clip_size_val numberThe clip size value of the parent order, as placed
orders[].target_value numberThe target notional of a value-target order (e.g. a multi-leg order leg); quantity is absent for such orders
orders[].params OrderParamsThe advanced order parameters to modify the execution behavior.
orders[].trades array[TradeDetails]The list of trades associated with this order when include_trades=true
orders[].trades[].trade_id stringThe trade id assigned by the exchange, or the Anboto platform trade id when no exchange trade id was captured
orders[].trades[].symbol string requiredThe symbol of the fill in Anboto's symbology
orders[].trades[].exchange_order_id stringThe exchange order id of the child order the fill belongs to
orders[].trades[].client_order_id stringThe client order id of the child order the fill belongs to
orders[].trades[].quantity number requiredThe absolute amount filled by this trade, in base asset
orders[].trades[].price number requiredThe traded price
orders[].trades[].direction enumThe direction of the trade —
BUY, SELLorders[].trades[].maker_or_taker enumWhether the fill was made as maker or taker —
MAKER, TAKERorders[].trades[].exec_time integerThe execution time of the trade as ms since epoch
orders[].trades[].fee numberThe fee charged on the trade, in fee_currency
orders[].trades[].fee_currency stringThe asset the fee was charged in
orders[].trades[].parent_order_id integerThe Anboto id of the parent order the fill belongs to (the order_id of the enclosing order)
orders[].trades[].child_order_id integerThe Anboto id of the child (slice) order that executed on the exchange; the WebSocket trade topic carries it as order_id
orders[].fees_infos objectAggregated fees per currency when include_fees=true
curl -X GET "$BASE/api/v2/trading/order/find?startMs=0" \
-H "X-API-KEY: $API_KEY" -H "X-TIMESTAMP: $ts" \
-H "X-SIGN: $sign"
params = {"startMs": ..., "endMs": ..., "limit": ..., "include_trades": ..., "include_fees": ...}
r = requests.get(f"{BASE}/api/v2/trading/order/find",
params=params
headers=signed_headers_query(params))
print(r.json())
let resp = client
.get(format!("{BASE}/api/v2/trading/order/find?startMs=0"))
.headers(signed_headers_query(¶ms))
.send()?;
println!("{}", resp.text()?);
req, _ := http.NewRequest("GET", BASE+"/api/v2/trading/order/find?startMs=0", nil)
for k, v := range signedHeadersQuery(req.URL.Query()) {
req.Header.Set(k, v)
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
io.Copy(os.Stdout, resp.Body)
HttpResponse<String> resp = client.send(
signedGet("/api/v2/trading/order/find?startMs=0"),
HttpResponse.BodyHandlers.ofString());
const res = await fetch(`${BASE}/api/v2/trading/order/find?startMs=0`, {
method: "GET",
headers: signedHeadersQuery(params),
});
const data: OrderDetailsList = await res.json();
val request = signedGet("/api/v2/trading/order/find?startMs=0")
val response = client.send(request, HttpResponse.BodyHandlers.ofString())
println(response.body())
cpr::Response r = cpr::Get(
cpr::Url{BASE + "/api/v2/trading/order/find?startMs=0"},
signedHeadersQuery(params));
std::cout << r.text << std::endl;
const res = await fetch(`${BASE}/api/v2/trading/order/find?startMs=0`, {
method: "GET",
headers: signedHeadersQuery(params),
});
console.log(await res.json());
Response 200
{
"orders": [
{
"order_id": 123456,
"client_order_id": "xxx-yyy-zzz",
"symbol": "string",
"status": "PENDING_NEW",
"asset_class": "SPOT",
"exchange": "BINANCE",
"strategy": "TWAP",
"start_time": 0.0,
"end_time": 0.0,
"quantity": 6,
"filled_quantity": 0,
"leaves_quantity": 0,
"progress": 0.1783,
"side": "BUY",
"last_quantity": 0,
"last_price": 0,
"average_price": 0,
"limit_price": 0.0,
"clip_size_type": "ABSOLUTE",
"clip_size_val": 0.0,
"target_value": 0.0,
"params": {
"duration_seconds": "120",
"trading_style": "PASSIVE",
"urgency": "LOW",
"pov_ratio": 5,
"pov_risk": "LOW",
"randomize_amount": true,
"would": {},
"trigger": {},
"placement_infos": {},
"reduce_only": true,
"start_ladder_price": "string",
"end_ladder_price": "string",
"ladder_direction": "string",
"ladder_profile": "string",
"size_skew": 0.0,
"ob_imbalance_cancel": true,
"ob_imbalance_threshold": "0.75",
"price_lock_bps": "5",
"limit_is_arrival": true,
"limit_bps": "-10",
"timer_iceberg_delay": 0.5,
"timer_iceberg_delay_min": 0,
"timer_iceberg_delay_max": 10,
"randomize_iceberg_timer": true,
"extend_duration": true
},
"trades": [
{}
],
"fees_infos": {}
}
]
}