# Get Pancake Pool's of a specific token

**URL:** <https://community.bitquery.io/t/get-pancake-pools-of-a-specific-token/45>\
**Category:** GraphQL API\
**Tags:** closed\
**Created:** [May 19, 2021, 10:44am UTC](https://community.bitquery.io/t/get-pancake-pools-of-a-specific-token/45 "2021-05-19T10:44:39Z")\
**Posts on this page:** 13\
**Page:** 1

<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:** [May 19, 2021, 10:44am UTC](https://community.bitquery.io/t/get-pancake-pools-of-a-specific-token/45/1 "2021-05-19T10:44:39Z")

</div>

The following query gives all the pools of pancake v1 and v2 for a specific token. Here we took 0xa184088a740c695e156f91f5cc086a06bb78b827 as an example.

```
{
  ethereum(network: bsc) {
    arguments(
      smartContractAddress: {in: ["0xBCfCcbde45cE874adCB698cC183deBcF17952812",
      "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73"]}
      smartContractEvent: {is: "PairCreated"}
      options: {asc: "block.height", limit: 10}
    ) {
      block {
        height
      }
      any(
        of: argument_value
        argument: {in: ["token0", "token1"]}
        value: {is: "0xa184088a740c695e156f91f5cc086a06bb78b827"}
      )
      pair: any(of: argument_value, argument: {is: "pair"})
      token1: any(of: argument_value, argument: {is: "token1"})
      token0: any(of: argument_value, argument: {is: "token0"})
    }
  }
}
```

---

<div class="post-metadata">

**Author:** ![peter\_performance](https://avatars.discourse-cdn.com/v4/letter/p/b4bc9f/32.png) [@peter\_performance](https://community.bitquery.io/u/peter_performance)\
**Post date:** [May 25, 2021, 9:11am UTC](https://community.bitquery.io/t/get-pancake-pools-of-a-specific-token/45/2 "2021-05-25T09:11:19Z")

</div>

Hi, I was looking for exact this query. However, it does not seem to work properly. To test the query, I tried to find the LP Pool of the SAFEMOON token (address 0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3) on Pancake Swap, but the results of the above query seem weird. Not only do I get many wrong Pairs that have nothing to do with SAFEMOON, but also when I take out the _options_ and the part with the _block height_, it gives just one wrong result. I played around with the value filter and tried to put it in the first block etc. but I could not find any working solution yet. Any suggestions?  
Thanks.

---

<div class="post-metadata">

**Author:** ![peter\_performance](https://avatars.discourse-cdn.com/v4/letter/p/b4bc9f/32.png) [@peter\_performance](https://community.bitquery.io/u/peter_performance)\
**Post date:** [May 25, 2021, 9:12am UTC](https://community.bitquery.io/t/get-pancake-pools-of-a-specific-token/45/3 "2021-05-25T09:12:55Z")

</div>

> [@gaurav](#):
>
> ```auto
> any(
> of: argument_value
> argument: {in: ["token0", "token1"]}
> value: {in: "0xa184088a740c695e156f91f5cc086a06bb78b827"}
> )
> 
> ```

It seems as if the following part is not working properly:

any(  
of: argument\_value  
argument: {in: [“token0”, “token1”]}  
value: {in: “0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3”}  
)

More specifically, the value-filter does not seem to work.

---

<div class="post-metadata">

**Author:** ![scane](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@scane](https://community.bitquery.io/u/scane)\
**Post date:** [June 1, 2021, 8:57am UTC](https://community.bitquery.io/t/get-pancake-pools-of-a-specific-token/45/4 "2021-06-01T08:57:57Z")

</div>

Hey, has this been solved? How to find [your\_token]/BNB LP BNB Holdings in USD?

---

<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:** [June 2, 2021, 1:01pm UTC](https://community.bitquery.io/t/get-pancake-pools-of-a-specific-token/45/5 "2021-06-02T13:01:30Z")

</div>

Sorry not yet resolved, we have raised this again with the dev team.

---

<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:** [June 3, 2021, 1:32pm UTC](https://community.bitquery.io/t/get-pancake-pools-of-a-specific-token/45/6 "2021-06-03T13:32:38Z")

</div>

DexTrades API can be used to get pool tokens for a given currency, check the following query

```auto
{
  ethereum(network: bsc) {
    dexTrades(
      baseCurrency: {is: "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82"}
      options: {desc: "trades"}
    ) {
      poolToken: smartContract {
        address {
          address
        }
      }
      exchange {
        fullName
      }
      pair: quoteCurrency {
        symbol
      }
      trades: count
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![Tedlourson](https://sea2.discourse-cdn.com/flex016/user_avatar/community.bitquery.io/tedlourson/32/52_2.png) [@Tedlourson](https://community.bitquery.io/u/Tedlourson)\
**Post date:** [June 13, 2021, 5:18pm UTC](https://community.bitquery.io/t/get-pancake-pools-of-a-specific-token/45/7 "2021-06-13T17:18:25Z")

</div>

> [@gaurav](#):
>
> ```auto
> {
> ethereum(network: bsc) {
> dexTrades(
> baseCurrency: {is: "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82"}
> options: {desc: "trades"}
> ) {
> poolToken: smartContract {
> address {
> address
> }
> }
> exchange {
> fullName
> }
> pair: quoteCurrency {
> symbol
> }
> trades: count
> }
> }
> }
> 
> ```

Hey,

I just tested it with a new tokens : 0xa8656f71EE80573Ed11719a7957Bd83fa320250B

As you will Poocoin have data about their LP but from the API I’m getting “no result”

> **[PooCoin BSC Charts](https://poocoin.app/tokens/0xa8656f71ee80573ed11719a7957bd83fa320250b)**
>
> PooCoin live streaming charts DAPP for Binance Smart Chain (BSC) tokens.

I just would like to know why it happens for being able to handle this issue.  
Thank you

---

<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:** [June 14, 2021, 6:24am UTC](https://community.bitquery.io/t/get-pancake-pools-of-a-specific-token/45/8 "2021-06-14T06:24:00Z")

</div>

You need the latest trades for this (0xa8656f71EE80573Ed11719a7957Bd83fa320250B) token right?

Check this query

```auto
{
  ethereum(network: bsc) {
    dexTrades(
      baseCurrency: {is: "0xa8656f71EE80573Ed11719a7957Bd83fa320250B"}
      quoteCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
      options: {desc: ["transaction.index"], limit: 10}
    ) {
      transaction {
        index
        gas
        gasPrice
        gasValue
      }
      gasPrice
      gas
      exchange {
        name
      }
      baseCurrency {
        symbol
      }
      quoteCurrency {
        symbol
      }
      quotePrice
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![NorrinRadd](https://avatars.discourse-cdn.com/v4/letter/n/dec6dc/32.png) [@NorrinRadd](https://community.bitquery.io/u/NorrinRadd)\
**Post date:** [June 25, 2021, 5:47pm UTC](https://community.bitquery.io/t/get-pancake-pools-of-a-specific-token/45/9 "2021-06-25T17:47:38Z")

</div>

I am using this.

```auto
{
  ethereum(network: bsc) {
    dexTrades(
      options: {limit: 10000, desc: "count"}
      baseCurrency: {is: "0x68590a47578e5060a29fd99654f4556dbfa05d10"}
    ) {
      smartContract {
        address {
          address
        }
      }
      count
      exchange {
        fullName
      } 
      baseCurrency {
        name
      } 
      quoteCurrency {
        name
      } 
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![andykwan](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@andykwan](https://community.bitquery.io/u/andykwan)\
**Post date:** [June 29, 2021, 11:40pm UTC](https://community.bitquery.io/t/get-pancake-pools-of-a-specific-token/45/10 "2021-06-29T23:40:40Z")

</div>

Thanks a lot, I just raised a question about this 🙂

---

<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:** [June 30, 2021, 6:35am UTC](https://community.bitquery.io/t/get-pancake-pools-of-a-specific-token/45/11 "2021-06-30T06:35:25Z")

</div>

> [@Tedlourson](#):
>
> 0xa8656f71ee80573ed11719a7957bd83fa320250b

This shows result …it take little time

```auto
{
  ethereum(network: bsc) {
    dexTrades(
      baseCurrency: {is: "0xa8656f71ee80573ed11719a7957bd83fa320250b"}
      options: {desc: "trades"}
    ) {
      poolToken: smartContract {
        address {
          address
        }
      }
      exchange {
        fullName
      }
      pair: quoteCurrency {
        symbol
      }
      trades: count
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![sayon](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sayon](https://community.bitquery.io/u/sayon)\
**Post date:** [July 9, 2021, 7:03am UTC](https://community.bitquery.io/t/get-pancake-pools-of-a-specific-token/45/12 "2021-07-09T07:03:25Z")

</div>



---

<div class="post-metadata">

**Author:** ![sayon](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sayon](https://community.bitquery.io/u/sayon)\
**Post date:** [July 16, 2021, 9:43am UTC](https://community.bitquery.io/t/get-pancake-pools-of-a-specific-token/45/13 "2021-07-16T09:43:07Z")

</div>


