# Polling NBA topshot events from flow

**URL:** <https://forum.flow.com/t/polling-nba-topshot-events-from-flow/2862>\
**Category:** Uncategorized\
**Created:** [February 24, 2022, 1:52am UTC](https://forum.flow.com/t/polling-nba-topshot-events-from-flow/2862 "2022-02-24T01:52:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cat\_in\_queen\_village](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@Cat\_in\_queen\_village](https://forum.flow.com/u/Cat_in_queen_village)\
**Post date:** [February 24, 2022, 1:52am UTC](https://forum.flow.com/t/polling-nba-topshot-events-from-flow/2862/1 "2022-02-24T01:52:13Z")

</div>

Hi there, I am new to Flow and currently I am trying to follow Eric Ren’s medium blog to poll NBA topshot purchase events from flow:

[https://medium.com/@eric.ren\_51534/polling-nba-top-shot-p2p-market-purchase-events-from-flow-blockchain-using-flow-go-sdk-3ec80119e75f](https://medium.com/@eric.ren_51534/polling-nba-top-shot-p2p-market-purchase-events-from-flow-blockchain-using-flow-go-sdk-3ec80119e75f)

However, this part always gave me an error message:

blockEvents, err := flowClient.GetEventsForHeightRange(context.Background(), client.EventRangeQuery{  
Type: “A.c1e4f4f4c4257510.Market.MomentPurchased”,  
StartHeight: latestBlock.Height - 500,  
EndHeight: latestBlock.Height,  
})

panic: client: rpc error: code = InvalidArgument desc = requested block range (501) exceeded maximum (250)

If I changed the parameter from 500 to 200, then I did not get anything in return.

Can anyone help me out here?

Thanks a bunch!

---

<div class="post-metadata">

**Author:** ![maggo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/maggo/32/673_2.png) [@maggo](https://forum.flow.com/u/maggo)\
**Post date:** [February 24, 2022, 2:09pm UTC](https://forum.flow.com/t/polling-nba-topshot-events-from-flow/2862/2 "2022-02-24T14:09:54Z")

</div>

flow access nodes have had a limit of 250 blocks in one call for a while now because of performance reasons. You’ll have to implement sequential calls if you want to query more events

---

<div class="post-metadata">

**Author:** ![Cat\_in\_queen\_village](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@Cat\_in\_queen\_village](https://forum.flow.com/u/Cat_in_queen_village)\
**Post date:** [February 24, 2022, 8:20pm UTC](https://forum.flow.com/t/polling-nba-topshot-events-from-flow/2862/3 "2022-02-24T20:20:27Z")

</div>

that is what I figured and thanks for confirming it. In future, where can I find these type of info? I did not see it in any flow doc or did I miss it?

---

<div class="post-metadata">

**Author:** ![MCinPA](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@MCinPA](https://forum.flow.com/u/MCinPA)\
**Post date:** [February 25, 2022, 12:04am UTC](https://forum.flow.com/t/polling-nba-topshot-events-from-flow/2862/4 "2022-02-25T00:04:28Z")

</div>

I’m new to this, but my understanding is that what is returned by the above code from the Medium article might not return purchase events, and the subsequent code from the article filters out everything from the initial query:

for \_, blockEvent := range blockEvents {  
for \_, purchaseEvent := range blockEvent.Events {  
fmt.Println(purchaseEvent)  
fmt.Println(purchaseEvent.Value)  
}  
}

I’d love to hear if you find a 250 block range where the results are not empty. Picking random 250 block ranges seems pretty random.

the market contract has been updated to V3, so i’m not sure if Market needs to be changed to MarketV3 in the initial code:

Type: “A.c1e4f4f4c4257510.Market.MomentPurchased”
