GET
/
dex
/
wallets
/
{walletAddress}
/
returns
Impermanent Loss & DEX Returns
curl --request GET \
  --url https://api.amberdata.com/defi/dex/wallets/{walletAddress}/returns \
  --header 'x-api-key: <api-key>'
{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "metadata": {
      "next": "https://api.amberdata.com/defi/dex/wallets/0xa82ae16b244563cadfca99a7314b716a0a87a59d/returns?cursor=N4IgzgLghgThAiUIFMQC4QCYAMnMFoBGA3AFW2zQquwDoLsAtEAGhGQDsATRFdQgOzZCAVgBshMQwpsANgEsAjgFd5XeRACeABQD2u2QEEuXGMjBh0IbAA8AZneR2ALFwDMhAJwiBmAMZ%2BYmICIgAcAnaemFBQngBGEnHIfth2hLECnn6sIPIcfrLKXMgAssjQXEhQ6HZQsmDIbGDyAF6oaIQyIBDyALbIAGK6ML1IVgAWyqMcAErIUJVxsqhsAA66zT26HACSXFY5qzC6ELp%2BBgByUP1WyhzyYADuUKsAbm4gAL5AA"
    },
    "data": [
      {
        "timestamp": "2022-08-25 00:00:00 000",
        "cumulativeFeesClaimedUSD": 0,
        "cumulativeFeesUnclaimedUSD": 0.00095621,
        "impermanentLossRatio": "-0.00335616",
        "positions": [
          {
            "positionId": "299362",
            "positionOpen": "True"
          }
        ],
        "byToken": [
          {
            "tokenAddress": "0xa0474c4c1729433e9c709a81f036522a7fedb622",
            "tokenFeesClaimedAmountNative": "0",
            "tokenFeesClaimedAmount": "0.00000000",
            "tokenFeesUnclaimedAmountNative": "54938576739597663735",
            "tokenFeesUnclaimedAmount": "54.93857674",
            "tokenLiquidityAmountNative": "202331875403223385319484",
            "tokenLiquidityAmount": "202331.87540322",
            "tokenPriceUSD": 0.0149137
          }
        ]
      }
    ]
  }
}

Authorizations

x-api-key
string
header
default:API_KEY
required

Headers

x-amberdata-blockchain-id
enum<string>

[Optional] The id of the blockchain for which you want data from. Defaults to ethereum-mainnet if not specified.

Available options:
ethereum-mainnet

Path Parameters

walletAddress
string
default:0x7e95Cde1B7270155C62450D1931ABe977BfbFe9C
required

The address of the wallet for which the timeseries metrics are desired.

Query Parameters

startDate
string<date-time>
default:2024-01-23

[Optional] Payload only includes data after this date (inclusive).<BR>[Formats] seconds | milliseconds | iso8601<BR>[Examples] 1578531600 | 1578531600000 | 2020-09-01T01:00:00

endDate
string<date-time>

[Optional] Payload only includes data after this date (inclusive).<BR>[Formats] seconds | milliseconds | iso8601<BR>[Examples] 1578531600 | 1578531600000 | 2020-09-01T01:00:00

timeFormat
enum<string>
default:hr

[Optional] Time format of the timestamps in the return payload.

Available options:
milliseconds,
ms,
iso,
iso8601,
hr,
human_readable
liquidityPoolAddress
string
default:0xCBCdF9626bC03E24f779434178A73a0B4bad62eD
required

The address of the liquidity pool that the wallet is providing liquidity in.

positionId
string

[Optional] Filter to only return metrics for a specific position of the wallet.

protocolName
enum<string>
default:uniswapv3
required

Filter to only a specific protocol that the wallet is providing liquidity in.

Available options:
uniswapv3

Response

200 - application/json

200

The response is of type object.