Get Token Balances

Retrieves the various ERC-20 Token balance by passing wallet address

GetCoinBalances retrieves the current balances for various coin types associated with a specified account address. This is crucial for platforms requiring real-time information on account coin holdings.

Base URL: https://mevm-devnet.lync.world/subgraphs/name/mevm

Get All Token Data from Wallet Address:

The graphQL query filters data based on wallet address and returns balance, contractAddress, Name, Symbol etc.

{
 getTokenBalances(where: {account: "0x26e76b18d4a132a9397c46af11e4688bdb602e92"}) {
    id
    account
    value
    token{
      id
      contractAddress
      name
      symbol
      decimals
    }
  }
}

Get Token Data from Wallet Address and Contract Address of token:

The graphQL query filters data based on wallet address and returns balance, contractAddress, Name, Symbol etc.

{
  getTokenBalances(where: {account: "0x26e76b18d4a132a9397c46af11e4688bdb602e92",
   token_: {contractAddress: "0x000ccc41cd1c789643ce2904aa9730bdf409819f"}}) {
    id
    account
    value
    token{
      id
      contractAddress
      name
      symbol
      decimals
    }
  }
}

Last updated