<p>You need to look at the specific pool's history using the <code>pools/{pool_id}/history</code> endpoint.</p>
<pre><code>[
  {
    &quot;epoch&quot;: 233,
    &quot;blocks&quot;: 22,
    &quot;active_stake&quot;: &quot;20485965693569&quot;,
    &quot;active_size&quot;: 1.2345,
    &quot;delegators_count&quot;: 115,
    &quot;rewards&quot;: &quot;206936253674159&quot;,
    &quot;fees&quot;: &quot;1290968354&quot;
  }
]
</code></pre>
<p>See <a href="https://docs.blockfrost.io/#tag/Cardano-Pools/paths/~1pools~1%7Bpool_id%7D~1history/get" rel="nofollow noreferrer">docs.blockfrost.io</a>.</p>

CC BY-SA 4.0
2022-12-01T14:52:08.103Z
Thank you for your answer. For private pool, reward amount is always 0. It seems all reward value become margin. Is it possible to get margin value in the pool history?
Heindrick
CC BY-SA 4.0
2022-12-01T15:33:21.527Z
It should not be 0 I think. Are you sure you're not looking at the first epoch of the pool, where it does not participate in staking yet?
Marek Mahut - StakeNuts
CC BY-SA 4.0
2022-12-01T21:57:06.807Z
The historical values of the pool margin value are available in `db-sync`.
Erik de Castro Lopo
CC BY-SA 4.0
2022-12-01T09:09:36.597Z
2022-12-01T09:09:36.597Z
Marek Mahut - StakeNuts
<p>As the main dev on <code>db-sync</code> I can tell you how to get it there.</p>
<p>In the simplest manner possible (with randomly chosen pool and epoch):</p>
<pre><code># select id, view from pool_hash where view =
    'pool19u64770wqp6s95gkajc8udheske5e6ljmpq33awxk326zjaza0q' ; 
 id |                           view                           
----+----------------------------------------------------------
 13 | pool19u64770wqp6s95gkajc8udheske5e6ljmpq33awxk326zjaza0q
(1 row)
# select sum (amount) / 1000000 as ada_reward from reward where earned_epoch = 354 
    and pool_id = 16 and type = 'member' ; 
     ada_reward     
--------------------
 13856.795160000000
(1 row)
</code></pre>
<p>This could be made into a single query with a <code>join</code> of the two tables.</p>

CC BY-SA 4.0
2022-12-01T03:37:17.880Z
2022-12-01T03:37:17.880Z
Erik de Castro Lopo
<p>I want to get pool(private pool) reward for specific epoch.</p>
<p>I searched blockfrost.io apis, can't find reward api.</p>
<p>How can I get reward by api? Or other solution will be fine like graphql.</p>

<blockfrost><rewards><epoch>
Get pool reward for specific epoch
# Get pool reward for specific epoch

(Asked by: username_0 on 2022-12-01)

I want to get pool(private pool) reward for specific epoch.

I searched blockfrost.io apis, can't find reward api.

How can I get reward by api? Or other solution will be fine like graphql.

**Tags:** blockfrost, rewards, epoch

---

## 2 answers

### Answer by username_1 on 2022-12-01. Score: 1 | Accepted answer

You need to look at the specific pool's history using the pools/{pool_id}/history endpoint.
[
  {
    "epoch": 233,
    "blocks": 22,
    "active_stake": "20485965693569",
    "active_size": 1.2345,
    "delegators_count": 115,
    "rewards": "206936253674159",
    "fees": "1290968354"
  }
]

See docs.blockfrost.io.

> **Comments:**
> **username_0**: Thank you for your answer. For private pool, reward amount is always 0. It seems all reward value become margin. Is it possible to get margin value in the pool history?  
> **username_1**: It should not be 0 I think. Are you sure you're not looking at the first epoch of the pool, where it does not participate in staking yet?  
> **username_2**: The historical values of the pool margin value are available in `db-sync`.  

---

### Answer by username_2 on 2022-12-01. Score: 0

As the main dev on db-sync I can tell you how to get it there.
In the simplest manner possible (with randomly chosen pool and epoch):
# select id, view from pool_hash where view =
    'pool19u64770wqp6s95gkajc8udheske5e6ljmpq33awxk326zjaza0q' ; 
 id |                           view                           
----+----------------------------------------------------------
 13 | pool19u64770wqp6s95gkajc8udheske5e6ljmpq33awxk326zjaza0q
(1 row)
# select sum (amount) / 1000000 as ada_reward from reward where earned_epoch = 354 
    and pool_id = 16 and type = 'member' ; 
     ada_reward     
--------------------
 13856.795160000000
(1 row)

This could be made into a single query with a join of the two tables.


---

