Export Positions Csv
Export the caller’s positions as a streamed CSV.
Companion to /v1/export/trades.csv: trades are the fills, this is the
resulting book. Keyset-paginated on id DESC and streamed in batches, so
peak memory is O(batch) rather than O(history).
Position has no created_at, so the cursor is the primary key alone —
always indexed and always well-defined, unlike a nullable timestamp. That
also means ordering is by insertion, not by trade time; updated_at and
closed_at are exported so a consumer can sort on whichever it means.
Authorizations
Issue from /v1/keys (or admin-issued for enterprise tier).
Headers
Query Parameters
Scope to one wallet the caller owns. Omitted = positions across every wallet the caller owns. Scoping to the MAIN wallet also includes legacy positions recorded before per-wallet attribution existed (wallet_id IS NULL), matching the profile view; every other wallet is matched strictly.
Filter to a position status, e.g. OPEN or CLOSED. Case-insensitive. Omitted = every status.
Filter to a single market condition_id.
Response
Streamed RFC-4180 CSV of the caller's positions (one row per position), newest first by id. Header row then data rows. UTC ISO-8601 timestamps; string-encoded numerics. No positions → header-only.