Wallet funding
const url = 'https://api.chainmetric.io/v2/wallet/1/94e13996035c0935f30d930dad4edbcacb8bab45/funding?direction=in&tokens=quote&hops=root&limit=100&cursor=7184150972001';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.chainmetric.io/v2/wallet/1/94e13996035c0935f30d930dad4edbcacb8bab45/funding?direction=in&tokens=quote&hops=root&limit=100&cursor=7184150972001' \ --header 'Authorization: <Authorization>'Returns who sent funds to a wallet and whom it sent funds to, and can walk back through the funders.
Use it to answer “who funded this wallet” or “which wallets share a funding source”.
With hops=1 the answer is pages of transfers in and out, newest first.
With hops of 2 or more, or root, the answer is a graph of nodes and edges walked backwards.
A walk stops at 10 hops or 500 addresses and then sets truncated.
Only final blocks are included, so a transfer appears once its block is final.
uncovered lists block ranges not yet indexed; an empty result inside them does not mean there were no transfers.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Chain id: 1 Ethereum, 56 BNB Chain, 8453 Base, 1399811149 Solana.
Example
1Wallet address. EVM is 40 lowercase hex characters without 0x; Solana is base58.
Example
94e13996035c0935f30d930dad4edbcacb8bab45Query Parameters
Section titled “Query Parameters”Which transfers to return. A walk (hops above 1) only goes backwards, so out needs hops=1.
Example
inquote covers the native currency and the chain’s quote tokens. all covers every token.
Example
quote1 for direct transfers, a number from 2 to 10, or root to walk back to the original funders.
Example
rootTransfers per direction per page, with hops=1 only. Larger values are clamped to 1000.
Example
100The next_cursor of the previous page. Only with sortOrder=asc on trades and liquidity.
Example
7184150972001Responses
Section titled “Responses”The wallet’s funding.
object
The document type, for example token_stats.
The document schema version.
The chain the document is about.
The token or wallet the document is about.
The stream topic of this document: <kind>.<chain_id>.<address>.
fast data is published as soon as a block is seen. safe data is published again once the block is final and replaces it.
How settled the data is: processed (Solana fast), confirmed (EVM fast) or finalized (safe).
The block height (or Solana slot) the document reflects.
Increases with every newer version of the document. Keep the highest.
When the document was built, Unix microseconds.
The document body. Its shape depends on kind.
object
object
The earliest native transfer into the wallet.
object
The other end of the transfer.
The token sent. Empty string for the native currency.
Raw integer amount, no decimals applied.
Who started the transaction.
The counterparty’s known entity, for example an exchange. Absent when unknown.
object
The other end of the transfer.
The token sent. Empty string for the native currency.
Raw integer amount, no decimals applied.
Who started the transaction.
The counterparty’s known entity, for example an exchange. Absent when unknown.
object
The other end of the transfer.
The token sent. Empty string for the native currency.
Raw integer amount, no decimals applied.
Who started the transaction.
The counterparty’s known entity, for example an exchange. Absent when unknown.
Pass as cursor for the next page. null on the last page and on desc pages.
Walk only. The addresses reached.
object
0 for the wallet itself.
Why the walk did not go further from this address.
Walk only. The transfers that reached each node.
object
The other end of the transfer.
The token sent. Empty string for the native currency.
Raw integer amount, no decimals applied.
Who started the transaction.
The counterparty’s known entity, for example an exchange. Absent when unknown.
Walk only. True when a cap ended the walk.
Block ranges not yet indexed.
object
Example
{ "kind": "token_stats", "lane": "fast", "commitment": "processed", "data": { "first_funding": { "direction": "in" }, "edges_in": [ { "direction": "in" } ], "edges_out": [ { "direction": "in" } ], "nodes": [ { "stop": "entity" } ], "edges": [ { "direction": "in" } ] }}The request is malformed, for example a bad address, an unknown chain or an out-of-range parameter. Do not retry unchanged.
Every error answer has this shape. error and message carry the same text.
object
What went wrong. For 5xx answers this is the status text.
The same text as error.
The HTTP status.
Examples
{ "error": "blockchain: unknown chain: \"ethereum\"", "message": "blockchain: unknown chain: \"ethereum\"", "statusCode": 400}The key is missing (api key missing), unknown (api key unknown) or revoked (api key revoked). Send Authorization: <key>.
Every error answer has this shape. error and message carry the same text.
object
What went wrong. For 5xx answers this is the status text.
The same text as error.
The HTTP status.
Examples
{ "error": "api key missing", "message": "api key missing", "statusCode": 401}The key’s request rate limit is reached. No Retry-After is sent; back off and retry.
Every error answer has this shape. error and message carry the same text.
object
What went wrong. For 5xx answers this is the status text.
The same text as error.
The HTTP status.
Examples
{ "error": "api key rate limit reached", "message": "api key rate limit reached", "statusCode": 429}The service is busy or catching up. Wait for the Retry-After header’s seconds when present (5 or 10), then retry. Without it, retry with exponential backoff.
Every error answer has this shape. error and message carry the same text.
object
What went wrong. For 5xx answers this is the status text.
The same text as error.
The HTTP status.
Examples
{ "error": "Service Unavailable", "message": "Service Unavailable", "statusCode": 503}Headers
Section titled “Headers”Seconds to wait before retrying.