tornado_portfolio
Get the account's positions and assets in the Tornado protocol.
Through account_defiPortfolio, you can fetch the account's Pool-Staked, Reward in the Tornado protocol,
accountAddress
is necessary. Using this API, you are able to acknowledge the detailed information like Pool-Staked infos, Reward and USD amount of each token as well as the sections. Some DeFi investigation and strategies can be made by calling this API.Supported on Ethereum.
Object
- An object with the following fields (required):protocol(string, optional)
-"tornado"
, If you don't specify the protocol, the API can return position data for all supported DeFi protocols.accountAddress(hex string, required)
- The account you intend to check.
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:data(array of object, defined below)
- response datas of the portfolioItemObject, click to view the detailed object description.
curl
TypeScript
curl --location --request POST 'https://apis.blockvision.org/v1/<api key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 1,
"jsonrpc": "2.0",
"method": "account_defiPortfolio",
"params": {
"protocol":"tornado",
"accountAddress": "0xd33e530d53fbd9c10a9a54791617118ab297c51b"
}
}'
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 DeFi API
bv.getAccountDeFiPortfolio({
protocol: 'tornado',
accountAddress: '0xd33e530d53fbd9c10a9a54791617118ab297c51b'
}).then(console.log)
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"data": [
{
"websiteUrl": "https://ipfs.io/ipns/tornadocash.eth",
"logo": "https://apis.blockvision.org/static/img/logo/torn.png",
"protocol": "tornado",
"usdAmount": "103998",
"positionInfos": [
{
"logo": "https://apis.blockvision.org/static/img/logo/torn.png",
"contractAddress": "0x77777feddddffc19ff86db637967013e6c6a116c",
"symbol": "TORN",
"usdValue": "103998",
"section": "Staked",
"rewardTokens": [
{
"contractAddress": "0x77777feddddffc19ff86db637967013e6c6a116c",
"symbol": "TORN",
"balance": "80.50",
"usdValue": "555"
}
],
"balanceTokens": [
{
"contractAddress": "0x77777feddddffc19ff86db637967013e6c6a116c",
"symbol": "TORN",
"balance": "15000.00",
"usdValue": "103443"
}
]
}
]
}
]
}
}
Last modified 1mo ago