Links

account_ftPortfolio

Get FT assets owned by any account address.
Through account_ftPortfolio, you can fetch the broad data of FT assets owned by certain holders, such as the collection, value, quantity and USD value, etc, accountAddress is necessary. 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, Optimism, Arbitrum and Polygon.

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 for ERC20 token.
  • showAll(integer number, optional) - whether to return tokens with low liquidity. The enumeration value is 0, or 1, if set to 1, will return tokens with low liquidity. Defaults to 0.

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:
    • totalUsdAmount(string, float) - the total USD amount of all the FT assets.
    • data(array of object, defined below) - response datas.
  • Object schema:
    • contractAddress(string) - the contract address for ERC20 token.
    • 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.
    • logo(string) - the logo of the token.

Example

Request

curl
TypeScript
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"
}
}'
import { BlockVisionProvider, BvNetwork } from 'blockvision.js'
​
// Optional parameters, but default to eth-mainnet and default api-key.
const bv = new BlockVisionProvider(BvNetwork.ETH_MAINNET)
​
// Access the BlockVision Account API
bv.getAccountFTPortfolio({
accountAddress: '0x98ec059dc3adfbdd63429454aeb0c990fba4a128'
}).then(console.log)

Result

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"data": [
{
"contractAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"decimals": 18,
"symbol": "ETH",
"quantity": "200000.10705597",
"usdPrice": "1538.12123977",
"usdAmount": "307624412.61811501",
"logo": "https://apis.blockvision.org/static/img/logo/eth.png"
},
{
"contractAddress": "0x2b591e99afe9f32eaa6214f7b7629768c40eeb39",
"decimals": 8,
"symbol": "HEX",
"quantity": "1100.00000000",
"usdPrice": "0.03901521",
"usdAmount": "42.91673136",
"logo": "https://apis.blockvision.org/static/img/logo/hex.png"
},
{
"contractAddress": "0x04abeda201850ac0124161f037efd70c74ddc74c",
"decimals": 18,
"symbol": "NEST",
"quantity": "1000.00000000",
"usdPrice": "0.01758739",
"usdAmount": "17.58738562",
"logo": "https://apis.blockvision.org/static/img/logo/nest.png"
},
{
"contractAddress": "0x2ee543b8866f46cc3dc93224c6742a8911a59750",
"decimals": 18,
"symbol": "MVDG",
"quantity": "10000.00000000",
"usdPrice": "0.00130594",
"usdAmount": "13.05937938",
"logo": "https://apis.blockvision.org/static/img/logo/mvdg.png"
},
{
"contractAddress": "0xed04915c23f00a313a544955524eb7dbd823143d",
"decimals": 8,
"symbol": "ACH",
"quantity": "5.00000000",
"usdPrice": "0.01178001",
"usdAmount": "0.05890003",
"logo": "https://apis.blockvision.org/static/img/logo/ach.png"
},
{
"contractAddress": "0x06e0feb0d74106c7ada8497754074d222ec6bcdf",
"decimals": 18,
"symbol": "BTB",
"quantity": "10.00000000",
"usdPrice": "0.00326513",
"usdAmount": "0.03265132",
"logo": "https://apis.blockvision.org/static/img/logo/btb.png"
},
{
"contractAddress": "0xa4bdb11dc0a2bec88d24a3aa1e6bb17201112ebe",
"decimals": 6,
"symbol": "USDS",
"quantity": "0.01000000",
"usdPrice": "0.99877340",
"usdAmount": "0.00998773",
"logo": "https://apis.blockvision.org/static/img/logo/usds.png"
},
{
"contractAddress": "0xdacd69347de42babfaecd09dc88958378780fb62",
"decimals": 0,
"symbol": "ATRI",
"quantity": "1.00000000",
"usdPrice": "0.00352872",
"usdAmount": "0.00352872",
"logo": "https://apis.blockvision.org/static/img/logo/atri.png"
},
{
"contractAddress": "0x28cb7e841ee97947a86b06fa4090c8451f64c0be",
"decimals": 18,
"symbol": "YFL",
"quantity": "0.00006900",
"usdPrice": "9.05870182",
"usdAmount": "0.00062505",
"logo": "https://apis.blockvision.org/static/img/logo/yfl.png"
},
{
"contractAddress": "0x9f7229af0c4b9740e207ea283b9094983f78ba04",
"decimals": 18,
"symbol": "TAD",
"quantity": "0.00010000",
"usdPrice": "2.44608959",
"usdAmount": "0.00024461",
"logo": "https://apis.blockvision.org/static/img/logo/tad.png"
},
{
"contractAddress": "0xac9bb427953ac7fddc562adca86cf42d988047fd",
"decimals": 18,
"symbol": "STT",
"quantity": "1.00000000",
"usdPrice": "0.00001983",
"usdAmount": "0.00001983",
"logo": "https://apis.blockvision.org/static/img/logo/stt.png"
},
{
"contractAddress": "0x243cacb4d5ff6814ad668c3e225246efa886ad5a",
"decimals": 18,
"symbol": "SHI",
"quantity": "10.00000000",
"usdPrice": "0.00000067",
"usdAmount": "0.00000666",
"logo": "https://apis.blockvision.org/static/img/logo/shi.png"
}
],
"totalUsdAmount": "307624486.28757536"
}
}