{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"Tomahawk API","version":"2.0.0","description":"One API for the terminal, the mobile app and AI agents: perps market data and order placing across Hyperliquid, Aster, Lighter and Pacifica, Solana memecoin data and trading, and funding. Every answer is an envelope: { ok: true, data, ts } or { ok: false, error: { code, message, details? }, ts }. Agent keys (renko_sk_live_… / renko_sk_test_…) are bearer tokens with scopes and a risk policy; test keys always trade in paper mode."},"servers":[{"url":"https://usetomahawk.xyz/api/v2"}],"tags":[{"name":"Markets"},{"name":"Account"},{"name":"Trading"},{"name":"Solana"},{"name":"Funding"},{"name":"Agents"}],"paths":{"/markets":{"get":{"operationId":"getMarkets","tags":["Markets"],"summary":"All perps markets across venues","description":"Public.","security":[],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Market"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/markets/{symbol}":{"get":{"operationId":"getMarketsSymbol","tags":["Markets"],"summary":"One perps market","description":"Public.","security":[],"parameters":[{"name":"symbol","in":"path","required":true,"description":"Base symbol, e.g. BTC","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/Market"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/candles":{"get":{"operationId":"getCandles","tags":["Markets"],"summary":"OHLCV candles","description":"Public.","security":[],"parameters":[{"name":"symbol","in":"query","required":true,"schema":{"type":"string"}},{"name":"venue","in":"query","required":false,"schema":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica","avantis"]}},{"name":"res","in":"query","required":true,"schema":{"type":"string","enum":["1m","5m","15m","1h","4h","1d"]}},{"name":"from","in":"query","required":false,"schema":{"type":"integer"}},{"name":"to","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000,"default":500}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Candle"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/route":{"get":{"operationId":"getRoute","tags":["Markets"],"summary":"Best executable route for a size","description":"Public.","security":[],"parameters":[{"name":"symbol","in":"query","required":true,"schema":{"type":"string"}},{"name":"side","in":"query","required":true,"schema":{"type":"string","enum":["buy","sell"]}},{"name":"size","in":"query","required":false,"schema":{"type":"number","exclusiveMinimum":0}},{"name":"notional","in":"query","required":false,"schema":{"type":"number","exclusiveMinimum":0}},{"name":"venues","in":"query","required":false,"description":"Comma-joined venue names","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/RouteQuote"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/config":{"get":{"operationId":"getConfig","tags":["Markets"],"summary":"Deployment settings: whether live trading is on","description":"Public.","security":[],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/AppConfig"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/health/feeds":{"get":{"operationId":"getHealthFeeds","tags":["Markets"],"summary":"Feed health per venue","description":"Public.","security":[],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/VenueHealth"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me":{"get":{"operationId":"getMe","tags":["Account"],"summary":"The signed-in user","description":"Signed-in user only (a Dynamic JWT); agent keys are refused.","security":[{"bearer":[]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/Me"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/account":{"get":{"operationId":"getAccount","tags":["Account"],"summary":"Balances and positions","description":"User token or agent key with account:read.","security":[{"bearer":[]}],"x-scopes":["account:read"],"parameters":[{"name":"mode","in":"query","required":false,"schema":{"type":"string","enum":["live","paper"],"default":"live"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/AccountState"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/venues":{"get":{"operationId":"getVenues","tags":["Account"],"summary":"Venue connections","description":"Signed-in user only (a Dynamic JWT); agent keys are refused.","security":[{"bearer":[]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"type":"object","description":"venue, connected, address, needs","additionalProperties":true}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/venues/{venue}/connect":{"post":{"operationId":"postVenuesVenueConnect","tags":["Account"],"summary":"Start connecting a venue","description":"Signed-in user only (a Dynamic JWT); agent keys are refused.","security":[{"bearer":[]}],"parameters":[{"name":"venue","in":"path","required":true,"description":"Tradable venue","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/ConnectPlan"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approval":{"type":"object","properties":{"doc":{"type":"string","minLength":40,"maxLength":2000},"sig":{"type":"string","pattern":"^[A-Za-z0-9_-]{86,86}$"}},"required":["doc","sig"],"additionalProperties":false,"description":"The one-time approval (kind venue_connect) for this connection. Signed on the user's own device and sent by the signed-in client. Agents never send it: a request made with an API key uses the standing approval stored with that key."}},"additionalProperties":false}}}}}},"/venues/{venue}/connect/complete":{"post":{"operationId":"postVenuesVenueConnectComplete","tags":["Account"],"summary":"Finish connecting a venue","description":"Signed-in user only (a Dynamic JWT); agent keys are refused.","security":[{"bearer":[]}],"parameters":[{"name":"venue","in":"path","required":true,"description":"Tradable venue","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"connected":{"type":"boolean"}},"required":["venue","connected"]},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectId":{"type":"string"},"signatures":{"type":"array","items":{"type":"string"},"maxItems":4}},"required":["connectId","signatures"],"additionalProperties":false}}}}}},"/venues/{venue}":{"delete":{"operationId":"deleteVenuesVenue","tags":["Account"],"summary":"Disconnect a venue","description":"Signed-in user only (a Dynamic JWT); agent keys are refused.","security":[{"bearer":[]}],"parameters":[{"name":"venue","in":"path","required":true,"description":"Tradable venue","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"connected":{"type":"boolean","const":false}},"required":["venue","connected"]},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/preview":{"post":{"operationId":"postOrdersPreview","tags":["Trading"],"summary":"Preview an order (nothing is sent)","description":"User token or agent key with orders:execute.","security":[{"bearer":[]}],"x-scopes":["orders:execute"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/OrderPreview"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":24},"side":{"type":"string","enum":["buy","sell"]},"type":{"type":"string","enum":["market","limit","stop_market","stop_limit","take_profit_market","take_profit_limit"],"default":"market"},"size":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"notional":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"sizePct":{"type":"number","exclusiveMinimum":0,"maximum":100},"price":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"triggerPrice":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"tif":{"type":"string","enum":["gtc","ioc","post_only"]},"reduceOnly":{"type":"boolean","default":false},"leverage":{"type":"integer","minimum":1,"maximum":200},"marginMode":{"type":"string","enum":["cross","isolated"]},"venue":{"type":"string","enum":["auto","hyperliquid","aster","lighter","pacifica"],"default":"auto"},"takeProfit":{"type":"object","properties":{"triggerPrice":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"price":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}},"required":["triggerPrice"],"additionalProperties":false},"stopLoss":{"type":"object","properties":{"triggerPrice":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"price":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}},"required":["triggerPrice"],"additionalProperties":false},"slippageBps":{"type":"integer","minimum":1,"maximum":500},"mode":{"type":"string","enum":["live","paper"],"default":"live"}},"required":["symbol","side"],"additionalProperties":false}}}}}},"/orders":{"post":{"operationId":"postOrders","tags":["Trading"],"summary":"Place an order (idempotent per clientId)","description":"User token or agent key with orders:execute.","security":[{"bearer":[]}],"x-scopes":["orders:execute"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}},"required":["orders"]},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"previewId":{"type":"string"},"intent":{"type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":24},"side":{"type":"string","enum":["buy","sell"]},"type":{"type":"string","enum":["market","limit","stop_market","stop_limit","take_profit_market","take_profit_limit"],"default":"market"},"size":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"notional":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"sizePct":{"type":"number","exclusiveMinimum":0,"maximum":100},"price":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"triggerPrice":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"tif":{"type":"string","enum":["gtc","ioc","post_only"]},"reduceOnly":{"type":"boolean","default":false},"leverage":{"type":"integer","minimum":1,"maximum":200},"marginMode":{"type":"string","enum":["cross","isolated"]},"venue":{"type":"string","enum":["auto","hyperliquid","aster","lighter","pacifica"],"default":"auto"},"takeProfit":{"type":"object","properties":{"triggerPrice":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"price":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}},"required":["triggerPrice"],"additionalProperties":false},"stopLoss":{"type":"object","properties":{"triggerPrice":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"price":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}},"required":["triggerPrice"],"additionalProperties":false},"slippageBps":{"type":"integer","minimum":1,"maximum":500},"mode":{"type":"string","enum":["live","paper"],"default":"live"}},"required":["symbol","side"],"additionalProperties":false},"clientId":{"type":"string","format":"uuid"},"approval":{"type":"object","properties":{"doc":{"type":"string","minLength":40,"maxLength":2000},"sig":{"type":"string","pattern":"^[A-Za-z0-9_-]{86,86}$"}},"required":["doc","sig"],"additionalProperties":false,"description":"The one-time approval (kind perp_order) for this live order; it covers every signature the order causes (the order, its take profit and stop loss, a leverage or margin change, each venue it is routed to). Paper orders need none. Signed on the user's own device and sent by the signed-in client. Agents never send it: a request made with an API key uses the standing approval stored with that key."}},"required":["clientId"],"additionalProperties":false}}}}},"get":{"operationId":"getOrders","tags":["Trading"],"summary":"List orders","description":"User token or agent key with account:read.","security":[{"bearer":[]}],"x-scopes":["account:read"],"parameters":[{"name":"mode","in":"query","required":false,"schema":{"type":"string","enum":["live","paper"],"default":"live"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","closed","all"],"default":"open"}},{"name":"symbol","in":"query","required":false,"schema":{"type":"string"}},{"name":"venue","in":"query","required":false,"schema":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{id}":{"delete":{"operationId":"deleteOrdersId","tags":["Trading"],"summary":"Cancel an order","description":"User token or agent key with orders:execute.","security":[{"bearer":[]}],"x-scopes":["orders:execute"],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/Order"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/cancel-all":{"post":{"operationId":"postOrdersCancelAll","tags":["Trading"],"summary":"Cancel all working orders","description":"User token or agent key with orders:execute.","security":[{"bearer":[]}],"x-scopes":["orders:execute"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"canceled":{"type":"integer"},"failed":{"type":"array","items":{"type":"object","properties":{"orderId":{"type":"string"},"message":{"type":"string"}},"required":["orderId","message"]}}},"required":["canceled","failed"]},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"symbol":{"type":"string"},"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"mode":{"type":"string","enum":["live","paper"],"default":"live"}},"additionalProperties":false}}}}}},"/positions/close":{"post":{"operationId":"postPositionsClose","tags":["Trading"],"summary":"Close all or part of a position","description":"User token or agent key with orders:execute.","security":[{"bearer":[]}],"x-scopes":["orders:execute"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}},"required":["orders"]},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"symbol":{"type":"string"},"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"fraction":{"type":"number","exclusiveMinimum":0,"maximum":1,"default":1},"slippageBps":{"type":"integer","minimum":1,"maximum":500},"mode":{"type":"string","enum":["live","paper"],"default":"live"},"clientId":{"type":"string","format":"uuid"},"approval":{"type":"object","properties":{"doc":{"type":"string","minLength":40,"maxLength":2000},"sig":{"type":"string","pattern":"^[A-Za-z0-9_-]{86,86}$"}},"required":["doc","sig"],"additionalProperties":false,"description":"The one-time approval (kind perp_order) for this live close. Paper closes need none. Signed on the user's own device and sent by the signed-in client. Agents never send it: a request made with an API key uses the standing approval stored with that key."}},"required":["symbol","venue","clientId"],"additionalProperties":false}}}}}},"/leverage":{"post":{"operationId":"postLeverage","tags":["Trading"],"summary":"Set leverage for a symbol on a venue","description":"User token or agent key with orders:execute.","security":[{"bearer":[]}],"x-scopes":["orders:execute"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"symbol":{"type":"string"},"leverage":{"type":"integer"}},"required":["venue","symbol","leverage"]},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"symbol":{"type":"string"},"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"leverage":{"type":"integer","minimum":1,"maximum":200},"marginMode":{"type":"string","enum":["cross","isolated"]},"mode":{"type":"string","enum":["live","paper"],"default":"live"},"approval":{"type":"object","properties":{"doc":{"type":"string","minLength":40,"maxLength":2000},"sig":{"type":"string","pattern":"^[A-Za-z0-9_-]{86,86}$"}},"required":["doc","sig"],"additionalProperties":false,"description":"The one-time approval (kind perp_settings) for this live leverage or margin-mode change. Paper needs none. Signed on the user's own device and sent by the signed-in client. Agents never send it: a request made with an API key uses the standing approval stored with that key."}},"required":["symbol","venue","leverage"],"additionalProperties":false}}}}}},"/fills":{"get":{"operationId":"getFills","tags":["Trading"],"summary":"List fills","description":"User token or agent key with account:read.","security":[{"bearer":[]}],"x-scopes":["account:read"],"parameters":[{"name":"mode","in":"query","required":false,"schema":{"type":"string","enum":["live","paper"],"default":"live"}},{"name":"symbol","in":"query","required":false,"schema":{"type":"string"}},{"name":"venue","in":"query","required":false,"schema":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]}},{"name":"from","in":"query","required":false,"schema":{"type":"integer"}},{"name":"to","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Fill"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/pulse":{"get":{"operationId":"getSolPulse","tags":["Solana"],"summary":"New, final-stretch and migrated tokens","description":"Public.","security":[],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/PulseSnapshot"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/search":{"get":{"operationId":"getSolSearch","tags":["Solana"],"summary":"Search tokens","description":"Public.","security":[],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/SolTokenCard"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/token/{mint}":{"get":{"operationId":"getSolTokenMint","tags":["Solana"],"summary":"Token detail","description":"Public.","security":[],"parameters":[{"name":"mint","in":"path","required":true,"description":"Solana token mint (base58, case-sensitive)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/SolTokenDetail"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/token/{mint}/candles":{"get":{"operationId":"getSolTokenMintCandles","tags":["Solana"],"summary":"Token candles","description":"Public.","security":[],"parameters":[{"name":"mint","in":"path","required":true,"description":"Solana token mint (base58, case-sensitive)","schema":{"type":"string"}},{"name":"res","in":"query","required":true,"schema":{"type":"string","enum":["1s","5s","15s","30s","1m","5m","15m","1h","4h","1d"]}},{"name":"from","in":"query","required":false,"schema":{"type":"integer"}},{"name":"to","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":2000,"default":600}},{"name":"unit","in":"query","required":false,"schema":{"type":"string","enum":["price_usd","market_cap_usd"],"default":"price_usd"}},{"name":"meta","in":"query","required":false,"schema":{"type":"string","enum":["0","1"]}},{"name":"gaps","in":"query","required":false,"schema":{"type":"string","enum":["fill","raw"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Candle"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/token/{mint}/trades":{"get":{"operationId":"getSolTokenMintTrades","tags":["Solana"],"summary":"Recent swaps","description":"Public.","security":[],"parameters":[{"name":"mint","in":"path","required":true,"description":"Solana token mint (base58, case-sensitive)","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/SolTrade"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/token/{mint}/holders":{"get":{"operationId":"getSolTokenMintHolders","tags":["Solana"],"summary":"Top holders","description":"Public.","security":[],"parameters":[{"name":"mint","in":"path","required":true,"description":"Solana token mint (base58, case-sensitive)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/SolHolder"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/token/{mint}/top-traders":{"get":{"operationId":"getSolTokenMintTopTraders","tags":["Solana"],"summary":"Most profitable traders (with ?meta=1: { since, traders })","description":"Public.","security":[],"parameters":[{"name":"mint","in":"path","required":true,"description":"Solana token mint (base58, case-sensitive)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/SolTopTrader"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/token/{mint}/dev-tokens":{"get":{"operationId":"getSolTokenMintDevTokens","tags":["Solana"],"summary":"Other tokens by the same creator","description":"Public.","security":[],"parameters":[{"name":"mint","in":"path","required":true,"description":"Solana token mint (base58, case-sensitive)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"type":"object","description":"mint, name, symbol, image, createdAt, migrated, marketCapUsd, athUsd","additionalProperties":true}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/token/{mint}/bubble-map":{"get":{"operationId":"getSolTokenMintBubbleMap","tags":["Solana"],"summary":"Holder clusters","description":"Public.","security":[],"parameters":[{"name":"mint","in":"path","required":true,"description":"Solana token mint (base58, case-sensitive)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","description":"nodes, links, clusters, clusteredPct, ts","additionalProperties":true},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/portfolio":{"get":{"operationId":"getSolPortfolio","tags":["Solana"],"summary":"Wallet and positions","description":"User token or agent key with account:read.","security":[{"bearer":[]}],"x-scopes":["account:read"],"parameters":[{"name":"mode","in":"query","required":false,"schema":{"type":"string","enum":["live","paper"],"default":"live"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/SolPortfolio"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/quote":{"post":{"operationId":"postSolQuote","tags":["Solana"],"summary":"Quote a swap (account:read or sol:trade)","description":"User token or agent key with sol:trade.","security":[{"bearer":[]}],"x-scopes":["sol:trade"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/SolQuote"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mint":{"type":"string","minLength":32,"maxLength":44},"side":{"type":"string","enum":["buy","sell"]},"amountSol":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"amountTokens":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"sellPct":{"type":"number","exclusiveMinimum":0,"maximum":100},"slippageBps":{"type":"integer","minimum":1,"maximum":5000,"default":300},"priorityFeeSol":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"tipSol":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"mev":{"type":"string","enum":["off","fast","secure"],"default":"fast"},"mode":{"type":"string","enum":["live","paper"],"default":"live"}},"required":["mint","side"],"additionalProperties":false}}}}}},"/sol/trade":{"post":{"operationId":"postSolTrade","tags":["Solana"],"summary":"Swap now (idempotent per clientId)","description":"User token or agent key with sol:trade.","security":[{"bearer":[]}],"x-scopes":["sol:trade"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/SolFill"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"intent":{"type":"object","properties":{"mint":{"type":"string","minLength":32,"maxLength":44},"side":{"type":"string","enum":["buy","sell"]},"amountSol":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"amountTokens":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"sellPct":{"type":"number","exclusiveMinimum":0,"maximum":100},"slippageBps":{"type":"integer","minimum":1,"maximum":5000,"default":300},"priorityFeeSol":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"tipSol":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"mev":{"type":"string","enum":["off","fast","secure"],"default":"fast"},"mode":{"type":"string","enum":["live","paper"],"default":"live"}},"required":["mint","side"],"additionalProperties":false},"clientId":{"type":"string","format":"uuid"},"approval":{"type":"object","properties":{"doc":{"type":"string","minLength":40,"maxLength":2000},"sig":{"type":"string","pattern":"^[A-Za-z0-9_-]{86,86}$"}},"required":["doc","sig"],"additionalProperties":false,"description":"The one-time approval (kind sol_trade) for this live trade; paper trades need none. Signed on the user's own device and sent by the signed-in client. Agents never send it: a request made with an API key uses the standing approval stored with that key."}},"required":["intent","clientId"],"additionalProperties":false}}}}}},"/sol/fills":{"get":{"operationId":"getSolFills","tags":["Solana"],"summary":"List Solana fills","description":"User token or agent key with account:read.","security":[{"bearer":[]}],"x-scopes":["account:read"],"parameters":[{"name":"mode","in":"query","required":false,"schema":{"type":"string","enum":["live","paper"]}},{"name":"mint","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/SolFill"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/fills/{id}":{"get":{"operationId":"getSolFillsId","tags":["Solana"],"summary":"One Solana fill","description":"User token or agent key with account:read.","security":[{"bearer":[]}],"x-scopes":["account:read"],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/SolFill"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/orders":{"post":{"operationId":"postSolOrders","tags":["Solana"],"summary":"Arm a trigger order","description":"User token or agent key with sol:trade.","security":[{"bearer":[]}],"x-scopes":["sol:trade"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/SolOrder"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mint":{"type":"string","minLength":32,"maxLength":44},"kind":{"type":"string","enum":["limit_buy","limit_sell","stop_loss","take_profit","trailing_stop","dca"]},"trigger":{"type":"string","enum":["price_usd","market_cap_usd"],"default":"price_usd"},"level":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"trailPct":{"type":"number","exclusiveMinimum":0,"exclusiveMaximum":100},"amountSol":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"sellPct":{"type":"number","exclusiveMinimum":0,"maximum":100},"everySec":{"type":"integer","minimum":10,"maximum":86400},"runs":{"type":"integer","minimum":1,"maximum":500},"slippageBps":{"type":"integer","minimum":1,"maximum":5000,"default":500},"priorityFeeSol":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"tipSol":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"groupId":{"type":"string","format":"uuid"},"expiresAt":{"type":"integer"},"mode":{"type":"string","enum":["live","paper"],"default":"live"},"clientId":{"type":"string","format":"uuid"},"approval":{"type":"object","properties":{"doc":{"type":"string","minLength":40,"maxLength":2000},"sig":{"type":"string","pattern":"^[A-Za-z0-9_-]{86,86}$"}},"required":["doc","sig"],"additionalProperties":false,"description":"The standing approval (kind sol_order) for this resting order. It is kept with the order and covers every signature the order causes; cancelling the order drops it. Paper orders need none. Signed on the user's own device and sent by the signed-in client. Agents never send it: a request made with an API key uses the standing approval stored with that key."}},"required":["mint","kind","clientId"],"additionalProperties":false}}}}},"get":{"operationId":"getSolOrders","tags":["Solana"],"summary":"List trigger orders","description":"User token or agent key with account:read.","security":[{"bearer":[]}],"x-scopes":["account:read"],"parameters":[{"name":"status","in":"query","required":false,"description":"Comma-joined: armed, triggering, filled, failed, canceled, expired","schema":{"type":"string"}},{"name":"mint","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/SolOrder"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/orders/{id}":{"delete":{"operationId":"deleteSolOrdersId","tags":["Solana"],"summary":"Cancel a trigger order","description":"User token or agent key with sol:trade.","security":[{"bearer":[]}],"x-scopes":["sol:trade"],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/SolOrder"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/withdraw":{"post":{"operationId":"postSolWithdraw","tags":["Solana"],"summary":"Withdraw SOL or a token","description":"User token or agent key with sol:trade.","security":[{"bearer":[]}],"x-scopes":["sol:trade"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"signature":{"type":"string"},"status":{"type":"string","enum":["submitted","confirmed","failed","expired"]}},"required":["signature","status"]},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":32,"maxLength":44},"mint":{"type":"string","minLength":32,"maxLength":44},"amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"clientId":{"type":"string","format":"uuid"},"approval":{"type":"object","properties":{"doc":{"type":"string","minLength":40,"maxLength":2000},"sig":{"type":"string","pattern":"^[A-Za-z0-9_-]{86,86}$"}},"required":["doc","sig"],"additionalProperties":false,"description":"The one-time approval (kind sol_send) for this withdrawal. Signed on the user's own device and sent by the signed-in client. Agents never send it: a request made with an API key uses the standing approval stored with that key."}},"required":["to","amount","clientId"],"additionalProperties":false}}}}}},"/sol/withdrawals":{"get":{"operationId":"getSolWithdrawals","tags":["Solana"],"summary":"List withdrawals from the trading wallet, newest first","description":"User token or agent key with account:read.","security":[{"bearer":[]}],"x-scopes":["account:read"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"type":"object","description":"id, clientId, to, mint (null for SOL), amount, status, signature, error, createdAt, settledAt","additionalProperties":true}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/withdrawals/{id}":{"get":{"operationId":"getSolWithdrawalsId","tags":["Solana"],"summary":"One withdrawal","description":"User token or agent key with account:read.","security":[{"bearer":[]}],"x-scopes":["account:read"],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","description":"id, clientId, to, mint (null for SOL), amount, status, signature, error, createdAt, settledAt","additionalProperties":true},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/watchlist":{"get":{"operationId":"getSolWatchlist","tags":["Solana"],"summary":"Watchlist","description":"User token or agent key with account:read.","security":[{"bearer":[]}],"x-scopes":["account:read"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"type":"string"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sol/watchlist/{mint}":{"put":{"operationId":"putSolWatchlistMint","tags":["Solana"],"summary":"Watch a token","description":"User token or agent key with sol:trade.","security":[{"bearer":[]}],"x-scopes":["sol:trade"],"parameters":[{"name":"mint","in":"path","required":true,"description":"Solana token mint (base58, case-sensitive)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"type":"string"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteSolWatchlistMint","tags":["Solana"],"summary":"Unwatch a token","description":"User token or agent key with sol:trade.","security":[{"bearer":[]}],"x-scopes":["sol:trade"],"parameters":[{"name":"mint","in":"path","required":true,"description":"Solana token mint (base58, case-sensitive)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"type":"string"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/funding/options":{"get":{"operationId":"getFundingOptions","tags":["Funding"],"summary":"Deposit and withdrawal options","description":"User token or agent key with swap:quote.","security":[{"bearer":[]}],"x-scopes":["swap:quote"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/FundingOptions"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/funding/quote":{"post":{"operationId":"postFundingQuote","tags":["Funding"],"summary":"Plan a deposit or withdrawal","description":"User token or agent key with swap:quote.","security":[{"bearer":[]}],"x-scopes":["swap:quote"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/PlanView"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"direction":{"type":"string","enum":["deposit","withdraw"]},"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"amount":{"type":"string","pattern":"^\\d+(\\.\\d{1,18})?$"},"from":{"type":"object","properties":{"chainId":{"type":"integer","exclusiveMinimum":0},"token":{"type":"string","minLength":1,"maxLength":64},"address":{"type":"string","minLength":1,"maxLength":64}},"required":["chainId","token","address"],"additionalProperties":false},"to":{"type":"object","properties":{"chainId":{"type":"integer","exclusiveMinimum":0},"token":{"type":"string","minLength":1,"maxLength":64},"address":{"type":"string","minLength":1,"maxLength":64}},"required":["chainId","token","address"],"additionalProperties":false},"slippageBps":{"type":"integer","minimum":1,"maximum":500},"confirmNewAddress":{"type":"boolean"}},"required":["direction","venue","amount"],"additionalProperties":false}}}}}},"/funding/transfers":{"post":{"operationId":"postFundingTransfers","tags":["Funding"],"summary":"Execute a plan (agents: backend-signed deposits only)","description":"User token or agent key with swap:execute.","security":[{"bearer":[]}],"x-scopes":["swap:execute"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/TransferView"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"planId":{"type":"string","minLength":8,"maxLength":80},"clientId":{"type":"string","minLength":1,"maxLength":80},"confirmNewAddress":{"type":"boolean"},"approval":{"type":"object","properties":{"doc":{"type":"string","minLength":40,"maxLength":2000},"sig":{"type":"string","pattern":"^[A-Za-z0-9_-]{86,86}$"}},"required":["doc","sig"],"additionalProperties":false,"description":"The one-time approval (kind funding) for this transfer. It is kept with the transfer and used for every signature its steps cause, also after a restart. Signed on the user's own device and sent by the signed-in client. Agents never send it: a request made with an API key uses the standing approval stored with that key."}},"required":["planId","clientId"],"additionalProperties":false}}}}},"get":{"operationId":"getFundingTransfers","tags":["Funding"],"summary":"List transfers","description":"User token or agent key with account:read.","security":[{"bearer":[]}],"x-scopes":["account:read"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/TransferView"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/funding/transfers/{id}/steps/{n}/submitted":{"post":{"operationId":"postFundingTransfersIdStepsNSubmitted","tags":["Funding"],"summary":"Report a user-signed step's transaction","description":"Signed-in user only (a Dynamic JWT); agent keys are refused.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Transfer id","schema":{"type":"string"}},{"name":"n","in":"path","required":true,"description":"Step index","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/TransferView"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"txHash":{"type":"string","minLength":40,"maxLength":100}},"required":["txHash"],"additionalProperties":false}}}}}},"/funding/transfers/{id}":{"get":{"operationId":"getFundingTransfersId","tags":["Funding"],"summary":"One transfer","description":"User token or agent key with account:read.","security":[{"bearer":[]}],"x-scopes":["account:read"],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/TransferView"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agent/keys":{"get":{"operationId":"getAgentKeys","tags":["Agents"],"summary":"List your agent keys","description":"Signed-in user only (a Dynamic JWT); agent keys are refused.","security":[{"bearer":[]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentKey"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postAgentKeys","tags":["Agents"],"summary":"Create an agent key (the secret is returned once)","description":"Signed-in user only (a Dynamic JWT); agent keys are refused.","security":[{"bearer":[]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/AgentKeyCreated"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"env":{"type":"string","enum":["live","test"],"default":"test"},"scopes":{"type":"array","items":{"type":"string","enum":["market:read","account:read","orders:execute","swap:quote","swap:execute","sol:trade"]},"minItems":1,"maxItems":6},"policy":{"type":"object","properties":{"executionEnabled":{"type":"boolean","default":false},"maxOrderUsd":{"type":"number","exclusiveMinimum":0,"maximum":10000000,"default":1000},"dailyUsd":{"type":"number","exclusiveMinimum":0,"maximum":100000000,"default":10000},"maxLeverage":{"type":"integer","minimum":1,"maximum":200,"default":5},"maxSlippageBps":{"type":"integer","minimum":1,"maximum":500,"default":100},"venuesAllow":{"type":"array","items":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"maxItems":8},"marketsAllow":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":200},"marketsDeny":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":200},"ipAllow":{"type":"array","items":{"type":"string","minLength":3,"maxLength":64},"maxItems":32}},"additionalProperties":false,"default":{}},"expiresInDays":{"type":"integer","minimum":1,"maximum":365},"approval":{"type":"object","properties":{"doc":{"type":"string","minLength":40,"maxLength":2000},"sig":{"type":"string","pattern":"^[A-Za-z0-9_-]{86,86}$"}},"required":["doc","sig"],"additionalProperties":false,"description":"The standing approval (kind agent) for this key. It is kept with the key and used for every signature the key causes. Only the owner's session sends it. Signed on the user's own device and sent by the signed-in client. Agents never send it: a request made with an API key uses the standing approval stored with that key."}},"required":["label","scopes"],"additionalProperties":false}}}}}},"/agent/keys/{id}":{"patch":{"operationId":"patchAgentKeysId","tags":["Agents"],"summary":"Change label, scopes or policy; pause or resume","description":"Signed-in user only (a Dynamic JWT); agent keys are refused.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/AgentKey"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"scopes":{"type":"array","items":{"type":"string","enum":["market:read","account:read","orders:execute","swap:quote","swap:execute","sol:trade"]},"minItems":1,"maxItems":6},"policy":{"type":"object","properties":{"executionEnabled":{"type":"boolean","default":false},"maxOrderUsd":{"type":"number","exclusiveMinimum":0,"maximum":10000000,"default":1000},"dailyUsd":{"type":"number","exclusiveMinimum":0,"maximum":100000000,"default":10000},"maxLeverage":{"type":"integer","minimum":1,"maximum":200,"default":5},"maxSlippageBps":{"type":"integer","minimum":1,"maximum":500,"default":100},"venuesAllow":{"type":"array","items":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"maxItems":8},"marketsAllow":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":200},"marketsDeny":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":200},"ipAllow":{"type":"array","items":{"type":"string","minLength":3,"maxLength":64},"maxItems":32}},"additionalProperties":false},"paused":{"type":"boolean"},"approval":{"type":"object","properties":{"doc":{"type":"string","minLength":40,"maxLength":2000},"sig":{"type":"string","pattern":"^[A-Za-z0-9_-]{86,86}$"}},"required":["doc","sig"],"additionalProperties":false,"description":"A new standing approval (kind agent) for this key; it replaces the stored one. Only the owner's session sends it. Signed on the user's own device and sent by the signed-in client. Agents never send it: a request made with an API key uses the standing approval stored with that key."}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteAgentKeysId","tags":["Agents"],"summary":"Revoke a key (final)","description":"Signed-in user only (a Dynamic JWT); agent keys are refused.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/AgentKey"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agent/keys/{id}/rotate":{"post":{"operationId":"postAgentKeysIdRotate","tags":["Agents"],"summary":"New secret for the same key","description":"Signed-in user only (a Dynamic JWT); agent keys are refused.","security":[{"bearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/AgentKeyCreated"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agent/pause":{"post":{"operationId":"postAgentPause","tags":["Agents"],"summary":"Kill switch: pause or resume every key","description":"Signed-in user only (a Dynamic JWT); agent keys are refused.","security":[{"bearer":[]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"paused":{"type":"boolean"},"keys":{"type":"integer"}},"required":["paused","keys"]},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paused":{"type":"boolean"}},"required":["paused"],"additionalProperties":false}}}}}},"/agent/activity":{"get":{"operationId":"getAgentActivity","tags":["Agents"],"summary":"What your agents did","description":"Signed-in user only (a Dynamic JWT); agent keys are refused.","security":[{"bearer":[]}],"parameters":[{"name":"keyId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"before","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentActivityItem"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agent/whoami":{"get":{"operationId":"getAgentWhoami","tags":["Agents"],"summary":"The calling agent key","description":"Agent key only.","security":[{"bearer":[]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/AgentWhoAmI"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agent/tools":{"get":{"operationId":"getAgentTools","tags":["Agents"],"summary":"The tool list (same as MCP tools/list)","description":"Public.","security":[],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentToolDef"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","data","ts"]}}}},"400":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error envelope (see `error.code`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/mcp":{"post":{"operationId":"postMcp","tags":["Agents"],"summary":"Hosted MCP endpoint (Streamable HTTP, stateless JSON; revision 2025-11-25)","description":"JSON-RPC 2.0: initialize, ping, tools/list, tools/call. Agent key only. The answers are JSON-RPC messages, not the REST envelope.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"A JSON-RPC 2.0 request or notification","additionalProperties":true}}}},"responses":{"200":{"description":"JSON-RPC response","content":{"application/json":{"schema":{"type":"object","description":"JSON-RPC 2.0 response","additionalProperties":true}}}},"202":{"description":"Notification accepted"},"401":{"description":"No valid agent key"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A Dynamic JWT (signed-in user) or an agent key renko_sk_live_… / renko_sk_test_…. `x-renko-key: <agent key>` is accepted too."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","not_found","conflict","rate_limited","venue_not_connected","venue_rejected","venue_unavailable","venue_timeout","insufficient_margin","stale_market_data","preview_expired","policy_denied","signing_unavailable","not_supported","live_off","unavailable","internal"]},"message":{"type":"string","description":"One line, safe to show."},"details":{"type":"object","description":"Field errors or notices, when there are any.","additionalProperties":true}},"required":["code","message"]},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["ok","error","ts"]},"Instrument":{"type":"object","properties":{"symbol":{"type":"string"},"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica","avantis"]},"venueSymbol":{"type":"string"},"priceRule":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"tick"},"tickSize":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"}},"required":["kind","tickSize"]},{"type":"object","properties":{"kind":{"type":"string","const":"sigfigs"},"sigFigs":{"type":"integer"},"maxDecimals":{"type":"integer"}},"required":["kind","sigFigs","maxDecimals"]}]},"stepSize":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"minSize":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"minNotional":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"maxLeverage":{"type":"integer"},"quote":{"type":"string","enum":["USD","USDC","USDT"]},"takerFee":{"type":"number","description":"Fraction, 0.00045 = 4.5 bps"},"makerFee":{"type":"number"},"fundingIntervalH":{"type":"number"},"status":{"type":"string","enum":["trading","halted"]}},"required":["symbol","venue","venueSymbol","priceRule","stepSize","maxLeverage","quote","status"]},"Market":{"type":"object","properties":{"symbol":{"type":"string"},"name":{"type":"string"},"logo":{"type":"string"},"category":{"type":"string","enum":["crypto","equity","fx","commodity","index"]},"instruments":{"type":"array","items":{"$ref":"#/components/schemas/Instrument"}},"refVenue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica","avantis"]}},"required":["symbol","instruments","refVenue"]},"Ticker":{"type":"object","properties":{"symbol":{"type":"string"},"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica","avantis","agg"]},"mark":{"type":"number"},"index":{"type":"number"},"bid":{"type":"number"},"ask":{"type":"number"},"change24h":{"type":"number"},"volume24h":{"type":"number"},"openInterest":{"type":"number"},"funding1h":{"type":"number"},"nextFundingTs":{"type":"integer","description":"Epoch milliseconds"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["symbol","venue","mark","ts"]},"Candle":{"type":"object","properties":{"t":{"type":"integer","description":"Bucket start, UTC"},"o":{"type":"number"},"h":{"type":"number"},"l":{"type":"number"},"c":{"type":"number"},"v":{"type":"number","description":"Base volume"}},"required":["t","o","h","l","c","v"]},"RouteQuote":{"type":"object","properties":{"symbol":{"type":"string"},"side":{"type":"string","enum":["buy","sell"]},"size":{"type":"number"},"legs":{"type":"array","items":{"type":"object","properties":{"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica","avantis"]},"size":{"type":"number"},"avgPrice":{"type":"number"},"worstPrice":{"type":"number"},"feeUsd":{"type":"number"}},"required":["venue","size","avgPrice","worstPrice","feeUsd"]}},"avgPrice":{"type":"number"},"slippageBps":{"type":"number"},"feeUsd":{"type":"number"},"single":{"type":"array","items":{"type":"object","properties":{"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica","avantis"]},"avgPrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"filledSize":{"type":"number"},"feeUsd":{"type":"number"}},"required":["venue","avgPrice","filledSize","feeUsd"]}},"excluded":{"type":"array","items":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica","avantis"]}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["symbol","side","size","legs","avgPrice","slippageBps","feeUsd","single","excluded","ts"]},"AppConfig":{"type":"object","description":"What this deployment allows: live (boolean), false while live trading is switched off (paper trading only).","additionalProperties":true},"VenueHealth":{"type":"object","description":"Feed state of one venue: venue, state (live | degraded | down), lag and timestamps.","additionalProperties":true},"OrderIntent":{"type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":24},"side":{"type":"string","enum":["buy","sell"]},"type":{"type":"string","enum":["market","limit","stop_market","stop_limit","take_profit_market","take_profit_limit"],"default":"market"},"size":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"notional":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"sizePct":{"type":"number","exclusiveMinimum":0,"maximum":100},"price":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"triggerPrice":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"tif":{"type":"string","enum":["gtc","ioc","post_only"]},"reduceOnly":{"type":"boolean","default":false},"leverage":{"type":"integer","minimum":1,"maximum":200},"marginMode":{"type":"string","enum":["cross","isolated"]},"venue":{"type":"string","enum":["auto","hyperliquid","aster","lighter","pacifica"],"default":"auto"},"takeProfit":{"type":"object","properties":{"triggerPrice":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"price":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}},"required":["triggerPrice"],"additionalProperties":false},"stopLoss":{"type":"object","properties":{"triggerPrice":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"price":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}},"required":["triggerPrice"],"additionalProperties":false},"slippageBps":{"type":"integer","minimum":1,"maximum":500},"mode":{"type":"string","enum":["live","paper"],"default":"live"}},"required":["symbol","side"],"additionalProperties":false},"OrderPreview":{"type":"object","properties":{"previewId":{"type":"string"},"intent":{"$ref":"#/components/schemas/OrderIntent"},"legs":{"type":"array","items":{"type":"object","properties":{"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"size":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"price":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"estAvgPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"feeUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"marginUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"estLiqPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"}},"required":["venue","size","estAvgPrice","feeUsd","marginUsd"]}},"estAvgPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"estSlippageBps":{"type":"number"},"feeUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"marginUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"alternatives":{"type":"array","items":{"type":"object","properties":{"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"estAvgPrice":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},{"type":"null"}]},"feeUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"connected":{"type":"boolean"}},"required":["venue","estAvgPrice","feeUsd","connected"]}},"notices":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"level":{"type":"string","enum":["info","warn","block"]}},"required":["code","message","level"]}},"placeable":{"type":"boolean"},"expiresAt":{"type":"integer","description":"Epoch milliseconds"}},"required":["previewId","intent","legs","estAvgPrice","estSlippageBps","feeUsd","marginUsd","alternatives","notices","placeable","expiresAt"]},"Order":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"groupId":{"type":"string"},"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"symbol":{"type":"string"},"side":{"type":"string","enum":["buy","sell"]},"type":{"type":"string","enum":["market","limit","stop_market","stop_limit","take_profit_market","take_profit_limit"]},"tif":{"type":"string","enum":["gtc","ioc","post_only"]},"price":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"triggerPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"size":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"filled":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"avgFillPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"status":{"type":"string","enum":["new","sent","open","partially_filled","filled","canceled","rejected","expired","unknown"]},"reduceOnly":{"type":"boolean"},"venueOrderId":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"mode":{"type":"string","enum":["live","paper"]},"source":{"type":"string","description":"\"user\", \"agent:<keyId>\" or \"auto:<ruleId>\""},"createdAt":{"type":"integer","description":"Epoch milliseconds"},"updatedAt":{"type":"integer","description":"Epoch milliseconds"}},"required":["id","clientId","venue","symbol","side","type","tif","size","filled","status","reduceOnly","mode","source","createdAt","updatedAt"]},"Fill":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"symbol":{"type":"string"},"side":{"type":"string","enum":["buy","sell"]},"price":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"size":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"feeUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"liquidity":{"type":"string","enum":["maker","taker"]},"realizedPnlUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"venueFillId":{"type":"string"},"mode":{"type":"string","enum":["live","paper"]},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["id","venue","symbol","side","price","size","feeUsd","venueFillId","mode","ts"]},"Position":{"type":"object","properties":{"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"symbol":{"type":"string"},"side":{"type":"string","enum":["long","short"]},"size":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"entryPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"markPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"liqPrice":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"marginUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"leverage":{"type":"number"},"marginMode":{"type":"string","enum":["cross","isolated"]},"unrealizedPnlUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"roe":{"type":"number"},"fundingUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"mode":{"type":"string","enum":["live","paper"]},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["venue","symbol","side","size","entryPrice","markPrice","marginUsd","leverage","marginMode","unrealizedPnlUsd","roe","mode","ts"]},"VenueAccount":{"type":"object","properties":{"venue":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"connected":{"type":"boolean"},"blocked":{"type":"object","properties":{"code":{"type":"string","enum":["not_connected","needs_deposit","key_expired","venue_down"]},"message":{"type":"string"}},"required":["code","message"]},"address":{"type":"string"},"equityUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"availableUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"marginUsedUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"positions":{"type":"array","items":{"$ref":"#/components/schemas/Position"}},"stale":{"type":"boolean"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["venue","connected","equityUsd","availableUsd","marginUsedUsd","positions","stale","ts"]},"AccountState":{"type":"object","properties":{"mode":{"type":"string","enum":["live","paper"]},"equityUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"availableUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"unrealizedPnlUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"venues":{"type":"array","items":{"$ref":"#/components/schemas/VenueAccount"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["mode","equityUsd","availableUsd","unrealizedPnlUsd","venues","ts"]},"Me":{"type":"object","description":"The signed-in user: userId, wallets, trading wallets, venue connections and paper balance.","additionalProperties":true},"ConnectPlan":{"type":"object","description":"What the client must sign to finish connecting a venue: venue, connectId, sign[], expiresAt.","additionalProperties":true},"SolTokenCard":{"type":"object","properties":{"mint":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"launchpad":{"type":"string"},"column":{"type":"string","enum":["new","final_stretch","migrated"]},"createdAt":{"type":"integer","description":"Epoch milliseconds"},"migratedAt":{"anyOf":[{"type":"integer","description":"Epoch milliseconds"},{"type":"null"}]},"priceUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"marketCapUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"liquidityUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"curveProgress":{"anyOf":[{"type":"number","description":"0..1"},{"type":"null"}]},"holders":{"anyOf":[{"type":"integer"},{"type":"null"}]},"w5m":{"anyOf":[{"type":"object","description":"5-minute window: volume, buys, sells, price change","additionalProperties":true},{"type":"null"}]},"w1h":{"anyOf":[{"type":"object","description":"1-hour window","additionalProperties":true},{"type":"null"}]},"volumeUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"txns":{"anyOf":[{"type":"integer"},{"type":"null"}]},"risk":{"type":"object","description":"Risk flags: mint/freeze authority, top-10 share, snipers, bundlers…","additionalProperties":true},"dev":{"type":"object","description":"Creator wallet, holdings and history","additionalProperties":true},"socials":{"type":"object","description":"Website, X, Telegram","additionalProperties":true},"kolCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"lastTradeAt":{"anyOf":[{"type":"integer","description":"Epoch milliseconds"},{"type":"null"}]},"tier":{"type":"string","enum":["hot","warm","cold"]},"updatedAt":{"type":"integer","description":"Epoch milliseconds"},"quoteSymbol":{"anyOf":[{"type":"string","description":"Symbol of the asset the token is paired with when it is not SOL (\"USDC\", \"SPCX\"). Null or absent = SOL."},{"type":"null"}]},"organicScore":{"anyOf":[{"type":"number","description":"0..100: how much of the trading looks like real people rather than bots (Jupiter's organic score). Null or absent when unknown."},{"type":"null"}]},"feesSol":{"anyOf":[{"type":"number","description":"Trading fees paid on this token so far, in SOL, when a source reports it. Null or absent when unknown."},{"type":"null"}]}},"required":["mint","name","symbol","image","launchpad","column","createdAt","migratedAt","priceUsd","marketCapUsd","liquidityUsd","curveProgress","holders","w5m","w1h","volumeUsd","txns","risk","dev","socials","kolCount","lastTradeAt","tier","updatedAt"]},"SolTokenDetail":{"allOf":[{"$ref":"#/components/schemas/SolTokenCard"},{"type":"object","properties":{"decimals":{"type":"integer"},"totalSupply":{"type":"string","description":"Raw base units"},"quoteMint":{"anyOf":[{"type":"string"},{"type":"null"}]},"curveAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"poolAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"athUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["decimals","totalSupply","quoteMint","curveAddress","poolAddress","athUsd","description"]}]},"PulseSnapshot":{"type":"object","properties":{"new":{"type":"array","items":{"$ref":"#/components/schemas/SolTokenCard"}},"final_stretch":{"type":"array","items":{"$ref":"#/components/schemas/SolTokenCard"}},"migrated":{"type":"array","items":{"$ref":"#/components/schemas/SolTokenCard"}},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["new","final_stretch","migrated","ts"],"description":"new and migrated are feeds, newest first. final_stretch is a ranking: the top tokens still on their bonding curve, largest market cap first, so index + 1 is the rank. A token can be in new and in final_stretch at once: two cards, one per column, each with its own column."},"SolTrade":{"type":"object","properties":{"id":{"type":"string"},"mint":{"type":"string"},"side":{"type":"string","enum":["buy","sell"]},"priceUsd":{"type":"number"},"marketCapUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"sol":{"type":"number"},"tokens":{"type":"number"},"trader":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"signature":{"type":"string"},"slot":{"anyOf":[{"type":"integer"},{"type":"null"}]},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["id","mint","side","priceUsd","marketCapUsd","sol","tokens","trader","tags","signature","slot","ts"]},"SolHolder":{"type":"object","properties":{"owner":{"type":"string"},"amount":{"type":"number"},"pct":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"pnlSol":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["owner","amount","pct","tags","label","pnlSol"]},"SolTopTrader":{"type":"object","properties":{"wallet":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"boughtSol":{"type":"number"},"soldSol":{"type":"number"},"boughtTokens":{"type":"number"},"soldTokens":{"type":"number"},"remainingTokens":{"type":"number"},"realizedSol":{"type":"number"},"unrealizedSol":{"anyOf":[{"type":"number"},{"type":"null"}]},"firstTs":{"type":"integer","description":"Epoch milliseconds"}},"required":["wallet","tags","label","boughtSol","soldSol","boughtTokens","soldTokens","remainingTokens","realizedSol","unrealizedSol","firstTs"]},"SolQuote":{"type":"object","properties":{"mint":{"type":"string"},"side":{"type":"string","enum":["buy","sell"]},"route":{"type":"string","enum":["pump_curve","pumpswap","launchlab","jupiter"]},"inAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"inAsset":{"type":"string","enum":["SOL","TOKEN"]},"outAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"minOut":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"priceUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"priceImpactBps":{"type":"number"},"networkFeeSol":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"priorityFeeSol":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"tipSol":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"platformFeeSol":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"notices":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"level":{"type":"string","enum":["info","warn","block"]}},"required":["code","message","level"]}},"placeable":{"type":"boolean"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["mint","side","route","inAmount","inAsset","outAmount","minOut","priceUsd","priceImpactBps","networkFeeSol","priorityFeeSol","tipSol","platformFeeSol","notices","placeable","ts"]},"SolFill":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"mint":{"type":"string"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}]},"side":{"type":"string","enum":["buy","sell"]},"status":{"type":"string","enum":["submitted","confirmed","failed","expired"]},"signature":{"anyOf":[{"type":"string"},{"type":"null"}]},"solAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"tokenAmount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"priceUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"feeSol":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"route":{"type":"string","enum":["pump_curve","pumpswap","launchlab","jupiter"]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}]},"mode":{"type":"string","enum":["live","paper"]},"source":{"type":"string","description":"\"user\", \"agent:<keyId>\" or \"order:<orderId>\""},"createdAt":{"type":"integer","description":"Epoch milliseconds"},"settledAt":{"anyOf":[{"type":"integer","description":"Epoch milliseconds"},{"type":"null"}]}},"required":["id","clientId","mint","symbol","side","status","signature","solAmount","tokenAmount","priceUsd","feeSol","route","error","mode","source","createdAt","settledAt"]},"SolPosition":{"type":"object","properties":{"mint":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"costBasisSol":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"avgEntryUsd":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},{"type":"null"}]},"priceUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"valueUsd":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},{"type":"null"}]},"valueSol":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},{"type":"null"}]},"realizedPnlSol":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"unrealizedPnlSol":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},{"type":"null"}]},"mode":{"type":"string","enum":["live","paper"]},"updatedAt":{"type":"integer","description":"Epoch milliseconds"}},"required":["mint","name","symbol","image","amount","costBasisSol","avgEntryUsd","priceUsd","valueUsd","valueSol","realizedPnlSol","unrealizedPnlSol","mode","updatedAt"]},"SolPortfolio":{"type":"object","properties":{"mode":{"type":"string","enum":["live","paper"]},"wallet":{"anyOf":[{"type":"string"},{"type":"null"}]},"solBalance":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"solUsd":{"anyOf":[{"type":"number"},{"type":"null"}]},"positions":{"type":"array","items":{"$ref":"#/components/schemas/SolPosition"}},"realizedPnlSol":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"ts":{"type":"integer","description":"Epoch milliseconds"}},"required":["mode","wallet","solBalance","solUsd","positions","realizedPnlSol","ts"]},"SolOrder":{"type":"object","properties":{"id":{"type":"string"},"clientId":{"type":"string"},"mint":{"type":"string"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["limit_buy","limit_sell","stop_loss","take_profit","trailing_stop","dca"]},"trigger":{"type":"string","enum":["price_usd","market_cap_usd"]},"level":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},{"type":"null"}]},"trailPct":{"anyOf":[{"type":"number"},{"type":"null"}]},"peak":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},{"type":"null"}]},"amountSol":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},{"type":"null"}]},"sellPct":{"anyOf":[{"type":"number"},{"type":"null"}]},"everySec":{"anyOf":[{"type":"integer"},{"type":"null"}]},"runsLeft":{"anyOf":[{"type":"integer"},{"type":"null"}]},"status":{"type":"string","enum":["armed","triggering","filled","failed","canceled","expired"]},"groupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastFillId":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}]},"mode":{"type":"string","enum":["live","paper"]},"createdAt":{"type":"integer","description":"Epoch milliseconds"},"updatedAt":{"type":"integer","description":"Epoch milliseconds"},"expiresAt":{"anyOf":[{"type":"integer","description":"Epoch milliseconds"},{"type":"null"}]}},"required":["id","clientId","mint","symbol","kind","trigger","level","trailPct","peak","amountSol","sellPct","everySec","runsLeft","status","groupId","lastFillId","error","mode","createdAt","updatedAt","expiresAt"]},"FundingOptions":{"type":"object","description":"Per venue: deposit and withdrawal support, accepted assets with minimums and fees, typical time; and the daily withdrawal limit.","additionalProperties":true},"PlanView":{"type":"object","description":"A funding plan: planId, direction, venue, amount, steps (kind, signer, title, status), estimatedOut, minOut, feesUsd, totalTimeSec, userSignatures, expiresAt, notices, executable.","additionalProperties":true},"TransferView":{"type":"object","description":"A funding transfer: id, clientId, direction, venue, status, amount, estimatedOut, amountOut, steps, awaitingStep, location, error, timestamps.","additionalProperties":true},"AgentPolicy":{"type":"object","properties":{"executionEnabled":{"type":"boolean","default":false},"maxOrderUsd":{"type":"number","exclusiveMinimum":0,"maximum":10000000,"default":1000},"dailyUsd":{"type":"number","exclusiveMinimum":0,"maximum":100000000,"default":10000},"maxLeverage":{"type":"integer","minimum":1,"maximum":200,"default":5},"maxSlippageBps":{"type":"integer","minimum":1,"maximum":500,"default":100},"venuesAllow":{"type":"array","items":{"type":"string","enum":["hyperliquid","aster","lighter","pacifica"]},"maxItems":8},"marketsAllow":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":200},"marketsDeny":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":200},"ipAllow":{"type":"array","items":{"type":"string","minLength":3,"maxLength":64},"maxItems":32}},"additionalProperties":false},"AgentKey":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"prefix":{"type":"string","description":"Display prefix, e.g. renko_sk_live_ab12"},"last4":{"type":"string"},"env":{"type":"string","enum":["live","test"]},"scopes":{"type":"array","items":{"type":"string","enum":["market:read","account:read","orders:execute","swap:quote","swap:execute","sol:trade"]}},"policy":{"$ref":"#/components/schemas/AgentPolicy"},"status":{"type":"string","enum":["active","paused","revoked"]},"createdAt":{"type":"integer","description":"Epoch milliseconds"},"expiresAt":{"anyOf":[{"type":"integer","description":"Epoch milliseconds"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"integer","description":"Epoch milliseconds"},{"type":"null"}]},"lastUsedIp":{"anyOf":[{"type":"string"},{"type":"null"}]},"usageToday":{"type":"object","properties":{"notionalUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"orders":{"type":"integer"}},"required":["notionalUsd","orders"]}},"required":["id","label","prefix","last4","env","scopes","policy","status","createdAt","expiresAt","lastUsedAt","lastUsedIp","usageToday"]},"AgentKeyCreated":{"type":"object","properties":{"key":{"$ref":"#/components/schemas/AgentKey"},"secret":{"type":"string","description":"The key itself. Shown once; only a hash is stored."}},"required":["key","secret"]},"AgentActivityItem":{"type":"object","properties":{"id":{"type":"string"},"keyId":{"type":"string"},"keyLabel":{"type":"string"},"ts":{"type":"integer","description":"Epoch milliseconds"},"kind":{"type":"string","enum":["order","cancel","fill","sol_trade","sol_order","funding","denied"]},"summary":{"type":"string"},"ok":{"type":"boolean"},"mode":{"type":"string","enum":["live","paper"]},"notionalUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"ref":{"type":"object","properties":{"orderId":{"type":"string"},"symbol":{"type":"string"},"venue":{"type":"string"},"mint":{"type":"string"},"fillId":{"type":"string"}}},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["id","keyId","keyLabel","ts","kind","summary","ok","mode"]},"AgentToolDef":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object","description":"JSON Schema, type object","additionalProperties":true},"scopes":{"type":"array","items":{"type":"string","enum":["market:read","account:read","orders:execute","swap:quote","swap:execute","sol:trade"]}},"mutates":{"type":"boolean"}},"required":["name","description","inputSchema","scopes","mutates"]},"AgentWhoAmI":{"type":"object","properties":{"keyId":{"type":"string"},"label":{"type":"string"},"env":{"type":"string","enum":["live","test"]},"scopes":{"type":"array","items":{"type":"string","enum":["market:read","account:read","orders:execute","swap:quote","swap:execute","sol:trade"]}},"policy":{"$ref":"#/components/schemas/AgentPolicy"},"forcedMode":{"anyOf":[{"type":"string","enum":["live","paper"]},{"type":"null"}]},"paused":{"type":"boolean"},"usageToday":{"type":"object","properties":{"notionalUsd":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal string"},"orders":{"type":"integer"}},"required":["notionalUsd","orders"]}},"required":["keyId","label","env","scopes","policy","forcedMode","paused","usageToday"]}}}}