Get Balance
Get raw wallet balance (live from chain).
Example
curl "https://luckylobster.io/api/agent/v1/balance" \
-H "Authorization: Bearer ll_live_..."
{
"success": true,
"data": {
"usdc": 93.16,
"matic": 0.5,
"address": "0x1234...",
"walletType": "proxy"
}
}
| Field | Description |
|---|
usdc | USDC balance for trading |
matic | MATIC for gas (rarely needed) |
walletType | proxy (Polymarket) or eoa (direct) |
Get Budget
Get how much you can spend. Check this before placing orders.
Budget = min(wallet balance, fixed limit, % of wallet)
Example
curl "https://luckylobster.io/api/agent/v1/budget" \
-H "Authorization: Bearer ll_live_..."
{
"success": true,
"data": {
"usdc": 46.58,
"limitedBy": "percent",
"wallet": 93.16,
"config": {
"fixedLimit": null,
"budgetPercent": 50,
"maxPositionValue": null,
"used": 0
}
}
}
| Field | Description |
|---|
usdc | What you can spend (accounts for all limits) |
limitedBy | Why you’re capped: wallet, fixed_limit, percent, position_limit |
wallet | Raw wallet balance |
config | Your budget settings |
Get Stats
Get trading performance statistics.
Example
curl "https://luckylobster.io/api/agent/v1/stats" \
-H "Authorization: Bearer ll_live_..."
{
"success": true,
"data": {
"totalOrders": 150,
"filledOrders": 142,
"totalVolume": 25000.00,
"realizedPnL": 1250.75,
"unrealizedPnL": 320.50,
"winRate": 62.5,
"avgTradeSize": 166.67
}
}
Check Redeemable Positions
Check what positions are ready for redemption.
Example
curl "https://luckylobster.io/api/agent/v1/settlements/redeem" \
-H "Authorization: Bearer ll_live_..."
{
"success": true,
"data": {
"positions": [
{
"conditionId": "0xbc13af0a...",
"title": "Bitcoin Up or Down - February 4",
"outcome": "Down",
"size": 5.0,
"estimatedValue": "$5.00"
}
],
"count": 3,
"totalValue": "$42.50"
},
"message": "Found 3 redeemable positions (~$42.50). POST to redeem."
}
Redeem Positions
Redeem winning positions. Batched into a single transaction.
Request Body (Optional)
| Field | Type | Description |
|---|
conditionId | string | Redeem only this position |
conditionIds | array | Redeem only these positions |
limit | int | Max positions to redeem (default: 10, max: 50) |
minValue | float | Skip positions below this value (default: $0.10) |
dryRun | bool | Preview without executing |
Example - Redeem All
curl -X POST "https://luckylobster.io/api/agent/v1/settlements/redeem" \
-H "Authorization: Bearer ll_live_..."
Example - Redeem Specific
curl -X POST "https://luckylobster.io/api/agent/v1/settlements/redeem" \
-H "Authorization: Bearer ll_live_..." \
-H "Content-Type: application/json" \
-d '{"conditionId": "0xbc13af0a..."}'
{
"success": true,
"message": "Redeemed 3 positions (~$42.50)",
"data": {
"processed": 3,
"redeemed": [
{
"conditionId": "0xbc13af0a...",
"title": "Bitcoin Up or Down - February 4",
"outcome": "Down",
"size": 5.0,
"txHash": "0x82d8d7e4d63185..."
}
],
"failed": [],
"totalValueRedeemed": "$42.50"
}
}
Run GET /settlements/redeem periodically to discover redeemable winnings from settled markets.