binance_get_algo_sub_orders
Retrieve each slice order of a TWAP algorithm, including filled quantity, average price, and fees, to audit what the strategy actually executed.
Instructions
List the individual orders a TWAP placed on the book, with fills and fees.
Calls GET /sapi/v1/algo/spot/subOrders (SIGNED, IP weight 1). A TWAP is executed as
a stream of ordinary orders; this is the only place to see them — what each slice
filled, at what average price, and what it cost in fees.
When to Use:
Answering "what did this TWAP actually get me?" — the executedQty / executedAmt / fee totals for one algoId.
Auditing a cancelled TWAP: what traded before the cancel landed.
When NOT to Use:
To find the algoId in the first place — that comes from
binance_get_open_algo_ordersorbinance_get_algo_order_history.For a symbol-wide trade list —
binance_get_my_trades(trade_history.py) covers every fill, algo or not.
Returns:
The order-level totals (total, executedQty, executedAmt) followed by a table of
sub-orders: bookTime, subId, orderId, symbol, side, orderStatus, executedQty,
executedAmt, avgPrice and the fee with its asset.
Pagination:
page (1-based) and page_size (1-100, default 100) map to Binance's page /
pageSize. Only 50 rows are rendered, so a full 100-row page hides rows 51-100:
lower page_size to 50, or use response_format="json", for the rest.
Examples: params = {"algo_id": 14511} params = {"algo_id": 14511, "page": 2, "page_size": 50}
Error Handling:
An unknown algoId comes back as a Binance rejection, not an empty page. An empty
subOrders array means the TWAP has not traded yet. -2015 means the key lacks Reading
permission or this IP is not allowlisted. /sapi does not exist on the spot testnet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |