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
    }
  }
}

Hi,

Any news / ideas about this point?

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

1 Like