Get positions
get_positionsRetrieve open and historical positions for a venue (futures or prediction markets). Pass the asOf cursor to poll only changed positions.
Instructions
List open + historical positions for a venue. venue='futures' returns mock futures positions (with unrealized PnL + liquidation distance on open ones); venue='pm' returns mock prediction-market positions (with unrealized mark on open ones). Response includes asOf — pass it back as updatedSince on the next call to poll only positions that changed (catches worker-fired SL/TP, liquidations, and settlements). Paper trading only — virtual funds (50,000 mUSD). Not financial advice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| venue | Yes | Which venue's positions to list. | |
| updatedSince | No | ISO 8601 cursor: only positions whose row changed since this instant. Pass the previous response's asOf back here. | |
| agentTrace | No | Optional private trace metadata stored in the caller's ledger. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| httpStatus | Yes | HTTP status returned by CoinRithm, or 0 for network errors. | |
| ok | Yes | True when CoinRithm returned a successful 2xx response. | |
| ledgerEventId | No | Private AgentActionEvent id returned by /api/agent/*, when present. | |
| ledgerStatus | No | Ledger write status header returned by CoinRithm, when present. | |
| body | No | Parsed CoinRithm response body, or raw text when the response is not JSON. |