# Find "PairCreated" event

**URL:** <https://community.bitquery.io/t/find-paircreated-event/436>\
**Category:** GraphQL API\
**Tags:** closed\
**Created:** [August 23, 2021, 11:49am UTC](https://community.bitquery.io/t/find-paircreated-event/436 "2021-08-23T11:49:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![stcroix](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@stcroix](https://community.bitquery.io/u/stcroix)\
**Post date:** [August 23, 2021, 11:49am UTC](https://community.bitquery.io/t/find-paircreated-event/436/1 "2021-08-23T11:49:49Z")

</div>

Hi there, can I please get some help with writing a query to find the PairCreated event for a specific pair? The pair or data I’m looking for is pair: 0x6e559A800e1C098029b0D7fcCEF14845F18b0078

Here’s what i’ve got so far… don’t know where to put the filter for the pair address:

```auto
query MyQuery {
  ethereum(network: bsc) {
    smartContractEvents(
      smartContractAddress: {is: "0xca143ce32fe78f1f7019d7d551a6402fc5350c73"} #pancake factory
      smartContractEvent: {is: "PairCreated"}
    ) {
      transaction {
        hash
      }
    }
  }
}

```

Many thanks!

---

<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:** [August 23, 2021, 12:47pm UTC](https://community.bitquery.io/t/find-paircreated-event/436/2 "2021-08-23T12:47:13Z")

</div>

What kind of data are you looking for ?

---

<div class="post-metadata">

**Author:** ![stcroix](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@stcroix](https://community.bitquery.io/u/stcroix)\
**Post date:** [August 23, 2021, 1:11pm UTC](https://community.bitquery.io/t/find-paircreated-event/436/3 "2021-08-23T13:11:50Z")

</div>

Just looking to get the transaction hash and a timestamp for when that pair was created

---

<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:** [August 23, 2021, 2:48pm UTC](https://community.bitquery.io/t/find-paircreated-event/436/4 "2021-08-23T14:48:48Z")

</div>

For the particular pair address, the smartContractEvent **PairCreated** is not available. You can check the same here. If you still need the **transaction hash** and **timestamp** of the pair address **0x6e559a800e1c098029b0d7fccef14845f18b0078**. Here is the query

```auto
{
  ethereum(network: bsc) {
    smartContractEvents(
      options: {limit: 10}
      smartContractAddress: {is: "0x6e559a800e1c098029b0d7fccef14845f18b0078"}
    ) {
      smartContractEvent{
        name
      }
      block {
        timestamp {
          iso8601
        }
      }
      transaction {
        hash
      }
    }
  }
}

```

If you need the transaction hash and the timestamp of the pair address **0xca143ce32fe78f1f7019d7d551a6402fc5350c73** , you can use the following query.

```auto
{
  ethereum(network: bsc) {
    smartContractEvents(
      options: {limit: 10}
      smartContractAddress: {is: "0xca143ce32fe78f1f7019d7d551a6402fc5350c73"}
    ) {
      smartContractEvent {
        name
      }
      transaction{
        hash
      }
      block{
        timestamp{
          iso8601
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![stcroix](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@stcroix](https://community.bitquery.io/u/stcroix)\
**Post date:** [August 23, 2021, 11:12pm UTC](https://community.bitquery.io/t/find-paircreated-event/436/5 "2021-08-23T23:12:11Z")

</div>

Thanks @sayon, as a follow up question, is there a simple query I can use just to get the tx hash and timestamp of when a smart contract was first deployed?

---

<div class="post-metadata">

**Author:** ![stcroix](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@stcroix](https://community.bitquery.io/u/stcroix)\
**Post date:** [August 24, 2021, 4:36am UTC](https://community.bitquery.io/t/find-paircreated-event/436/6 "2021-08-24T04:36:02Z")

</div>

I’ll open a new thread for this question so that others can benefit

---

<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:** [August 24, 2021, 7:09am UTC](https://community.bitquery.io/t/find-paircreated-event/436/7 "2021-08-24T07:09:20Z")

</div>

Answered on this thread

> [@Query to find Contract Deployment Transaction?](https://community.bitquery.io/t/query-to-find-contract-deployment-transaction/437):
>
> Hello, Would it be possible to provide an example query that can show the block, time and transaction that a smart contract was created/deployed on the Ethereum/BSC chain? Thanks

---

<div class="post-metadata">

**Author:** ![mbajpai](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@mbajpai](https://community.bitquery.io/u/mbajpai)\
**Post date:** [September 1, 2021, 7:39am UTC](https://community.bitquery.io/t/find-paircreated-event/436/8 "2021-09-01T07:39:23Z")

</div>



---

<div class="post-metadata">

**Author:** ![mbajpai](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@mbajpai](https://community.bitquery.io/u/mbajpai)\
**Post date:** [September 1, 2021, 11:38am UTC](https://community.bitquery.io/t/find-paircreated-event/436/9 "2021-09-01T11:38:13Z")

</div>


