{"openapi":"3.1.0","info":{"title":"Papertrade AI","version":"0.1.0","summary":"Trade Papertrade BTC and ETH perps from any AI agent.","description":"Market data, analytics and guarded trading for Papertrade (HyperEVM perps priced off Hyperliquid). The same tools are served over MCP at /mcp. Trading requires the wallet owner to approve a session key with guardrails; the key cannot withdraw.","license":{"name":"MIT","identifier":"MIT"},"contact":{"url":"https://github.com/nirholas/papertrade-ai"}},"servers":[{"url":"https://papertrade-ai.ninabrekkerese.workers.dev"}],"tags":[{"name":"Market data","description":"No authentication."},{"name":"Account","description":"Connected wallet views."},{"name":"Trading","description":"Requires the trade:write scope."}],"components":{"securitySchemes":{"oauth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://papertrade-ai.ninabrekkerese.workers.dev/authorize","tokenUrl":"https://papertrade-ai.ninabrekkerese.workers.dev/token","refreshUrl":"https://papertrade-ai.ninabrekkerese.workers.dev/token","scopes":{"trade:read":"Read the connected account.","trade:write":"Open and close positions within the owner guardrails.","offline_access":"Stay connected."}}}}}},"paths":{"/api/v1/tools/get_markets":{"post":{"operationId":"get_markets","summary":"Markets","description":"Live Papertrade perp markets (BTC, ETH): Hyperliquid mark/bid/ask, 24h change, Papertrade 24h volume, open interest vs caps, max leverage, minimum trade size and whether each market is open. Call this before trading.","tags":["Market data"],"security":[],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/get_markets":{"post":{"operationId":"me_get_markets","summary":"Markets","description":"Live Papertrade perp markets (BTC, ETH): Hyperliquid mark/bid/ask, 24h change, Papertrade 24h volume, open interest vs caps, max leverage, minimum trade size and whether each market is open. Call this before trading.","tags":["Market data"],"security":[{"oauth":["trade:read"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/tools/get_price_chart":{"post":{"operationId":"get_price_chart","summary":"Price chart","description":"OHLCV candles for BTC or ETH from Hyperliquid (the price source Papertrade settles against), with range stats and a TradingView link.","tags":["Market data"],"security":[],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"market":{"type":"string","enum":["BTC","ETH"],"description":"Market symbol: BTC or ETH."},"interval":{"default":"15m","description":"Candle interval.","type":"string","enum":["1m","3m","5m","15m","30m","1h","2h","4h","8h","12h","1d","3d","1w","1M"]},"count":{"default":96,"description":"Number of candles.","type":"integer","minimum":10,"maximum":500}},"required":["market"]}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/get_price_chart":{"post":{"operationId":"me_get_price_chart","summary":"Price chart","description":"OHLCV candles for BTC or ETH from Hyperliquid (the price source Papertrade settles against), with range stats and a TradingView link.","tags":["Market data"],"security":[{"oauth":["trade:read"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"market":{"type":"string","enum":["BTC","ETH"],"description":"Market symbol: BTC or ETH."},"interval":{"default":"15m","description":"Candle interval.","type":"string","enum":["1m","3m","5m","15m","30m","1h","2h","4h","8h","12h","1d","3d","1w","1M"]},"count":{"default":96,"description":"Number of candles.","type":"integer","minimum":10,"maximum":500}},"required":["market"]}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/tools/get_protocol_stats":{"post":{"operationId":"get_protocol_stats","summary":"Protocol stats","description":"Papertrade protocol analytics: TVL, margin, LP, lifetime volume, open positions, fees, PAPER supply and staking, plus daily history (volume, trader PnL, liquidations, users).","tags":["Market data"],"security":[],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"days":{"default":14,"description":"Days of daily history to include.","type":"integer","minimum":1,"maximum":365}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/get_protocol_stats":{"post":{"operationId":"me_get_protocol_stats","summary":"Protocol stats","description":"Papertrade protocol analytics: TVL, margin, LP, lifetime volume, open positions, fees, PAPER supply and staking, plus daily history (volume, trader PnL, liquidations, users).","tags":["Market data"],"security":[{"oauth":["trade:read"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"days":{"default":14,"description":"Days of daily history to include.","type":"integer","minimum":1,"maximum":365}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/tools/get_liquidation_map":{"post":{"operationId":"get_liquidation_map","summary":"Liquidation map","description":"Where open Papertrade positions get liquidated: notional and position count of longs and shorts by price bucket around the current price, with the largest clusters.","tags":["Market data"],"security":[],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"market":{"type":"string","enum":["BTC","ETH"],"description":"Market symbol: BTC or ETH."}},"required":["market"]}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/get_liquidation_map":{"post":{"operationId":"me_get_liquidation_map","summary":"Liquidation map","description":"Where open Papertrade positions get liquidated: notional and position count of longs and shorts by price bucket around the current price, with the largest clusters.","tags":["Market data"],"security":[{"oauth":["trade:read"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"market":{"type":"string","enum":["BTC","ETH"],"description":"Market symbol: BTC or ETH."}},"required":["market"]}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/tools/get_leaderboard":{"post":{"operationId":"get_leaderboard","summary":"Leaderboard","description":"Papertrade trader leaderboard for a time window, sortable by PnL, volume, balance and more. Search by name or address with q.","tags":["Market data"],"security":[],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"window":{"default":"24h","type":"string","enum":["24h","7d","30d","all"]},"sortKey":{"default":"rank","type":"string","enum":["rank","address","lastActiveTs","totalWindowedPnl","realizedPnl","currentUnrealizedPnl","currentBalance","currentQueued","currentOpenNotional","totalVolume","paperTotal","currentOpenPositionCount"]},"sortDir":{"default":"asc","type":"string","enum":["asc","desc"]},"page":{"default":0,"description":"0-based page; 25 rows per page.","type":"integer","minimum":0,"maximum":1000},"q":{"description":"Filter by leaderboard name or address.","type":"string","maxLength":64}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/get_leaderboard":{"post":{"operationId":"me_get_leaderboard","summary":"Leaderboard","description":"Papertrade trader leaderboard for a time window, sortable by PnL, volume, balance and more. Search by name or address with q.","tags":["Market data"],"security":[{"oauth":["trade:read"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"window":{"default":"24h","type":"string","enum":["24h","7d","30d","all"]},"sortKey":{"default":"rank","type":"string","enum":["rank","address","lastActiveTs","totalWindowedPnl","realizedPnl","currentUnrealizedPnl","currentBalance","currentQueued","currentOpenNotional","totalVolume","paperTotal","currentOpenPositionCount"]},"sortDir":{"default":"asc","type":"string","enum":["asc","desc"]},"page":{"default":0,"description":"0-based page; 25 rows per page.","type":"integer","minimum":0,"maximum":1000},"q":{"description":"Filter by leaderboard name or address.","type":"string","maxLength":64}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/tools/get_top_trades":{"post":{"operationId":"get_top_trades","summary":"Top trades","description":"The most profitable individual Papertrade positions in a window: who, market, side, leverage, entry, exit and PnL.","tags":["Market data"],"security":[],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"window":{"default":"24h","type":"string","enum":["24h","7d","30d","all"]}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/get_top_trades":{"post":{"operationId":"me_get_top_trades","summary":"Top trades","description":"The most profitable individual Papertrade positions in a window: who, market, side, leverage, entry, exit and PnL.","tags":["Market data"],"security":[{"oauth":["trade:read"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"window":{"default":"24h","type":"string","enum":["24h","7d","30d","all"]}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/tools/get_recent_trades":{"post":{"operationId":"get_recent_trades","summary":"Recent trades","description":"The latest opens, closes and liquidations across all of Papertrade, optionally filtered by market or wallet.","tags":["Market data"],"security":[],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"market":{"type":"string","enum":["BTC","ETH"],"description":"Market symbol: BTC or ETH."},"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/get_recent_trades":{"post":{"operationId":"me_get_recent_trades","summary":"Recent trades","description":"The latest opens, closes and liquidations across all of Papertrade, optionally filtered by market or wallet.","tags":["Market data"],"security":[{"oauth":["trade:read"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"market":{"type":"string","enum":["BTC","ETH"],"description":"Market symbol: BTC or ETH."},"wallet":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/tools/get_account":{"post":{"operationId":"get_account","summary":"Account","description":"A Papertrade account: free balance, locked margin, equity, every open position with live estimated PnL, bust price and distance to liquidation, pending intents, session keys and lifetime stats. Any wallet can be inspected.","tags":["Market data"],"security":[],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"description":"Wallet address (0x...). Defaults to the connected wallet.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/get_account":{"post":{"operationId":"me_get_account","summary":"Account","description":"A Papertrade account: free balance, locked margin, equity, every open position with live estimated PnL, bust price and distance to liquidation, pending intents, session keys and lifetime stats. Any wallet can be inspected.","tags":["Market data"],"security":[{"oauth":["trade:read"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"description":"Wallet address (0x...). Defaults to the connected wallet.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/tools/get_trade_history":{"post":{"operationId":"get_trade_history","summary":"Trade history","description":"Closed and liquidated positions for a wallet, newest first, with entry, exit, settled PnL, fees and PAPER minted.","tags":["Market data"],"security":[],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"description":"Wallet address (0x...). Defaults to the connected wallet.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"pages":{"default":1,"description":"Pages of 75 trades.","type":"integer","minimum":1,"maximum":10}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/get_trade_history":{"post":{"operationId":"me_get_trade_history","summary":"Trade history","description":"Closed and liquidated positions for a wallet, newest first, with entry, exit, settled PnL, fees and PAPER minted.","tags":["Market data"],"security":[{"oauth":["trade:read"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"description":"Wallet address (0x...). Defaults to the connected wallet.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"pages":{"default":1,"description":"Pages of 75 trades.","type":"integer","minimum":1,"maximum":10}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/tools/get_portfolio_history":{"post":{"operationId":"get_portfolio_history","summary":"Portfolio history","description":"Equity curve for a wallet over 1h, 1d, 1w or all time.","tags":["Market data"],"security":[],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"description":"Wallet address (0x...). Defaults to the connected wallet.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"range":{"default":"1d","type":"string","enum":["1h","1d","1w","all"]}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/get_portfolio_history":{"post":{"operationId":"me_get_portfolio_history","summary":"Portfolio history","description":"Equity curve for a wallet over 1h, 1d, 1w or all time.","tags":["Market data"],"security":[{"oauth":["trade:read"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"description":"Wallet address (0x...). Defaults to the connected wallet.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"range":{"default":"1d","type":"string","enum":["1h","1d","1w","all"]}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/tools/calculate_position":{"post":{"operationId":"calculate_position","summary":"Position calculator","description":"Pure math for a hypothetical position: bust price, liquidation distance and settled PnL at a target exit, using the exchange formula (win curve, deadband, 2% win fee). Does not need a wallet.","tags":["Market data"],"security":[],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"market":{"type":"string","enum":["BTC","ETH"],"description":"Market symbol: BTC or ETH."},"side":{"type":"string","enum":["long","short"],"description":"long profits if price rises, short if it falls."},"marginUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"leverage":{"type":"integer","minimum":1,"maximum":1000},"entryPrice":{"description":"Defaults to the live ask (long) or bid (short).","type":"number","minimum":0,"exclusiveMinimum":true},"exitPrice":{"description":"Target exit to evaluate.","type":"number","minimum":0,"exclusiveMinimum":true}},"required":["market","side","marginUsd","leverage"]}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/calculate_position":{"post":{"operationId":"me_calculate_position","summary":"Position calculator","description":"Pure math for a hypothetical position: bust price, liquidation distance and settled PnL at a target exit, using the exchange formula (win curve, deadband, 2% win fee). Does not need a wallet.","tags":["Market data"],"security":[{"oauth":["trade:read"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"market":{"type":"string","enum":["BTC","ETH"],"description":"Market symbol: BTC or ETH."},"side":{"type":"string","enum":["long","short"],"description":"long profits if price rises, short if it falls."},"marginUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"leverage":{"type":"integer","minimum":1,"maximum":1000},"entryPrice":{"description":"Defaults to the live ask (long) or bid (short).","type":"number","minimum":0,"exclusiveMinimum":true},"exitPrice":{"description":"Target exit to evaluate.","type":"number","minimum":0,"exclusiveMinimum":true}},"required":["market","side","marginUsd","leverage"]}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/tools/get_deposit_info":{"post":{"operationId":"get_deposit_info","summary":"Deposit instructions","description":"How to fund a Papertrade account: the wallet's personal deposit proxy address (USDC on HyperCore spot), minimums, the activation fee, and the wallet's current HyperEVM USDC/HYPE balances. Read-only; it never moves funds.","tags":["Market data"],"security":[],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"description":"Wallet address (0x...). Defaults to the connected wallet.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/get_deposit_info":{"post":{"operationId":"me_get_deposit_info","summary":"Deposit instructions","description":"How to fund a Papertrade account: the wallet's personal deposit proxy address (USDC on HyperCore spot), minimums, the activation fee, and the wallet's current HyperEVM USDC/HYPE balances. Read-only; it never moves funds.","tags":["Market data"],"security":[{"oauth":["trade:read"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"description":"Wallet address (0x...). Defaults to the connected wallet.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/tools/get_trading_permissions":{"post":{"operationId":"get_trading_permissions","summary":"Trading permissions","description":"What this connection may do: connected wallet, whether a trading session is active and when it expires, the guardrails the owner set, and how much of the daily limit is used.","tags":["Market data"],"security":[],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/get_trading_permissions":{"post":{"operationId":"me_get_trading_permissions","summary":"Trading permissions","description":"What this connection may do: connected wallet, whether a trading session is active and when it expires, the guardrails the owner set, and how much of the daily limit is used.","tags":["Market data"],"security":[{"oauth":["trade:read"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/preview_trade":{"post":{"operationId":"me_preview_trade","summary":"Preview trade","description":"Step 1 of 2 for opening a position. Checks the trade against exchange limits, the account balance and the owner guardrails, estimates entry, bust price and PnL scenarios, and returns a quoteId valid for 3 minutes. Show the preview to the user and get an explicit yes before calling open_position with the quoteId.","tags":["Trading"],"security":[{"oauth":["trade:write"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"market":{"type":"string","enum":["BTC","ETH"],"description":"Market symbol: BTC or ETH."},"side":{"type":"string","enum":["long","short"],"description":"long profits if price rises, short if it falls."},"marginUsd":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"USD margin to commit (the most you can lose)."},"leverage":{"type":"integer","minimum":1,"maximum":1000}},"required":["market","side","marginUsd","leverage"]}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/open_position":{"post":{"operationId":"me_open_position","summary":"Open position","description":"Step 2 of 2: opens a real Papertrade position with the user's funds, signed by the delegated session key. Requires the quoteId from preview_trade for the identical market, side, margin and leverage, and only after the user explicitly confirmed. Waits for settlement and reports the fill.","tags":["Trading"],"security":[{"oauth":["trade:write"]}],"x-openai-isConsequential":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"market":{"type":"string","enum":["BTC","ETH"],"description":"Market symbol: BTC or ETH."},"side":{"type":"string","enum":["long","short"],"description":"long profits if price rises, short if it falls."},"marginUsd":{"type":"number","minimum":0,"exclusiveMinimum":true},"leverage":{"type":"integer","minimum":1,"maximum":1000},"quoteId":{"description":"From preview_trade. Required when the owner enabled confirmations (the default).","type":"string"}},"required":["market","side","marginUsd","leverage"]}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/close_positions":{"post":{"operationId":"me_close_positions","summary":"Close positions","description":"Closes open positions at the market, signed by the session key. Pass positionIds, or all=true optionally narrowed by market. Confirm with the user before closing. Reports each settled result.","tags":["Trading"],"security":[{"oauth":["trade:write"]}],"x-openai-isConsequential":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"positionIds":{"maxItems":120,"type":"array","items":{"type":"string","pattern":"^\\d+$"}},"all":{"description":"Close every open position (optionally only in `market`).","type":"boolean"},"market":{"type":"string","enum":["BTC","ETH"],"description":"Market symbol: BTC or ETH."}}}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/cancel_intent":{"post":{"operationId":"me_cancel_intent","summary":"Cancel intent","description":"Cancels a submitted intent that is still queued (not yet executed).","tags":["Trading"],"security":[{"oauth":["trade:write"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"intentId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"required":["intentId"]}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/tools/get_intent_status":{"post":{"operationId":"get_intent_status","summary":"Intent status","description":"Whether a submitted intent is still queued, has produced an open position, or is no longer pending.","tags":["Market data"],"security":[],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"intentId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"wallet":{"description":"Wallet address (0x...). Defaults to the connected wallet.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"required":["intentId"]}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/me/tools/get_intent_status":{"post":{"operationId":"me_get_intent_status","summary":"Intent status","description":"Whether a submitted intent is still queued, has produced an open position, or is no longer pending.","tags":["Market data"],"security":[{"oauth":["trade:read"]}],"x-openai-isConsequential":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"intentId":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"wallet":{"description":"Wallet address (0x...). Defaults to the connected wallet.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"required":["intentId"]}}}},"responses":{"200":{"description":"Tool result: a summary to relay to the user, and structured data.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"summary":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["ok","summary","data"]}}}},"400":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing or invalid bearer token."},"502":{"description":"The tool refused or failed. `error.message` is written for the end user.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}}}}