Depa LogoDocsv1
API Reference

Ledger

The ledger is the book of record of an account. Every movement of funds posts an entry, and balances are derived from those entries.

  • GET /accounts/{account_id}/balance returns the current balance per currency. Add include[details]=true to split each balance into available and pending_settlement.
  • GET /accounts/{account_id}/ledgers lists the entries behind that balance. Each entry names the operation that caused it with entryable_type and entryable_id, so you can reconcile it against the payment, trade or transfer.
  • Download statements as PDF or CSV for any date range, for reconciliation, audits or your customers.
  • Move funds between two of your accounts with an internal transfer: no bank or blockchain rail is involved and both sides post an entry.

List ledger entries

GET/accounts/{account_id}/ledgers

Returns the ledger entries of an account, page by page. Each entry names the operation that created it with entryable_type and entryable_id, so you can reconcile it against the payment, trade or transfer.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

ID of the account.

Formatuuid

Query Parameters

page?integer

Page number, starting at 1.

Range1 <= value
Default1
per_page?integer

Number of results per page. Defaults to 80.

Range1 <= value

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/ledgers?page=1&per_page=80"
{  "data": [    {      "id": "c3e7a1f9-2b8d-4c6e-9f1a-5d0b7e3c8a12",      "entryable_type": "FiatPayment",      "amount": "1000.0",      "currency": "EUR",      "category": "FiatPayment",      "metadata": {        "description": "Monthly payment",        "category": "subscription"      },      "created_at": 1772813114,      "entryable_id": "7e2a9c4b-5d1f-4b8e-9a3c-6f0e2d8b1a74"    }  ],  "pagination": {    "current_page": 1,    "per_page": 80,    "total_pages": 1,    "total_count": 2  }}

Retrieve balances

GET/accounts/{account_id}/balance

Returns the account's balance in each currency it holds, as decimal strings keyed by currency code. Add include[details]=true to split each balance into available and pending_settlement.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

ID of the account.

Formatuuid

Query Parameters

filter[currency]?string

Return only this currency.

include[details]?boolean

Set to true to add the details breakdown.

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/balance?filter%5Bcurrency%5D=EUR&include%5Bdetails%5D=true"
{  "data": [    {      "USDT": "7.83897507",      "EUR": "12500.5",      "USDC": "3000.0",      "POL": "1.23650518",      "USD": "9.9656",      "ETH": "0.00643452",      "details": {        "EUR": {          "available": "12000.5",          "pending_settlement": "500.0"        },        "USD": {          "available": "9.9656",          "pending_settlement": "0.0"        }      }    }  ]}
POST/accounts/{account_id}/internal_settlement

Moves funds from this account to another account in your vault, without using a bank or blockchain rail. A debit and a credit are posted to the two ledgers and returned in from and to. Use metadata to label the transfer for your own reporting.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

ID of the account the funds leave.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/internal_settlement" \  -H "Content-Type: application/json" \  -d '{    "destination_account_id": "2b9e4f6a-1c3d-4a8b-b5e7-9f0c2d4e6a81",    "amount": "250.00",    "currency": "EUR",    "metadata": {      "description": "Monthly payment",      "category": "subscription"    }  }'
{  "data": {    "from": {      "account_id": "8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23",      "ledger_entry": {        "id": "c3e7a1f9-2b8d-4c6e-9f1a-5d0b7e3c8a12",        "category": "InternalPayment",        "amount": 250,        "currency": "EUR"      }    },    "to": {      "account_id": "2b9e4f6a-1c3d-4a8b-b5e7-9f0c2d4e6a81",      "ledger_entry": {        "id": "d4f8b2a0-3c9e-4d7f-a02b-6e1c8f4d9b23",        "category": "InternalPayment",        "amount": 250,        "currency": "EUR"      }    },    "created_at": 1772813114  }}

Download a PDF statement

GET/accounts/{account_id}/ledger_pdf_report

Builds a PDF statement of the account's ledger entries and returns it base64-encoded in data. Limit it to a period with start_date and end_date; leave both out to include every entry. Returns 400 with invalid_date if a date isn't valid.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

The unique identifier of the account

Formatuuid

Query Parameters

start_date?string

First day of the statement (YYYY-MM-DD).

Formatdate
end_date?string

Last day of the statement (YYYY-MM-DD).

Formatdate

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/ledger_pdf_report?start_date=2026-01-01&end_date=2026-03-31"
{  "data": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFI+Pg..."}

Download a CSV export

GET/accounts/{account_id}/ledger_csv_report

Returns the account's ledger entries as a CSV file, ready for a spreadsheet or your accounting system. Limit it to a period with start_date and end_date; leave both out to include every entry. Returns 400 with invalid_date if a date isn't valid.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

The unique identifier of the account

Formatuuid

Query Parameters

start_date?string

First day of the export (YYYY-MM-DD).

Formatdate
end_date?string

Last day of the export (YYYY-MM-DD).

Formatdate

Response Body

text/csv

application/json

application/json

application/json

curl -X GET "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/ledger_csv_report?start_date=2026-01-01&end_date=2026-03-31"
null
🍪 We do not track your behaviour or use any cookie on this site.