account_ftPortfolio
Help you to quickly query the FT assets owned by any account address.
You can specify the account address and contract address, then you can obtain the broad data of FT assets owned by certain holders, such as the collection, value, quantity and USD value, etc. Using this API, you could acknowledge the FT possession of certain holders. Some investigation and buying strategies could be made by calling this API.
Supported on Ethereum and BNB Chain.

Parameters

Object - An object with the following fields (required):
  • accountAddress(hex string, required) - the account address you want to query.
  • contractAddress(hex string, optional) - the contract address of the collection. BlockVision currently support both ERC721 and ERC1155.
  • pageSize(integer number, optional, default 20) - max number of results to return per call.
  • pageIndex(integer number, optional, default 1) - page index.

Returns

Object - An object with the following fields:
  • id(integer number) - JSON-RPC id.
  • jsonrpc(string) - JSON-RPC version.
  • result(object) - an object with the following fields:
    • nextPageIndex(integer number) - next page index.
    • total(integer number) - the amount of the records.
    • data(object array, defined below) - response datas.
  • Object schema:
    • contractAddress(string) - the address of the collection.
    • value(string) - the token value with decimals.
    • decimals(int) - token decimals.
    • symbol(string) - the symbol of the token.
    • quantity(string, float) - the quantity of the token.
    • usdPrice(float) - the token price in USD.
    • usdAmount(float) - the total value of the token.

Example

Request

curl https://api.blockvision.org/v1/<api key> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 0,
"method": "account_ftPortfolio",
"params": {
"accountAddress": "0x98ec059dc3adfbdd63429454aeb0c990fba4a128",
"pageIndex": 1,
"pageSize": 10
}
}'

Result

{
"jsonrpc": "2.0",
"id": 0,
"result": {
"data": [
{
"contractAddress": "0x14409B0Fc5C7f87b5DAd20754fE22d29A3dE8217",
"decimals": 18,
"symbol": "PYRO",
"quantity": "1500",
"usdPrice": 0.000036,
"usdAmount": 0.054
},
{
"contractAddress": "0xdacD69347dE42baBfAEcD09dC88958378780FB62",
"decimals": 0,
"symbol": "ATRI",
"quantity": "1",
"usdPrice": 0.003084,
"usdAmount": 0.003084
},
{
"contractAddress": "0x5881dA4527BCdC44a100F8bA2efC4039243D2C07",
"decimals": 1,
"symbol": "LGBTQ",
"quantity": "1",
"usdPrice": 0,
"usdAmount": 0
}
],
"nextPageIndex": 2
}
}
Copy link
Outline
Parameters
Returns
Example
Request
Result