# Last pairs from Pancakeswap

**URL:** <https://community.bitquery.io/t/last-pairs-from-pancakeswap/360>\
**Category:** GraphQL API\
**Tags:** closed\
**Created:** [July 29, 2021, 3:10pm UTC](https://community.bitquery.io/t/last-pairs-from-pancakeswap/360 "2021-07-29T15:10:41Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Alex](https://community.bitquery.io/u/Alex)\
**Post date:** [July 29, 2021, 3:10pm UTC](https://community.bitquery.io/t/last-pairs-from-pancakeswap/360/1 "2021-07-29T15:10:41Z")

</div>

Hello!

Please help me to compose the code: Get a list of the latest pairs from Pancakeswap.

Filter:  
a) a pair based on WBNB (for example: WBNB/PSWAP or PSWAP/WBNB if the order matters)  
b) pair created from the last 2 to 9 days  
c) daily volume (not liquid) more than 10k  
d) last activity of buy/sell: less than 5 minutes (if possible)

Sort by daily volume.

Thank you

---

<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 29, 2021, 4:02pm UTC](https://community.bitquery.io/t/last-pairs-from-pancakeswap/360/2 "2021-07-29T16:02:48Z")

</div>

Hi @Alex sorry for the delay. This query fulfill the above requirements

> **[Last Pairs from PancakeSwap](https://graphql.bitquery.io/ide/IsFXiwXJLJ)**
>
> Bitquery is analytical engine for blockchains

---

<div class="post-metadata">

**Author:** ![Alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Alex](https://community.bitquery.io/u/Alex)\
**Post date:** [July 29, 2021, 4:14pm UTC](https://community.bitquery.io/t/last-pairs-from-pancakeswap/360/3 "2021-07-29T16:14:39Z")

</div>

Thank you, Sayon.

Something is wrong with the result. Only BUSD/WBNB pair is displayed with a different number of trading volumes.

I need A NEW pairs created in last 2 to 9 days, not top pairs like BUSD/WBNB

---

<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:** [August 10, 2021, 8:48am UTC](https://community.bitquery.io/t/last-pairs-from-pancakeswap/360/4 "2021-08-10T08:48:43Z")

</div>

Check this example -

> **[Latest Pairs on Pancake](https://graphql.bitquery.io/ide/jvmZpT3Hji)**
>
> Latest Trades on Pancake

---

<div class="post-metadata">

**Author:** ![Alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Alex](https://community.bitquery.io/u/Alex)\
**Post date:** [November 8, 2021, 7:16am UTC](https://community.bitquery.io/t/last-pairs-from-pancakeswap/360/5 "2021-11-08T07:16:17Z")

</div>

“message”: "ActiveRecord::ActiveRecordError: Response code: 500:\nCode: 160, e.displayText() = DB::Exception: Estimated query execution time (47.54567749630479 seconds) is too long. Maximum: 15.

---

<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 15, 2021, 5:24am UTC](https://community.bitquery.io/t/last-pairs-from-pancakeswap/360/6 "2021-11-15T05:24:16Z")

</div>

I added date filter to reduce the data API trying to query.

```auto
{
  ethereum(network: bsc) {
    arguments(
      smartContractAddress: {is: "0xBCfCcbde45cE874adCB698cC183deBcF17952812"}
      smartContractEvent: {is: "PairCreated"}
      argument: {not: "pair"}
      date: {after: "2021-11-01"}
      options: {desc: "block.height", limit: 100}
    ) {
      block {
        height
        timestamp {
          unixtime
        }
      }
      argument {
        name
        type
      }
      reference {
        address
        smartContract {
          currency {
            name
          }
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![max](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@max](https://community.bitquery.io/u/max)\
**Post date:** [November 22, 2021, 2:06pm UTC](https://community.bitquery.io/t/last-pairs-from-pancakeswap/360/8 "2021-11-22T14:06:48Z")

</div>

I fetched thousands of latest tokens, but when I see latest coinmarketcap token I can’t find single token in what bitquery returned, why’s that ?

It would be great if you could help me on this.

@gaurav

---

<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 23, 2021, 4:06pm UTC](https://community.bitquery.io/t/last-pairs-from-pancakeswap/360/9 "2021-11-23T16:06:16Z")

</div>

Because DEXs have a lot more shitcoins.

---

<div class="post-metadata">

**Author:** ![max](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@max](https://community.bitquery.io/u/max)\
**Post date:** [November 25, 2021, 10:19am UTC](https://community.bitquery.io/t/last-pairs-from-pancakeswap/360/10 "2021-11-25T10:19:47Z")

</div>

okay got you  
but why the tokens are missing, I mean are you skipping them ?

---

<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, 1:07pm UTC](https://community.bitquery.io/t/last-pairs-from-pancakeswap/360/11 "2021-11-29T13:07:12Z")

</div>

which token we skip… can you tell me an example?

Give me its address.
