TriportRPC

Paging getSignaturesForAddress with before/until

Last updated:

At a glance

Symptom details
PropertyValue
OrderNewest to oldest
Maximum per call1,000 signatures
beforeStart searching backwards from this signature
untilStop at this signature, if reached before the limit
Without beforeThe search starts from the highest max confirmed block

What you see

getSignaturesForAddress returns exactly 1,000 entries (or your limit) and older transactions you know about are not among them. Repeating the call returns the same newest page again.

Why this happens

Solana's reference says the result is "ordered from newest to oldest transaction", and limit caps a call at 1,000 signatures. before means "start searching backwards from this transaction signature"; without it, "the search starts from the top of the highest max confirmed block" — which is why an unchanged call keeps returning the newest page. until means "search until this transaction signature, if found before limit reached", so it bounds a walk from the other side. Paging is therefore a backwards walk: each call's oldest signature becomes the next call's before.

What to do

  1. First call: no before, limit up to 1,000. Next calls: before = the last (oldest) signature of the previous page.
  2. For incremental sync, pass until = the newest signature you processed last time, so the walk stops where your stored history begins.
  3. Stop when a page comes back with fewer entries than your limit, or empty: the walk has reached the oldest signature this node returns.
  4. Store the cursor signature, not a count or a slot — signatures are the only cursor the method accepts.

When this is not our problem

The page size, the order and the before/until cursors are part of Solana's RPC method itself and behave the same on every node, whoever operates it, Triport included. How far back a walk reaches depends on what the node retains; that is covered on the empty-history page linked below.

FAQ

How do I get more than 1,000 transactions for a Solana address?
Page backwards: pass the oldest signature of each page as before on the next call, until a page returns fewer entries than your limit.
What is the difference between before and until?
before sets where the backwards search starts; until sets the signature where it stops.

Sources