Overview
Budget limits are a critical safety feature that cap how much an API key can spend. This protects against bugs, unexpected behavior, and compromised keys.How Budget Limits Work
- Agent submits an order
- LuckyLobster calculates order cost:
price × size - Compares against remaining budget
- If sufficient, executes and updates usage
- If exceeded, rejects with budget details
Configuring Budgets
Budget Limit
The maximum amount (in USDC) the API key can spend.| Example | Use Case |
|---|---|
| $50 | Testing and development |
| $500 | Small trading agent |
| $5,000 | Active trading strategy |
| Unlimited | Advanced users (not recommended) |
Budget Period
When the spent amount resets to zero.| Period | Resets |
|---|---|
daily | Every day at midnight UTC |
weekly | Every Monday at midnight UTC |
monthly | First of each month at midnight UTC |
never | Never resets (lifetime limit) |
Budget Enforcement
Order Placement
When placing an order, budget is checked:What Counts Toward Budget
| Counts | Doesn’t Count |
|---|---|
| Order cost at placement | Unrealized gains |
| Filled trade value | Market research |
| Fees | Viewing positions |
Checking Your Budget
Via Dashboard
View budget usage at Dashboard > API Keys for each key.Via API
Effective Limit
TheeffectiveLimit is the actual spendable amount:
Position Limits
In addition to spending budgets, you can configure position limits:| Setting | Description |
|---|---|
| Max Position Value | Maximum value of all open positions |
| Max Single Position | Maximum size of any single position |
Best Practices
Start Conservative
Start Conservative
Begin with a low budget ($50-100) and increase as you verify agent behavior. It’s easier to increase limits than recover from losses.
Choose Appropriate Period
Choose Appropriate Period
- Use
dailyfor high-frequency strategies that need fresh limits each day - Use
monthlyfor steady strategies with predictable spending - Use
neverfor fixed-allocation strategies
Monitor Usage
Monitor Usage
Regularly check budget utilization in the dashboard. If an agent consistently hits limits, it might need adjustment or investigation.
Set Up Alerts
Set Up Alerts
Configure notifications (coming soon) for when budget usage exceeds thresholds like 80%.
Increasing Limits
To increase an API key’s budget:- Go to Dashboard > API Keys
- Click on the key to edit
- Update the Budget Limit field
- Save changes
Dry Run Testing
UsedryRun: true in orders to test budget validation without spending:
