Skip to content

Wallet funding

View as Markdown
GET
/v2/wallet/{chain_id}/{address}/funding
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.

chain_id
required
integer
Allowed values: 1 56 8453 1399811149

Chain id: 1 Ethereum, 56 BNB Chain, 8453 Base, 1399811149 Solana.

Example

1
address
required
string

Wallet address. EVM is 40 lowercase hex characters without 0x; Solana is base58.

Example

94e13996035c0935f30d930dad4edbcacb8bab45
direction
string
default: both
Allowed values: in out both

Which transfers to return. A walk (hops above 1) only goes backwards, so out needs hops=1.

Example

in
tokens
string
default: quote
Allowed values: quote all

quote covers the native currency and the chain’s quote tokens. all covers every token.

Example

quote
hops
string
default: 1

1 for direct transfers, a number from 2 to 10, or root to walk back to the original funders.

Example

root
limit
integer
default: 100 >= 1 <= 1000

Transfers per direction per page, with hops=1 only. Larger values are clamped to 1000.

Example

100
cursor
string

The next_cursor of the previous page. Only with sortOrder=asc on trades and liquidity.

Example

7184150972001

The wallet’s funding.

Media typeapplication/json
object
kind
required

The document type, for example token_stats.

string
version
required

The document schema version.

integer
chain_id
required

The chain the document is about.

integer
address

The token or wallet the document is about.

string
subject

The stream topic of this document: <kind>.<chain_id>.<address>.

string
lane
required

fast data is published as soon as a block is seen. safe data is published again once the block is final and replaces it.

string
Allowed values: fast safe
commitment
required

How settled the data is: processed (Solana fast), confirmed (EVM fast) or finalized (safe).

string
Allowed values: processed confirmed finalized
as_of

The block height (or Solana slot) the document reflects.

integer format: int64
seq
required

Increases with every newer version of the document. Keep the highest.

integer format: int64
updated_us

When the document was built, Unix microseconds.

integer format: int64
data
required

The document body. Its shape depends on kind.

object
data
required
object
chain_id
integer
wallet
string
first_funding

The earliest native transfer into the wallet.

One of:
object
wallet
string
counterparty

The other end of the transfer.

string
direction
string
Allowed values: in out
token

The token sent. Empty string for the native currency.

string
value

Raw integer amount, no decimals applied.

string
tx_id
string
tx_from

Who started the transaction.

string
time_us
integer format: int64
entity_name

The counterparty’s known entity, for example an exchange. Absent when unknown.

string
entity_type
string
edges_in
Array<object>
object
wallet
string
counterparty

The other end of the transfer.

string
direction
string
Allowed values: in out
token

The token sent. Empty string for the native currency.

string
value

Raw integer amount, no decimals applied.

string
tx_id
string
tx_from

Who started the transaction.

string
time_us
integer format: int64
entity_name

The counterparty’s known entity, for example an exchange. Absent when unknown.

string
entity_type
string
edges_out
Array<object>
object
wallet
string
counterparty

The other end of the transfer.

string
direction
string
Allowed values: in out
token

The token sent. Empty string for the native currency.

string
value

Raw integer amount, no decimals applied.

string
tx_id
string
tx_from

Who started the transaction.

string
time_us
integer format: int64
entity_name

The counterparty’s known entity, for example an exchange. Absent when unknown.

string
entity_type
string
next_cursor

Pass as cursor for the next page. null on the last page and on desc pages.

string | null
nodes

Walk only. The addresses reached.

Array<object>
object
address
string
depth

0 for the wallet itself.

integer
stop

Why the walk did not go further from this address.

string
Allowed values: entity distributor root uncovered limit
entity_name
string
edges

Walk only. The transfers that reached each node.

Array<object>
object
wallet
string
counterparty

The other end of the transfer.

string
direction
string
Allowed values: in out
token

The token sent. Empty string for the native currency.

string
value

Raw integer amount, no decimals applied.

string
tx_id
string
tx_from

Who started the transaction.

string
time_us
integer format: int64
entity_name

The counterparty’s known entity, for example an exchange. Absent when unknown.

string
entity_type
string
truncated

Walk only. True when a cap ended the walk.

boolean
uncovered

Block ranges not yet indexed.

Array<object>
object
low_block
integer format: int64
high_block
integer format: int64

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.

Media typeapplication/json

Every error answer has this shape. error and message carry the same text.

object
error
required

What went wrong. For 5xx answers this is the status text.

string
message
required

The same text as error.

string
statusCode
required

The HTTP status.

integer

Examples

ExampleunknownChain
{
"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>.

Media typeapplication/json

Every error answer has this shape. error and message carry the same text.

object
error
required

What went wrong. For 5xx answers this is the status text.

string
message
required

The same text as error.

string
statusCode
required

The HTTP status.

integer

Examples

Examplemissing
{
"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.

Media typeapplication/json

Every error answer has this shape. error and message carry the same text.

object
error
required

What went wrong. For 5xx answers this is the status text.

string
message
required

The same text as error.

string
statusCode
required

The HTTP status.

integer

Examples

Examplelimited
{
"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.

Media typeapplication/json

Every error answer has this shape. error and message carry the same text.

object
error
required

What went wrong. For 5xx answers this is the status text.

string
message
required

The same text as error.

string
statusCode
required

The HTTP status.

integer

Examples

Exampleunavailable
{
"error": "Service Unavailable",
"message": "Service Unavailable",
"statusCode": 503
}
Retry-After
integer

Seconds to wait before retrying.