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

Borrowers

Borrower management

List borrowers

get

List enabled borrower organizations. Authentication is optional but affects results.

Authorizations
x-api-keystringOptional

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

Query parameters
limitinteger · min: 1 · max: 100OptionalDefault: 20
offsetintegerOptionalDefault: 0
Responses
200

Default Response

application/json
get/v3/borrowers
200

Default Response

Get borrower by ID

get

Get a single borrower organization by ID. Authentication is optional but required to view private borrowers.

Authorizations
x-api-keystringOptional

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

Path parameters
idstring · uuidRequired

Borrower organization ID. Example: 550e8400-e29b-41d4-a716-446655440000

Query parameters
Responses
200

Default Response

application/json
organizationIdstring · uuidRequired

Borrower organization ID

Example: 550e8400-e29b-41d4-a716-446655440000
namestringRequired

Organization name

networkIdsstring[]Required

CAIP-2 network identifiers for blockchain networks this borrower has credit facilities on

Example: eip155:1
get/v3/borrowers/{id}

Get borrower credit line logs

get

Get on-chain credit line logs for a borrower.

Supports three response formats via the format query parameter:

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

  • csv — streamed CSV file download (up to 1 000 000 rows).

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

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

Event types: AddCredit, RepayPrincipal, RepayInterest, IncreaseCredit, ReservesChanged, Borrow, WithdrawDeposit, WithdrawProfit, PayServicingFee, TransferOriginationFee.

Authorizations
x-api-keystringRequired

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

Path parameters
idstring · uuidRequired

Borrower organization ID. Example: 550e8400-e29b-41d4-a716-446655440000

Query parameters
formatstring · enumOptional

Response format. "json" returns paginated JSON (default 20, max 1000). "csv" returns a streamed CSV file download. "event-stream" returns Server-Sent Events with each log as a named "log" event and a final "done" event. Event types: AddCredit, RepayPrincipal, RepayInterest, IncreaseCredit, ReservesChanged, Borrow, WithdrawDeposit, WithdrawProfit, PayServicingFee, TransferOriginationFee.

Default: jsonPossible values:
networkIdstringOptional

Filter logs by CAIP-2 network identifier. Example: eip155:8453

startDatestring · dateOptional

Start date (YYYY-MM-DD). Example: 2025-01-15

endDatestring · dateOptional

End date, inclusive (YYYY-MM-DD). Example: 2025-01-15

limitinteger · min: 1Optional

Maximum number of results. For json: default 20, max 1000. For csv/event-stream: default 1000000, max 1000000.

offsetintegerOptionalDefault: 0
Responses
200

Borrower credit line logs. Response format depends on the format query parameter.

organizationIdstring · uuidRequired

Borrower organization ID

Example: 550e8400-e29b-41d4-a716-446655440000
get/v3/borrowers/{id}/logs

Get borrower analytics time series

get

Get analytics time series for a borrower. Returns daily cashflow, trailing sums, and debt metrics. Auto-detects loan start date from the first borrow event if startDate is not provided.

Authorizations
x-api-keystringRequired

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

Path parameters
idstring · uuidRequired

Borrower organization ID

Query parameters
startDatestring · dateOptional

Start date (YYYY-MM-DD). Defaults to auto-detected loan start.

endDatestring · dateOptional

End date, inclusive (YYYY-MM-DD). Defaults to today.

trailingDaysstringOptional

Comma-separated trailing periods in days (e.g. "14,30,120"). Max: 365. Defaults to org config or "30".

stagesstringOptional

Comma-separated stage filter for cashflow (e.g. "secured,settled"). Valid values: external, in_transit, secured, settled. Normally you do not need to specify this parameter. Defaults to org config or "secured".

directionstring · enumOptional

Cash flow direction. "inflow" counts only inflows. "net" computes net flow (inflows - outflows). Defaults to org config or "inflow".

Possible values:
formatstring · enumOptional

Response format. "json" (default) or "csv" file download.

Default: jsonPossible values:
Responses
200

Default Response

application/json
organizationIdstring · uuidRequired
organizationNamestringRequired
get/v3/borrowers/{id}/analytics

Last updated

Was this helpful?