For the complete documentation index, see llms.txt. This page is also available as Markdown.

Ledger

Typed ledger endpoints: transfers, borrows, repays, cumulative cashflows

List credit facility borrow events

get

Get on-chain borrow events for an organization. Each row represents a single Borrow event emitted by a SecuredLine credit facility — the moment outstanding principal was drawn against the line.

Results are sorted by occurredAt (descending — newest first). Ordering is not configurable from the query string.

Supports three response formats via the format query parameter:

  • json (default) — paginated JSON (default limit 100, max 1000).

  • csv — streamed CSV file download (up to 1,000,000 rows). Columns: inflow, transaction, type, timestamp, amount, usdValue, tokenAddress, tokenIcon, tokenSymbol.

  • event-stream — Server-Sent Events stream (up to 1,000,000 rows). Each entry is emitted as a named entry event with JSON data. A final done event carries {"total": N}. Connect with EventSource or fetch:

const es = new EventSource('/v3/ledger/borrows?organizationId={id}&format=event-stream', {
  headers: { 'x-api-key': 'cc_...' },
});
es.addEventListener('entry', (e) => console.log(JSON.parse(e.data)));
es.addEventListener('done', (e) => { console.log('total:', JSON.parse(e.data).total); es.close(); });

Requires org membership or vault curator role (public orgs only).

Authorizations
x-api-keystringRequired

API key in the format: cc_xxx_yyy (for customer API routes)

Query parameters
organizationIdstring · uuid · max: 36Required

Organization ID (must be an org the caller is a member of, or a public org if caller is a vault curator).

Example: 550e8400-e29b-41d4-a716-446655440000
startDatestring · dateOptional

Optional filter. Inclusive start date (YYYY-MM-DD); restricts results to occurredAt >= startDate (or snapshotDate for collateral-snapshots). Omit to leave the start unbounded.

Example: 2025-01-15
endDatestring · dateOptional

Optional filter. Inclusive end date (YYYY-MM-DD). Omit to leave the end unbounded.

Example: 2025-01-31
limitinteger · min: 1Optional

Maximum records returned. Format-dependent: format=json capped at 1000 (default 100); format=csv|event-stream capped at 1,000,000 (default 1,000,000). Values outside these caps are silently clamped server-side.

offsetintegerOptional

Number of records to skip from the start (JSON pagination only — ignored for csv/event-stream).

Default: 0
formatstring · enumOptional

Response format. json returns paginated JSON. csv streams a CSV file download. event-stream returns Server-Sent Events: each row is a named entry event; a final done event carries {"total": N}.

Default: jsonPossible values:
networkIdstring · max: 50Optional

Optional filter. CAIP-2 network identifier; restricts results to a single chain. Omit to return all networks.

Example: eip155:1
facilityAddressstring · max: 42Optional

Optional filter. Credit facility (SecuredLine) contract address; restricts results to a single facility. Omit to return all facilities for the organization.

Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045Pattern: ^0x[0-9a-fA-F]{40}$
Responses
200

Credit facility borrow events.

get/v3/ledger/borrows

List credit facility repayment events

get

Get on-chain repayment events for an organization. Each row represents a RepayPrincipal or RepayInterest event emitted by a SecuredLine credit facility. Filter by repaymentType to restrict to one subtype.

Results are sorted by occurredAt (descending — newest first). Ordering is not configurable from the query string.

Supports three response formats via the format query parameter:

  • json (default) — paginated JSON (default limit 100, max 1000).

  • csv — streamed CSV file download (up to 1,000,000 rows). Columns: inflow, transaction, type, timestamp, amount, usdValue, tokenAddress, tokenIcon, tokenSymbol.

  • event-stream — Server-Sent Events stream (up to 1,000,000 rows). Each entry is emitted as a named entry event with JSON data. A final done event carries {"total": N}. Connect with EventSource or fetch:

const es = new EventSource('/v3/ledger/repays?organizationId={id}&format=event-stream', {
  headers: { 'x-api-key': 'cc_...' },
});
es.addEventListener('entry', (e) => console.log(JSON.parse(e.data)));
es.addEventListener('done', (e) => { console.log('total:', JSON.parse(e.data).total); es.close(); });

Requires org membership or vault curator role (public orgs only).

Authorizations
x-api-keystringRequired

API key in the format: cc_xxx_yyy (for customer API routes)

Query parameters
organizationIdstring · uuid · max: 36Required

Organization ID (must be an org the caller is a member of, or a public org if caller is a vault curator).

Example: 550e8400-e29b-41d4-a716-446655440000
startDatestring · dateOptional

Optional filter. Inclusive start date (YYYY-MM-DD); restricts results to occurredAt >= startDate (or snapshotDate for collateral-snapshots). Omit to leave the start unbounded.

Example: 2025-01-15
endDatestring · dateOptional

Optional filter. Inclusive end date (YYYY-MM-DD). Omit to leave the end unbounded.

Example: 2025-01-31
limitinteger · min: 1Optional

Maximum records returned. Format-dependent: format=json capped at 1000 (default 100); format=csv|event-stream capped at 1,000,000 (default 1,000,000). Values outside these caps are silently clamped server-side.

offsetintegerOptional

Number of records to skip from the start (JSON pagination only — ignored for csv/event-stream).

Default: 0
formatstring · enumOptional

Response format. json returns paginated JSON. csv streams a CSV file download. event-stream returns Server-Sent Events: each row is a named entry event; a final done event carries {"total": N}.

Default: jsonPossible values:
repaymentTypestring · enumOptional

Optional filter. Restricts results to a single repayment subtype: principal (reduces outstanding principal) or interest (paid to depositors). Omit to return both.

Possible values:
networkIdstring · max: 50Optional

Optional filter. CAIP-2 network identifier; restricts results to a single chain. Omit to return all networks.

Example: eip155:1
facilityAddressstring · max: 42Optional

Optional filter. Credit facility (SecuredLine) contract address; restricts results to a single facility. Omit to return all facilities for the organization.

Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045Pattern: ^0x[0-9a-fA-F]{40}$
Responses
200

Credit facility repayment events.

get/v3/ledger/repays

List individual cashflow transfer events

get

Get individual cashflow transfer events for an organization. Each row is a single movement of value (on-chain Transfer, off-chain wire/ACH, swap leg, etc.) classified by stage (externalin_transitsecuredsettled) and direction (inflow / outflow). Set excludeLinkedTransfers=true to drop transfers whose tx hash matches a known borrow/repay and avoid double-counting against /v3/ledger/borrows and /v3/ledger/repays.

Results are sorted by occurredAt (descending — newest first). Ordering is not configurable from the query string.

Supports three response formats via the format query parameter:

  • json (default) — paginated JSON (default limit 100, max 1000).

  • csv — streamed CSV file download (up to 1,000,000 rows). Columns: inflow, transaction, type, timestamp, amount, usdValue, tokenAddress, tokenIcon, tokenSymbol.

  • event-stream — Server-Sent Events stream (up to 1,000,000 rows). Each entry is emitted as a named entry event with JSON data. A final done event carries {"total": N}. Connect with EventSource or fetch:

const es = new EventSource('/v3/ledger/transfers?organizationId={id}&format=event-stream', {
  headers: { 'x-api-key': 'cc_...' },
});
es.addEventListener('entry', (e) => console.log(JSON.parse(e.data)));
es.addEventListener('done', (e) => { console.log('total:', JSON.parse(e.data).total); es.close(); });

Requires org membership or vault curator role (public orgs only).

Authorizations
x-api-keystringRequired

API key in the format: cc_xxx_yyy (for customer API routes)

Query parameters
organizationIdstring · uuid · max: 36Required

Organization ID (must be an org the caller is a member of, or a public org if caller is a vault curator).

Example: 550e8400-e29b-41d4-a716-446655440000
startDatestring · dateOptional

Optional filter. Inclusive start date (YYYY-MM-DD); restricts results to occurredAt >= startDate (or snapshotDate for collateral-snapshots). Omit to leave the start unbounded.

Example: 2025-01-15
endDatestring · dateOptional

Optional filter. Inclusive end date (YYYY-MM-DD). Omit to leave the end unbounded.

Example: 2025-01-31
limitinteger · min: 1Optional

Maximum records returned. Format-dependent: format=json capped at 1000 (default 100); format=csv|event-stream capped at 1,000,000 (default 1,000,000). Values outside these caps are silently clamped server-side.

offsetintegerOptional

Number of records to skip from the start (JSON pagination only — ignored for csv/event-stream).

Default: 0
formatstring · enumOptional

Response format. json returns paginated JSON. csv streams a CSV file download. event-stream returns Server-Sent Events: each row is a named entry event; a final done event carries {"total": N}.

Default: jsonPossible values:
networkIdstring · max: 50Optional

Optional filter. CAIP-2 network identifier; restricts results to a single chain. Omit to return all networks.

Example: eip155:1
accountIdstring · max: 255Optional

Optional filter. Wallet address (on-chain) or bank account identifier (off-chain); restricts results to a single account. Omit to return all accounts.

stagestring · enumOptional

Optional filter. Cash-flow stage (externalin_transitsecuredsettled); restricts results to a single stage. Omit to return all stages.

Possible values:
typestring · max: 20Optional

Optional filter. Transfer mechanism; restricts results to a single mechanism (common values: swap, bridge, onramp, wire, ach, direct). Omit to return all mechanisms.

inflowbooleanOptional

Optional filter. true = arriving only, false = leaving only. Omit to return both directions.

excludeLinkedTransfersbooleanOptional

Optional. When true, excludes transfers whose tx hash matches a known borrow/repay event, to avoid double-counting with /v3/ledger/borrows and /v3/ledger/repays. Defaults to false.

Default: false
Responses
200

Individual cashflow transfer events.

get/v3/ledger/transfers

List aggregate daily cashflow snapshots

get

Get daily aggregate cashflow snapshots reported by an institution (e.g. self_report, visa) on behalf of an organization. Unlike /v3/ledger/transfers, each row is a period summary — typically one row per (institution, day, direction) — not an individual transaction. Use this endpoint when you want pre-aggregated totals; use /v3/ledger/transfers for line-item activity.

Results are sorted by occurredAt (descending — newest first). Ordering is not configurable from the query string.

Supports three response formats via the format query parameter:

  • json (default) — paginated JSON (default limit 100, max 1000).

  • csv — streamed CSV file download (up to 1,000,000 rows). Columns: inflow, transaction, type, timestamp, amount, usdValue, tokenAddress, tokenIcon, tokenSymbol.

  • event-stream — Server-Sent Events stream (up to 1,000,000 rows). Each entry is emitted as a named entry event with JSON data. A final done event carries {"total": N}. Connect with EventSource or fetch:

const es = new EventSource('/v3/ledger/cumulative-cashflows?organizationId={id}&format=event-stream', {
  headers: { 'x-api-key': 'cc_...' },
});
es.addEventListener('entry', (e) => console.log(JSON.parse(e.data)));
es.addEventListener('done', (e) => { console.log('total:', JSON.parse(e.data).total); es.close(); });

Requires org membership or vault curator role (public orgs only).

Authorizations
x-api-keystringRequired

API key in the format: cc_xxx_yyy (for customer API routes)

Query parameters
organizationIdstring · uuid · max: 36Required

Organization ID (must be an org the caller is a member of, or a public org if caller is a vault curator).

Example: 550e8400-e29b-41d4-a716-446655440000
startDatestring · dateOptional

Optional filter. Inclusive start date (YYYY-MM-DD); restricts results to occurredAt >= startDate (or snapshotDate for collateral-snapshots). Omit to leave the start unbounded.

Example: 2025-01-15
endDatestring · dateOptional

Optional filter. Inclusive end date (YYYY-MM-DD). Omit to leave the end unbounded.

Example: 2025-01-31
limitinteger · min: 1Optional

Maximum records returned. Format-dependent: format=json capped at 1000 (default 100); format=csv|event-stream capped at 1,000,000 (default 1,000,000). Values outside these caps are silently clamped server-side.

offsetintegerOptional

Number of records to skip from the start (JSON pagination only — ignored for csv/event-stream).

Default: 0
formatstring · enumOptional

Response format. json returns paginated JSON. csv streams a CSV file download. event-stream returns Server-Sent Events: each row is a named entry event; a final done event carries {"total": N}.

Default: jsonPossible values:
institutionIdstring · max: 100Optional

Optional filter. Source institution that reported the aggregate (e.g. self_report, visa); restricts results to a single institution. Omit to return all institutions.

Example: self_report
stagestring · enumOptional

Optional filter. Cash-flow stage (externalin_transitsecuredsettled); restricts results to a single stage. Omit to return all stages.

Possible values:
inflowbooleanOptional

Optional filter. true = arriving only, false = leaving only. Omit to return both directions.

Responses
200

Aggregate daily cashflow snapshots.

get/v3/ledger/cumulative-cashflows

List point-in-time collateral USD snapshots

get

Get daily collateral USD snapshots for an organization. Each row is the total USD value of collateral held on a given calendar day — one row per organization per day. Use this for time-series collateral charts and coverage ratios; combine with /v3/ledger/borrows + /v3/ledger/repays to compute net leverage over time.

Results are sorted by snapshotDate (descending — newest first). Ordering is not configurable from the query string.

Supports three response formats via the format query parameter:

  • json (default) — paginated JSON (default limit 100, max 1000).

  • csv — streamed CSV file download (up to 1,000,000 rows). Columns: snapshotDate, amountUsd, organizationId, organizationName, createdAt.

  • event-stream — Server-Sent Events stream (up to 1,000,000 rows). Each entry is emitted as a named entry event with JSON data. A final done event carries {"total": N}. Connect with EventSource or fetch:

const es = new EventSource('/v3/ledger/cumulative-collateral?organizationId={id}&format=event-stream', {
  headers: { 'x-api-key': 'cc_...' },
});
es.addEventListener('entry', (e) => console.log(JSON.parse(e.data)));
es.addEventListener('done', (e) => { console.log('total:', JSON.parse(e.data).total); es.close(); });

Requires org membership or vault curator role (public orgs only).

Authorizations
x-api-keystringRequired

API key in the format: cc_xxx_yyy (for customer API routes)

Query parameters
organizationIdstring · uuid · max: 36Required

Organization ID (must be an org the caller is a member of, or a public org if caller is a vault curator).

Example: 550e8400-e29b-41d4-a716-446655440000
startDatestring · dateOptional

Optional filter. Inclusive start date (YYYY-MM-DD); restricts results to occurredAt >= startDate (or snapshotDate for collateral-snapshots). Omit to leave the start unbounded.

Example: 2025-01-15
endDatestring · dateOptional

Optional filter. Inclusive end date (YYYY-MM-DD). Omit to leave the end unbounded.

Example: 2025-01-31
limitinteger · min: 1Optional

Maximum records returned. Format-dependent: format=json capped at 1000 (default 100); format=csv|event-stream capped at 1,000,000 (default 1,000,000). Values outside these caps are silently clamped server-side.

offsetintegerOptional

Number of records to skip from the start (JSON pagination only — ignored for csv/event-stream).

Default: 0
formatstring · enumOptional

Response format. json returns paginated JSON. csv streams a CSV file download. event-stream returns Server-Sent Events: each row is a named entry event; a final done event carries {"total": N}.

Default: jsonPossible values:
Responses
200

Point-in-time collateral USD snapshots (one row per org per day).

get/v3/ledger/cumulative-collateral

Last updated

Was this helpful?