User Balances End-points

This section provides all the needed information about how to request the data to the User Balances API

getUserNativeBalanceByChain

Get user wallet balances of native token

GET https://api-v1.mymerlin.io/api/merlin/public/balances/native/{userAddress}?chain={chain}

Path Parameters

Query Parameters

{
  "balance": 0
}
curl -X GET --header 'Accept: application/json' 
'https://api-v1.mymerlin.io/api/merlin/public/balances/native/{userAddress}?chain={chain}'

getUserTokenBalances

Get user wallet balances of tokens (including native)

GET https://api-v1.mymerlin.io/api/merlin/public/balances/token/{userAddress}?chain={chain}

Path Parameters

Query Parameters

[
  {
    "balance": 0,
    "decimals": 0,
    "logo": "string",
    "name": "string",
    "symbol": "string",
    "thumbnail": "string",
    "token_address": "string"
  }
]
curl -X GET --header 'Accept: application/json' 
'https://api-v1.mymerlin.io/api/merlin/public/balances/token/{userAddress}'

getUserNFTs

Get user wallet balances of NFTs

GET https://api-v1.mymerlin.io/api/merlin/public/balances/nft/all/{userAddress}?chain={chain}

Path Parameters

Query Parameters

{
  "cursor": "string",
  "page": 0,
  "page_size": 0,
  "result": [
    {
      "amount": 0,
      "block_number": 0,
      "block_number_minted": 0,
      "contract_type": "string",
      "metadata": "string",
      "name": "string",
      "owner_of": "string",
      "symbol": "string",
      "synced_at": "string",
      "token_address": "string",
      "token_id": "string",
      "token_uri": "string"
    }
  ],
  "status": "string",
  "total": 0
}
curl -X GET --header 'Accept: application/json' 
'https://api-v1.mymerlin.io/api/merlin/public/balances/nft/{userAddress}'

getUserNFTsByChain

Get user wallet balances of NFT by chain

GET https://api-v1.mymerlin.io/api/merlin/public/balances/nft/all/{userAddress}?chain={chain}

Query Parameters

curl -X GET --header 'Accept: application/json' 
'https://api-v1.mymerlin.io/api/merlin/public/balances/nft/chain/{userAddress}?chain={chain}

getAllUserBalances

Get user wallet balances by chain: tokens and NFTs

GET https://api-v1.mymerlin.io/api/merlin/public/balances/{userAddress}?chain=matic

Path Parameters

Query Parameters

{
  "nativeBalance": 0,
  "nfts": [
    {
      "amount": 0,
      "blockNumber": 0,
      "blockNumberMinted": 0,
      "contractType": "string",
      "metadata": "string",
      "ownerOf": "string",
      "syncedAt": "string",
      "tokenAddress": "string",
      "tokenId": "string",
      "tokenName": "string",
      "tokenSymbol": "string",
      "tokenUri": "string"
    }
  ],
  "tokenBalances": [
    {
      "balance": 0,
      "logoUrl": "string",
      "tokenAddress": "string",
      "tokenDecimals": 0,
      "tokenName": "string",
      "tokenSymbol": "string"
    }
  ]
}
curl -X GET --header 'Accept: application/json' 
'https://api-v1.mymerlin.io/api/merlin/public/balances/{userAddress}?chain=matic'

getTotalUserBalanceByChain

Get user overall balance by chain, including tokens, NFT and DeFi exposures

GET https://api-v1.mymerlin.io/api/merlin/public/balances/chain/{userAddress}?chain=eth

Query Parameters

{
    "valueUsd": Double
}
curl -X GET --header 'Accept: application/json' 
'https://api-v1.mymerlin.io/api/merlin/public/balances/chain/{userAddress}?chain=eth'

getTotalUserBalanceByChains

Get user overall balance by chains, including tokens, NFT and DeFi exposures grouping by chain

GET https://api-v1.mymerlin.io/api/merlin/public/balances/chains/token/{userAddress}?chains=eth,matic

Query Parameters

```json
{
    "matic": [
        {
            "token_address": "0x0000065a20d6689430601581a21f28014594f74e",
            "name": "WWW.PUNKWL.XYZ",
            "symbol": "PUNKWL.XYZ",
            "logo": null,
            "thumbnail": null,
            "decimals": 18,
            "balance": 7777000000000000000000,
            "price": 0.0,
            "priceChange24h": null,
            "bundleWallet": null,
            "prices": {
                "AED": 0.0,
                "AUD": 0.0,
                "CAD": 0.0,
                "EUR": 0.0,
                "GBP": 0.0,
                "INR": 0.0,
                "USD": 0.0
            }
        },...],
    "eth": [...]
}
```
curl -X GET --header 'Accept: application/json' 
'https://api-v1.mymerlin.io/api/merlin/public/balances/chains/token/{userAddress}?chains=eth,matic'

getTotalUserBalance

Get user overall balance, including tokens, NFT and DeFi exposures

GET https://api-v1.mymerlin.io/api/merlin/public/balances/all/{userAddress}?chain={chain}

{
    "totalValueUsd": Double,
    "byChain": [
        {
            "id": String,
            "name": String,
            "logoUrl": String,
            "wrappedTokenId": String,
            "valueUsd": Double
        },...
]
curl -X GET --header 'Accept: application/json' 
'https://api-v1.mymerlin.io/api/merlin/public/balances/all/{userAddress}?chain={chain}'

Last updated