# Transactions with prices and time

**URL:** https://community.bitquery.io/t/transactions-with-prices-and-time/676
**Category:** GraphQL API
**Created:** [November 28, 2021, 3:59am UTC](https://community.bitquery.io/t/transactions-with-prices-and-time/676 "2021-11-28T03:59:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Arturo](https://sea2.discourse-cdn.com/flex016/user_avatar/community.bitquery.io/arturo/32/335_2.png) [@Arturo](https://community.bitquery.io/u/Arturo)
#### Post date: [November 28, 2021, 3:59am UTC](https://community.bitquery.io/t/transactions-with-prices-and-time/676/1 "2021-11-28T03:59:55Z")

</div>

Hi, I’m new to the api still trying to understand it. How can I get the transactions that an address did so I can calculate the average of the price for a token?

For example I bought ETH 2 times at different prices using the currency USD. So I want the query to return the hash, day/time, price bought and quantity. Can someone help me to do the query for 1 network (example matic) and I’ll modify it for the rest, at least have an idea how it works. This is what I’ve been trying but it’s returning 0 results:

```auto
query MyQuery {
  ethereum(network: matic) {
    address(address: {is: "0x59820C7a02Ba744140c325c94D0Ab0D2449ea6B5"}) {
      address
    }
    transfers {
      amount
    }
  }
}

```

It just returns this:

```auto
{
  "ethereum.address[0]": {
    "address": "0x59820c7a02ba744140c325c94d0ab0d2449ea6b5"
  }
}

```

How can I do it?

---

<div class="post-metadata">

### Author: ![gaurav](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@gaurav](https://community.bitquery.io/u/gaurav)
#### Post date: [November 29, 2021, 12:56pm UTC](https://community.bitquery.io/t/transactions-with-prices-and-time/676/2 "2021-11-29T12:56:32Z")

</div>

Use transfer query, not transaction… however if you want to use transaction api …i have added example below.

> [@Get average of coins price](https://community.bitquery.io/t/get-average-of-coins-price/680/3):
>
> This is the correct query query MyQuery { ethereum(network: matic) { transfers (sender: {is: "0x59820C7a02Ba744140c325c94D0Ab0D2449ea6B5"}){ amount(calculate: average in:USD) } } }

```auto
{
  ethereum(network: matic) {
    transactions(
      success: true
      txSender: {is: "0x59820C7a02Ba744140c325c94D0Ab0D2449ea6B5"}
    ) {
      amount(calculate: average, in: USD)
    }
  }
}

```
