Skip to main content

Base URLs and conventions

Routes are relative to these URLs. GET requires no signature; POST consent does. Amounts/blocks are decimal strings. Token paths take cToken addresses except /icon, which takes the underlying asset. Pagination: page=1, limit=10, maximum 100. Send positive integers.

GET /tokens

Lists all indexed wrappers, newest created first. No pagination parameters. Returns TokenRow[]:
Missing metadata defaults to empty name/symbol and 18 decimals. Read on-chain decimals for transaction precision. No SDK tokens() method.

GET /tokens/:address

Returns TokenRow or HTTP 200 JSON null if unindexed. A missing record does not prove non-deployment.

GET /tokens/:address/flows

Public flow feed for a cToken. Query page, limit. Returns the common page envelope with items containing kind, account, amount, success_handle, block_number, block_time, and tx_hash. Amounts are base-unit decimal strings; nullable fields can occur. Ordered by block/log descending.

GET /tokens/:address/activity

Confidential event feed for a cToken. Query page, limit. Page item fields: kind, from_addr, to_addr, handle, block_number, block_time, tx_hash. This feed exposes handles, not decrypted amounts. Addresses/handles may be null depending on the event.

GET /tokens/:address/disclosures

Disclosure feed for a cToken. Query page, limit. Page item fields: handle, amount, block_number, block_time, tx_hash. Amounts are publicly disclosed base-unit values; this endpoint does not authorize new disclosure. Ordered by block descending.
Token feeds and wallet transactions share this envelope. Hosted responses keep pages at least 1, including empty results.

GET /wallets/:address/assets

Lists indexed holdings for a wallet, descending last activity block. Returns the Asset[] schema. Empty wallet: []. There is no pagination. SDK equivalent: ctoken.assets({ address }).

GET /wallets/:address/transactions

Combined cross-token wallet activity. Query page, limit. Returns TxPage. Confidential transfers and public flows share the normalized transaction schema; internal mint/burn legs are excluded. SDK equivalent: ctoken.history({ address, page, limit }).

GET /wallets/:address/operators

Unpaginated array: token, operator, until (Unix seconds string), active (expiry > server time), block_number, tx_hash. Newest block first; expired approvals remain with active: false. No SDK wrapper.

GET /factory

Indexed deployment state: These snapshots can lag chain state. The SDK does not fetch them before operations.

GET /tokens/:address/icon

Underlying token/price-reference icon: HTTP 302 to a CDN image, cached 86400 seconds. Invalid address: 400; unknown icon: 404. Supply an image fallback.

GET /prices

Query tokens: comma-separated underlying addresses, at most 200; omit for available cached prices. Returns Prices. Hosted TTL defaults to 600 seconds; read the response’s ttl.

GET /consent/:address

Returns { consented: boolean, version: string, signedAt: number | null } for current terms; timestamp is Unix seconds. Consent is separate from allowances and reveal sessions.

POST /consent

JSON body: { address: string, signedAt: number, signature: string }. Unix timestamp must be nonnegative and at most 300 seconds ahead. A valid signature records acceptance; success is HTTP 200 { "ok": true }. Canonical message (newline-separated, lowercase address):
Replace placeholders and sign with walletClient.signMessage({ account: walletClient.account, message }); POST the address, timestamp, and signature. Confirm the service’s current terms version/hash before signing. No SDK consent helper.

Operational routes and CORS

Hosted ingress does not expose these five operational paths. Use internal monitoring URLs; their public 404s do not indicate API failure. Other failures: 500 (internal error), 429 (rate limited), or 503 (busy). Honor Retry-After on rate limits/load shedding. GET responses may be cached or stale; capacity limits vary by deployment.

Production origins

Request hosted access through the origin whitelist form. For your backend, see compatibility and CORS.