Parameters
string
required
Public key of the delegate (base-58 encoded)
object
required
Response
object
Object containing:
array
Array of token account objects containing:
string
Public key of the token account (base-58 encoded)
object
number
Number of lamports in the account
string
Public key of the account owner (base-58 encoded)
boolean
Whether the account is executable
number
Epoch at which the account will next owe rent
object
object
object
object
string
Public key of the token’s mint (base-58 encoded)
string
Public key of the token account owner (base-58 encoded)
string
Public key of the delegate (base-58 encoded)
string
Type of account (account)
string
Program that owns the account (spl-token)
number
Number of bytes allocated to the account
Code Examples
Basic Request
Using web3.js
Notes
- Returns all token accounts where the given public key is a delegate
- The delegate has the authority to transfer tokens from these accounts
- The response is immediate as it reads from the current state
- The accounts can change with token transfers and other operations
- The delegate must be a valid public key
Best Practices
- Use appropriate commitment level based on your needs
- Cache results when appropriate to reduce RPC load
- Monitor for changes in delegated accounts
- Consider using websocket subscription for real-time updates
- Handle network errors and retry when appropriate
Common Errors
Use Cases
-
Delegate Account Analysis
-
Delegate Account Monitoring
-
Delegate Account Planning