> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anthid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Query current and historical broker orders, positions, and order statistics.

## Availability

Ledger APIs are available on all plans.

Historical retention, query limits, and rate limits may vary by pricing tier.

## Intended Purpose

The Anthid Ledger provides a durable historical record of trading activity across connected broker accounts.

Rather than querying broker APIs directly for historical orders and positions, applications can use the Ledger APIs to access normalized, broker-agnostic records stored by Anthid.

The Ledger is designed for historical analysis, reporting, auditing, monitoring, and application state reconstruction.

Current account state is also available through dedicated latest-state endpoints and real-time streaming APIs.

## Access

Ledger endpoints read data for the authenticated user or API-key principal's organization. API-key callers need organization intent read permission; user callers need an organization admin, member, or read-only role.

When a request supplies an `account_id` or `trading_account_id`, the trading account must belong to the caller's organization.

## Endpoint Groups

| Group                | Endpoints                   |
| -------------------- | --------------------------- |
| Current positions    | `GET /v1/positions`         |
| Historical positions | `GET /v1/positions/history` |
| Current orders       | `GET /v1/orders`            |
| Historical orders    | `GET /v1/orders/history`    |
| Single order         | `GET /v1/orders/{order_id}` |
| Order stats          | `GET /v1/orders/stats`      |

Current and historical list endpoints support pagination with `next_cursor` and `limit`, plus sorting with `sort_by` and `sort_direction`.

## Filters

Order endpoints can filter by trading account, symbol, intent id, and external broker order id. Historical order endpoints also support `start` and `end` time ranges.

Position endpoints can filter by trading account and symbol. Historical position endpoints also support `start` and `end` time ranges.

Order stats require a trailing `days` value, capped at 90, and can optionally filter by `trading_account_id`.

## Common Use Cases

* Retrieve historical order activity.
* Retrieve historical position snapshots.
* Retrieve latest known orders and positions.
* Query aggregate order counts over a trailing day window.
* Build trading dashboards and reporting systems.
* Audit account activity across broker integrations.
* Reconstruct application state from historical records.
* Analyze execution activity over time.
* Export trading data for compliance or operational review.
* Power internal analytics and monitoring workflows.

## Data Model

The Ledger stores broker activity as normalized platform records.

Records are organized around:

* Orders
* Positions

Data is indexed and queryable by organization, trading account, symbol, time range, intent id, and external broker order id where supported.

Historical records are immutable and intended to represent the broker activity observed by Anthid at the time it occurred.

## Historical vs Latest Data

Anthid provides two categories of data access:

### Historical

Historical endpoints return records across a specified time range and are intended for reporting, auditing, analytics, and data export workflows.

### Latest

Latest endpoints return the most recent known state for orders and positions and are intended for dashboards, account views, and operational workflows.

Applications should generally use latest endpoints for current state and historical endpoints for analysis and reporting.

## Related Resources

* Orders
* Positions
* Streaming API
* Trading Accounts
* Brokers

## Support

For questions about authentication, request formats, or API behavior, contact [support@anthid.com](mailto:support@anthid.com).
