List trade history
spotgrid.list_historyLists completed fills for one runtime, newest first, with the profit realised on each. Paginated: has_more says whether rows remain behind this page and next_cursor is present whenever they do — pass it back to continue, and keep going until has_more is false, because one page is not the whole history. realized_pnl is the gross figure the ledger booked for that fill, from the price achieved minus buy_price, the basis actually paid. fee_usdt is the fee recorded for that one fill and realized_pnl_net is the gross less that fee; the paired fill's fee is on its own row. fees_estimated is true when the fee was modelled rather than charged by an exchange, which is always the case in PAPER mode, where mode says so. page_totals sums this page and only this page. On a SELL, expected_pnl is what the rung was designed to make — the grid spacing at that fill times the quantity — so the gap between it and realized_pnl is slippage, a partial fill or a rung that moved; in PAPER the two coincide by construction.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum trades to return (default 50). | |
| cursor | No | The next_cursor from a previous call. Continues that listing where it stopped. | |
| runtime_id | Yes | A Multi Grid runtime id from spotgrid.list_runtimes. The primary grid is the one listed with primary: true. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| count | Yes | ||
| trades | Yes | ||
| network | No | ||
| has_more | No | ||
| runtime_id | Yes | ||
| next_cursor | No | ||
| page_totals | No |