# Reconciliation

Connect user balances, ledger movements and daily snapshots.

This is the simulated Earn API. Position creation and withdrawal change sandbox records; they do not sign a wallet transaction.


[Authentication](/build/authentication/) · [Errors](/build/errors/) · [Amounts and units](/build/units/)


## Reconciliation ledger

`GET /reconciliation/ledger`


Append-only ledger of balance-affecting entries with running balance per position.


### Parameters

| Name | Location | Type | Required | Description |

| --- | --- | --- | --- | --- |

| `user_id` | query | `string` | No | Filter by user |

| `position_id` | query | `string` | No | Filter by position |

| `asset` | query | `"USDC"`, `"USDT"` | No | Filter by asset |

| `type` | query | `"deposit"`, `"withdraw"`, `"close"`, `"accrual"` | No | Filter by entry type |

| `limit` | query | `integer` | No | Page size (1-500, default 100) |

| `cursor` | query | `string` | No | Opaque cursor returned as meta.next_cursor |

### Response · 200

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | `"list"` | Yes |   |
| `data` | [LedgerEntry](/api/sandbox-models/#ledgerentry)[] | Yes |   |
| `meta` | [ListMeta](/api/sandbox-models/#listmeta) | Yes |   |


For failed requests, inspect `error.code`, `error.message` and the request ID. [Error handling](/build/errors/).


## Current balances

`GET /reconciliation/balances`


Current recorded balances grouped by user and asset (active positions).


### Parameters

| Name | Location | Type | Required | Description |

| --- | --- | --- | --- | --- |

| `user_id` | query | `string` | No | Filter by user |

| `asset` | query | `"USDC"`, `"USDT"` | No | Filter by asset |

### Response · 200

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | `"list"` | Yes |   |
| `data` | [Balance](/api/sandbox-models/#balance)[] | Yes |   |
| `meta` | [ListMeta](/api/sandbox-models/#listmeta) | Yes |   |


For failed requests, inspect `error.code`, `error.message` and the request ID. [Error handling](/build/errors/).


## Reconciliation report

`GET /reconciliation/report`


Recorded (ledger) vs on-chain (settled) totals. The difference is intraday unsettled yield; within tolerance the status is "reconciled".


### Parameters

| Name | Location | Type | Required | Description |

| --- | --- | --- | --- | --- |

| `scope` | query | `string` | No | all, a user id (usr_...) or a position id (pos_...) |

### Response · 200

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | `string` | Yes |   |
| `data` | [Reconciliation](/api/sandbox-models/#reconciliation) | Yes |   |
| `meta` | `object` | No |   |


For failed requests, inspect `error.code`, `error.message` and the request ID. [Error handling](/build/errors/).


## Balance snapshots

`GET /reconciliation/snapshots`


Daily balance snapshots over a range, for period accounting.


### Parameters

| Name | Location | Type | Required | Description |

| --- | --- | --- | --- | --- |

| `from` | query | `string` | No | Start date (YYYY-MM-DD) |

| `to` | query | `string` | No | End date (YYYY-MM-DD) |

| `asset` | query | `"USDC"`, `"USDT"` | No | Filter by asset |

### Response · 200

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | `"list"` | Yes |   |
| `data` | [BalanceSnapshot](/api/sandbox-models/#balancesnapshot)[] | Yes |   |
| `meta` | [ListMeta](/api/sandbox-models/#listmeta) | Yes |   |


For failed requests, inspect `error.code`, `error.message` and the request ID. [Error handling](/build/errors/).

