Spending Limit Concepts
Period Types
- ONE_TIME: Single-use allowance
- DAILY: Resets every 24 hours
- WEEKLY: Resets every 7 days
- MONTHLY: Resets every 30 days
Key Components
- Amount: Maximum spendable amount in smallest token units
- Mint: Token contract address (e.g., USDC, SOL)
- Period: How often the limit resets
- Spending Limit Signers: Authorized addresses that can use the limit
- Destinations: Optional list of allowed recipient addresses
- Expiration: Optional expiration timestamp
Security Model
Spending limits operate with reduced security requirements compared to full account operations:- Creation: Requires full account authority signatures
- Usage: Only requires spending limit signer authorization
- Updates: Requires full account authority signatures
- Deletion: Requires full account authority signatures
Use Cases
- Employee Expenses: Allow employees to spend within limits
- Subscription Payments: Automate recurring payments
- DeFi Operations: Enable automated DeFi strategies
- Bill Payments: Simplify recurring bill payments
Important Notes
- Amounts are specified in the token’s smallest unit (e.g., 1 USDC = 1,000,000 units)
- Spending limits reset automatically based on the period
- Unused amounts don’t carry over to the next period
- Multiple spending limits can exist for different tokens
- Spending limit addresses are generated deterministically
Authorizations
API key authentication with Bearer token. Include the API key in the Authorization header as 'Bearer YOUR_API_KEY'
Environment identifier for the Grid API. Use 'sandbox' for testing on devnet or 'production' for production on mainnet.
Path Parameters
Account address
Example:
"11111111111111111111111111111112"
Body
application/json
Amount in smallest token units
Solana public key in base58 format
Example:
"11111111111111111111111111111112"
Time period for recurring operations
Available options:
one_time
, day
, week
, month
Minimum length:
1
Solana public key in base58 format
Solana public key in base58 format
Solana public key in base58 format
Unix timestamp for expiration