---
title: "Export private action ledger rows for reproducible runs"
method: GET
path: "/api/agent/ledger/export"
tags: ["ledger"]
---

# Export private action ledger rows for reproducible runs

`GET /api/agent/ledger/export`

## Request

- Base URL: `https://api.coinrithm.com`
- URL: `https://api.coinrithm.com/api/agent/ledger/export`
- Auth: HTTP bearer

JSON export of up to 1,000 private ledger rows for the calling API key.
Use `runId` / `decisionId` filters to export one reproducible agent run.
Requires scope `read`.

## Query parameters

- `venue` string
- `eventType` string
- `runId` string
- `decisionId` string
- `status` string
- `from` string, date-time
- `to` string, date-time

## Response `200`

JSON export

- AgentLedgerExport
  - `apiKeyId` integer
  - `exportedAt` string, date-time
  - `count` integer
  - `maxRows` integer
  - `run` AgentRunEvidenceManifest: Private reproducibility bundle metadata for one agentTrace.runId.
    - `schema` string
    - `generatedAt` string, date-time
    - `source` string
    - `definition` string
    - `snapshotModel` string
    - `retentionPolicy` AgentLedgerRetentionPolicy: Bounded retention/cap policy for private agent ledger evidence.
      - `schema` string
      - `retentionDays` integer: Rolling private ledger retention window.
      - `runListScanLimit` integer: Max recent ledger rows scanned to build the settings run list.
      - `exportMaxRows` integer: Max rows included in one ledger/run export.
      - `pruneBatchMax` integer: Max rows deleted by one retention prune run.
      - `policy` string
    - `executionAssumptions` AgentExecutionAssumptions: Versioned paper-execution assumptions attached to private run exports. This is methodology metadata, not a fee/slippage charge schedule.
      - `schema` string
      - `accountModel` string
      - `dataFreshness` string
      - `costModel` object
        - `spot` string
        - `futures` string
        - `predictionMarkets` string
      - `executionTiming` object
        - `spotMarket` string
        - `spotResting` string
        - `futures` string
        - `predictionMarkets` string
      - `reproducibilityCaveat` string
    - `outcomeSummary` AgentRunOutcomeSummary: Best-effort run-level outcome/PnL attribution derived at export time from ledger relatedEntityType/relatedEntityId links. Spot orders may also match through their idempotency keys once a terminal ClosedOrder exists. No new data is stored for this summary.
      - `schema` string
      - `mode` string
      - `coverage` 'none' | 'partial' | 'complete'
      - `relatedEntityCount` integer
      - `matchedOutcomeCount` integer
      - `unmatchedRelatedEntityCount` integer
      - `realizedPnlMusd` number
      - `byVenue` object
        - `spot` object
          - `realizedPnlMusd` number
          - `matchedOutcomeCount` integer
        - `futures` object
          - `realizedPnlMusd` number
          - `matchedOutcomeCount` integer
        - `pm` object
          - `realizedPnlMusd` number
          - `matchedOutcomeCount` integer
      - `caveat` string
    - `evidenceChecklist` AgentRunEvidenceChecklist: Derived private reproducibility checklist for a run export. Computed from ledger rows at read/export time; no additional run table or raw market archive is created.
      - `schema` string
      - `overallStatus` 'pass' | 'warn' | 'fail'
      - `items` object[]
        - `id` string
        - `label` string
        - `status` 'pass' | 'warn' | 'fail'
        - `detail` string
    - `summary` object
      - `apiKeyId` integer
      - `runId` string
      - `eventCount` integer
      - `firstEventAt` string, date-time, nullable
      - `lastEventAt` string, date-time, nullable
      - `quoteCount` integer
      - `writeCount` integer
      - `rejectionCount` integer
      - `idempotentReplayCount` integer
      - `observationCount` integer
      - `observationCoverageRate` number, nullable
      - `quoteBeforeTradeRate` number, nullable
      - `averageLatencyMs` number, nullable
      - `eventTypes` AgentRunCount[]
        - `value` string
        - `count` integer
      - `venues` AgentRunCount[]
        - `value` string
        - `count` integer
      - `ledgerStatuses` AgentRunCount[]
        - `value` string
        - `count` integer
      - `relatedEntities` object[]
        - `type` string
        - `id` string
      - `maxRows` integer, nullable
      - `truncated` boolean
  - `data` AgentActionEvent[]
    - `id` integer
    - `method` string
    - `endpoint` string
    - `venue` string, nullable
    - `eventType` string
    - `statusCode` integer, nullable
    - `ledgerStatus` string
    - `latencyMs` integer, nullable
    - `idempotencyKey` string, nullable
    - `relatedEntityType` string, nullable
    - `relatedEntityId` string, nullable
    - `requestSummary` object, nullable
    - `responseSummary` union
      - object
      - unknown[]
        - unknown
      - string
      - number
      - boolean
    - `blockReasons` string[]
    - `runId` string, nullable
    - `decisionId` string, nullable
    - `strategyLabel` string, nullable
    - `confidence` number, nullable
    - `rationaleSummary` string, nullable: Private caller-supplied summary; never exposed publicly.
    - `startedAt` string, date-time
    - `completedAt` string, date-time, nullable
  - `futures` AuditFuturesPosition[]: Not emitted by this endpoint (the futures audit export is a separate signed-in surface); always absent.
    - `id` integer
    - `coinSymbol` string
    - `side` 'long' | 'short'
    - `leverage` number
    - `entryPrice` number
    - `marginMusd` number
    - `notionalMusd` number
    - `sizeCoin` number
    - `maintenanceMarginRate` number
    - `liquidationPrice` number
    - `stopLossPrice` number, nullable
    - `takeProfitPrice` number, nullable
    - `entryPriceAsOf` string, date-time, nullable
    - `entryFreshnessAgeSeconds` number, nullable
    - `entryFreshnessStatus` string, nullable
    - `status` 'open' | 'closed' | 'liquidated'
    - `exitPrice` number, nullable
    - `exitReason` string, nullable
    - `realizedPnlMusd` number, nullable
    - `fillModel` string, nullable
    - `idempotencyKey` string, nullable
    - `openedAt` string, date-time, nullable
    - `closedAt` string, date-time, nullable
    - `createdAt` string, date-time
  - `futuresEvents` AuditFuturesEvent[]: Not emitted by this endpoint; always absent.
    - `id` integer
    - `positionId` integer
    - `type` string
    - `sizeDeltaCoin` number
    - `markPrice` number
    - `fillPrice` number, nullable: Executed fill price; markPrice remains the reference mark and slippage is already embedded here.
    - `realizedPnlMusd` number: Realized PnL of this exit, net of its close fee and, since 2026-10-14, of the share of open/add fees charged at this exit (entryFeeAllocatedMusd). History was corrected once.
    - `marginDeltaMusd` number
    - `feeMusd` number
    - `slippageMusd` number
    - `entryFeeAllocatedMusd` number: Open/add fee charged to realizedPnlMusd at this exit (pro rata on a reduce, the remainder on a close or liquidation). Already included in realizedPnlMusd; the wallet paid it at open, so do not subtract it again. 0 on open/add events.
    - `executionVersion` string, nullable
    - `idempotencyKey` string, nullable
    - `createdAt` string, date-time

## Other responses

- `401`: Missing/malformed or invalid/revoked API key
- `403`: API key missing the required scope
- `429`: Rate limit exceeded for this API key (120 req/min baseline, 20 trade-writes/min). Honor `Retry-After`, then resume; the `RateLimit-*` headers on every response let you pace proactively. (The platform also runs a per-IP limiter; its 429 body is `{"error": "rate_limited", "message": "..."}`.)

---

[API](https://skmtc.dev/coinrithm/apis/coinrithm-agent-trading-api.md) · [All operations](https://skmtc.dev/coinrithm/apis/coinrithm-agent-trading-api/llms.txt) · [OpenAPI document](https://skmtc.dev/coinrithm/apis/coinrithm-agent-trading-api/revisions/28fb59f285fe?raw)
