<p>The list of stake pools should only be a couple of thousand which is tiny in comparison to number of blocks or even worse the number of transactions.</p>
<p>It can be done with a relatively simple SQL query on the database maintained by <code>cardano-db-sync</code>.</p>

CC BY-SA 4.0
2022-06-27T06:12:48.993Z
Is it possible to query the ticker of a pool directly from the db? Or should I have to get first the URL of the metadata? I understand that the ticker is not a field in the stake pools database. Am I right? Thank you.
Falcon Stakepool
CC BY-SA 4.0
2022-06-28T07:12:19.767Z
The ticker is stored in the db. You want the `ticker_name` field of the `pool_offline_data` table,
Erik de Castro Lopo
CC BY-SA 4.0
2022-06-26T10:32:04.780Z
2022-06-26T10:32:04.780Z
Erik de Castro Lopo
<p>As a developer, I'd like to have a service that retrieves the information of a stake pool based on its ticker (or all the stake pools with that ticker, I know there can be duplicates).</p>
<p>I'm thinking that with <code>graphql</code> I need to query first the list of <code>stakePools</code> (which is huge) and then filter that by ticker, which is inside the <code>metadata</code> of the pool.</p>
<p>Is there a way to do this in a more performing way or a service already solving this for me?</p>

<stake-pool><staking><cardano-graphql><query>
What is the best way to query stake pools by ticker?
# What is the best way to query stake pools by ticker?

(Asked by: username_0 on 2022-06-26)

As a developer, I'd like to have a service that retrieves the information of a stake pool based on its ticker (or all the stake pools with that ticker, I know there can be duplicates).

I'm thinking that with `graphql` I need to query first the list of `stakePools` (which is huge) and then filter that by ticker, which is inside the `metadata` of the pool.

Is there a way to do this in a more performing way or a service already solving this for me?

**Tags:** stake-pool, staking, cardano-graphql, query

---

## 1 answers

### Answer by username_1 on 2022-06-26. Score: 3 | Accepted answer

The list of stake pools should only be a couple of thousand which is tiny in comparison to number of blocks or even worse the number of transactions.

It can be done with a relatively simple SQL query on the database maintained by `cardano-db-sync`.

> **Comments:**
> **username_0**: Is it possible to query the ticker of a pool directly from the db? Or should I have to get first the URL of the metadata? I understand that the ticker is not a field in the stake pools database. Am I right? Thank you.  
> **username_1**: The ticker is stored in the db. You want the `ticker_name` field of the `pool_offline_data` table,  

---

