uniswapv3_portfolio
Get the account's positions and assets in the Uniswap v3 protocol.
You can specify the account address and then you can query the account's Locked, Liquidity Pool, Reward, Staked assets in the Uniswap V3 protocol. Using this API, you are able to acknowledge the detailed information like Locked, Liquidity Pool token 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, required) - "uniswapv3".
  • 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:
    • accountUsdAmount(string) - the account portfolio value in USD.
    • positions(array of objects, defined below) - sorted in ascending order by USD amount, positions that are closed will be placed at the end.
  • Object schema:
    • name(string) - the name of the uniswap v3 position.
    • tokenId(integer) - the id of the position NFT.
    • status(string) - the status of the position that could be in-range, out-range and closed.
    • virtualLiquidity(string) - the liquidity number of the position.
    • token0(hex string) - the contract address of token0 in position.
    • token1(hex string) - the contract address of token1 in position.
    • tickLower(string) - the lower tick of the position.
    • tickUpper(string) - the upper tick of the position.
    • priceLower(string) - the lower price range converting from tickLower.
    • priceUpper(string) - the upper price range converting from tickUpper.
    • token0Balance(string) - the balance of position's token0.
    • token1Balance(string) - the balance of position's token1.
    • token0UnclaimedReward(string) - position's unclaimed token0 transactions fee reward.
    • token1UnclaimedReward(string) - position's unclaimed token1 transactions fee reward.
    • usdValue(string) - position value in USD.
    • usdReward(string) - position's reward value in USD.

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":"uniswapv3",
"accountAddress": "0x885D667521F4b31513cC76C02D0881b8Ea3fC024"
}
}'

Result

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accountUsdAmount": "8.19083852",
"positions": [
{
"name": "USDC - WETH",
"tokenId": 307561,
"fee": "3000",
"status": "in-range",
"virtualLiquidity": "352135274079",
"token0": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"token1": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"tickLower": "195780",
"tickUpper": "209640",
"priceLower": "0.00031783",
"priceUpper": "0.00127085",
"token0Balance": "4.09182853",
"token1Balance": "0.00259854",
"token0UncalimReward": "0.00000009",
"token1UncalimReward": "0.00000000",
"usdValue": "8.19083852",
"usdReward": "0.00000009"
}
]
}
}
Copy link
Outline
Parameters
Returns
Example
Request
Result