# Query for CurrencyCreated events without specifying the generic type

**URL:** <https://forums.sui.io/t/query-for-currencycreated-events-without-specifying-the-generic-type/4629>\
**Category:** Technical Support\
**Created:** [February 2, 2023, 10:33am UTC](https://forums.sui.io/t/query-for-currencycreated-events-without-specifying-the-generic-type/4629 "2023-02-02T10:33:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielmoos](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/danielmoos/32/2843_2.png) [@danielmoos](https://forums.sui.io/u/danielmoos)\
**Post date:** [February 2, 2023, 10:33am UTC](https://forums.sui.io/t/query-for-currencycreated-events-without-specifying-the-generic-type/4629/1 "2023-02-02T10:33:22Z")

</div>

Hello,

Am I correct that it’s currently not possible to filter for **all** generic events, without specifing the generic itself?

use-case: I would like to read all 0x2::c oin::CurrencyCreated events without having to pass in the , so that I can index cointypes off-chain more efficiently.

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sui_getEvents",
  "params": {
      "query": {
          "MoveEvent": "0x2::coin::CurrencyCreated"
      },
      "descending_order": false
  }
}

```

returns an emtpy list (because I did not specify T) where as

```auto
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sui_getEvents",
  "params": {
      "query": {
          "MoveEvent": "0x2::coin::CurrencyCreated<0xe02749a56fc4b05daf0fb1c700e6450ea03ef757::btc::BTC>"
      },
      "descending_order": false
  }
}

```

returns one event.

Best,  
Daniel

---

<div class="post-metadata">

**Author:** ![patrickkuo](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@patrickkuo](https://forums.sui.io/u/patrickkuo)\
**Post date:** [February 5, 2023, 9:40pm UTC](https://forums.sui.io/t/query-for-currencycreated-events-without-specifying-the-generic-type/4629/2 "2023-02-05T21:40:06Z")

</div>

Currently we can only query using the exact type.

Querying for generic type is a valid use case, I think we should support this.

We are moving all event indexing to the indexer, we can add generic type query support to this.

---

<div class="post-metadata">

**Author:** ![danielmoos](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/danielmoos/32/2843_2.png) [@danielmoos](https://forums.sui.io/u/danielmoos)\
**Post date:** [February 7, 2023, 6:23pm UTC](https://forums.sui.io/t/query-for-currencycreated-events-without-specifying-the-generic-type/4629/3 "2023-02-07T18:23:23Z")

</div>

gotcha!

thanks for considering a change.

I have a workaround for now to index the Coin types, but I’m happy to move to the “optimal” event-query solution once it’s available 🙂
