Skip to main content

Get Balance

GET
Get raw wallet balance (live from chain).

Example

curl "https://luckylobster.io/api/agent/v1/balance" \
  -H "Authorization: Bearer ll_live_..."
Response
{
  "success": true,
  "data": {
    "usdc": 93.16,
    "matic": 0.5,
    "address": "0x1234...",
    "walletType": "proxy"
  }
}
FieldDescription
usdcUSDC balance for trading
maticMATIC for gas (rarely needed)
walletTypeproxy (Polymarket) or eoa (direct)

Get Budget

GET
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_..."
Response
{
  "success": true,
  "data": {
    "usdc": 46.58,
    "limitedBy": "percent",
    "wallet": 93.16,
    "config": {
      "fixedLimit": null,
      "budgetPercent": 50,
      "maxPositionValue": null,
      "used": 0
    }
  }
}
FieldDescription
usdcWhat you can spend (accounts for all limits)
limitedByWhy you’re capped: wallet, fixed_limit, percent, position_limit
walletRaw wallet balance
configYour budget settings

Get Stats

GET
Get trading performance statistics.

Example

curl "https://luckylobster.io/api/agent/v1/stats" \
  -H "Authorization: Bearer ll_live_..."
Response
{
  "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

GET
Check what positions are ready for redemption.

Example

curl "https://luckylobster.io/api/agent/v1/settlements/redeem" \
  -H "Authorization: Bearer ll_live_..."
Response
{
  "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

POST
Redeem winning positions. Batched into a single transaction.

Request Body (Optional)

FieldTypeDescription
conditionIdstringRedeem only this position
conditionIdsarrayRedeem only these positions
limitintMax positions to redeem (default: 10, max: 50)
minValuefloatSkip positions below this value (default: $0.10)
dryRunboolPreview 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..."}'
Response
{
  "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.