1

The issue is that when I get the create pool txn, there is no way getting the signatures for the token address going forward in time.

getSignaturesForAddress only goes back in time using the before parameter.

Is there not way to get the transactions for a token after a specific signature?

And would it be possible to start the call at a specific slot number. So if i enter a slot number it starts the scan from that slot

0

1 Answer 1

3

The until parameter will do exactly what you want. You specify a signature, and getSignaturesForAddress will stop once it sees that signature, ie:

curl https://api.devnet.solana.com -X POST -H "Content-Type: application/json" -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getSignaturesForAddress",
    "params": [
      "Vote111111111111111111111111111111111111111",
      {
        "until": "2QKPPw7ZEF5ZTkSsvt3YgqyEWQp61k8upaeCrpLvzPvVUdANYx7VWyouMArVF4chW6vDQp1DcbjSpDBMcToB31Uz"
      }
    ]
  }
'

There's no way to specify the search start at a specific slot unfortunately.

More info at https://solana.com/docs/rpc/http/getsignaturesforaddress

2
  • Thanks, Could you let me know how to get value to use in the until param?
    – A.K.
    Commented Nov 20 at 9:52
  • It will heavily depend on your use case. You might be listening to transactions over a websocket to get signatures, you might be fetching blocks, etc. Can you ask a separate question with more information to get a more specific answer?
    – Jon C
    Commented Nov 21 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.