Get vault event logs
Get on-chain event logs for a vault.
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/vaults/{id}/logs?format=event-stream');
es.addEventListener('log', (e) => console.log(JSON.parse(e.data)));
es.addEventListener('done', (e) => { console.log('total:', JSON.parse(e.data).total); es.close(); });
Authentication is optional but required for vaults with private organizations. Events are ordered by most recent first. For a v2 vault the feed spans the vault contract, its credit and liquid strategies, and its credit facilities; for a v3 vault it spans the vault contract (ERC-7540 deposit/redeem activity plus CommitmentAdded/CommitmentRemoved) and the credit facilities holding its commitments (scoped to the vault's own commitment ids).
Event types by protocol version —
- v1/v2: AddCredit, CancelDepositRequest, CancelRedeemRequest, CloseCreditPosition, Deposit, DepositRequest, IncreaseCredit, ManagerDeposit, ManagerWithdraw, MintManagementShares, MintPerformanceShares, ProcessDepositRequest, ProcessRedeemRequest, RedeemRequest, SetFee, SetManager, StrategyDeposit, StrategyWithdraw, SwapCreditPositionForTokens, VaultDeposit, VaultWithdraw, Withdraw, WithdrawDeposit, WithdrawProfit
- v3: CancelDepositRequest, CancelRedeemRequest, CommitmentAccrued, CommitmentAdded, CommitmentClaimed, CommitmentClosed, CommitmentDrawn, CommitmentRemoved, CommitmentRepaid, Deposit, DepositRequest, Originated, ProcessDepositRequest, ProcessRedeemRequest, RedeemRequest, Refinanced, Withdraw
(The ERC-7540 deposit/redeem events appear under both — every vault emits them.)
Request
- Base URL: https://api.creditcoop.xyz
- URL: https://api.creditcoop.xyz/v3/vaults/{id}/logs
- 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)
- none
Path parameters
Vault ID. Example: 550e8400-e29b-41d4-a716-446655440000
Query parameters
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.
Start date (YYYY-MM-DD). Example: 2025-01-15
End date, inclusive (YYYY-MM-DD). Example: 2025-01-15
Maximum number of results. For json: default 20, max 1000. For csv/event-stream: default 1000000, max 1000000.
Response
Vault event logs. Response format depends on the format query parameter.
Example response
{
"vaultAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"networkId": "eip155:1",
"logs": [
{
"timestamp": "2025-01-15T10:30:00Z",
"address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"token": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"shareToken": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"contractAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"protocolTreasury": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.