Links

synthetix_portfolio

Get the account's positions and assets in the synthetix protocol.
You can specify the account address and then you can query the account's Supplied, Borrowed, Reward, Staked assets and Health factor in the synthetix protocol. Using this API, you are able to acknowledge the detailed information like health rate, token infos and USD amount of each token as well as the sections. Some DeFi investigations and strategies can be made by calling this API.
Supported on Ethereum.

Parameters

Object - An object with the following fields (required):
  • protocol(string, optional) - "synthetix", 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.

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:
    • data(object array, defined below) - response datas of the portfolioItemObject, click to view the detailed object description.

Example

Request

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":"synthetix",
"accountAddress": "0x5a95338f086d25130e2a27e14609d30f4ce155d6"
}
}'

Result

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"data": [
{
"websiteUrl": "https://synthetix.io",
"logo": "https://apis.blockvision.org/static/img/logo/snx.png",
"protocol": "Synthetix",
"healthRate": "2.60",
"healthRateTip": "Your assests will be liquidated if the health factor is less than or equal to 1",
"proxy": "",
"usdAmount": "1625293",
"positionInfos": [
{
"logo": "https://apis.blockvision.org/static/img/logo/snx.png",
"contractAddress": "0x8D1201b074EeF198D5e6957F4574e2e4FC5Ba9Cf",
"symbol": "SNX",
"usdValue": "2600021",
"section": "Supplied",
"balanceTokens": [
{
"contractAddress": "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
"symbol": "SNX",
"balance": "1115194.54",
"usdValue": "2600021"
}
]
},
{
"logo": "https://apis.blockvision.org/static/img/logo/susd.png",
"contractAddress": "0x8D1201b074EeF198D5e6957F4574e2e4FC5Ba9Cf",
"symbol": "sUSD",
"usdValue": "1001724",
"section": "Borrowed",
"balanceTokens": [
{
"contractAddress": "0x57ab1ec28d129707052df4df418d58a2d46d5f51",
"symbol": "sUSD",
"balance": "997890.49",
"usdValue": "1001724"
}
]
},
{
"logo": "https://apis.blockvision.org/static/img/logo/snx.png",
"contractAddress": "0x3B2f389AeE480238A49E3A9985cd6815370712eB",
"symbol": "SNX",
"usdValue": "26545",
"section": "Rewards",
"balanceTokens": [
{
"contractAddress": "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
"symbol": "SNX",
"balance": "11385.41",
"usdValue": "26545"
}
]
},
{
"logo": "https://apis.blockvision.org/static/img/logo/susd.png",
"contractAddress": "0x3B2f389AeE480238A49E3A9985cd6815370712eB",
"symbol": "sUSD",
"usdValue": "451",
"section": "Rewards",
"balanceTokens": [
{
"contractAddress": "0x57ab1ec28d129707052df4df418d58a2d46d5f51",
"symbol": "sUSD",
"balance": "449.50",
"usdValue": "451"
}
]
}
]
}
]
}
}