getTokenAccountsByOwner
Learn getTokenAccountsByOwner use cases, code examples, request parameters, response structure, and tips.
β
Common Use Cases
π§Ύ Request Parameters
[
ownerPubkey: string, // Required β The public key of the wallet.
filter: {
mint?: string, // Optional β Specific token mint to filter by.
programId?: string // Optional β Token program ID to filter accounts (e.g. SPL or Token-2022).
},
options?: {
commitment?: string, // Optional β Commitment level (processed, confirmed, finalized).
encoding?: string, // Optional β Data encoding ("jsonParsed" recommended).
dataSlice?: { offset: number, length: number }, // Optional β Only used for binary encodings.
minContextSlot?: number // Optional β Minimum context slot.
}
]π¦ Response Structure
π§ͺ Examples
π‘ Developer Tips
Last updated