Links

stakefish_portfolio

Get the account's positions and assets in the StakeFish staking protocol.
Through account_defiPortfolio, you can fetch the account's Pool-Staked in the StakeFish staking protocol, accountAddress is necessary. Using this API, you are able to acknowledge the detailed information like Pool-Staked infos 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.

Parameters

Object - An object with the following fields (required):
  • protocol(string, optional) - "stakefish", 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(array of object, defined below) - response datas of the portfolioItemObject, click to view the detailed object description.

Example

Request

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":"stakefish",
"accountAddress": "0xd4e9e5ad1cfba3a805bc7df7f6a0fdd69d249e8d"
}
}'
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: 'stakefish',
accountAddress: '0xd4e9e5ad1cfba3a805bc7df7f6a0fdd69d249e8d'
}).then(console.log)

Result

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"data": [
{
"websiteUrl": "https://stake.fish",
"logo": "https://apis.blockvision.org/static/img/logo/stakefish.png",
"protocol": "Stakefish",
"proxy": "",
"usdAmount": "4666930",
"positionInfos": [
{
"logo": "https://apis.blockvision.org/static/img/logo/eth.png",
"contractAddress": "0x00000000219ab540356cBB839Cbe05303d7705Fa",
"symbol": "ETH",
"usdValue": "4666930",
"section": "Staked",
"balanceTokens": [
{
"contractAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"symbol": "ETH",
"balance": "3968.00",
"usdValue": "4666930"
}
]
}
]
}
]
}
}