Constructing Requests

Option 1: You can use the JSON RPC playground to easily create sample JSON RPC requests.

Option 2: Alternatively, you can construct your own requests by following the below steps:

  1. Log into the CDP Portal and go to the Data page.
  2. Ensure the correct network in your RPC URL based on the supported RPC networks.
  3. Open a terminal and make your requests based on the supported methods in this API reference page.

Authentication

For information on how to authenticate requests to our JSON-RPC APIs, please visit the Client API Keys section of our Authentication page.

JSON-RPC Methods for Wallet History Data

cdp_listBalances

This endpoint retrieves the latest balances for an address. Note that this JSON RPC endpoint provides a more complete list of assets than the CDP API. However, there is a few seconds of delay in terms of data freshness for indexing a complete list of assets. If you need more real-time data with whitelisted assets, you should use the CDP API.

The API credit value of this method is 100.

Parameters

NameTypeReqDescription
addressstringYBlockchain address hash. EVM chain address hash should be lowercase.
pageSizestringNNumber of balances to receive in a page. The default value is 25. The maximum value is 100, and values supplied over this will be coerced to the maximum.
pageTokenstringNProvided from a previous response’s nextPageToken

Returns

FieldDescription
asset.idThe identity of the asset for querying for details or history.
asset.typeThe type of Asset the definition describes. For example: “native”, “erc20”, “erc721”, “erc1155”, “creditAlphanum4”, “fa2”.
asset.groupIdThe contract address or group identifier for an Asset. For an NFT or a multi-token Asset this may identify a group of Asset. For a native Asset this will not be set.
asset.subGroupIdThe identifier that distinguishes the identity of the Asset within the contract address or group. For an NFT or a multi-token Asset that can have many Assets associated with a contract address, this could be a token ID. For a UTXO, this could be the coin identifier.
valueThe amount of the balance in the lowest denomination of the asset. Type is in BigInteger in standard base64 encoding.
valueStrThe string representation of the balance value to avoid precision loss.
decimalsThe number of decimals the asset utilizes.
nextPageTokenA token which can be provided as pageToken to retrieve the next page. If this field is omitted, there are no additional pages.

Request/Response

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "cdp_listBalances",
    "params": [
        {
        "address": "0x0e73fc61bb9d6b7588910c2d14e83bae68222c5d",
        "pageToken": "",
        "pageSize": 2
        }
    ]
}

cdp_listBalanceDetails

This endpoint lists the latest balance details for an asset for an address. Similar to cdp_listBalances, if you need more real-time data, you should use the CDP API.

The API credit value of this method is 100.

Parameters

NameTypeReqDescription
addressstringYBlockchain address hash. EVM chain address hash should be lowercase.
assetIdstringYProvided from ListBalances or ListAddressTransactions response’s asset field
pageSizestringNNumber of balances to receive in a page. The default value is 25. The maximum value is 100, and values supplied over this will be coerced to the maximum.
pageTokenstringNProvided from a previous response’s nextPageToken

Returns

FieldDescription
asset.idThe identity of the asset for querying for details or history.
asset.typeThe type of Asset the definition describes. For example: “native”, “erc20”, “erc721”, “erc1155”, “creditAlphanum4”, “fa2”.
asset.groupIdThe contract address or group identifier for an Asset. For an NFT or a multi-token Asset this may identify a group of Asset. For a native Asset this will not be set.
asset.subGroupIdThe identifier that distinguishes the identity of the Asset within the contract address or group. For an NFT or a multi-token Asset that can have many Assets associated with a contract address, this could be a token ID. For a UTXO, this could be the coin identifier.
valueThe amount of the balance in the lowest denomination of the asset. Type is in BigInteger in standard base64 encoding.
valueStrThe string representation of the balance value to avoid precision loss.
decimalsThe number of decimals the asset utilizes.
nextPageTokenA token which can be provided as pageToken to retrieve the next page. If this field is omitted, there are no additional pages.

Request/Response

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "cdp_listBalanceDetails",
    "params": [
        {
        "address": "0x0e73fc61bb9d6b7588910c2d14e83bae68222c5d",
        "assetId": "08122fa4-510f-5ae4-9675-792c378b0018",
        "pageToken": "",
        "pageSize": 1
        }
    ]
}

cdp_listBalanceHistories

This endpoint lists the balance histories for an asset for an address. cdp_listBalanceHistory is also a valid method name for this method.

The API credit value of this method is 100.

Parameters

NameTypeReqDescription
addressstringYBlockchain address hash. EVM chain address hash should be lowercase.
assetIdstringYProvided from ListBalances or ListAddressTransactions response’s asset field
pageSizestringNNumber of balances to receive in a page. The default value is 25. The maximum value is 100, and values supplied over this will be coerced to the maximum.
pageTokenstringNProvided from a previous response’s nextPageToken

Returns

FieldDescription
blockHashThe hash of the block this transaction was included in.
blockHeightThe height of the block this transaction was included in.
valueThe amount of the balance in the lowest denomination of the asset. Type is in BigInteger in standard base64 encoding.
valueStrThe string representation of the balance value to avoid precision loss.
nextPageTokenA token which can be provided as pageToken to retrieve the next page. If this field is omitted, there are no additional pages.

Request/Response

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "cdp_listBalanceHistories",
    "params": [
        {
        "address": "0x0e73fc61bb9d6b7588910c2d14e83bae68222c5d",
        "assetId": "123d82ca-b3f4-527c-ace7-559d5791a564",
        "pageToken": "",
        "pageSize": 2
        }
    ]
}

cdp_listAddressTransactions

This endpoint lists the transactions for an address. cdp_listTransactions is also a valid method name for this method.

The API credit value of this method is 100.

Parameters

NameTypeReqDescription
addressstringYBlockchain address hash. EVM chain address hash should be lowercase.
pageSizestringNNumber of balances to receive in a page. The default value is 25. The maximum value is 100, and values supplied over this will be coerced to the maximum.
pageTokenstringNProvided from a previous response’s nextPageToken

Returns

FieldDescription
nameA unique identifier for the transaction, which cannot be changed once created.In the format of networks/{network}/indexers/{indexer}/transactions/{transaction}
hashThe transaction hash
blockHashThe hash of the block this transaction was included in.
blockHeightThe height of the block this transaction was included in.
statusThe status of the transaction
contentThe transaction content in either ethereum or rosetta format.

Request/Response

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "cdp_listAddressTransactions",
    "params": [
        {
        "address": "0x0e73fc61bb9d6b7588910c2d14e83bae68222c5d",
        "pageToken": "",
        "pageSize": 2
        }
    ]
}