Ledger

List individual cashflow transfer events

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 (external → in_transit → secured → settled) 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).

get/v3/ledger/transfers

Request

  • Base URL: https://api.creditcoop.xyz
  • URL: https://api.creditcoop.xyz/v3/ledger/transfers
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://clerk.creditcoop.xyz/oauth/authorize, token URL https://clerk.creditcoop.xyz/oauth/token)

Query parameters

organizationIdstring uuid required
Example:550e8400-e29b-41d4-a716-446655440000

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

startDatestring date
Example:2025-01-15

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

endDatestring date
Example:2025-01-31

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

limitinteger

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.

offsetinteger

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

format'json' | 'csv' | 'event-stream'

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}.

networkIdstring
Example:eip155:1

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

accountIdstring

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

stage'external' | 'in_transit' | 'secured' | 'settled'

Optional filter. Cash-flow stage (external → in_transit → secured → settled); restricts results to a single stage. Omit to return all stages.

typestring

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

inflowboolean

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

excludeLinkedTransfersboolean

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.

Response

Individual cashflow transfer events.

Example response

{
  "entries": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "organizationId": "550e8400-e29b-41d4-a716-446655440000",
      "webCaptureId": "550e8400-e29b-41d4-a716-446655440000",
      "evmLogId": "550e8400-e29b-41d4-a716-446655440000",
      "amountUsd": "1234567.890000",
      "tokenNetworkId": "eip155:1",
      "occurredAt": "2025-01-15T10:30:00Z",
      "networkId": "eip155:1",
      "createdAt": "2025-01-15T10:30:00Z"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.