{"openapi":"3.1.0","info":{"title":"Panda Financial agent API","version":"1.0.0","description":"Read tools and transaction builders for Panda Financial on Base. Build tools return unsigned, simulated transactions; nothing is signed or sent by Panda. The same tools are served over MCP at /mcp."},"servers":[{"url":"https://pandafinancial.org"}],"paths":{"/api/agent/tools/get_panda_overview":{"post":{"operationId":"get_panda_overview","summary":"What Panda Financial is","description":"Start here. What Panda offers on Base, which tool does what, fees, minimums, how signing works and every contract a transaction may touch.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/list_vaults":{"post":{"operationId":"list_vaults","summary":"List the automated vaults","description":"The automated liquidity vaults: pair, whether deposits are open, fee rates (for a wallet when given), deposited value, depositors, rewards paid so far and the pool's reward stream.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Optional: show the fee rates this wallet pays."}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/get_wallet_positions":{"post":{"operationId":"get_wallet_positions","summary":"A wallet's vault positions","description":"Every open position a wallet has in the automated vaults: value, tokens held, price range, whether it is earning, rewards ready to claim, lifetime earnings, deposits, net result and live APR (the figures the website shows).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."}},"required":["wallet"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/get_old_vault_positions":{"post":{"operationId":"get_old_vault_positions","summary":"A wallet's old-vault positions","description":"Positions a wallet still has in Panda's OLD vault (withdraw-only since 2026-10-04): value, tokens, rewards ready.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."}},"required":["wallet"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/get_bankr_position":{"post":{"operationId":"get_bankr_position","summary":"A wallet's BNKR staking","description":"A wallet's stake in Bankr's BNKR staking contract: staked, rewards ready, multiplier, unstaking queue, withdrawable now, BNKR and USDC in the wallet, BNKR price.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."}},"required":["wallet"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/get_wallet_balances":{"post":{"operationId":"get_wallet_balances","summary":"Wallet balances","description":"ETH (for gas), USDC, WETH, AERO and BNKR on Base for a wallet, with dollar values.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."}},"required":["wallet"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/get_transaction_status":{"post":{"operationId":"get_transaction_status","summary":"Did a transaction land?","description":"Whether a Base transaction succeeded, the token changes for its sender and the Panda vault or staking events it emitted (new position id, rewards paid, withdrawals).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","description":"The transaction hash."}},"required":["hash"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_vault_deposit":{"post":{"operationId":"build_vault_deposit","summary":"Deposit into a vault","description":"Open a new position in an automated vault with USDC (about half is swapped to WETH in the same transaction), or with both WETH and USDC. Minimum $5 (or $2.50 a side). Includes the USDC approval when needed. Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"amount_usdc":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"USDC to deposit, in whole USDC, e.g. \"25\" or \"0.5\"."},"amount_weth":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Optional: WETH to deposit alongside the USDC (no swap then)."},"vault":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"A Panda vault address from list_vaults. Optional: the open WETH/USDC vault when left out."},"auto_compound":{"type":"boolean","description":"Add rewards back into the position automatically (default false: rewards are paid out)."}},"required":["wallet","amount_usdc"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_vault_top_up":{"post":{"operationId":"build_vault_top_up","summary":"Add to a position","description":"Add USDC to an existing position, in its current range (minimum $1). Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"token_id":{"type":"string","pattern":"^[0-9]+$","description":"The position id (token_id from get_wallet_positions)."},"amount_usdc":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"USDC to add, in whole USDC, e.g. \"25\" or \"0.5\"."},"vault":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"A Panda vault address from list_vaults. Optional: the open WETH/USDC vault when left out."}},"required":["wallet","token_id","amount_usdc"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_vault_claim":{"post":{"operationId":"build_vault_claim","summary":"Claim rewards","description":"Claim a position's AERO rewards, as USDC (swapped, default) or as AERO. The position keeps earning. Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"token_id":{"type":"string","pattern":"^[0-9]+$","description":"The position id (token_id from get_wallet_positions)."},"receive":{"type":"string","enum":["USDC","AERO"],"description":"USDC (default) or AERO."},"vault":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"A Panda vault address from list_vaults. Optional: the open WETH/USDC vault when left out."}},"required":["wallet","token_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_vault_withdraw":{"post":{"operationId":"build_vault_withdraw","summary":"Withdraw a position","description":"Withdraw a whole position: back as USDC (default; its WETH is swapped) or as both WETH and USDC, with its rewards as USDC (default) or AERO. A closed position's leftovers are collected instead. Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"token_id":{"type":"string","pattern":"^[0-9]+$","description":"The position id (token_id from get_wallet_positions)."},"receive":{"type":"string","enum":["USDC","BOTH"],"description":"USDC (default) or BOTH (WETH and USDC, no swap)."},"rewards":{"type":"string","enum":["USDC","AERO"],"description":"Rewards as USDC (default) or AERO."},"vault":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"A Panda vault address from list_vaults. Optional: the open WETH/USDC vault when left out."}},"required":["wallet","token_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_vault_set_auto_compound":{"post":{"operationId":"build_vault_set_auto_compound","summary":"Auto-compound on or off","description":"Turn auto-compound on (rewards are added back into the position at each range move) or off (rewards are paid out). Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"token_id":{"type":"string","pattern":"^[0-9]+$","description":"The position id (token_id from get_wallet_positions)."},"enabled":{"type":"boolean","description":"true = on, false = off."},"vault":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"A Panda vault address from list_vaults. Optional: the open WETH/USDC vault when left out."}},"required":["wallet","token_id","enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_vault_move":{"post":{"operationId":"build_vault_move","summary":"Move a position to another vault","description":"Move a position to another open Panda vault for the same pair in one transaction, with no Panda fee (only when such a vault exists). Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"token_id":{"type":"string","pattern":"^[0-9]+$","description":"The position id (token_id from get_wallet_positions)."},"vault":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The vault the position is in now."},"to_vault":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Optional: the vault to move to."}},"required":["wallet","token_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_old_vault_withdraw":{"post":{"operationId":"build_old_vault_withdraw","summary":"Withdraw from the old vault","description":"Withdraw a position from Panda's old vault (no fee). Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"token_id":{"type":"string","pattern":"^[0-9]+$","description":"The position id (token_id from get_wallet_positions)."}},"required":["wallet","token_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_old_vault_migrate":{"post":{"operationId":"build_old_vault_migrate","summary":"Move an old-vault position to the new vault","description":"Withdraw an old-vault position and deposit it into the new vault, best as one batch (the website's Migrate button). Positions under $5 should be withdrawn instead. Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"token_id":{"type":"string","pattern":"^[0-9]+$","description":"The position id (token_id from get_wallet_positions)."},"auto_compound":{"type":"boolean","description":"For the new position (default false)."}},"required":["wallet","token_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_bnkr_buy":{"post":{"operationId":"build_bnkr_buy","summary":"Buy BNKR with USDC","description":"Buy BNKR with USDC through 0x (Panda 0.15% + 0x 0.15%). Minimum 0.10 USDC. Then stake it with build_bnkr_stake. Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"amount_usdc":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"USDC to spend, in whole USDC, e.g. \"25\" or \"0.5\"."}},"required":["wallet","amount_usdc"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_bnkr_stake":{"post":{"operationId":"build_bnkr_stake","summary":"Stake BNKR with Bankr","description":"Stake BNKR in Bankr's own staking contract for the wallet (rewards in BNKR; unstaking takes 48 hours). No Panda fee. Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"amount_bnkr":{"type":"string","pattern":"^([0-9]+(\\.[0-9]+)?|all)$","description":"BNKR in whole tokens, e.g. \"15000\", or \"all\"."}},"required":["wallet","amount_bnkr"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_bnkr_restake":{"post":{"operationId":"build_bnkr_restake","summary":"Restake BNKR rewards","description":"Add the wallet's BNKR staking rewards to its stake. Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."}},"required":["wallet"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_bnkr_request_unstake":{"post":{"operationId":"build_bnkr_request_unstake","summary":"Start unstaking BNKR","description":"Start Bankr's 48-hour unstaking wait for some or all of the stake (it stops earning now). Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"amount_bnkr":{"type":"string","pattern":"^([0-9]+(\\.[0-9]+)?|all)$","description":"BNKR in whole tokens, e.g. \"15000\", or \"all\"."}},"required":["wallet","amount_bnkr"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_bnkr_withdraw":{"post":{"operationId":"build_bnkr_withdraw","summary":"Withdraw unstaked BNKR","description":"Send BNKR whose 48-hour wait is over back to the wallet. Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."}},"required":["wallet"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/get_swap_price":{"post":{"operationId":"get_swap_price","summary":"Price a swap","description":"What swapping one token for another on Base would return right now through 0x (the route the website uses): amount out, the fees (Panda 0.15% in the sold token + 0x 0.15%) and the sources. No wallet needed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sell_token":{"type":"string","description":"Token to sell: a symbol (USDC, WETH, AERO, BNKR, cbBTC) or a token address on Base."},"buy_token":{"type":"string","description":"Token to buy: a symbol (USDC, WETH, AERO, BNKR, cbBTC) or a token address on Base."},"amount":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Amount to sell, in whole tokens, e.g. \"25\" or \"0.01\"."},"slippage_bps":{"type":"integer","minimum":1,"maximum":500,"description":"Optional slippage tolerance in basis points (default 50 = 0.5%)."}},"required":["sell_token","buy_token","amount"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_swap":{"post":{"operationId":"build_swap","summary":"Swap tokens","description":"Swap any two ERC-20 tokens on Base through 0x for the wallet: an approval of 0x's AllowanceHolder if needed, then the swap exactly as 0x built it. Fees: Panda 0.15% in the sold token (paid inside the swap) + 0x 0.15%. Native ETH is not swapped (wrap it first). Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"sell_token":{"type":"string","description":"Token to sell: a symbol (USDC, WETH, AERO, BNKR, cbBTC) or a token address on Base."},"buy_token":{"type":"string","description":"Token to buy: a symbol (USDC, WETH, AERO, BNKR, cbBTC) or a token address on Base."},"amount":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Amount to sell, in whole tokens."},"slippage_bps":{"type":"integer","minimum":1,"maximum":500,"description":"Optional slippage tolerance in basis points (default 50 = 0.5%)."}},"required":["wallet","sell_token","buy_token","amount"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_bridge":{"post":{"operationId":"build_bridge","summary":"Bridge tokens from Base","description":"Send USDC, WETH, ETH or any token from Base to another chain (ethereum, arbitrum, optimism, polygon, bsc, avalanche, linea, scroll, zksync, or a chain id) through the LI.FI route the website's Bridge uses: an exact approval of the route's spender if needed, then the bridge transaction exactly as LI.FI built it. Fees: LI.FI 0.25% + Panda 0.15%, paid inside the transaction, plus the route's own costs; all are returned. From Base only (a bridge into Base starts on the other chain). Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"from_chain":{"type":"string","description":"Must be \"base\" (or 8453)."},"to_chain":{"type":"string","description":"Destination: a chain name (ethereum, arbitrum, optimism, polygon, bsc, avalanche, linea, scroll, zksync) or a chain id."},"token":{"type":"string","description":"Token to send from Base: USDC, WETH, ETH, or a token address on Base."},"amount":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Amount to send, in whole tokens."},"to_token":{"type":"string","description":"Optional: the token to receive on the destination (symbol or address there). Default: the same symbol."},"to_wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Optional: the receiving wallet on the destination chain. Default: the same wallet."}},"required":["wallet","from_chain","to_chain","token","amount"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/get_defi_positions":{"post":{"operationId":"get_defi_positions","summary":"Curated Vault and lending positions","description":"A wallet's deposit in the Curated Vault (Steakhouse Prime USDC on Morpho) and its position in the Morpho WETH/USDC market (USDC lent, WETH collateral, USDC borrowed, health factor, liquidation price), with today's rates and the wallet's USDC and WETH.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."}},"required":["wallet"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_curated_vault_deposit":{"post":{"operationId":"build_curated_vault_deposit","summary":"Deposit USDC in the Curated Vault","description":"Deposit USDC into Steakhouse Prime USDC, a Morpho vault curated by Steakhouse Financial (about 4% a year, changes daily, compounds in the share price). Panda's fee: 0.05% once, inside the transaction. Withdraw any time. Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"amount_usdc":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"USDC to deposit (at least 1), in whole USDC, e.g. \"25\" or \"0.5\"."}},"required":["wallet","amount_usdc"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_curated_vault_withdraw":{"post":{"operationId":"build_curated_vault_withdraw","summary":"Withdraw from the Curated Vault","description":"Withdraw USDC from Steakhouse Prime USDC to the wallet. No Panda fee; subject to the vault's liquidity. Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"amount_usdc":{"type":"string","pattern":"^([0-9]+(\\.[0-9]+)?|all)$","description":"USDC to withdraw, or \"all\"."}},"required":["wallet","amount_usdc"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_lend_supply":{"post":{"operationId":"build_lend_supply","summary":"Lend USDC on Morpho","description":"Lend USDC in the Morpho WETH/USDC market (interest accrues as it is borrowed). Panda's fee: 0.05% once, inside the transaction. Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"amount_usdc":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"USDC to lend (at least 1), in whole USDC, e.g. \"25\" or \"0.5\"."}},"required":["wallet","amount_usdc"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_lend_withdraw":{"post":{"operationId":"build_lend_withdraw","summary":"Withdraw lent USDC","description":"Withdraw USDC lent in the Morpho WETH/USDC market. No Panda fee; subject to the market's liquidity. Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"amount_usdc":{"type":"string","pattern":"^([0-9]+(\\.[0-9]+)?|all)$","description":"USDC to withdraw, or \"all\"."}},"required":["wallet","amount_usdc"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_borrow":{"post":{"operationId":"build_borrow","summary":"Borrow USDC against WETH","description":"Add WETH as collateral and/or borrow USDC in the Morpho WETH/USDC market (liquidation at 86% loan-to-value; the tool refuses anything past it and reports the health factor). No Panda fee. The first borrow includes a one-time bundler authorization. Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"collateral_weth":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Optional: WETH to add as collateral."},"borrow_usdc":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Optional: USDC to borrow."}},"required":["wallet"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_repay":{"post":{"operationId":"build_repay","summary":"Repay a Morpho loan","description":"Repay part or all of the USDC owed in the Morpho WETH/USDC market. No Panda fee. Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"amount_usdc":{"type":"string","pattern":"^([0-9]+(\\.[0-9]+)?|all)$","description":"USDC to repay, or \"all\"."}},"required":["wallet","amount_usdc"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/build_withdraw_collateral":{"post":{"operationId":"build_withdraw_collateral","summary":"Withdraw WETH collateral","description":"Withdraw WETH collateral from the Morpho WETH/USDC market (refused if it would leave the loan past 86% loan-to-value). No Panda fee. Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"amount_weth":{"type":"string","pattern":"^([0-9]+(\\.[0-9]+)?|all)$","description":"WETH to withdraw, or \"all\"."}},"required":["wallet","amount_weth"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/get_referral_code":{"post":{"operationId":"get_referral_code","summary":"My referral code","description":"The wallet's own Panda referral code and link (created on first use), its tier, referrals, and what it has earned and been paid. Agents earn referrals exactly like people: a share of Panda's fee on their referees' rewards, paid in USDC every two weeks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."}},"required":["wallet"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/check_referral_eligibility":{"post":{"operationId":"check_referral_eligibility","summary":"Can this wallet accept a code?","description":"Whether a wallet may accept a referral code: it must never have deposited in any Panda vault, never have accepted a referral, and not be the code's owner.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"code":{"type":"string","pattern":"^[A-Za-z0-9]{6}$","description":"A 6-character Panda referral code."}},"required":["wallet","code"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/referral_accept_message":{"post":{"operationId":"referral_accept_message","summary":"Message to sign to accept a code","description":"The exact sign-in message (EIP-4361) a wallet signs to accept a referral code, with a fresh 10-minute nonce. Sign it as plain text with the wallet, then call accept_referral. Do this before the wallet's first deposit.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"The wallet on Base that will sign (and that owns the positions)."},"code":{"type":"string","pattern":"^[A-Za-z0-9]{6}$","description":"A 6-character Panda referral code."}},"required":["wallet","code"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/tools/accept_referral":{"post":{"operationId":"accept_referral","summary":"Accept a referral code","description":"Records the acceptance from the signed message (from referral_accept_message) and its signature. Nothing is sent on chain. After this, the wallet's first deposit counts for the referrer.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The message from referral_accept_message, unchanged."},"signature":{"type":"string","pattern":"^0x[0-9a-fA-F]+$","description":"The wallet's signature of that message."}},"required":["message","signature"],"additionalProperties":false}}}},"responses":{"200":{"description":"The result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"result":{"type":"object"}},"required":["ok","result"]}}}},"400":{"description":"A refusal the caller can act on (bad argument, below a minimum, nothing to do)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}},"402":{"description":"Payment required (x402): the body lists `accepts`; call again with an X-PAYMENT header, or send Authorization: Bearer <day pass>. Builds are never charged; reads are free for customers and 10 an hour for everyone else."},"429":{"description":"Too many calls: 60 a minute per address and per wallet","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["ok","error"]}}}}}}},"/api/agent/pricing":{"get":{"operationId":"pricing","summary":"What is free and what a read costs","responses":{"200":{"description":"The rules and numbers"}}}},"/api/agent/pass":{"post":{"operationId":"buy_pass","summary":"Buy a 24-hour pass (x402, $0.25)","responses":{"201":{"description":"The pass token, to send as Authorization: Bearer <pass>"},"402":{"description":"Payment required: the body lists `accepts`"}}}}}}