Skip to content

[docs-agent] Document Solana getTokenAccountsByOwnerAtSlot method#1444

Open
alchemy-bot wants to merge 2 commits into
mainfrom
docs/solana-get-token-accounts-by-owner-at-slot
Open

[docs-agent] Document Solana getTokenAccountsByOwnerAtSlot method#1444
alchemy-bot wants to merge 2 commits into
mainfrom
docs/solana-get-token-accounts-by-owner-at-slot

Conversation

@alchemy-bot

Copy link
Copy Markdown
Contributor

Summary

Adds documentation for Alchemy's new Solana JSON-RPC method getTokenAccountsByOwnerAtSlot: the historical, point-in-time version of getTokenAccountsByOwner. Same inputs plus an optional slot to look up past state and pageKey / pageLimit to page through large wallets.

Changes

  • src/openrpc/chains/_components/solana/methods.yaml — full OpenRPC method definition (params, result, example, errors, x-compute-units: 40).
  • src/openrpc/chains/_components/solana/account.yaml — three new schemas: GetTokenAccountsByOwnerAtSlotFilter, GetTokenAccountsByOwnerAtSlotConfig, GetTokenAccountsByOwnerAtSlotResult.
  • src/openrpc/chains/solana/solana.yaml — new $ref in alphabetical position, plus x-bot-ignore entry to protect the method until topconfig.yml in OMGWINNING/chain-config lists it.
  • content/api-reference/solana/solana-api-overview.mdx — alphabetized table row, remaining rows shifted so the table stays sorted.

Not touching content/api-reference/pricing-resources/pricing/compute-unit-costs.mdx: the Solana Standard JSON-RPC table is Daikon-managed via cu:auto markers (see PRs #1424 + #1425). The 40 CU cost for this method needs to be added to topconfig.yml in OMGWINNING/chain-config for it to render on the pricing page on Daikon's next daily 12 PM EST run.

Validation

  • pnpm run generate:rpc — succeeded.
  • pnpm run validate:rpc — passed both json-rpc and chains OpenRPC specs.
  • npx prettier --check on all four changed files — clean.
  • Verified the generated content/api-specs/chains/solana.json includes the method with 3 params, 3 errors, 1 example (with result.value populated so Fern's Response panel renders real data), and x-compute-units: 40.

Linear

DOCS-137

Requested by

@andreidg31 (via Slack thread)

Adds an OpenRPC definition for Alchemy's new Solana JSON-RPC method `getTokenAccountsByOwnerAtSlot`, plus the config/result schemas, an alphabetized overview-table row, and an `x-bot-ignore` guard so Daikon won't strip the method until `topconfig.yml` in chain-config lists it.

The method returns every SPL Token and Token-2022 account owned by a wallet as of a specific slot; if `slot` is omitted it returns the wallet's current holdings. Includes `pageKey`/`pageLimit` pagination.

The 40 CU cost is set on the method definition (`x-compute-units: 40`) but the Solana Standard JSON-RPC pricing table (`content/api-reference/pricing-resources/pricing/compute-unit-costs.mdx`) is Daikon-managed via `cu:auto` markers (PRs #1424 + #1425), so that row will populate on Daikon's next daily run once the value lands in `topconfig.yml` upstream.

Refs DOCS-137

Requested-by: @andreidg31
@alchemy-bot alchemy-bot requested a review from a team as a code owner July 13, 2026 09:44
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

🔗 Preview Mode

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview Jul 13, 2026, 12:05 PM

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 24936723aa

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

type: array
description: The token accounts the wallet held at that slot.
items:
$ref: "#/components/schemas/TokenAccount"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fix parsed token account response schema

For this new method the description says responses are always jsonParsed, and the example returns account.data as an object with program, space, and parsed. Reusing TokenAccount here points generated docs/clients at AccountInfo, whose data is a string array and whose size field is named size, so every successful getTokenAccountsByOwnerAtSlot response is documented with the wrong account shape. Please add/use a parsed token-account schema for this result instead of the generic encoded TokenAccount.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in a5f7cba. Since the method returns jsonParsed responses only (per the description and example), reusing the generic TokenAccount / AccountInfo was wrong: data should be an object with program / space / parsed, not a base64 string array, and the account-metadata field is named space, not size.

Added four schemas — ParsedTokenAccount, ParsedTokenAccountInfo, ParsedSplTokenAccountData, ParsedSplTokenAccountInfo — reusing the existing TokenBalance schema for tokenAmount, and pointed GetTokenAccountsByOwnerAtSlotResult.value.items at ParsedTokenAccount. generate:rpc + validate:rpc pass.

…ountsByOwnerAtSlot

The method returns `jsonParsed` responses (per its description and example), where `account.data` is an object with `program` / `space` / `parsed` and the account metadata field is named `space` (not `size`). The previous schema reused the generic `TokenAccount` / `AccountInfo`, which types `data` as a base64 string array and names the size field `size` — every successful response was documented with the wrong account shape.

Adds parsed-token-account schemas (`ParsedTokenAccount`, `ParsedTokenAccountInfo`, `ParsedSplTokenAccountData`, `ParsedSplTokenAccountInfo`) that match the actual `jsonParsed` payload, and points `GetTokenAccountsByOwnerAtSlotResult.value.items` at the new `ParsedTokenAccount` schema. The existing `TokenBalance` schema is reused for `tokenAmount`. `generate:rpc` + `validate:rpc` pass.

Addresses Codex review on PR #1444.

Refs DOCS-137

Requested-by: @andreidg31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant