How do I query historical account data on solana with quicknode?

How do I use getAccountInfo to query an account at a particular time in the ledger? I see there’s support for solana archive queries but don’t see how to use the feature. Thanks

Hi @Jack,

You can mention the minContextSlot in your request to get the info at a particular slot.

All the QuickNode Solana RPCs on all plans gives you access to the archival data.

So if an account has been closed in a later slot I can use that query to grab its account data at a previous slot where it’s not closed?

That is correct, you can just mention the slot for which you want the state of that account.

Gotcha, thanks for the response… I must be doing something wrong. Here’s my query

curl https://QUICKNODE -X POST -H “Content-Type: application/json” -d ’
“jsonrpc”: “2.0”,
“id”: 1,
“method”: “getAccountInfo”,
“params”: [
“encoding”: “base58”,
“minContextSlot”: 226965989

the account CTzhBWUqYt4PCDC8zsgXoESY75PUn4Rdudk7yFz7zdaz here is closed currently at latest slot

but it’s open here

I’ve tried a few diff slots around this slot time of this tx but I still get null data back

heyy, don’t think this is correct