# Get average of coins price

**URL:** https://community.bitquery.io/t/get-average-of-coins-price/680
**Category:** GraphQL API
**Created:** [November 28, 2021, 8:27pm UTC](https://community.bitquery.io/t/get-average-of-coins-price/680 "2021-11-28T20:27:39Z")
**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, 8:27pm UTC](https://community.bitquery.io/t/get-average-of-coins-price/680/1 "2021-11-28T20:27:39Z")

</div>

How can I get the price average of my coins if I bought them at different times? Let’s say I have a wallet and I want to fetch all transactions in matic chain and see the price at which I bought the token, the date/time, hash and amount?

I’m trying this but it’s not working 😕

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

```

---

<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:43pm UTC](https://community.bitquery.io/t/get-average-of-coins-price/680/3 "2021-11-29T12:43:33Z")

</div>

> [@Arturo](#):
>
> `0x59820C7a02Ba744140c325c94D0Ab0D2449ea6B5`

This is the correct query

```auto
query MyQuery {
  ethereum(network: matic) {
    transfers (sender: {is: "0x59820C7a02Ba744140c325c94D0Ab0D2449ea6B5"}){
      amount(calculate: average in:USD)
    }
  }
}

```
