getLookupTablesByAccounts

Lookup tables that hold several accounts, or the best small set to cover them.

1 credit a call. Free plan includes 500,000 credits a month.

What it returns

Pass the accounts a transaction uses. By default you get tables that hold all of them. With bestSet, you get a small set of tables covering as many as possible, plus the accounts left uncovered.

Each result carries the indices to use and an estimate of the bytes saved.

What you can build

  • Compile v0 transactions

    Pick lookup tables for a swap route in one call.

  • Fit bundles

    Shrink transactions enough to fit a Jito bundle.

  • Route benchmarks

    Compare transaction size across routes.

Call it

Replace the URL with your endpoint from the dashboard.

getLookupTablesByAccounts1 credit

Request

curl "$SOLANA_RPC_URL" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getLookupTablesByAccounts",
  "params": [
    {
      "accounts": [
        "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "So11111111111111111111111111111111111111112"
      ],
      "bestSet": true,
      "maxLookupTables": 4
    }
  ]
}'

Response shape

{
  "lookupTables": [
    {
      "pubkey": "…",
      "matchedAccounts": [
        "…",
        "…"
      ],
      "matchedAddressIndices": [
        3,
        17
      ],
      "estimatedBytesSaved": 62
    }
  ],
  "coveredAccounts": [
    "…",
    "…"
  ],
  "uncoveredAccounts": [],
  "estimatedBytesSaved": 62,
  "count": 1
}

Parameters

accountsstring[]
The accounts to cover. Required.
bestSetboolean
Return a covering set instead of the intersection. Default false.
maxLookupTablesnumber
Most tables in the set. Default 8.
ownerstring
Only tables with this authority.
limitnumber
1 to 1,000 tables a page. Default 100.
cursorstring
The nextCursor from the previous page.

Good to know

  • bestSet is greedy: small, not guaranteed minimal.
  • Signers and invoked programs always stay static keys.

Start calling getLookupTablesByAccounts.

Free to start. Paid plans from €39 a month.