Get all transaction from wallet for a given token, with USD price

Hello,

I would like to get all the transactions (in and out) from one wallet for a given token, with quantity and USD price when buy or sell for each transaction. Like BscScan transfers tab, but with the USD price of the transaction.

I tried a lot of things, many different ways, but my results are always wrong (when I have results).

I can get all transactions, but the price is not here:

query ($address: String!, $tokenAddress: String!) {
  ethereum(network: bsc) {
    address(address: {is: $address}) {
      balances(currency: {is: $tokenAddress}) {
        currency {
          address
          symbol
          tokenType
          name
        }
        value
        history {
          timestamp
          transferAmount
        }
      }
    }
  }
}

Can you please help me? :slight_smile:

All Inbound(Incoming) Transactions All inbound transactions of a specific wallet

All outbound (outgoing) transactions - All outbound transactions of a specific wallet

Both Inbound/Outbound transactions in one api

Hi,

Thanks for your reply. The inbound and outbound using alias works, I get all the transactions, but… price in USD is always 0. I saw an other topic with the same issue, you said it has been fixed. Do you have any idea?

I use BSC as Network, if it can help.

Thanks.

Check this

{
  ethereum(network: ethereum) {
    inbound: transfers(
      options: {desc: "block.timestamp.time", asc: "currency.symbol", limit: 10}
      amount: {gt: 0}
      receiver: {is: "0xcb99ee10c7cb3813df8672bf83d3a77b5c52837c"}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      address: sender {
        address
        annotation
      }
      currency {
        address
        symbol
      }
      gasValue
      amount(in: USD)
      amountInUSD: amount(in: USD)
      transaction {
        hash
      }
      external
    }
    outbound: transfers(
      options: {desc: "block.timestamp.time", asc: "currency.symbol", limit: 10}
      amount: {gt: 0}
      sender: {is: "0xcb99ee10c7cb3813df8672bf83d3a77b5c52837c"}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      address: receiver {
        address
        annotation
      }
      currency {
        address
        symbol
      }
      amount
      amountInUSD: amount(in: USD)
      transaction {
        hash
      }
      gasValue
      external
    }
  }
}

That’s exactly what I have already done, amountInUSD is always 0.

{
  ethereum(network: bsc) {
    inbound: transfers(
      options: {desc: "block.timestamp.time", asc: "currency.symbol"}
      receiver: {is: "0xa6f2d35d316da15d029e6eb3d0143a38afd5f1bc"}
      currency: {is: "0xefdfe2ce33000b5b6b5c64c6a4d54ac789677ed8"}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      address: sender {
        address
        annotation
      }
      currency {
        address
        symbol
      }
      gasValue
      amount
      amountInUSD: amount(in: USD)
      transaction {
        hash
      }
      external
    }
    outbound: transfers(
      options: {desc: "block.timestamp.time", asc: "currency.symbol"}
      sender: {is: "0xa6f2d35d316da15d029e6eb3d0143a38afd5f1bc"}
      currency: {is: "0xefdfe2ce33000b5b6b5c64c6a4d54ac789677ed8"}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      address: receiver {
        address
        annotation
      }
      currency {
        address
        symbol
      }
      amount
      amountInUSD: amount(in: USD)
      transaction {
        hash
      }
      gasValue
      external
    }
  }
}
1 Like

Hi,

Any news / ideas about this point?

I have raised this with the DEV team, will reply once I get the answer.

1 Like

Hi,
Any news about my request? Do you see a solution, or still not?

Did you check with the cryptorank team for listing, as we suggest.

No, because it will not solve my issue. I can ask for listing my token, but what about others? My tool must analyze every BSC token, not only mine. I can not ask to cryptorank for listing every tokens my users need.

Ohh … got that … but this is not a small task, we need to decide on a strategy for it. It will take months.

OK. Bad news, but I understand.
Is there a way, instead of get amount in USD, to get amount in BNB?

Yes…as I understand most of the token has wbnb pair…so you can easily get the prices in bnb

OK, but how, from my previous request?

Ohh… you mean USD value in transactions, this is still pending from our side.

this is not you want?

This is solved…please check and revert