{"openapi":"3.1.0","paths":{"/arbitrage-auto-close-orders/{id}":{"delete":{"description":"Cancels a pending auto-close order and leaves both positions open. Only orders that have not started closing can be canceled.","operationId":"ArbitrageAutoCloseOrderController_cancelArbitrageAutoCloseOrder","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArbitrageAutoCloseOrderDto"}}}},"409":{"description":"The order has already started closing, or an update of it is still being saved"},"503":{"description":"The arbitrage order service is unreachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Cancel an arbitrage auto-close order","tags":["Arbitrage Auto-Close Orders"]},"get":{"operationId":"ArbitrageAutoCloseOrderController_getArbitrageAutoCloseOrder","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArbitrageAutoCloseOrderDto"}}}},"503":{"description":"The arbitrage order service is unreachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get a single arbitrage auto-close order","tags":["Arbitrage Auto-Close Orders"]},"patch":{"description":"Replaces all conditions of a pending auto-close order and starts every count over. Only orders that have not started closing can be updated.","operationId":"ArbitrageAutoCloseOrderController_updateArbitrageAutoCloseOrder","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateArbitrageAutoCloseOrderBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArbitrageAutoCloseOrderDto"}}}},"409":{"description":"The order has already started closing, or an update of it is still being saved"},"503":{"description":"The arbitrage order service is unreachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Update the conditions of an arbitrage auto-close order","tags":["Arbitrage Auto-Close Orders"]}},"/arbitrage-auto-close-orders":{"post":{"description":"Closes both legs of a hedged position as soon as any of its conditions is met: a close time, a price spread, a funding spread or the funding spread turning negative. At that moment every order resting on either market is canceled and each position is closed in full with a reduce-only market order.","operationId":"ArbitrageAutoCloseOrderController_createArbitrageAutoCloseOrder","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateArbitrageAutoCloseOrderBodyDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArbitrageAutoCloseOrderDto"}}}},"409":{"description":"An auto-close order already covers one of the markets"},"503":{"description":"The arbitrage order service is unreachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Create an arbitrage auto-close order","tags":["Arbitrage Auto-Close Orders"]},"get":{"description":"Returns your arbitrage auto-close orders, newest first. Filter by status for pending orders (created, executionStarted) or history (executed, canceled, failed).","operationId":"ArbitrageAutoCloseOrderController_getArbitrageAutoCloseOrders","parameters":[{"name":"cursor","required":false,"in":"query","description":"Opaque pagination cursor returned as cursor from the previous page","schema":{"description":"Opaque pagination cursor returned as cursor from the previous page","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of orders to return per page (1–100)","schema":{"default":20,"description":"Number of orders to return per page (1–100)","type":"integer","minimum":1,"maximum":100}},{"name":"orderBy","required":false,"in":"query","description":"Sort field: updatedAt (default, most recently changed first), createdAt (most recently placed first) or closeAt (latest close time first, then orders with no time condition)","schema":{"default":"updatedAt","description":"Sort field: updatedAt (default, most recently changed first), createdAt (most recently placed first) or closeAt (latest close time first, then orders with no time condition)","type":"string","enum":["closeAt","createdAt","updatedAt"]}},{"name":"status","required":false,"in":"query","description":"Filter by one or more statuses, repeating the parameter for several. Pending orders are created and executionStarted; history is executed, canceled and failed.","schema":{"description":"Filter by one or more statuses, repeating the parameter for several. Pending orders are created and executionStarted; history is executed, canceled and failed.","anyOf":[{"type":"string","enum":["canceled","created","executed","executionStarted","failed"]},{"type":"array","items":{"type":"string","enum":["canceled","created","executed","executionStarted","failed"]}}]}},{"name":"unifiedSymbol","required":false,"in":"query","description":"Filter by asset.","schema":{"description":"Filter by asset.","type":"string","minLength":1}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetArbitrageAutoCloseOrdersDto"}}}},"503":{"description":"The arbitrage order service is unreachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"List arbitrage auto-close orders","tags":["Arbitrage Auto-Close Orders"]}},"/arbitrage-orders/{id}":{"delete":{"description":"Cancels the arbitrage order: no further step is started, and the order of the step in progress is canceled on the exchange whatever its state is, including a partially filled primary or hedge order. A step that was not sent yet is dropped without touching the exchange; a step whose order is sent but not confirmed yet waits for its order id first. When the exchange rejects the cancel, for example because the order has just filled, the arbitrage order becomes failed and the request answers 503 with the reason. The request is rejected with 409 when the order is already canceled, failed, finished or is being canceled by an earlier request. The order is returned in its final status.","operationId":"ArbitrageOrderController_cancelArbitrageOrder","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArbitrageOrderDto"}}}},"409":{"description":"The order is already in a terminal status, or it has no step left to cancel"},"503":{"description":"The arbitrage order service is unreachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Cancel an arbitrage order","tags":["Arbitrage Orders"]},"get":{"operationId":"ArbitrageOrderController_getArbitrageOrder","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArbitrageOrderDto"}}}},"503":{"description":"The arbitrage order service is unreachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get a single arbitrage order","tags":["Arbitrage Orders"]}},"/arbitrage-orders":{"post":{"description":"Opens a hedged position with one order on each exchange, each leg sized on its own. The primary leg is placed first, and the hedge leg is placed once the primary leg fills. With more than one size per leg, the steps are placed in a row, each with its own sizes and each hedged before the next one starts. With maxSlippage set, a step is sent only once both legs fit into their order books within maxSlippage.bps, checked every second; if they do not fit within maxSlippage.waitMs, the order is marked failed and the steps hedged so far stay open. Both legs are validated against their exchanges before the order is accepted.","operationId":"ArbitrageOrderController_createArbitrageOrder","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateArbitrageOrderBodyDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArbitrageOrderDto"}}}},"409":{"description":"An auto-close order covers one of the markets and will clear it when it fires"},"503":{"description":"The arbitrage order service is unreachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Create an arbitrage order","tags":["Arbitrage Orders"]},"get":{"description":"Returns your arbitrage orders, newest first. Filter by status for open orders (processing, canceling), open positions (finished), or history (canceled, failed).","operationId":"ArbitrageOrderController_getArbitrageOrders","parameters":[{"name":"cursor","required":false,"in":"query","description":"Opaque pagination cursor returned as cursor from the previous page","schema":{"description":"Opaque pagination cursor returned as cursor from the previous page","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of orders to return per page (1–100)","schema":{"default":20,"description":"Number of orders to return per page (1–100)","type":"integer","minimum":1,"maximum":100}},{"name":"orderBy","required":false,"in":"query","description":"Sort field: updatedAt (default, most recently changed first) or createdAt (most recently placed first)","schema":{"default":"updatedAt","description":"Sort field: updatedAt (default, most recently changed first) or createdAt (most recently placed first)","type":"string","enum":["createdAt","updatedAt"]}},{"name":"status","required":false,"in":"query","description":"Filter by one or more statuses, repeating the parameter for several. Open orders are processing and canceling; open positions are finished; history is canceled and failed.","schema":{"description":"Filter by one or more statuses, repeating the parameter for several. Open orders are processing and canceling; open positions are finished; history is canceled and failed.","anyOf":[{"type":"string","enum":["canceled","canceling","failed","finished","processing"]},{"type":"array","items":{"type":"string","enum":["canceled","canceling","failed","finished","processing"]}}]}},{"name":"strategy","required":false,"in":"query","description":"Filter by strategy.","schema":{"description":"Filter by strategy.","type":"string","enum":["limitLimit","limitMarket","marketMarket"]}},{"name":"unifiedSymbol","required":false,"in":"query","description":"Filter by asset.","schema":{"description":"Filter by asset.","type":"string","minLength":1}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetArbitrageOrdersDto"}}}},"503":{"description":"The arbitrage order service is unreachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"List arbitrage orders","tags":["Arbitrage Orders"]}},"/user/tokens":{"post":{"operationId":"TokensController_createToken","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTokenBodyDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTokenResultDto"}}}}},"summary":"Create a new API token","tags":["Tokens"]},"delete":{"operationId":"TokensController_deleteToken","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTokenBodyDto"}}}},"responses":{"200":{"description":""}},"summary":"Delete an API token","tags":["Tokens"]},"get":{"operationId":"TokensController_getTokens","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetTokensResultItemDto"}}}}}},"security":[{"bearer":[]}],"summary":"List named API tokens","tags":["Tokens"]}},"/user":{"get":{"operationId":"UserController_getUser","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get current user info","tags":["User"]}},"/arbitrage-scanner":{"get":{"description":"Returns cross-exchange funding-arbitrage opportunities grouped by coin. Each market pair appears in both trade directions. fundingSpread1h, priceSpread and priceSpreadAtSize are signed and direction-specific, so the two directions of a pair carry roughly opposite values; the maxFundingSpread and maxPriceSpread fields are each a maximum taken over that direction alone, so one direction value is not the negation of the other. Each leg keeps its own signed funding rate. Prices, funding rates and open interest are current live values. Each coin carries the `category` of its underlying; `GET /exchange/markets/categories` lists the categories available to filter by. Both legs may sit on Hyperliquid when they are on different dexes (Hyperliquid's own perps and its HIP-3 dexes); the `<dex>:` prefix on each leg's `baseSymbol` tells them apart. `exchanges` accepts an exchange name or a single Hyperliquid dex as `hyperliquid:<dex>` (e.g. `hyperliquid:io`, or `hyperliquid:hyperliquid` for Hyperliquid's own perps): a single entry keeps every pair touching it, several entries keep only pairs whose legs are on two different listed entries.","operationId":"ArbitrageScannerController_getArbitrageScanner","parameters":[{"name":"categories","required":false,"in":"query","description":"Keep only coins whose asset class is one of these (repeat the query param to pass several); omit to keep every category. A coin has a single category because both legs are the same underlying.","schema":{"description":"Keep only coins whose asset class is one of these (repeat the query param to pass several); omit to keep every category. A coin has a single category because both legs are the same underlying.","anyOf":[{"type":"string","enum":["commodities","crypto","etf-index","forex","pre-ipo","stocks-asia","stocks-us"],"description":"Asset class of the market"},{"type":"array","items":{"type":"string","enum":["commodities","crypto","etf-index","forex","pre-ipo","stocks-asia","stocks-us"],"description":"Asset class of the market"}}]}},{"name":"exchanges","required":false,"in":"query","description":"Exchanges to scan (repeat the query param to pass several): an exchange name for all of its markets, or `hyperliquid:<dex>` for one Hyperliquid dex (`hyperliquid` for Hyperliquid's own perps, otherwise a HIP-3 dex: `xyz`, `mkts`, `vntl` or `io`); a dex suffix on any other exchange is rejected. With a single entry every pair with at least one leg on it is kept; with several entries both legs must be on listed entries and on different exchanges or Hyperliquid dexes. Omit to scan every exchange.","schema":{"description":"Exchanges to scan (repeat the query param to pass several): an exchange name for all of its markets, or `hyperliquid:<dex>` for one Hyperliquid dex (`hyperliquid` for Hyperliquid's own perps, otherwise a HIP-3 dex: `xyz`, `mkts`, `vntl` or `io`); a dex suffix on any other exchange is rejected. With a single entry every pair with at least one leg on it is kept; with several entries both legs must be on listed entries and on different exchanges or Hyperliquid dexes. Omit to scan every exchange.","anyOf":[{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$"}]},{"type":"array","items":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$"}]}}]}},{"name":"excludeSymbols","required":false,"in":"query","description":"Exclude these base symbols from the results (repeat the query param to pass several); a pair is dropped when at least one of its legs matches. Alias keys are not accepted.","schema":{"description":"Exclude these base symbols from the results (repeat the query param to pass several); a pair is dropped when at least one of its legs matches. Alias keys are not accepted.","anyOf":[{"type":"string","minLength":1,"description":"Asset identifier: base symbol (e.g. \"ETH\") or full pair (e.g. \"ETHUSDC\").","example":"ETH"},{"type":"array","items":{"type":"string","minLength":1,"description":"Asset identifier: base symbol (e.g. \"ETH\") or full pair (e.g. \"ETHUSDC\").","example":"ETH"}}]}},{"name":"limit","required":false,"in":"query","description":"Number of coins to return per page (1–200).","schema":{"default":15,"description":"Number of coins to return per page (1–200).","type":"integer","minimum":1,"maximum":200}},{"name":"minFundingSpread","required":false,"in":"query","description":"Keep only coins with at least one pair whose hourly funding spread is at least this decimal fraction.","schema":{"description":"Keep only coins with at least one pair whose hourly funding spread is at least this decimal fraction.","type":"string","pattern":"\\d+(\\.\\d+)?","example":"0.001"}},{"name":"minFundingSpreadPositiveHours","required":false,"in":"query","description":"Keep only pairs whose funding spread has stayed positive for at least this many hours (see fundingSpreadPositiveSince); a coin stays when at least one of its pairs does. After a restart runs are known back to a day only.","schema":{"description":"Keep only pairs whose funding spread has stayed positive for at least this many hours (see fundingSpreadPositiveSince); a coin stays when at least one of its pairs does. After a restart runs are known back to a day only.","type":"number","exclusiveMinimum":0,"maximum":8760}},{"name":"minOpenInterest","required":false,"in":"query","description":"Keep only coins with at least one pair whose thinner leg has open interest of at least this USD notional (one-sided).","schema":{"description":"Keep only coins with at least one pair whose thinner leg has open interest of at least this USD notional (one-sided).","type":"number","minimum":0}},{"name":"minPriceSpread","required":false,"in":"query","description":"Keep only coins with at least one pair whose price spread is at least this decimal fraction.","schema":{"description":"Keep only coins with at least one pair whose price spread is at least this decimal fraction.","type":"string","pattern":"\\d+(\\.\\d+)?","example":"0.001"}},{"name":"minVolume","required":false,"in":"query","description":"Keep only coins with at least one pair whose thinner leg has 24h volume in USD of at least this value.","schema":{"description":"Keep only coins with at least one pair whose thinner leg has 24h volume in USD of at least this value.","type":"string","pattern":"\\d+(\\.\\d+)?","example":"0.001"}},{"name":"notionalUsd","required":false,"in":"query","description":"Notional in USD used to estimate per-leg slippage from the live order book.","schema":{"default":1000,"description":"Notional in USD used to estimate per-leg slippage from the live order book.","type":"number","exclusiveMinimum":0}},{"name":"offset","required":false,"in":"query","description":"Number of coins to skip.","schema":{"default":0,"description":"Number of coins to skip.","type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"orderBy","required":false,"in":"query","description":"Pair-level numeric field to rank coins by; each coin ranks by its best pair. `openInterest` and `volume24h` rank by the thinner leg of the pair; the spread fields rank by the pair value itself.","schema":{"default":"fundingSpread1h","description":"Pair-level numeric field to rank coins by; each coin ranks by its best pair. `openInterest` and `volume24h` rank by the thinner leg of the pair; the spread fields rank by the pair value itself.","type":"string","enum":["fundingSpread1h","maxFundingSpread1h","maxFundingSpread24h","maxPriceSpread1h","maxPriceSpread24h","openInterest","priceSpread","volume24h"]}},{"name":"orderDirection","required":false,"in":"query","description":"Sort direction over the ranked coins.","schema":{"default":"desc","description":"Sort direction over the ranked coins.","type":"string","enum":["asc","desc"]}},{"name":"query","required":false,"in":"query","description":"Case-insensitive substring search over the coin asset key (alias keys match by their name without the `alias:` prefix) and each leg's symbols.","schema":{"description":"Case-insensitive substring search over the coin asset key (alias keys match by their name without the `alias:` prefix) and each leg's symbols.","type":"string","minLength":1}},{"name":"symbol","required":false,"in":"query","description":"Return only the coin with this exact case-insensitive alias (if exists for market) or base symbol; combine with two exchanges to fetch a single cross-market pair in both trade directions.","schema":{"description":"Return only the coin with this exact case-insensitive alias (if exists for market) or base symbol; combine with two exchanges to fetch a single cross-market pair in both trade directions.","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetArbitrageScannerResponseDto"}}}}},"summary":"List arbitrage scanner opportunities","tags":["Arbitrage Scanner"]}},"/arbitrage-scanner/funding-candles":{"get":{"description":"Returns the funding rates recorded for two markets over a window of `limit` minutes, ending at `dateTo` (defaults to now, never later than the current minute) shifted `offset` minutes back — increase offset by limit to page further into the past. Minutes without a recorded rate are omitted, not zero-filled, so each leg carries between zero and `limit` rates.","operationId":"ArbitrageScannerController_getFundingCandles","parameters":[{"name":"assetA","required":true,"in":"query","description":"Asset identifier of the first leg market.","schema":{"type":"string","minLength":1,"description":"Asset identifier of the first leg market.","example":"BTC"}},{"name":"assetB","required":true,"in":"query","description":"Asset identifier of the second leg market.","schema":{"type":"string","minLength":1,"description":"Asset identifier of the second leg market.","example":"BTC"}},{"name":"dateTo","required":false,"in":"query","description":"End of the window as a unix timestamp in milliseconds, truncated to the minute. Defaults to now.","schema":{"description":"End of the window as a unix timestamp in milliseconds, truncated to the minute. Defaults to now.","example":1784720700000,"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"exchangeA","required":true,"in":"query","description":"Exchange of the first leg market.","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Exchange of the first leg market.","example":"lighter"}},{"name":"exchangeB","required":true,"in":"query","description":"Exchange of the second leg market.","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Exchange of the second leg market.","example":"aster"}},{"name":"limit","required":false,"in":"query","description":"Width of the returned window in minutes.","schema":{"default":1500,"description":"Width of the returned window in minutes.","example":1500,"type":"integer","exclusiveMinimum":0,"maximum":3000}},{"name":"offset","required":false,"in":"query","description":"Number of most recent minutes to skip before dateTo. Increase by limit to page further back in time.","schema":{"default":0,"description":"Number of most recent minutes to skip before dateTo. Increase by limit to page further back in time.","example":0,"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFundingCandlesResponseDto"}}}}},"summary":"Per-minute funding rates for a market pair","tags":["Arbitrage Scanner"]}},"/arbitrage-scanner/price-spread-candles":{"get":{"description":"Returns all stored price spread candles for a market pair at the requested resolution, oldest first. Leg A is the buy (ask) side and leg B is the sell (bid) side; the spread is computed as `2 * (bidB - askA) / (bidB + askA)`. Intervals without ticks are omitted, not zero-filled.","operationId":"ArbitrageScannerController_getPriceSpreadCandles","parameters":[{"name":"assetA","required":true,"in":"query","description":"Asset identifier of the first leg market.","schema":{"type":"string","minLength":1,"description":"Asset identifier of the first leg market.","example":"BTC"}},{"name":"assetB","required":true,"in":"query","description":"Asset identifier of the second leg market.","schema":{"type":"string","minLength":1,"description":"Asset identifier of the second leg market.","example":"BTC"}},{"name":"exchangeA","required":true,"in":"query","description":"Exchange of the first leg market.","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Exchange of the first leg market.","example":"lighter"}},{"name":"exchangeB","required":true,"in":"query","description":"Exchange of the second leg market.","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Exchange of the second leg market.","example":"aster"}},{"name":"resolution","required":true,"in":"query","description":"Candle resolution","schema":{"type":"string","enum":["1m","5m","15m","30m","1h","4h","12h","1d"],"description":"Candle resolution","example":"1m"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPriceSpreadCandlesResponseDto"}}}}},"summary":"Price spread candles for a market pair","tags":["Arbitrage Scanner"]}},"/bots":{"post":{"description":"Creates a stopped funding bot. Once started it scans the arbitrage scanner for cross-venue pairs with a positive funding spread, positive for as many hours as `risk` demands, whose round trip costs at most `maxRoundTripCostBps` and, when `minExpectedNetBps` is set, is expected to earn at least that much over it, opens the one expected to earn the most over `maxHoldHours`, holds until the spread turns against the pair (for `low` and `medium` the day average stops paying or the spread flips hard, for `high` it turns clearly negative) or `maxHoldHours` pass, closes, and scans again.","operationId":"BotController_createBot","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBotBodyDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotDto"}}}},"400":{"description":"A selected venue is not connected to your account"},"409":{"description":"You already have the maximum number of bots"}},"security":[{"bearer":[]}],"summary":"Create a bot","tags":["Bots"]},"get":{"operationId":"BotController_getBots","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BotDto"}}}}}},"security":[{"bearer":[]}],"summary":"List your bots","tags":["Bots"]}},"/bots/{id}":{"delete":{"description":"Hides the bot and keeps its history readable. Refused while the bot runs or is closing its pair; a stopped or halted bot is deleted whatever it holds — its cycles stay readable.","operationId":"BotController_deleteBot","parameters":[{"name":"id","required":true,"in":"path","description":"Bot identifier","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Bot identifier"}}],"responses":{"404":{"description":"Bot not found"},"409":{"description":"The bot is running or closing its pair"}},"security":[{"bearer":[]}],"summary":"Delete a bot","tags":["Bots"]},"put":{"description":"Replaces the whole configuration of a stopped or halted bot; the runner applies it on its next poll. Refused while the bot runs, is closing its pair, or has an entry order working, since that order was sized under the configuration it was sent with. The last error and the history stay.","operationId":"BotController_updateBot","parameters":[{"name":"id","required":true,"in":"path","description":"Bot identifier","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Bot identifier"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBotBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotDto"}}}},"400":{"description":"A selected venue is not connected to your account"},"404":{"description":"Bot not found"},"409":{"description":"The bot is running, closing its pair, or has an entry order working"}},"security":[{"bearer":[]}],"summary":"Edit a bot","tags":["Bots"]}},"/bots/{id}/cycles":{"get":{"description":"Lists the round trips this bot has recorded, newest first, each with the pair it traded, the scan that chose it, the orders it placed and what it earned and cost. Trades, positions and funding are refreshed from the venues at most once a minute before the figures are computed.","operationId":"BotController_getBotCycles","parameters":[{"name":"id","required":true,"in":"path","description":"Bot identifier","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Bot identifier"}},{"name":"cursor","required":false,"in":"query","description":"Pass the cursor from the previous page to fetch the next one.","schema":{"description":"Pass the cursor from the previous page to fetch the next one.","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of cycles to return per page, from 1 to 100.","schema":{"default":20,"description":"Number of cycles to return per page, from 1 to 100.","type":"integer","minimum":1,"maximum":100}},{"name":"phase","required":false,"in":"query","description":"Filter by one or more phases, repeating the parameter for several: closed for the pairs the bot closed, plus aborted for the entries that never filled. Keep the same filter on every page of one cursor.","schema":{"description":"Filter by one or more phases, repeating the parameter for several: closed for the pairs the bot closed, plus aborted for the entries that never filled. Keep the same filter on every page of one cursor.","anyOf":[{"type":"string","enum":["aborted","closed","closing","holding","opening"]},{"type":"array","items":{"type":"string","enum":["aborted","closed","closing","holding","opening"]}}]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotCyclesDto"}}}},"400":{"description":"Wrong cursor"},"404":{"description":"Bot not found"}},"security":[{"bearer":[]}],"summary":"Read a bot's cycles","tags":["Bots"]}},"/bots/{id}/stats":{"get":{"description":"Totals over every cycle this bot has recorded. Figures accrue to the close of each cycle, or to now while its pair is still held, and partial cycles are counted in `incompleteCycles` rather than dropped.","operationId":"BotController_getBotStats","parameters":[{"name":"id","required":true,"in":"path","description":"Bot identifier","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Bot identifier"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotStatsDto"}}}},"404":{"description":"Bot not found"}},"security":[{"bearer":[]}],"summary":"Read a bot's totals","tags":["Bots"]}},"/bots/{id}/start":{"post":{"description":"Starts your bot; the runner picks it up on its next poll. Starting a bot that is closing its pair withdraws the stop; an exit already in flight is left to settle, then normal operation resumes. The last error stays on the bot until it halts again.","operationId":"BotController_startBot","parameters":[{"name":"id","required":true,"in":"path","description":"Bot identifier","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Bot identifier"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotDto"}}}},"404":{"description":"Bot not found"}},"security":[{"bearer":[]}],"summary":"Start a bot","tags":["Bots"]}},"/bots/{id}/stop":{"post":{"description":"Stops your bot on the next runner poll; an active tick is allowed to finish. With `closePair` the runner pulls any order still resting, closes the pair at market, and the bot reads `stopping` until the pair is gone; without it the positions stay open and a later start resumes the pair. Send `{}` for a plain stop.","operationId":"BotController_stopBot","parameters":[{"name":"id","required":true,"in":"path","description":"Bot identifier","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Bot identifier"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopBotBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotDto"}}}},"404":{"description":"Bot not found"},"409":{"description":"The bot has halted, or — without `closePair` — is already closing its pair"}},"security":[{"bearer":[]}],"summary":"Stop a bot","tags":["Bots"]}},"/broker/exchanges/{exchange}":{"delete":{"description":"Adds a settings record with no identifier and no fees effective from now, which deactivates the broker configuration for this exchange: the exchange stops being listed by GET /broker/exchanges, new orders carry no builder attribution, and builder approval falls back to caller-supplied identifier and maxFeeBps. Earlier records stay in history so past statistics are unchanged.","operationId":"BrokerController_clearExchange","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}},{"name":"exchange","required":true,"in":"path","description":"Supported perpetual exchange","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}],"responses":{"204":{"description":""}},"summary":"Deactivate broker settings for a specific exchange","tags":["Broker"]}},"/broker/exchanges":{"post":{"description":"Adds a settings record effective from now; the latest record is the current one, and statistics apply the record that was active when each order was created.","operationId":"BrokerController_createExchange","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetBrokerExchangeBodyDTO"}}}},"responses":{"201":{"description":""}},"summary":"Add new broker key and fee settings for a specific exchange","tags":["Broker"]},"get":{"operationId":"BrokerController_listExchanges","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetBrokerExchangeDTO"}}}}}},"summary":"Get broker exchange settings for all exchanges","tags":["Broker"]}},"/broker/orders":{"get":{"operationId":"BrokerController_getOrders","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Opaque pagination cursor returned as cursor from the previous page","schema":{"description":"Opaque pagination cursor returned as cursor from the previous page","type":"string"}},{"name":"exchange","required":false,"in":"query","description":"Filter by exchange","schema":{"description":"Filter by exchange","type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"]}},{"name":"from","required":false,"in":"query","description":"Start of time range (Unix milliseconds, inclusive)","schema":{"description":"Start of time range (Unix milliseconds, inclusive)","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"limit","required":false,"in":"query","description":"Number of items to return per page (1-1000)","schema":{"default":100,"description":"Number of items to return per page (1-1000)","type":"integer","minimum":1,"maximum":1000}},{"name":"to","required":false,"in":"query","description":"End of time range (Unix milliseconds, exclusive)","schema":{"description":"End of time range (Unix milliseconds, exclusive)","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"userId","required":false,"in":"query","description":"Filter by user id","schema":{"description":"Filter by user id","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBrokerOrdersDTO"}}}}},"summary":"Get order history for broker users","tags":["Broker"]}},"/broker/stats":{"get":{"operationId":"BrokerController_getStats","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}},{"name":"from","required":true,"in":"query","description":"Start of the period (Unix milliseconds, inclusive)","schema":{"description":"Start of the period (Unix milliseconds, inclusive)","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"to","required":true,"in":"query","description":"End of the period (Unix milliseconds, exclusive)","schema":{"description":"End of the period (Unix milliseconds, exclusive)","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerStatsDto"}}}}},"summary":"Get aggregated trading statistics for broker users (max 30-day period)","tags":["Broker"]}},"/broker/users/top-volume":{"get":{"operationId":"BrokerController_getTopVolumeUsers","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Pagination cursor returned from the previous page. Keep dateFrom, dateTo, exchanges, and limit unchanged across requests.","schema":{"description":"Pagination cursor returned from the previous page. Keep dateFrom, dateTo, exchanges, and limit unchanged across requests.","type":"string"}},{"name":"dateFrom","required":false,"in":"query","description":"Start of the period as ISO date (e.g. \"2026-01-01\", inclusive). Defaults to 30 days before now. The range must not exceed 180 days.","schema":{"description":"Start of the period as ISO date (e.g. \"2026-01-01\", inclusive). Defaults to 30 days before now. The range must not exceed 180 days.","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"dateTo","required":false,"in":"query","description":"End of the period as ISO date (e.g. \"2026-01-31\", inclusive). Defaults to today.","schema":{"description":"End of the period as ISO date (e.g. \"2026-01-31\", inclusive). Defaults to today.","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"exchanges","required":false,"in":"query","description":"Filter by these exchanges (repeat the query param to pass several). When omitted, all supported exchanges are included.","schema":{"description":"Filter by these exchanges (repeat the query param to pass several). When omitted, all supported exchanges are included.","anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"array","items":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}]}},{"name":"limit","required":false,"in":"query","description":"Number of items to return per page (1-1000).","schema":{"default":100,"description":"Number of items to return per page (1-1000).","type":"integer","minimum":1,"maximum":1000}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerTopVolumeUsersDto"}}}}},"summary":"Get broker users ranked by API-created order volume in USD, with pagination","tags":["Broker"]}},"/broker/trades":{"get":{"operationId":"BrokerController_getTrades","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Opaque pagination cursor returned as cursor from the previous page","schema":{"description":"Opaque pagination cursor returned as cursor from the previous page","type":"string"}},{"name":"exchange","required":false,"in":"query","description":"Filter by exchange","schema":{"description":"Filter by exchange","type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"]}},{"name":"from","required":false,"in":"query","description":"Start of time range (Unix milliseconds, inclusive)","schema":{"description":"Start of time range (Unix milliseconds, inclusive)","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"limit","required":false,"in":"query","description":"Number of items to return per page (1-1000)","schema":{"default":100,"description":"Number of items to return per page (1-1000)","type":"integer","minimum":1,"maximum":1000}},{"name":"to","required":false,"in":"query","description":"End of time range (Unix milliseconds, exclusive)","schema":{"description":"End of time range (Unix milliseconds, exclusive)","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"userId","required":false,"in":"query","description":"Filter by user id","schema":{"description":"Filter by user id","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBrokerTradesDTO"}}}}},"summary":"Get trade history for broker users","tags":["Broker"]}},"/broker/users/stats":{"get":{"operationId":"BrokerController_getUsersStats","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"Opaque pagination cursor returned from the previous page. When paginating, from, to, and limit must remain unchanged across requests.","schema":{"description":"Opaque pagination cursor returned from the previous page. When paginating, from, to, and limit must remain unchanged across requests.","type":"string"}},{"name":"from","required":true,"in":"query","description":"Start of time range (Unix milliseconds, inclusive)","schema":{"description":"Start of time range (Unix milliseconds, inclusive)","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"limit","required":false,"in":"query","description":"Number of items to return per page (1-50)","schema":{"default":50,"description":"Number of items to return per page (1-50)","type":"integer","minimum":1,"maximum":50}},{"name":"to","required":true,"in":"query","description":"End of time range (Unix milliseconds, exclusive)","schema":{"description":"End of time range (Unix milliseconds, exclusive)","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBrokerUsersStatsDTO"}}}}},"summary":"Get broker users ranked by executed notional volume","tags":["Broker"]}},"/broker/users":{"post":{"operationId":"BrokerController_registerUser","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterUserBodyDTO"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileDTO"}}}}},"summary":"Register a new user","tags":["Broker"]}},"/broker/users/public-key":{"put":{"operationId":"BrokerController_setPublicKey","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPublicKeyBodyDTO"}}}},"responses":{"204":{"description":""}},"summary":"Set or remove a public key for a user","tags":["Broker"]}},"/broker-statistics/summary":{"get":{"operationId":"BrokerStatisticsController_getSummary","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"Start of the period as unix timestamp in milliseconds (inclusive), snapped to the start of its UTC day. Defaults to 30 days before now.","schema":{"description":"Start of the period as unix timestamp in milliseconds (inclusive), snapped to the start of its UTC day. Defaults to 30 days before now.","example":1767225600000,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"to","required":false,"in":"query","description":"End of the period as unix timestamp in milliseconds (inclusive), snapped to the end of its UTC day. Defaults to now.","schema":{"description":"End of the period as unix timestamp in milliseconds (inclusive), snapped to the end of its UTC day. Defaults to now.","example":1769903999000,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerSummaryDto"}}}}},"summary":"Get trade volume and unique traders from API-created orders, broken down by exchange, with totals","tags":["Broker Statistics"]}},"/broker-statistics/user-pnl":{"get":{"operationId":"BrokerStatisticsController_getUserPnl","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"Start of the period as unix timestamp in milliseconds (inclusive). Defaults to now - 30 days (1 day for hour resolution).","schema":{"description":"Start of the period as unix timestamp in milliseconds (inclusive). Defaults to now - 30 days (1 day for hour resolution).","example":1767225600000,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"resolution","required":false,"in":"query","description":"Aggregation interval: day (UTC calendar day) or hour (UTC clock hour). from/to snap to interval boundaries. On series endpoints, items span one interval and hour limits the range to 7 days. Defaults to day.","schema":{"default":"day","description":"Aggregation interval: day (UTC calendar day) or hour (UTC clock hour). from/to snap to interval boundaries. On series endpoints, items span one interval and hour limits the range to 7 days. Defaults to day.","type":"string","enum":["day","hour"]}},{"name":"to","required":false,"in":"query","description":"End of the period as unix timestamp in milliseconds (inclusive). Defaults to now.","schema":{"description":"End of the period as unix timestamp in milliseconds (inclusive). Defaults to now.","example":1769903999000,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"userId","required":true,"in":"query","description":"User id to compute stats for.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id to compute stats for."}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBrokerUserPnlDTO"}}}}},"summary":"Get user realized PnL, broken down by exchange","tags":["Broker Statistics"]}},"/broker-statistics/user-pnl/chart":{"get":{"operationId":"BrokerStatisticsController_getUserPnlChart","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"Start of the period as unix timestamp in milliseconds (inclusive). Defaults to now - 30 days (1 day for hour resolution).","schema":{"description":"Start of the period as unix timestamp in milliseconds (inclusive). Defaults to now - 30 days (1 day for hour resolution).","example":1767225600000,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"resolution","required":false,"in":"query","description":"Aggregation interval: day (UTC calendar day) or hour (UTC clock hour). from/to snap to interval boundaries. On series endpoints, items span one interval and hour limits the range to 7 days. Defaults to day.","schema":{"default":"day","description":"Aggregation interval: day (UTC calendar day) or hour (UTC clock hour). from/to snap to interval boundaries. On series endpoints, items span one interval and hour limits the range to 7 days. Defaults to day.","type":"string","enum":["day","hour"]}},{"name":"to","required":false,"in":"query","description":"End of the period as unix timestamp in milliseconds (inclusive). Defaults to now.","schema":{"description":"End of the period as unix timestamp in milliseconds (inclusive). Defaults to now.","example":1769903999000,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"userId","required":true,"in":"query","description":"User id to compute stats for.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id to compute stats for."}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerUserPnlChartDto"}}}}},"summary":"Get per-interval (day or hour) realized PnL of a user broken down by exchange, with gaps filled","tags":["Broker Statistics"]}},"/broker-statistics/users-volume":{"post":{"operationId":"BrokerStatisticsController_getUsersListVolume","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBrokerUsersVolumeBodyDTO"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetBrokerUsersVolumeDTO"}}}}}},"summary":"Get per-user trade volume and broker fees, broken down by exchange, for a list of users","tags":["Broker Statistics"]}},"/broker-statistics/users-volume/chart":{"post":{"operationId":"BrokerStatisticsController_getUsersListVolumeChart","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBrokerUsersVolumeBodyDTO"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerUsersVolumeChartDto"}}}}},"summary":"Get per-interval (day or hour) trade volume broken down by exchange across a list of users, with gaps filled","tags":["Broker Statistics"]}},"/broker-statistics/user-volume":{"get":{"operationId":"BrokerStatisticsController_getUserVolume","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"Start of the period as unix timestamp in milliseconds (inclusive). Defaults to now - 30 days (1 day for hour resolution).","schema":{"description":"Start of the period as unix timestamp in milliseconds (inclusive). Defaults to now - 30 days (1 day for hour resolution).","example":1767225600000,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"resolution","required":false,"in":"query","description":"Aggregation interval: day (UTC calendar day) or hour (UTC clock hour). from/to snap to interval boundaries. On series endpoints, items span one interval and hour limits the range to 7 days. Defaults to day.","schema":{"default":"day","description":"Aggregation interval: day (UTC calendar day) or hour (UTC clock hour). from/to snap to interval boundaries. On series endpoints, items span one interval and hour limits the range to 7 days. Defaults to day.","type":"string","enum":["day","hour"]}},{"name":"to","required":false,"in":"query","description":"End of the period as unix timestamp in milliseconds (inclusive). Defaults to now.","schema":{"description":"End of the period as unix timestamp in milliseconds (inclusive). Defaults to now.","example":1769903999000,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"totalAccountStats","required":false,"in":"query","description":"Count the whole exchange account volume instead of only the volume produced by orders created through this API.","schema":{"description":"Count the whole exchange account volume instead of only the volume produced by orders created through this API.","type":"string"}},{"name":"userId","required":true,"in":"query","description":"User id to compute stats for.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id to compute stats for."}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBrokerUserVolumeDTO"}}}}},"summary":"Get user trade volume and fees, broken down by exchange","tags":["Broker Statistics"]}},"/broker-statistics/user-volume/chart":{"get":{"operationId":"BrokerStatisticsController_getUserVolumeChart","parameters":[{"name":"X-Broker-Key","in":"header","description":"Broker API key","required":true,"schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"Start of the period as unix timestamp in milliseconds (inclusive). Defaults to now - 30 days (1 day for hour resolution).","schema":{"description":"Start of the period as unix timestamp in milliseconds (inclusive). Defaults to now - 30 days (1 day for hour resolution).","example":1767225600000,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"resolution","required":false,"in":"query","description":"Aggregation interval: day (UTC calendar day) or hour (UTC clock hour). from/to snap to interval boundaries. On series endpoints, items span one interval and hour limits the range to 7 days. Defaults to day.","schema":{"default":"day","description":"Aggregation interval: day (UTC calendar day) or hour (UTC clock hour). from/to snap to interval boundaries. On series endpoints, items span one interval and hour limits the range to 7 days. Defaults to day.","type":"string","enum":["day","hour"]}},{"name":"to","required":false,"in":"query","description":"End of the period as unix timestamp in milliseconds (inclusive). Defaults to now.","schema":{"description":"End of the period as unix timestamp in milliseconds (inclusive). Defaults to now.","example":1769903999000,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"totalAccountStats","required":false,"in":"query","description":"Count the whole exchange account volume instead of only the volume produced by orders created through this API.","schema":{"description":"Count the whole exchange account volume instead of only the volume produced by orders created through this API.","type":"string"}},{"name":"userId","required":true,"in":"query","description":"User id to compute stats for.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id to compute stats for."}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerUserVolumeChartDto"}}}}},"summary":"Get per-interval (day or hour) trade volume of a user broken down by exchange, with gaps filled","tags":["Broker Statistics"]}},"/deposit":{"get":{"operationId":"DepositController_deposit","parameters":[{"name":"address","required":true,"in":"query","description":"Wallet address to deposit from","schema":{"type":"string","description":"Wallet address to deposit from","example":"0x1234567890abcdef1234567890abcdef12345678"}},{"name":"amount","required":true,"in":"query","description":"Amount to deposit","schema":{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Amount to deposit","example":"5.0"}},{"name":"chainId","required":true,"in":"query","description":"Chain ID","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Chain ID","example":42161}},{"name":"exchange","required":true,"in":"query","description":"Target exchange","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Target exchange"}},{"name":"tokenAddress","required":false,"in":"query","description":"ERC-20 token contract address to deposit","schema":{"description":"ERC-20 token contract address to deposit","example":"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositResponseDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get deposit transactions for signing","tags":["Deposit"]}},"/funding-strategies/funding-rate-history":{"get":{"description":"Returns hourly funding rate data points for a single market over the requested time range. Each rate is normalized to 1 hour, so exchanges with multi-hour funding intervals (e.g. 8h on Aster) report the per-hour equivalent. Missing buckets are backward-filled from the most recent known rate.","operationId":"FundingStrategyController_getFundingRateHistory","parameters":[{"name":"asset","required":true,"in":"query","description":"Asset base symbol of the market.","schema":{"type":"string","description":"Asset base symbol of the market.","example":"BTC"}},{"name":"exchange","required":true,"in":"query","description":"Exchange where the market trades.","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Exchange where the market trades.","example":"lighter"}},{"name":"fromDate","required":false,"in":"query","description":"Start of the date range","schema":{"example":"2026-01-01","description":"Start of the date range","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"toDate","required":false,"in":"query","description":"End of the date range","schema":{"example":"2026-01-31","description":"End of the date range","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FundingRatePointDto"}}}}}},"summary":"Funding rate history for a single market","tags":["Funding Strategies"]}},"/funding-strategies/spread-chart":{"get":{"description":"Returns hourly spread data points for a specific long/short exchange pair over the requested time range. Each point represents the hourly funding rate spread (shortRate − longRate) normalized to 1 hour. Historical rates are extrapolated across the full funding interval when an exchange settles less frequently than every hour.","operationId":"FundingStrategyController_getFundingSpreadChart","parameters":[{"name":"fromDate","required":false,"in":"query","description":"Start of the date range","schema":{"example":"2026-01-01","description":"Start of the date range","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"longAsset","required":true,"in":"query","description":"Asset base symbol for long position.","schema":{"type":"string","description":"Asset base symbol for long position.","example":"BTCUSDT"}},{"name":"longExchange","required":true,"in":"query","description":"Exchange where the long position is held.","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Exchange where the long position is held.","example":"lighter"}},{"name":"shortAsset","required":true,"in":"query","description":"Asset base symbol for short position.","schema":{"type":"string","description":"Asset base symbol for short position.","example":"BTC"}},{"name":"shortExchange","required":true,"in":"query","description":"Exchange where the short position is held.","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Exchange where the short position is held.","example":"aster"}},{"name":"toDate","required":false,"in":"query","description":"End of the date range","schema":{"example":"2026-01-31","description":"End of the date range","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpreadPointDto"}}}}}},"summary":"Funding spread chart data","tags":["Funding Strategies"]}},"/funding-strategies":{"get":{"description":"Returns a list of all funding arbitrage strategies computed from current market funding rates.","operationId":"FundingStrategyController_getFundingStrategies","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetFundingStrategyDto"}}}}}},"summary":"List funding arbitrage strategies","tags":["Funding Strategies"]}},"/exchange/batch-orders":{"delete":{"operationId":"ExchangeController_batchCancelOrders","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCancelOrderBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCancelOrderResultDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Cancel multiple orders in a single batch","tags":["Exchange"]},"post":{"operationId":"ExchangeController_batchCreateOrders","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateOrderBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateOrderResultDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Create multiple orders in a single batch","tags":["Exchange"]}},"/exchange/all-orders":{"delete":{"operationId":"ExchangeController_cancelAllOrders","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelAllOrdersBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelAllOrdersDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Cancel all open orders on an exchange (supported on Binance, Extended, and Lighter)","tags":["Exchange"]}},"/exchange/orders":{"delete":{"operationId":"ExchangeController_cancelOrder","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Cancel an open order","tags":["Exchange"]},"post":{"operationId":"ExchangeController_createOrder","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Create a new order","tags":["Exchange"]},"get":{"operationId":"ExchangeController_getOrders","parameters":[{"name":"exchanges","required":false,"in":"query","schema":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"array","items":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}]}},{"name":"cursor","required":false,"in":"query","description":"Opaque pagination cursor returned as cursor from the previous page","schema":{"description":"Opaque pagination cursor returned as cursor from the previous page","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of orders to return per page (1–100)","schema":{"default":20,"description":"Number of orders to return per page (1–100)","type":"integer","minimum":1,"maximum":100}},{"name":"orderBy","required":false,"in":"query","description":"Sort field: updatedAt (default, most recently modified first) or createdAt (most recently placed first)","schema":{"default":"updatedAt","description":"Sort field: updatedAt (default, most recently modified first) or createdAt (most recently placed first)","type":"string","enum":["createdAt","updatedAt"]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrdersDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get order history","tags":["Exchange"]}},"/exchange/updates-token":{"post":{"operationId":"ExchangeController_createUpdatesToken","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatesTokenDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Create one-time token update token","tags":["Exchange"]}},"/exchange/account-info":{"get":{"operationId":"ExchangeController_getAccountInfo","parameters":[{"name":"exchange","required":true,"in":"query","description":"Supported perpetual exchange","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}],"responses":{"200":{"description":"Exchange-specific account settings","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AsterGetAccountInfoDto"},{"$ref":"#/components/schemas/BybitGetAccountInfoDto"},{"$ref":"#/components/schemas/ExtendedGetAccountInfoDto"},{"$ref":"#/components/schemas/HyperliquidGetAccountInfoDto"},{"$ref":"#/components/schemas/LighterGetAccountInfoDto"}]}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get account settings. Aster returns hedge mode, margin type, multi-assets margin. Hyperliquid returns the abstraction mode. Extended returns the applied referral code. Bybit returns the margin mode, unified account balances and the account upgrade status. Lighter and Robinhood return the account fee tier and the fees it charges.","tags":["Exchange"]}},"/exchange/accounts":{"get":{"operationId":"ExchangeController_getAccounts","parameters":[{"name":"exchanges","required":false,"in":"query","schema":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"array","items":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetAccountDto"}}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get account balances","tags":["Exchange"]}},"/exchange/markets/categories":{"get":{"description":"Returns the asset classes at least one open market currently belongs to, sorted alphabetically. A category is absent when no open market carries it, so the list is safe to render as the option set for the `categories` filter on the arbitrage scanner.","operationId":"ExchangeController_getMarketCategories","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMarketCategoriesDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"summary":"Get asset classes in use","tags":["Exchange"]}},"/exchange/markets":{"get":{"operationId":"ExchangeController_getMarkets","parameters":[{"name":"exchanges","required":false,"in":"query","schema":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"array","items":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetMarketsDto"}}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"summary":"Get available trading markets","tags":["Exchange"]}},"/exchange/market-settings":{"get":{"description":"Read all configurable settings for one `(exchange, asset)` pair; individual settings have no dedicated read endpoint.","operationId":"ExchangeController_getMarketSettings","parameters":[{"name":"asset","required":true,"in":"query","description":"Asset identifier: base symbol (e.g. \"ETH\") or full pair (e.g. \"ETHUSDC\").","schema":{"type":"string","minLength":1,"description":"Asset identifier: base symbol (e.g. \"ETH\") or full pair (e.g. \"ETHUSDC\").","example":"ETH"}},{"name":"exchange","required":true,"in":"query","description":"Supported perpetual exchange","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMarketSettingsDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get current user settings for a market","tags":["Exchange"]}},"/exchange/open-orders":{"get":{"operationId":"ExchangeController_getOpenOrders","parameters":[{"name":"exchanges","required":false,"in":"query","schema":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"array","items":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderDto"}}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get open orders","tags":["Exchange"]}},"/exchange/order":{"get":{"operationId":"ExchangeController_getOrder","parameters":[{"name":"asset","required":false,"in":"query","description":"Market the order is on — required for Aster, Binance, Bybit, Lighter and Robinhood, and for MEXC when looking up by clientOrderId; not used otherwise.","schema":{"description":"Market the order is on — required for Aster, Binance, Bybit, Lighter and Robinhood, and for MEXC when looking up by clientOrderId; not used otherwise.","type":"string","minLength":1,"example":"ETH"}},{"name":"clientOrderId","required":false,"in":"query","description":"Your custom order identifier, the one you passed when creating the order.","schema":{"description":"Your custom order identifier, the one you passed when creating the order.","type":"string","minLength":1}},{"name":"exchange","required":true,"in":"query","description":"Supported perpetual exchange","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}},{"name":"orderId","required":false,"in":"query","description":"Order identifier assigned by the exchange.","schema":{"description":"Order identifier assigned by the exchange.","type":"string","minLength":1}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDto"}}}},"404":{"description":"Order not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get a single order by its exchange order ID or your client order ID","tags":["Exchange"]}},"/exchange/positions":{"get":{"operationId":"ExchangeController_getPositions","parameters":[{"name":"exchanges","required":false,"in":"query","schema":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"array","items":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetPositionsDto"}}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get open positions","tags":["Exchange"]}},"/exchange/quotes":{"get":{"description":"Authorization is optional: without a valid session, quotes are returned with `liquidationPrice` set to null.","operationId":"ExchangeController_getQuotes","parameters":[{"name":"asset","required":true,"in":"query","description":"Asset identifier: a base symbol (e.g. `ETH`), a full pair (e.g. `ETHUSDC`), or a common short name (e.g. `gold`, `sp500`, `1000pepe`) for cross-venue lookup. Tickers vary across venues for the same underlying — if you only have a common name, pass it as lowercase with no spaces or punctuation. Look up an unfamiliar market with `get_markets({ query: \"<name>\" })` first if needed.","schema":{"type":"string","minLength":1,"description":"Asset identifier: a base symbol (e.g. `ETH`), a full pair (e.g. `ETHUSDC`), or a common short name (e.g. `gold`, `sp500`, `1000pepe`) for cross-venue lookup. Tickers vary across venues for the same underlying — if you only have a common name, pass it as lowercase with no spaces or punctuation. Look up an unfamiliar market with `get_markets({ query: \"<name>\" })` first if needed.","example":"ETH"}},{"name":"exchanges","required":false,"in":"query","description":"One or more exchanges to get quotes from","schema":{"description":"One or more exchanges to get quotes from","anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"array","items":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}]}},{"name":"leverage","required":true,"in":"query","description":"Leverage multiplier used to estimate the liquidation price for isolated margin positions.","schema":{"description":"Leverage multiplier used to estimate the liquidation price for isolated margin positions.","example":"10","type":"string","pattern":"\\d+(\\.\\d+)?"}},{"name":"marginMode","required":false,"in":"query","description":"Margin mode used to estimate the liquidation price. Defaults to cross.","schema":{"default":"cross","type":"string","enum":["cross","isolated"],"description":"Margin mode used to estimate the liquidation price. Defaults to cross."}},{"name":"quoteSize","required":true,"in":"query","description":"Order size in quote currency (USD)","schema":{"description":"Order size in quote currency (USD)","example":"1000.00","type":"string","pattern":"\\d+(\\.\\d+)?"}},{"name":"side","required":true,"in":"query","description":"Order side: buy (long) or sell (short)","schema":{"type":"string","enum":["buy","sell"],"description":"Order side: buy (long) or sell (short)"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetQuotesDto"}}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get quotes for markets","tags":["Exchange"]}},"/exchange/estimate-slippage":{"get":{"operationId":"ExchangeController_getSlippage","parameters":[{"name":"asset","required":true,"in":"query","description":"Asset identifier: base symbol (e.g. \"ETH\") or full pair (e.g. \"ETHUSDC\").","schema":{"type":"string","minLength":1,"description":"Asset identifier: base symbol (e.g. \"ETH\") or full pair (e.g. \"ETHUSDC\").","example":"ETH"}},{"name":"exchange","required":true,"in":"query","description":"Exchange name","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Exchange name","example":"aster"}},{"name":"notionalUsd","required":true,"in":"query","description":"Notional USD includes leverage","schema":{"description":"Notional USD includes leverage","example":1000,"type":"string"}},{"name":"side","required":true,"in":"query","description":"Side","schema":{"type":"string","enum":["buy","sell"],"description":"Side","example":"buy"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSlippageDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get slippage for provided notional and side","tags":["Exchange"]}},"/exchange/top-volume-symbols-quotes":{"get":{"operationId":"ExchangeController_getTopVolumeSymbolsQuotes","parameters":[{"name":"quoteSize","required":true,"in":"query","description":"Order size in quote currency (USD)","schema":{"description":"Order size in quote currency (USD)","example":"1000.00","type":"string","pattern":"\\d+(\\.\\d+)?"}},{"name":"side","required":true,"in":"query","description":"Order side: buy (long) or sell (short)","schema":{"type":"string","enum":["buy","sell"],"description":"Order side: buy (long) or sell (short)"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetTopVolumeSymbolsDto"}}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"summary":"Get quotes for top markets by 24h volume across all exchanges","tags":["Exchange"]}},"/exchange/trades":{"get":{"operationId":"ExchangeController_getTrades","parameters":[{"name":"exchanges","required":false,"in":"query","schema":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"array","items":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}]}},{"name":"cursor","required":false,"in":"query","description":"Opaque pagination cursor returned as cursor from the previous page","schema":{"description":"Opaque pagination cursor returned as cursor from the previous page","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Number of trades to return per page (1–100)","schema":{"default":20,"description":"Number of trades to return per page (1–100)","type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTradesDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get trade history","tags":["Exchange"]}},"/exchange/leverage":{"post":{"description":"Set per-market leverage for one `(exchange, asset)` pair; read the current value via `GET /exchange/market-settings`.","operationId":"ExchangeController_setLeverage","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetLeverageBodyDto"}}}},"responses":{"201":{"description":""},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Set leverage for a market","tags":["Exchange"]}},"/exchange/margin-mode":{"post":{"description":"Switch a market between `cross` and `isolated` margin; read the current value via `GET /exchange/market-settings`.","operationId":"ExchangeController_setMarginMode","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMarginModeBodyDto"}}}},"responses":{"201":{"description":""},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Set margin mode for a market","tags":["Exchange"]}},"/exchange/updates-orderbook":{"get":{"operationId":"ExchangeController_subscribeToOrderBook","parameters":[{"name":"asset","required":true,"in":"query","description":"Asset to subscribe on","schema":{"type":"string","minLength":1,"description":"Asset to subscribe on","example":"ETH"}},{"name":"exchanges","required":false,"in":"query","description":"Exchange(s) to subscribe on","schema":{"description":"Exchange(s) to subscribe on","anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"array","items":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}]}},{"name":"levels","required":false,"in":"query","description":"Number of levels to subscribe on","schema":{"description":"Number of levels to subscribe on","type":"string"}},{"name":"significantFigures","required":false,"in":"query","description":"Significant figures to subscribe on","schema":{"description":"Significant figures to subscribe on","type":"string"}}],"responses":{"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}},"default":{"description":"Server-Sent Events stream. Event types:\n- **orderBookSnapshot**: { bids, asks, marketId, exchange, timestamp } — full book. Sent immediately on connect, then re-sent every 10 seconds so a client that missed a diff can resynchronise. Its timestamp only advances while diffs are flowing.\n- **orderBookDiff**: { bids, asks, marketId, exchange, timestamp } — only changed price levels since the previous frame. A level that has been removed is emitted as { price, size: '0' }.\nUse 'levels' and 'significantFigures' query params to customize the response."}},"summary":"Subscribe to order book updates via SSE","tags":["Exchange"]}},"/exchange/updates":{"get":{"operationId":"ExchangeController_subscribeToUpdates","parameters":[{"name":"exchanges","required":false,"in":"query","schema":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"array","items":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}]}},{"name":"token","required":false,"in":"query","description":"One-time updates token from POST /exchange/updates-token","schema":{"type":"string","description":"One-time updates token from POST /exchange/updates-token"}}],"responses":{"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}},"default":{"description":"Server-Sent Events stream. Events are emitted as named SSE frames (event: <name>, id: <counter>, data: <single-line JSON>). The 'id:' line is a per-connection counter that starts at 1 on every connect — it is not a resumable cursor and the server does not honor Last-Event-ID or replay missed events. No SSE keep-alive comments are sent.\n\nEvent types:\n- **state**: Full snapshot object { accounts, openOrders, positions, exchange }. Fires once on subscribe, only if the server already has warm cached state for (user, exchange). Not guaranteed on first connect.\n- **accounts**: Array of changed account rows — same shape as GET /exchange/accounts items, plus 'exchange'.\n- **order**: Array of changed order rows — same shape as GET /exchange/orders items, plus 'exchange'. Cancellations and fills arrive with their terminal 'status'.\n- **position**: Array of changed position rows — same shape as GET /exchange/positions items, plus 'exchange'. Closed positions are emitted with size: '0'.\n- **trade**: Array of new trade rows (your own fills only) — same shape as GET /exchange/trades items, plus 'exchange'.\n- **marketPrice**: Array of { marketId, price, fundingRate, nextFundingTime, updatedAt, exchange } for symbols the exchange feed pushed in this tick. 'fundingRate' is an hourly rate as a decimal on every exchange — do not scale it by the market's 'fundingInterval' from GET /exchange/markets, which describes only the settlement cadence; the charge per settlement is fundingRate × fundingInterval. Public, no account context required.\n- **restarting**: { exchange } — the server is reconnecting to the upstream exchange. Keep the connection open; more frames follow once recovered.\n- **error**: { error, exchange } — the per-exchange synchronizer has been torn down. Reconnect with a fresh token to resume.\n\nAccounts/order/position/trade frames are partial — they carry only the rows that changed since the previous frame, not a full replacement. Merge into client state by identity."}},"summary":"Subscribe to real-time updates (SSE)","tags":["Exchange"]}},"/exchange/broker/execute":{"post":{"description":"Body shape depends on `exchange`:\n- **hyperliquid** → `{ exchange: \"hyperliquid\", pendingData: { action, nonce }, signature }`\n- **lighter** → `{ exchange: \"lighter\", pendingData: { txInfo, txType }, signature }`\n- **robinhood** → `{ exchange: \"robinhood\", pendingData: { txInfo, txType }, signature }`\n- **aster** → `{ exchange: \"aster\", pendingData: { asterChain, builder, builderName, maxFeeRate, nonce, user }, signature }`\n\nPass the exact `pendingData` returned by POST /exchange/broker/prepare for that exchange, plus the wallet signature over its `signData`.","operationId":"ExchangeBrokerController_executeApproveBroker","parameters":[],"requestBody":{"required":true,"description":"Per-exchange execute payload. Use the variant whose `exchange` literal matches the prepare call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteApproveBrokerBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteApproveBrokerResponseDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Submit a signed broker-approval action for the given exchange","tags":["Exchange / Broker"]}},"/exchange/broker/approved":{"get":{"description":"Returns `brokerMaxFees` — the builder fee (bps) configured for this user in the brokerExchange table — and `approvedMaxFees` — the builder fee (bps) currently approved on the exchange for that broker. Both are null when no broker is configured for the user; `approvedMaxFees` is also null when nothing is approved for the configured broker.","operationId":"ExchangeBrokerController_getBrokerMaxFees","parameters":[{"name":"exchange","required":true,"in":"query","description":"Target exchange whose configured broker approval status is checked.","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Target exchange whose configured broker approval status is checked."}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokerApprovedResponseDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get the configured and on-chain approved builder fees for the user's broker","tags":["Exchange / Broker"]}},"/exchange/broker/prepare":{"post":{"operationId":"ExchangeBrokerController_prepareApproveBroker","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareApproveBrokerBodyDto"}}}},"responses":{"200":{"description":"Per-exchange prepare payload. Response shape depends on the `exchange` field of the request body:\n- **hyperliquid** → `{ pendingData: { action, nonce }, signData: <EIP-712 typed data> }`\n- **lighter** / **robinhood** → `{ pendingData: { txInfo, txType }, signData: <hex message> }`\n- **aster** → `{ pendingData: { asterChain, builder, builderName, maxFeeRate, nonce, user }, signData: <EIP-712 typed data> }`","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PrepareHyperliquidApproveBrokerResponseDto"},{"$ref":"#/components/schemas/PrepareLighterApproveBrokerResponseDto"},{"$ref":"#/components/schemas/PrepareAsterApproveBrokerResponseDto"}]}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Build the payload the user must sign to approve a broker on the given exchange","tags":["Exchange / Broker"]}},"/exchange/bybit/agreement":{"post":{"description":"Accept the one-time agreement Bybit requires before it takes any order on a traditional-asset market; it cannot be asked whether one is already accepted, so calling this again is a no-op.","operationId":"BybitController_signAgreement","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignBybitAgreementBodyDto"}}}},"responses":{"400":{"description":"Either `asset` matches more than one Bybit market and needs its full pair name, or the key cannot sign — Bybit takes a signature only from a master-account key carrying Account Transfer, Subaccount Transfer or Withdrawal permission, none of which connecting a Bybit key asks for.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}},"404":{"description":"Bybit is not connected for this user, or `asset` matches no Bybit market.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}},"503":{"description":"Bybit refused the signature. Orders on the market keep failing with ret code 110123, 110125 or 110126 until it is accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Accept a market's trading agreement","tags":["Exchange / Bybit"]}},"/exchange/hyperliquid/send-asset/execute":{"post":{"operationId":"HyperliquidController_executeSendAsset","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteHyperliquidSendAssetBodyDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Submit a signed Hyperliquid sendAsset transfer","tags":["Exchange / Hyperliquid"]}},"/exchange/hyperliquid/set-abstraction/execute":{"post":{"operationId":"HyperliquidController_executeSetAbstraction","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteHyperliquidSetAbstractionBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HyperliquidSettingsDto"}}}}},"security":[{"bearer":[]}],"summary":"Submit a signed Hyperliquid abstraction mode change","tags":["Exchange / Hyperliquid"]}},"/exchange/hyperliquid/send-asset/prepare":{"post":{"operationId":"HyperliquidController_prepareSendAsset","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareHyperliquidSendAssetBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareHyperliquidSendAssetResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Build EIP-712 data the main Hyperliquid wallet must sign to transfer assets between perp DEXes, spot, users, and/or sub-accounts","tags":["Exchange / Hyperliquid"]}},"/exchange/hyperliquid/set-abstraction/prepare":{"post":{"operationId":"HyperliquidController_prepareSetAbstraction","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareHyperliquidSetAbstractionBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareHyperliquidSetAbstractionResponseDto"}}}}},"security":[{"bearer":[]}],"summary":"Build EIP-712 data the main Hyperliquid wallet must sign to change the abstraction mode","tags":["Exchange / Hyperliquid"]}},"/exchange/hyperliquid/stablecoins-swap":{"post":{"operationId":"HyperliquidController_stablecoinsSwap","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HyperliquidStablecoinsSwapBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HyperliquidStablecoinsSwapResultDto"}}}}},"security":[{"bearer":[]}],"summary":"Swap between stablecoins on the Hyperliquid spot market","tags":["Exchange / Hyperliquid"]}},"/exchange/lighter/account-tier":{"post":{"description":"Switch a Lighter or Robinhood account between fee tiers; read the current one from `GET /exchange/account-info`. The tier is tied to the L1 address, so sub-accounts inherit it. Robinhood runs standard and premium, Lighter also runs plus.","operationId":"LighterController_setAccountTier","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetLighterAccountTierBodyDto"}}}},"responses":{"404":{"description":"That Lighter deployment is not connected for this user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}},"503":{"description":"The venue refused the change or could not be reached. A refusal is ordinary user state — the 24-hour cooldown, or a tier the deployment does not run — but it reaches the client as a 503 because every Lighter venue error is reported the same way; the venue states which it was in `message`. The venue docs also require no open positions or orders; that is not enforced as written, so do not gate on it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Set the account fee tier","tags":["Exchange / Lighter"]}},"/user-exchange/{exchange}/register/execute":{"post":{"description":"Submits the signed registration data to the exchange and stores the resulting credentials.","operationId":"RegistrationController_executeRegistration","parameters":[{"name":"exchange","required":true,"in":"path","description":"Supported perpetual exchange","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteRegistrationBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserExchangeDto"}}}}},"security":[{"bearer":[]}],"summary":"Execute exchange registration","tags":["User exchange"]}},"/user-exchange/{exchange}/register/status":{"get":{"description":"Checks whether a user has deposited on the exchange and is eligible for registration.","operationId":"RegistrationController_isRegistered","parameters":[{"name":"exchange","required":true,"in":"path","description":"Supported perpetual exchange","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}},{"name":"address","required":true,"in":"query","description":"User wallet address to check","schema":{"type":"string","description":"User wallet address to check"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsRegisteredResponseDto"}}}}},"summary":"Check registration status","tags":["User exchange"]}},"/user-exchange/{exchange}/register/prepare":{"post":{"description":"Generates exchange-specific registration data and returns sign data for the user to sign, along with an opaque registration token.","operationId":"RegistrationController_prepareRegistration","parameters":[{"name":"exchange","required":true,"in":"path","description":"Supported perpetual exchange","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareRegistrationBody"}}}},"responses":{"200":{"description":"Registration preparation data","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AsterPrepareRegistrationResponseDto"},{"$ref":"#/components/schemas/ExtendedPrepareRegistrationResponseDto"},{"$ref":"#/components/schemas/HyperliquidPrepareRegistrationResponseDto"},{"$ref":"#/components/schemas/LighterPrepareRegistrationResponseDto"},{"$ref":"#/components/schemas/OndoPrepareRegistrationResponseDto"},{"$ref":"#/components/schemas/RobinhoodPrepareRegistrationResponseDto"}],"type":"object","discriminator":{"propertyName":"exchange","mapping":{"aster":"#/components/schemas/AsterPrepareRegistrationResponseDto","extended":"#/components/schemas/ExtendedPrepareRegistrationResponseDto","hyperliquid":"#/components/schemas/HyperliquidPrepareRegistrationResponseDto","lighter":"#/components/schemas/LighterPrepareRegistrationResponseDto","ondo":"#/components/schemas/OndoPrepareRegistrationResponseDto","robinhood":"#/components/schemas/RobinhoodPrepareRegistrationResponseDto"}}}}}}},"security":[{"bearer":[]}],"summary":"Prepare exchange registration","tags":["User exchange"]}},"/user-exchange/{exchange}":{"delete":{"operationId":"UserExchangeController_deleteUserExchange","parameters":[{"name":"exchange","required":true,"in":"path","description":"Supported perpetual exchange","schema":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Disconnect an exchange","tags":["User exchange"]}},"/user-exchange":{"get":{"operationId":"UserExchangeController_getUserExchanges","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserExchangeDto"}}}}}},"security":[{"bearer":[]}],"summary":"Get connected exchanges","tags":["User exchange"]}},"/user-exchange/aster":{"post":{"operationId":"UserExchangeController_setAsterUserExchange","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAsterUserExchangeBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserExchangeDto"}}}}},"security":[{"bearer":[]}],"summary":"Connect Aster","tags":["User exchange"]}},"/user-exchange/binance":{"post":{"operationId":"UserExchangeController_setBinanceUserExchange","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetBinanceUserExchangeBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserExchangeDto"}}}}},"security":[{"bearer":[]}],"summary":"Connect Binance","tags":["User exchange"]}},"/user-exchange/bybit":{"post":{"operationId":"UserExchangeController_setBybitUserExchange","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetBybitUserExchangeBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserExchangeDto"}}}}},"security":[{"bearer":[]}],"summary":"Connect Bybit","tags":["User exchange"]}},"/user-exchange/extended":{"post":{"operationId":"UserExchangeController_setExtendedUserExchange","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetExtendedUserExchangeBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserExchangeDto"}}}}},"security":[{"bearer":[]}],"summary":"Connect Extended","tags":["User exchange"]}},"/user-exchange/gate":{"post":{"operationId":"UserExchangeController_setGateUserExchange","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetGateUserExchangeBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserExchangeDto"}}}}},"security":[{"bearer":[]}],"summary":"Connect Gate","tags":["User exchange"]}},"/user-exchange/hyperliquid":{"post":{"operationId":"UserExchangeController_setHyperliquidUserExchange","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetHyperliquidUserExchangeBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserExchangeDto"}}}}},"security":[{"bearer":[]}],"summary":"Connect Hyperliquid","tags":["User exchange"]}},"/user-exchange/lighter":{"post":{"operationId":"UserExchangeController_setLighterUserExchange","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetLighterUserExchangeBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserExchangeDto"}}}}},"security":[{"bearer":[]}],"summary":"Connect Lighter","tags":["User exchange"]}},"/user-exchange/mexc":{"post":{"operationId":"UserExchangeController_setMexcUserExchange","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMexcUserExchangeBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserExchangeDto"}}}}},"security":[{"bearer":[]}],"summary":"Connect MEXC","tags":["User exchange"]}},"/user-exchange/ondo":{"post":{"operationId":"UserExchangeController_setOndoUserExchange","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOndoUserExchangeBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserExchangeDto"}}}}},"security":[{"bearer":[]}],"summary":"Connect Ondo","tags":["User exchange"]}},"/user-exchange/robinhood":{"post":{"operationId":"UserExchangeController_setRobinhoodUserExchange","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetRobinhoodUserExchangeBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserExchangeDto"}}}}},"security":[{"bearer":[]}],"summary":"Connect Robinhood","tags":["User exchange"]}},"/user-exchange/exchange-account-ids/sync":{"post":{"description":"Resolves the exchange-side account id for every active connection that has none yet. Connections whose exchange exposes no identity to the stored key receive a random id.","operationId":"UserExchangeController_syncExchangeAccountIds","parameters":[{"name":"X-Admin-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncExchangeAccountIdsResultDto"}}}}},"summary":"Resolve missing exchange account ids (admin)","tags":["User exchange"]}},"/extended/points/earned":{"get":{"operationId":"ExtendedController_getEarnedPoints","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExtendedPointsSeasonDto"}}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get Extended points earned per season and epoch","tags":["Extended"]}},"/extended/points":{"get":{"operationId":"ExtendedController_getPoints","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendedPointsStatsDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get Extended points summary (total, rank, and league tiers)","tags":["Extended"]}},"/extended/use-referral-code":{"post":{"description":"Applies the referral code on Extended. Fails if the account already has a referral code applied.","operationId":"ExtendedController_useReferralCode","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseReferralCodeBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseReferralCodeResponseDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Apply a referral code to the Extended account","tags":["Extended"]}},"/kinetiq/enable":{"post":{"operationId":"KinetiqController_enableKinetiq","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnableKinetiqBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KinetiqAccountDto"}}}}},"security":[{"bearer":[]}],"summary":"Enable Kinetiq kPoints by verifying a wallet signature","tags":["Kinetiq"]}},"/kinetiq/points":{"get":{"operationId":"KinetiqController_getKinetiqPoints","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KinetiqPointsDto"}}}}},"security":[{"bearer":[]}],"summary":"Get current Kinetiq kPoints","tags":["Kinetiq"]}},"/kinetiq/status":{"get":{"operationId":"KinetiqController_getKinetiqStatus","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KinetiqStatusDto"}}}}},"security":[{"bearer":[]}],"summary":"Check whether Kinetiq kPoints are enabled","tags":["Kinetiq"]}},"/transfer/execute":{"post":{"operationId":"TransferController_executeTransfer","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteTransferBodyDto"}}}},"responses":{"200":{"description":"Transfer executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteTransferResponseDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Execute a prepared transfer","tags":["Transfer"]}},"/transfer/history":{"get":{"operationId":"TransferController_getTransferHistory","parameters":[{"name":"limit","required":false,"in":"query","description":"Number of items per page (1–100)","schema":{"default":20,"description":"Number of items per page (1–100)","type":"integer","minimum":1,"maximum":100}},{"name":"offset","required":false,"in":"query","description":"Number of items to skip","schema":{"default":0,"description":"Number of items to skip","type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTransferHistoryResponseDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get paginated margin transfer history","tags":["Transfer"]}},"/transfer/status":{"get":{"operationId":"TransferController_getTransferStatus","parameters":[{"name":"transferId","required":true,"in":"query","description":"Transfer identifier returned from the prepare step","schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Transfer identifier returned from the prepare step"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTransferStatusResponseDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get the status of a margin transfer by ID","tags":["Transfer"]}},"/transfer/arbitrum":{"post":{"operationId":"TransferController_prepareArbitrumTransfer","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArbitrumTransferBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArbitrumTransferResponseDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Prepare an Arbitrum to exchange transfer","tags":["Transfer"]}},"/transfer/prepare":{"post":{"operationId":"TransferController_prepareTransfer","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareTransferBodyDto"}}}},"responses":{"200":{"description":"Transfer preparation data","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HyperliquidTransferResponseDto"},{"$ref":"#/components/schemas/LighterTransferResponseDto"}],"type":"object","discriminator":{"propertyName":"source","mapping":{"hyperliquid":"#/components/schemas/HyperliquidTransferResponseDto","lighter":"#/components/schemas/LighterTransferResponseDto"}}}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Prepare a cross-exchange transfer","tags":["Transfer"]}},"/withdraw/execute":{"post":{"operationId":"WithdrawController_executeWithdraw","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteWithdrawBodyDto"}}}},"responses":{"200":{"description":"Withdraw executed successfully"},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Execute a prepared withdraw","tags":["Withdraw"]}},"/withdraw/prepare":{"post":{"operationId":"WithdrawController_prepareWithdraw","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareWithdrawBodyDto"}}}},"responses":{"200":{"description":"Withdraw preparation data","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AsterWithdrawResponseDto"},{"$ref":"#/components/schemas/HyperliquidWithdrawResponseDto"},{"$ref":"#/components/schemas/LighterWithdrawResponseDto"},{"$ref":"#/components/schemas/OndoWithdrawResponseDto"},{"$ref":"#/components/schemas/RobinhoodWithdrawResponseDto"}],"type":"object","discriminator":{"propertyName":"exchange","mapping":{"aster":"#/components/schemas/AsterWithdrawResponseDto","hyperliquid":"#/components/schemas/HyperliquidWithdrawResponseDto","lighter":"#/components/schemas/LighterWithdrawResponseDto","ondo":"#/components/schemas/OndoWithdrawResponseDto","robinhood":"#/components/schemas/RobinhoodWithdrawResponseDto"}}}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Prepare a withdraw from an exchange","tags":["Withdraw"]}},"/withdraw/extended/execute":{"post":{"operationId":"ExtendedWithdrawController_execute","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteExtendedWithdrawBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteExtendedWithdrawResponseDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Execute an Extended withdrawal using a quote from /quote","tags":["Withdraw / Extended"]}},"/withdraw/extended/quote":{"post":{"operationId":"ExtendedWithdrawController_quote","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteExtendedWithdrawBodyDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteExtendedWithdrawResponseDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Quote an Extended withdrawal (fee, limit, quote id)","tags":["Withdraw / Extended"]}},"/ondo/points":{"get":{"operationId":"OndoController_getPoints","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OndoPointsDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get Ondo points summary (totals by source and leaderboard rank)","tags":["Ondo"]}},"/ondo/rewards/total":{"get":{"operationId":"OndoController_getRewardsTotal","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OndoRewardsTotalDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get the total USDC rewards paid out to the Ondo account","tags":["Ondo"]}},"/robinhood/points":{"get":{"operationId":"RobinhoodController_getPoints","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RobinhoodPointsDto"}}}},"503":{"description":"ExchangeApiError","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDTO"}}}}},"security":[{"bearer":[]}],"summary":"Get Robinhood points summary (totals, last week, and rank)","tags":["Robinhood"]}},"/time":{"get":{"operationId":"ServerTimeController_getServerTime","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerTimeDto"}}}}},"summary":"Get current server time","tags":["Server"]}}},"info":{"title":"VOOI API","description":"Unified perps API","version":"1.0","contact":{}},"tags":[],"servers":[{"url":"https://perps-api.vooi.io"}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"ErrorResponseDTO":{"type":"object","properties":{"message":{"type":"string","example":"Invalid order id: 123"},"statusCode":{"example":503,"type":"number"}},"required":["message"],"title":"ErrorResponse"},"ArbitrageAutoCloseOrderDto":{"type":"object","properties":{"conditions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"closeAt":{"description":"When both positions get closed.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"type":{"type":"string","description":"Closes both positions at a fixed time.","enum":["time"]}},"required":["closeAt","type"],"title":"ArbitrageAutoCloseTimeConditionResponse"},{"type":"object","properties":{"holdSeconds":{"type":"integer","minimum":0,"maximum":2147483647,"description":"How many seconds in a row the condition must stay met before both positions close, 0 to close as soon as it is met; any value that is not met, and any restart of the service, starts the count over.","example":300},"operator":{"type":"string","enum":["gte","lte"],"description":"How the spread is compared with the threshold: gte (met when the spread is at or above it) or lte (met when the spread is at or below it)."},"threshold":{"type":"number","description":"Price spread to compare against, as a signed decimal fraction ((short bid − long ask) / mid, the scanner priceSpread for this pair); the close itself trades the other side of both books, so it realizes roughly the bid-ask of both markets less.","example":0.001},"type":{"type":"string","description":"Closes both positions when the live price spread of the pair meets the threshold.","enum":["priceSpread"]},"metSince":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the condition started being met in the current count, null while it is not met; the positions close once it has been met for holdSeconds."}},"required":["holdSeconds","operator","threshold","type","metSince"],"title":"ArbitrageAutoClosePriceSpreadConditionResponse"},{"type":"object","properties":{"holdSeconds":{"type":"integer","minimum":0,"maximum":2147483647,"description":"How many seconds in a row the condition must stay met before both positions close, 0 to close as soon as it is met; any value that is not met, and any restart of the service, starts the count over.","example":300},"operator":{"type":"string","enum":["gte","lte"],"description":"How the spread is compared with the threshold: gte (met when the spread is at or above it) or lte (met when the spread is at or below it)."},"threshold":{"type":"number","description":"Hourly funding spread to compare against, as a signed decimal fraction (short − long funding, the scanner fundingSpread1h for this pair).","example":0.00005},"type":{"type":"string","description":"Closes both positions when the hourly funding spread of the pair meets the threshold.","enum":["fundingSpread"]},"metSince":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the condition started being met in the current count, null while it is not met; the positions close once it has been met for holdSeconds."}},"required":["holdSeconds","operator","threshold","type","metSince"],"title":"ArbitrageAutoCloseFundingSpreadConditionResponse"},{"type":"object","properties":{"holdSeconds":{"type":"integer","minimum":0,"maximum":2147483647,"description":"How many seconds in a row the condition must stay met before both positions close, 0 to close as soon as it is met; any value that is not met, and any restart of the service, starts the count over.","example":300},"type":{"type":"string","description":"Closes both positions when the hourly funding spread (short − long funding) turns negative, so the pair starts paying funding.","enum":["fundingFlip"]},"metSince":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the condition started being met in the current count, null while it is not met; the positions close once it has been met for holdSeconds."}},"required":["holdSeconds","type","metSince"],"title":"ArbitrageAutoCloseFundingFlipConditionResponse"}],"description":"A condition that closes the position when it is met, with its current progress.","type":"object"},"description":"Conditions being watched, any one of which closes the position; the first one met closes both legs."},"createdAt":{"description":"When the auto-close order was accepted.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"error":{"description":"Why the order failed, null otherwise.","type":["string","null"]},"executionStartedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When closing started, null while the order is still waiting."},"firedConditionType":{"anyOf":[{"type":"string","enum":["fundingFlip","fundingSpread","priceSpread","time"]},{"type":"null"}],"description":"Type of the condition that closed the position: time, priceSpread, fundingSpread or fundingFlip; null until one is met."},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Arbitrage auto-close order identifier.","example":"019d5cbe-6980-7193-a80e-38a45eda36d8"},"legs":{"type":"object","properties":{"long":{"type":"object","properties":{"clientOrderId":{"description":"Identifier sent to the exchange with the closing order, null until it is placed.","type":["string","null"]},"error":{"description":"Exchange error text when this leg failed to close, null otherwise.","type":["string","null"]},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"exchangeOrderId":{"description":"Order identifier assigned by the exchange to the closing order, null until it is placed. Stays null on Lighter, which answers with a transaction hash instead.","type":["string","null"]},"marketId":{"type":"string","description":"Venue-specific market identifier.","example":"ETHUSDT"},"status":{"type":"string","enum":["executed","not_sent","sent"],"description":"not_sent — no closing order has gone to the exchange yet. sent — a closing order was sent and its outcome is still unknown. executed — this leg is done, either because the exchange accepted the closing order or because there was no position left to close."}},"required":["clientOrderId","error","exchange","exchangeOrderId","marketId","status"],"title":"ArbitrageAutoCloseOrderLeg","description":"The market whose long position gets closed."},"short":{"type":"object","properties":{"clientOrderId":{"description":"Identifier sent to the exchange with the closing order, null until it is placed.","type":["string","null"]},"error":{"description":"Exchange error text when this leg failed to close, null otherwise.","type":["string","null"]},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"exchangeOrderId":{"description":"Order identifier assigned by the exchange to the closing order, null until it is placed. Stays null on Lighter, which answers with a transaction hash instead.","type":["string","null"]},"marketId":{"type":"string","description":"Venue-specific market identifier.","example":"ETHUSDT"},"status":{"type":"string","enum":["executed","not_sent","sent"],"description":"not_sent — no closing order has gone to the exchange yet. sent — a closing order was sent and its outcome is still unknown. executed — this leg is done, either because the exchange accepted the closing order or because there was no position left to close."}},"required":["clientOrderId","error","exchange","exchangeOrderId","marketId","status"],"title":"ArbitrageAutoCloseOrderLeg","description":"The market whose short position gets closed."}},"required":["long","short"],"title":"ArbitrageAutoCloseOrderLegs"},"status":{"type":"string","enum":["canceled","created","executed","executionStarted","failed"],"description":"created — watching the conditions, none has been met yet. executionStarted — a condition was met and both legs are being closed. executed — both markets were cleared, closing whatever position was open on each. canceled — canceled before any condition was met. failed — closing a leg was rejected, the worker was interrupted mid-close, or the close time passed while the service was down; the position may still be open.","example":"created"},"unifiedSymbol":{"type":"string","description":"Cross-exchange asset key — an alias (alias:1000bonk) when defined, otherwise the base symbol.","example":"ETH"},"updatedAt":{"description":"When the order last changed.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["conditions","createdAt","error","executionStartedAt","firedConditionType","id","legs","status","unifiedSymbol","updatedAt"],"title":"ArbitrageAutoCloseOrder"},"CreateArbitrageAutoCloseOrderBodyDto":{"type":"object","properties":{"conditions":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"closeAt":{"description":"When to close both positions, as an ISO 8601 timestamp in the future.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"type":{"type":"string","description":"Closes both positions at a fixed time.","enum":["time"]}},"required":["closeAt","type"],"title":"ArbitrageAutoCloseTimeCondition"},{"type":"object","properties":{"holdSeconds":{"type":"integer","minimum":0,"maximum":2147483647,"description":"How many seconds in a row the condition must stay met before both positions close, 0 to close as soon as it is met; any value that is not met, and any restart of the service, starts the count over.","example":300},"operator":{"type":"string","enum":["gte","lte"],"description":"How the spread is compared with the threshold: gte (met when the spread is at or above it) or lte (met when the spread is at or below it)."},"threshold":{"type":"number","description":"Price spread to compare against, as a signed decimal fraction ((short bid − long ask) / mid, the scanner priceSpread for this pair); the close itself trades the other side of both books, so it realizes roughly the bid-ask of both markets less.","example":0.001},"type":{"type":"string","description":"Closes both positions when the live price spread of the pair meets the threshold.","enum":["priceSpread"]}},"required":["holdSeconds","operator","threshold","type"],"title":"ArbitrageAutoClosePriceSpreadCondition"},{"type":"object","properties":{"holdSeconds":{"type":"integer","minimum":0,"maximum":2147483647,"description":"How many seconds in a row the condition must stay met before both positions close, 0 to close as soon as it is met; any value that is not met, and any restart of the service, starts the count over.","example":300},"operator":{"type":"string","enum":["gte","lte"],"description":"How the spread is compared with the threshold: gte (met when the spread is at or above it) or lte (met when the spread is at or below it)."},"threshold":{"type":"number","description":"Hourly funding spread to compare against, as a signed decimal fraction (short − long funding, the scanner fundingSpread1h for this pair).","example":0.00005},"type":{"type":"string","description":"Closes both positions when the hourly funding spread of the pair meets the threshold.","enum":["fundingSpread"]}},"required":["holdSeconds","operator","threshold","type"],"title":"ArbitrageAutoCloseFundingSpreadCondition"},{"type":"object","properties":{"holdSeconds":{"type":"integer","minimum":0,"maximum":2147483647,"description":"How many seconds in a row the condition must stay met before both positions close, 0 to close as soon as it is met; any value that is not met, and any restart of the service, starts the count over.","example":300},"type":{"type":"string","description":"Closes both positions when the hourly funding spread (short − long funding) turns negative, so the pair starts paying funding.","enum":["fundingFlip"]}},"required":["holdSeconds","type"],"title":"ArbitrageAutoCloseFundingFlipCondition"}],"description":"A condition that closes the position when it is met: time (at a fixed time), priceSpread (price spread against a threshold), fundingSpread (hourly funding spread against a threshold) or fundingFlip (funding spread turns negative).","type":"object"},"description":"Conditions that close the position, any one of which is enough; the first one met closes both legs and the rest stop counting."},"long":{"type":"object","properties":{"asset":{"type":"string","minLength":1,"description":"Asset identifier: base symbol (e.g. \"ETH\") or full pair (e.g. \"ETHUSDC\").","example":"ETH"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}},"required":["asset","exchange"],"title":"CreateArbitrageAutoCloseOrderLeg","description":"The market where you hold the long position, or where an arbitrage order you have already placed will open it. Every order resting on it is canceled before the position closes."},"short":{"type":"object","properties":{"asset":{"type":"string","minLength":1,"description":"Asset identifier: base symbol (e.g. \"ETH\") or full pair (e.g. \"ETHUSDC\").","example":"ETH"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}},"required":["asset","exchange"],"title":"CreateArbitrageAutoCloseOrderLeg","description":"The market where you hold the short position, or where an arbitrage order you have already placed will open it. Every order resting on it is canceled before the position closes."}},"required":["conditions","long","short"],"title":"CreateArbitrageAutoCloseOrder"},"GetArbitrageAutoCloseOrdersDto":{"type":"object","properties":{"cursor":{"description":"Pass as cursor to fetch the next page. Null when no more pages exist","type":["string","null"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/ArbitrageAutoCloseOrderDto"}}},"required":["cursor","items"],"title":"ArbitrageAutoCloseOrders"},"UpdateArbitrageAutoCloseOrderBodyDto":{"type":"object","properties":{"conditions":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"closeAt":{"description":"When to close both positions, as an ISO 8601 timestamp in the future.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"type":{"type":"string","description":"Closes both positions at a fixed time.","enum":["time"]}},"required":["closeAt","type"],"title":"ArbitrageAutoCloseTimeCondition"},{"type":"object","properties":{"holdSeconds":{"type":"integer","minimum":0,"maximum":2147483647,"description":"How many seconds in a row the condition must stay met before both positions close, 0 to close as soon as it is met; any value that is not met, and any restart of the service, starts the count over.","example":300},"operator":{"type":"string","enum":["gte","lte"],"description":"How the spread is compared with the threshold: gte (met when the spread is at or above it) or lte (met when the spread is at or below it)."},"threshold":{"type":"number","description":"Price spread to compare against, as a signed decimal fraction ((short bid − long ask) / mid, the scanner priceSpread for this pair); the close itself trades the other side of both books, so it realizes roughly the bid-ask of both markets less.","example":0.001},"type":{"type":"string","description":"Closes both positions when the live price spread of the pair meets the threshold.","enum":["priceSpread"]}},"required":["holdSeconds","operator","threshold","type"],"title":"ArbitrageAutoClosePriceSpreadCondition"},{"type":"object","properties":{"holdSeconds":{"type":"integer","minimum":0,"maximum":2147483647,"description":"How many seconds in a row the condition must stay met before both positions close, 0 to close as soon as it is met; any value that is not met, and any restart of the service, starts the count over.","example":300},"operator":{"type":"string","enum":["gte","lte"],"description":"How the spread is compared with the threshold: gte (met when the spread is at or above it) or lte (met when the spread is at or below it)."},"threshold":{"type":"number","description":"Hourly funding spread to compare against, as a signed decimal fraction (short − long funding, the scanner fundingSpread1h for this pair).","example":0.00005},"type":{"type":"string","description":"Closes both positions when the hourly funding spread of the pair meets the threshold.","enum":["fundingSpread"]}},"required":["holdSeconds","operator","threshold","type"],"title":"ArbitrageAutoCloseFundingSpreadCondition"},{"type":"object","properties":{"holdSeconds":{"type":"integer","minimum":0,"maximum":2147483647,"description":"How many seconds in a row the condition must stay met before both positions close, 0 to close as soon as it is met; any value that is not met, and any restart of the service, starts the count over.","example":300},"type":{"type":"string","description":"Closes both positions when the hourly funding spread (short − long funding) turns negative, so the pair starts paying funding.","enum":["fundingFlip"]}},"required":["holdSeconds","type"],"title":"ArbitrageAutoCloseFundingFlipCondition"}],"description":"A condition that closes the position when it is met: time (at a fixed time), priceSpread (price spread against a threshold), fundingSpread (hourly funding spread against a threshold) or fundingFlip (funding spread turns negative).","type":"object"},"description":"The conditions to watch from now on; they replace the ones the order was created with, and every condition starts counting again."}},"required":["conditions"],"title":"UpdateArbitrageAutoCloseOrder"},"ArbitrageOrderDto":{"type":"object","properties":{"createdAt":{"description":"When the order was accepted.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the order reached a terminal state. For finished orders this is the moment the last step was hedged, so it doubles as the position start time."},"hedgeFailurePolicy":{"type":"string","enum":["alertAndHold","autoUnwind"],"description":"What happens when the hedge leg fails after the primary filled. alertAndHold — the naked leg is left in place and the order is marked failed. autoUnwind — the primary leg is closed with a market order.","example":"alertAndHold"},"hedgeStepSizes":{"type":"array","items":{"type":"string"},"description":"Size of the hedge leg for each step, in base units. The array length is the number of steps in the order.","example":["0.5","0.25"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Arbitrage order identifier.","example":"019d5cbe-6980-7193-a80e-38a45eda36d8"},"legsByStep":{"type":"array","items":{"type":"object","properties":{"hedge":{"type":"object","properties":{"baseSymbol":{"type":"string","description":"Base symbol on this exchange.","example":"ETH"},"clientOrderId":{"description":"Identifier sent to the exchange when the leg was placed.","type":["string","null"]},"error":{"description":"Exchange error text when the leg failed, null otherwise.","type":["string","null"]},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"filledSize":{"description":"Size of this leg already executed, in base asset units. Null when the exchange does not report it, or for orders placed before the field existed.","example":"0.25","type":["string","null"]},"marketId":{"type":"string","description":"Venue-specific market identifier.","example":"ETHUSDT"},"orderId":{"description":"Order identifier assigned by the exchange, null until the leg is placed.","type":["string","null"]},"price":{"description":"Limit price in quote currency, or null on market legs.","example":"1850.50","type":["string","null"]},"quoteSymbol":{"type":"string","description":"Quote symbol on this exchange.","example":"USDT"},"reduceOnly":{"description":"Whether the leg only reduces an existing position.","type":["boolean","null"]},"role":{"type":"string","enum":["primary","hedge"],"description":"Leg role into arbitrage order","example":"primary"},"side":{"type":"string","enum":["buy","sell"],"description":"Direction of this leg."},"size":{"type":"string","description":"Size the leg was placed with, in base units.","example":"0.5"},"status":{"anyOf":[{"type":"string","enum":["canceled","created","error","executed","partiallyFilled"]},{"type":"null"}],"description":"Status of this leg on the exchange, null until it is submitted.","example":"created"},"stepIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based step this leg belongs to.","example":0},"timeInForce":{"anyOf":[{"type":"string","enum":["gtc","ioc","fok","alo"]},{"type":"null"}],"description":"Time in force policy. gtc — Good-Till-Cancel, ioc — Immediate-Or-Cancel, fok — Fill-Or-Kill, alo — Add Liquidity Only (post-only). Null on market legs.","example":"gtc"},"type":{"type":"string","enum":["limit","market"],"description":"Order type of this leg. The primary leg is a limit order in every strategy but marketMarket."}},"required":["baseSymbol","clientOrderId","error","exchange","filledSize","marketId","orderId","price","quoteSymbol","reduceOnly","role","side","size","status","stepIndex","timeInForce","type"],"title":"ArbitrageOrderLeg","description":"The hedging leg of this step."},"primary":{"type":"object","properties":{"baseSymbol":{"type":"string","description":"Base symbol on this exchange.","example":"ETH"},"clientOrderId":{"description":"Identifier sent to the exchange when the leg was placed.","type":["string","null"]},"error":{"description":"Exchange error text when the leg failed, null otherwise.","type":["string","null"]},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"filledSize":{"description":"Size of this leg already executed, in base asset units. Null when the exchange does not report it, or for orders placed before the field existed.","example":"0.25","type":["string","null"]},"marketId":{"type":"string","description":"Venue-specific market identifier.","example":"ETHUSDT"},"orderId":{"description":"Order identifier assigned by the exchange, null until the leg is placed.","type":["string","null"]},"price":{"description":"Limit price in quote currency, or null on market legs.","example":"1850.50","type":["string","null"]},"quoteSymbol":{"type":"string","description":"Quote symbol on this exchange.","example":"USDT"},"reduceOnly":{"description":"Whether the leg only reduces an existing position.","type":["boolean","null"]},"role":{"type":"string","enum":["primary","hedge"],"description":"Leg role into arbitrage order","example":"primary"},"side":{"type":"string","enum":["buy","sell"],"description":"Direction of this leg."},"size":{"type":"string","description":"Size the leg was placed with, in base units.","example":"0.5"},"status":{"anyOf":[{"type":"string","enum":["canceled","created","error","executed","partiallyFilled"]},{"type":"null"}],"description":"Status of this leg on the exchange, null until it is submitted.","example":"created"},"stepIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based step this leg belongs to.","example":0},"timeInForce":{"anyOf":[{"type":"string","enum":["gtc","ioc","fok","alo"]},{"type":"null"}],"description":"Time in force policy. gtc — Good-Till-Cancel, ioc — Immediate-Or-Cancel, fok — Fill-Or-Kill, alo — Add Liquidity Only (post-only). Null on market legs.","example":"gtc"},"type":{"type":"string","enum":["limit","market"],"description":"Order type of this leg. The primary leg is a limit order in every strategy but marketMarket."}},"required":["baseSymbol","clientOrderId","error","exchange","filledSize","marketId","orderId","price","quoteSymbol","reduceOnly","role","side","size","status","stepIndex","timeInForce","type"],"title":"ArbitrageOrderLeg","description":"The leg placed first in this step."},"stepIndex":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based step number."}},"required":["hedge","primary","stepIndex"],"title":"ArbitrageOrderStep"},"description":"Steps reached so far with both legs, in execution order. The next step appears once the current one is hedged, so the array is shorter than primaryStepSizes while a sequential order is processing."},"maxSlippageBps":{"anyOf":[{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Numeric value as string","example":"0.001"},{"type":"null"}],"description":"Slippage limit in basis points that both legs must fit into before each step is sent, or null when no check is made."},"maxSlippageWaitMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"How long a step waits for the slippage to fit, in milliseconds, before the order is marked failed. Null when no slippage check is made."},"partialFillPolicy":{"type":"string","enum":["fullFill","immediate","threshold"],"description":"When a partially filled primary leg gets hedged. fullFill — only after the primary leg fills completely. immediate — every fill is hedged as it arrives. threshold — hedged once unhedged size crosses a threshold.","example":"fullFill"},"primaryStepSizes":{"type":"array","items":{"type":"string"},"description":"Size of the primary leg for each step, in base units. The array length is the number of steps in the order.","example":["0.5","0.25"]},"status":{"type":"string","enum":["canceled","canceling","failed","finished","processing"],"description":"processing — the order is working: the current step is being placed, filled and hedged, or waits out stepDelayMs before it is placed, and on a multi-step order every earlier step is already hedged and open. Follow the legs of the current step to see where it stands. canceling — a cancel was requested: no new step starts and the order of the current step is being canceled on the exchange; the order then ends canceled, or failed when the exchange rejects the cancel. finished — every step is hedged, both legs are open and the order is finalized. canceled — the steps that had not started were canceled; every step hedged before that stays open as a position. failed — needs manual handling; the legs may be directionally exposed.","example":"processing"},"stepDelayMs":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Pause between steps in milliseconds, or null when each step starts as soon as the previous one is hedged."},"strategy":{"type":"string","enum":["limitLimit","limitMarket","marketMarket"],"description":"Leg types in execution order. marketMarket — both legs fire immediately. limitMarket — primary limit rests, hedge hedges with a market order once it fills. limitLimit — both legs are limit orders.","example":"limitMarket"},"unifiedSymbol":{"type":"string","description":"Cross-exchange asset key — an alias (alias:1000bonk) when defined, otherwise the base symbol.","example":"ETH"},"updatedAt":{"description":"When the order last changed.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["createdAt","finishedAt","hedgeFailurePolicy","hedgeStepSizes","id","legsByStep","maxSlippageBps","maxSlippageWaitMs","partialFillPolicy","primaryStepSizes","status","stepDelayMs","strategy","unifiedSymbol","updatedAt"],"title":"ArbitrageOrder"},"CreateArbitrageOrderBodyDto":{"type":"object","properties":{"hedge":{"type":"object","properties":{"asset":{"type":"string","minLength":1,"description":"Asset identifier: base symbol (e.g. \"ETH\") or full pair (e.g. \"ETHUSDC\").","example":"ETH"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},"price":{"description":"Limit price in quote currency. Required on limit legs, rejected on market legs.","example":"1850.50","type":"string","pattern":"\\d+(\\.\\d+)?"},"reduceOnly":{"description":"If true, this leg only reduces an existing position. Set on both legs to close positions opened by a previous arbitrage order.","type":"boolean"},"side":{"type":"string","enum":["buy","sell"],"description":"Direction of this leg. The two legs must be opposite."},"sizes":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Numeric value as string","example":"0.001"},"description":"Size of this leg for each sequential step, in base units. The array length is the number of steps and must match the other leg; a single element places one step. Each leg is sized independently. Max 50 steps.","example":["0.5","0.25"]},"timeInForce":{"description":"Time in force for a limit leg, defaults to gtc. gtc — Good-Till-Cancel, ioc — Immediate-Or-Cancel, fok — Fill-Or-Kill (Aster only), alo — Add Liquidity Only, which guarantees the leg pays maker fees but is rejected if the price crosses the book. Rejected on market legs.","example":"gtc","type":"string","enum":["gtc","ioc","fok","alo"]},"type":{"type":"string","enum":["limit","market"],"description":"Order type to place this leg with."}},"required":["asset","exchange","side","sizes","type"],"title":"CreateArbitrageOrderLeg","description":"The hedging leg, placed once the primary leg fills. Fires immediately alongside the primary when both legs are market orders."},"hedgeFailurePolicy":{"description":"What happens when the hedge leg fails after the primary filled. Only alertAndHold — leave the naked leg and mark the order failed — is supported today.","type":"string","enum":["alertAndHold"]},"maxSlippage":{"description":"Slippage check applied before each step is sent. Without this object no check is made.","type":"object","properties":{"bps":{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Maximum estimated slippage in basis points for each step, measured against the order books of both legs at the sizes of the step being sent. Before the primary leg of a step is sent, both legs are estimated; if either one exceeds the limit or lacks depth, the step is retried every second until it fits.","example":"20.5"},"waitMs":{"type":"integer","exclusiveMinimum":0,"maximum":86400000,"description":"How long a step may wait for both legs to fit into bps, in milliseconds. When the wait runs out the order is marked failed with the timeout recorded on the primary leg of the current step; the steps hedged so far stay open. Max value is 24 hours.","example":60000}},"required":["bps","waitMs"]},"partialFillPolicy":{"description":"When a partially filled primary leg gets hedged. Only fullFill — hedge after the primary leg fills completely — is supported today.","type":"string","enum":["fullFill"]},"primary":{"type":"object","properties":{"asset":{"type":"string","minLength":1,"description":"Asset identifier: base symbol (e.g. \"ETH\") or full pair (e.g. \"ETHUSDC\").","example":"ETH"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},"price":{"description":"Limit price in quote currency. Required on limit legs, rejected on market legs.","example":"1850.50","type":"string","pattern":"\\d+(\\.\\d+)?"},"reduceOnly":{"description":"If true, this leg only reduces an existing position. Set on both legs to close positions opened by a previous arbitrage order.","type":"boolean"},"side":{"type":"string","enum":["buy","sell"],"description":"Direction of this leg. The two legs must be opposite."},"sizes":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Numeric value as string","example":"0.001"},"description":"Size of this leg for each sequential step, in base units. The array length is the number of steps and must match the other leg; a single element places one step. Each leg is sized independently. Max 50 steps.","example":["0.5","0.25"]},"timeInForce":{"description":"Time in force for a limit leg, defaults to gtc. gtc — Good-Till-Cancel, ioc — Immediate-Or-Cancel, fok — Fill-Or-Kill (Aster only), alo — Add Liquidity Only, which guarantees the leg pays maker fees but is rejected if the price crosses the book. Rejected on market legs.","example":"gtc","type":"string","enum":["gtc","ioc","fok","alo"]},"type":{"type":"string","enum":["limit","market"],"description":"Order type to place this leg with."}},"required":["asset","exchange","side","sizes","type"],"title":"CreateArbitrageOrderLeg","description":"The leg placed first. Its fill triggers the hedge leg."},"stepDelayMs":{"description":"Pause between steps in milliseconds. Once a step is hedged, the next step waits this long before its primary leg is sent; the slippage check, if any, runs after the pause. Ignored when each leg has a single size. Max value is 1 week.","example":5000,"type":"integer","exclusiveMinimum":0,"maximum":604800000}},"required":["hedge","primary"],"title":"CreateArbitrageOrder"},"GetArbitrageOrdersDto":{"type":"object","properties":{"cursor":{"description":"Pass as cursor to fetch the next page. Null when no more pages exist","type":["string","null"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/ArbitrageOrderDto"}}},"required":["cursor","items"],"title":"ArbitrageOrders"},"CreateTokenBodyDto":{"type":"object","properties":{"expiresIn":{"description":"Token lifetime in seconds. Defaults to 604800 (7 days). Must be > 0. When > 604800, `name` is required.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"description":"Token name. Required when `expiresIn` > 604800 (7 days). Must be unique per user. Tokens without a name are session tokens and are not enumerable.","type":"string"},"signature":{"type":"string","pattern":"^[0-9a-f]{128}$","description":"Ed25519 signature of the token creation request.\n\nMessage: `createToken:<timestamp>:<expiresIn>:<name>:<userId>` — data fields sorted alphabetically by key. Omitted optional fields become an empty slot (not a dropped slot):\n- name omitted → `createToken:<ts>:<expiresIn>::<userId>`\n- expiresIn omitted → `createToken:<ts>::<name>:<userId>`\n- both omitted → `createToken:<ts>:::<userId>`\n\nSign the UTF-8 bytes of the message with the Ed25519 private key whose public key is registered for the user. Encode the signature as lowercase hex, 128 chars, no 0x prefix.","example":"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"},"timestamp":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix timestamp in milliseconds. Must be within ±2 minutes of server time or the request is rejected with 401 Signature expired."},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User identifier. Send the value verbatim — do not re-case it, since the signed message must match byte-for-byte."}},"required":["signature","timestamp","userId"],"title":"CreateTokenBody"},"CreateTokenResultDto":{"type":"object","properties":{"expiresAt":{"description":"Token expiration date","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"id":{"type":"string","description":"Token ID"},"token":{"type":"string","description":"Bearer token value"}},"required":["expiresAt","id","token"],"title":"CreateTokenResult"},"DeleteTokenBodyDto":{"type":"object","properties":{"signature":{"type":"string","pattern":"^[0-9a-f]{128}$","description":"Ed25519 signature of the token deletion request.\n\nMessage: `deleteToken:<timestamp>:<tokenId>:<userId>` — data fields sorted alphabetically by key.\n\nSign the UTF-8 bytes of the message with the Ed25519 private key whose public key is registered for the user. Encode the signature as lowercase hex, 128 chars, no 0x prefix.","example":"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"},"timestamp":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix timestamp in milliseconds. Must be within ±2 minutes of server time or the request is rejected with 401 Signature expired."},"tokenId":{"type":"string","description":"ID of the token to delete."},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User identifier. Send the value verbatim — do not re-case it, since the signed message must match byte-for-byte."}},"required":["signature","timestamp","tokenId","userId"],"title":"DeleteTokenBody"},"GetTokensResultItemDto":{"type":"object","properties":{"expiresAt":{"description":"Token expiration date","type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"id":{"type":"string","description":"Token ID"},"name":{"type":"string","description":"Token name"}},"required":["expiresAt","id","name"],"title":"TokenItem"},"UserProfileDTO":{"type":"object","properties":{"broker":{"type":"string","description":"Broker this account belongs to"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Unique user identifier"}},"required":["broker","id"],"title":"User"},"GetArbitrageScannerResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ScannerCoinDto"},"description":"Coins for the requested page, in sorted order."},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of coins matching the filters."}},"required":["items","total"],"title":"GetArbitrageScannerResponse"},"ScannerCoinDto":{"type":"object","properties":{"asset":{"type":"string","description":"Coin grouping key: the cross-venue alias key (e.g. `alias:gold`) when defined, otherwise the base symbol shared by the paired markets across exchanges. Pass this value back as the `symbol` filter to fetch a single coin.","example":"alias:gold"},"category":{"type":"string","enum":["commodities","crypto","etf-index","forex","pre-ipo","stocks-asia","stocks-us"],"description":"Asset class of the coin. It belongs to the underlying rather than the venue, so every pair and every leg of this coin carries the same value.","example":"commodities"},"exchangeCount":{"type":"number","description":"Number of distinct exchanges this coin trades on; Hyperliquid counts once across its own perps and its HIP-3 dexes.","example":4},"pairs":{"type":"array","items":{"$ref":"#/components/schemas/ScannerPairDto"},"description":"Every cross-exchange pair for this coin, in both trade directions."}},"required":["asset","category","exchangeCount","pairs"],"title":"ScannerCoin"},"ScannerPairDto":{"type":"object","properties":{"avgFundingSpread24h":{"description":"Hourly funding spread averaged over every minute of the last 24 hours both legs have candles for, signed (short − long funding); null when that is under twelve hours, their candles have stalled, or there is no precomputed data.","example":"0.0000164","type":["string","null"]},"fundingSpread1h":{"type":"string","description":"Hourly funding spread as a signed decimal fraction (short − long funding); opposite sign for the inverse direction.","example":"0.0000215"},"fundingSpreadPositiveSince":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the funding spread last turned positive in this direction and stayed so, known back to a day at most; a brief zero spread does not end the run. Null when the spread is not positive or its candles stopped arriving.","example":"2026-07-17T09:00:00.000Z"},"long":{"description":"Leg you go long in this pair direction.","$ref":"#/components/schemas/ScannerMarketLegDto"},"maxFundingSpread1h":{"description":"Highest funding spread over the last hour, signed (short − long funding); null when no precomputed data.","example":"0.0000318","type":["string","null"]},"maxFundingSpread24h":{"description":"Highest funding spread over the last 24 hours, signed (short − long funding); null when no precomputed data.","example":"0.0000512","type":["string","null"]},"maxPriceSpread1h":{"description":"Highest price spread over the last hour, signed ((short bid − long ask) / mid); null when no precomputed data.","example":"0.0231","type":["string","null"]},"maxPriceSpread24h":{"description":"Highest price spread over the last 24 hours, signed ((short bid − long ask) / mid); null when no precomputed data.","example":"0.0417","type":["string","null"]},"priceSpread":{"description":"Latest price spread as a signed decimal fraction ((short bid − long ask) / mid); null when no precomputed data.","example":"0.0184","type":["string","null"]},"priceSpreadAtSize":{"description":"priceSpread recomputed at the requested notional from both legs fill prices, as a signed decimal fraction; it reads the live order books while priceSpread comes from a periodic snapshot, so the two can disagree by more than depth alone; null when either leg has no estimate at the requested notional.","example":"0.0121","type":["string","null"]},"short":{"description":"Leg you go short in this pair direction.","$ref":"#/components/schemas/ScannerMarketLegDto"}},"required":["avgFundingSpread24h","fundingSpread1h","fundingSpreadPositiveSince","long","maxFundingSpread1h","maxFundingSpread24h","maxPriceSpread1h","maxPriceSpread24h","priceSpread","priceSpreadAtSize","short"],"title":"ScannerPair"},"ScannerMarketLegDto":{"type":"object","properties":{"baseSymbol":{"type":"string","description":"Base currency symbol on this exchange.","example":"BTC"},"bestAsk":{"description":"Best ask on this exchange when the spread was last computed; null when no top of book is available.","example":"65001.0","type":["string","null"]},"bestBid":{"description":"Best bid on this exchange when the spread was last computed; null when no top of book is available.","example":"65000.0","type":["string","null"]},"depthImpact":{"description":"Price impact past the top of book for the leg side at the requested notional, as a percentage that excludes the half-spread; null when no estimate is available at the requested notional.","example":0.08,"type":["number","null"]},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"fundingRate":{"type":"string","description":"Current funding rate normalized to 1 hour, as a decimal fraction.","example":"0.0000125"},"marketId":{"type":"string","description":"Venue-specific market identifier on this exchange.","example":"BTCUSDT"},"maxLeverage":{"type":"number","description":"Maximum leverage available on this exchange.","example":20},"nextFundingTime":{"description":"Timestamp of the next funding settlement.","example":"2026-07-17T12:00:00.000Z","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"openInterest":{"type":"string","description":"Open interest as USD notional, one-sided. Multiply by 2 for two-sided.","example":"12345678.9"},"price":{"type":"string","description":"Latest price the exchange reported for this market, in the quote currency.","example":"65000.5"},"price24hPercent":{"type":"number","description":"Price change over the last 24 hours as a percentage.","example":-1.23},"quoteSymbol":{"type":"string","description":"Quote currency symbol on this exchange.","example":"USDT"},"slippage":{"description":"Estimated slippage against the local mid price as a percentage for the leg side at the requested notional; null when no estimate is available at that notional.","example":0.12,"type":["number","null"]},"volume24h":{"type":"number","description":"24-hour trading volume for this market on this exchange in USD.","example":3400000}},"required":["baseSymbol","bestAsk","bestBid","depthImpact","exchange","fundingRate","marketId","maxLeverage","nextFundingTime","openInterest","price","price24hPercent","quoteSymbol","slippage","volume24h"],"title":"ScannerMarketLeg"},"GetFundingCandlesResponseDto":{"type":"object","properties":{"candlesA":{"type":"array","items":{"$ref":"#/components/schemas/FundingCandleDto"},"description":"Per-minute funding rates of the first leg market, in ascending time order."},"candlesB":{"type":"array","items":{"$ref":"#/components/schemas/FundingCandleDto"},"description":"Per-minute funding rates of the second leg market, in ascending time order."}},"required":["candlesA","candlesB"],"title":"GetFundingCandlesResponse"},"FundingCandleDto":{"type":"object","properties":{"close":{"type":"string","description":"Funding rate recorded for the minute, as a decimal fraction.","example":"0.0000128"},"timestamp":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Start of the 1-minute interval as a unix timestamp in milliseconds.","example":1784715300000}},"required":["close","timestamp"],"title":"FundingCandle"},"GetPriceSpreadCandlesResponseDto":{"type":"array","items":{"$ref":"#/components/schemas/PriceSpreadCandleDto"},"title":"GetPriceSpreadCandlesResponse"},"PriceSpreadCandleDto":{"type":"object","properties":{"close":{"type":"string","description":"Price spread at the end of the interval, as a decimal fraction.","example":"0.0000128"},"high":{"type":"string","description":"Maximum price spread of the interval, as a decimal fraction.","example":"0.0000128"},"low":{"type":"string","description":"Minimum price spread of the interval, as a decimal fraction.","example":"0.0000128"},"open":{"type":"string","description":"Price spread at the start of the interval, as a decimal fraction.","example":"0.0000128"},"timestamp":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Start of the interval as a unix timestamp in milliseconds.","example":1784715300000}},"required":["close","high","low","open","timestamp"],"title":"PriceSpreadCandle"},"CreateBotBodyDto":{"type":"object","properties":{"categories":{"description":"Asset classes to trade; omit to trade every category","minItems":1,"type":"array","items":{"type":"string","enum":["commodities","crypto","etf-index","forex","pre-ipo","stocks-asia","stocks-us"],"description":"Asset class of the market"}},"exchanges":{"minItems":2,"type":"array","items":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|io|hyperliquid)$"}]},"description":"Venues the pair legs may be opened on: an exchange name for all of its markets, or `hyperliquid:<dex>` for one Hyperliquid dex (`hyperliquid:hyperliquid` for Hyperliquid's own perps, otherwise a HIP-3 dex: `xyz`, `mkts` or `io`); each leg of a pair is on a different one of these, and a bare `hyperliquid` counts as one","example":["hyperliquid:io","lighter"]},"leverage":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Leverage per leg, capped by each market limit","example":2},"maxHoldHours":{"default":24,"description":"Longest time to hold a pair before closing it even while the spread still pays; low for frequent rolls, high for carry","type":"number","exclusiveMinimum":0},"maxRoundTripCostBps":{"type":"number","exclusiveMinimum":0,"description":"Most a round trip (entry plus exit: fees, the hedge's book crossing and the resting leg's bid-ask spread) may cost, in basis points of the notional; pairs are ranked by expected funding over the hold minus this cost","example":25},"minExpectedNetBps":{"description":"Least a pair must be expected to earn over the hold after its round trip, in basis points of the notional; omit to enter on the cost cap alone, as points farming does","example":20,"type":"number"},"notionalUsd":{"type":"number","exclusiveMinimum":0,"description":"Notional per leg in USD at the full leverage; a pair trades about 5% under it, further under where a venue reserves fee and slippage beyond notionalUsd / leverage (a market leg on Extended, Lighter or Robinhood) or a market caps leverage lower","example":500},"requiredExchange":{"description":"Venue one leg of every pair must be on, an exchange or one Hyperliquid dex as in `exchanges`; omit to let any two venues pair up","anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|io|hyperliquid)$"}]},"risk":{"default":"low","type":"string","enum":["low","medium","high"],"description":"How much history the bot wants of a pair: low — a spread positive for the last 12 hours that also paid over the last day, held until the day stops paying or the spread flips hard; medium — the same with 6 hours; high — a spread paying now is enough, held until it turns clearly negative"}},"required":["exchanges","leverage","maxRoundTripCostBps","notionalUsd"],"additionalProperties":false,"title":"BotConfig"},"BotDto":{"type":"object","properties":{"config":{"description":"Bot configuration, applied by the runner on its next poll; null when the stored configuration no longer matches the current schema and the bot must be recreated.","anyOf":[{"type":"object","properties":{"categories":{"description":"Asset classes to trade; omit to trade every category","minItems":1,"type":"array","items":{"type":"string","enum":["commodities","crypto","etf-index","forex","pre-ipo","stocks-asia","stocks-us"],"description":"Asset class of the market"}},"exchanges":{"minItems":2,"type":"array","items":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|io|hyperliquid)$"}]},"description":"Venues the pair legs may be opened on: an exchange name for all of its markets, or `hyperliquid:<dex>` for one Hyperliquid dex (`hyperliquid:hyperliquid` for Hyperliquid's own perps, otherwise a HIP-3 dex: `xyz`, `mkts` or `io`); each leg of a pair is on a different one of these, and a bare `hyperliquid` counts as one","example":["hyperliquid:io","lighter"]},"leverage":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Leverage per leg, capped by each market limit","example":2},"maxHoldHours":{"default":24,"description":"Longest time to hold a pair before closing it even while the spread still pays; low for frequent rolls, high for carry","type":"number","exclusiveMinimum":0},"maxRoundTripCostBps":{"type":"number","exclusiveMinimum":0,"description":"Most a round trip (entry plus exit: fees, the hedge's book crossing and the resting leg's bid-ask spread) may cost, in basis points of the notional; pairs are ranked by expected funding over the hold minus this cost","example":25},"minExpectedNetBps":{"description":"Least a pair must be expected to earn over the hold after its round trip, in basis points of the notional; omit to enter on the cost cap alone, as points farming does","example":20,"type":"number"},"notionalUsd":{"type":"number","exclusiveMinimum":0,"description":"Notional per leg in USD at the full leverage; a pair trades about 5% under it, further under where a venue reserves fee and slippage beyond notionalUsd / leverage (a market leg on Extended, Lighter or Robinhood) or a market caps leverage lower","example":500},"requiredExchange":{"description":"Venue one leg of every pair must be on, an exchange or one Hyperliquid dex as in `exchanges`; omit to let any two venues pair up","anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|io|hyperliquid)$"}]},"risk":{"default":"low","type":"string","enum":["low","medium","high"],"description":"How much history the bot wants of a pair: low — a spread positive for the last 12 hours that also paid over the last day, held until the day stops paying or the spread flips hard; medium — the same with 6 hours; high — a spread paying now is enough, held until it turns clearly negative"}},"required":["exchanges","leverage","maxRoundTripCostBps","notionalUsd"],"additionalProperties":false,"title":"BotConfig"},{"type":"null"}]},"createdAt":{"description":"When the bot was created.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Bot identifier."},"lastError":{"description":"Why the bot halted, or null when it has never halted; it is kept when you start the bot again.","type":["string","null"]},"lastScan":{"description":"The last scan that opened nothing, with the pairs it ranked and why each was passed over; null while the bot has never scanned, entered on every scan, or its stored scan no longer matches the current schema.","anyOf":[{"type":"object","properties":{"candidates":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"string","description":"Coin the pair trades, as the scanner names it"},"long":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$"}],"description":"Venue the pair would be bought on: the exchange, or `hyperliquid:<dex>` on Hyperliquid"},"short":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$"}],"description":"Venue the pair would be sold on: the exchange, or `hyperliquid:<dex>` on Hyperliquid"},"averageSpreadBpsPerHour":{"description":"Average funding spread over the last day, in bps per hour; null when unknown","type":["number","null"]},"entryBasisBps":{"type":"number","description":"Price gap between the two venues' mids at entry, positive when the short leg is dearer"},"expectedNetBps":{"type":"number","description":"Funding expected over the configured hold at the lower of the current and the day-average spread, less the round trip cost"},"limitLeg":{"type":"string","enum":["long","short"],"description":"Which leg would rest as a post-only limit"},"roundTripCostBps":{"type":"number","description":"Fees, the hedge's book crossing, the resting leg's bid-ask spread and the entry gap, for opening and closing the pair"},"spreadBpsPerHour":{"type":"number","description":"Funding spread between the two venues, in bps per hour"}},"required":["asset","long","short","entryBasisBps","expectedNetBps","limitLeg","roundTripCostBps","spreadBpsPerHour"],"title":"BotScanCandidate"},"description":"The most promising pairs that passed ranking, best first; only the few the bot would try are kept, and `pairs` less the `rejected` counts is how many passed"},"nearMisses":{"default":[],"description":"The pairs only the cost cap or only the expected-profit floor refused, the two closest to each limit, the closest first: the cheapest over the cap, the highest expected net under the floor; scans stored before the field have none","type":"array","items":{"type":"object","properties":{"asset":{"type":"string","description":"Coin the pair trades, as the scanner names it"},"long":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$"}],"description":"Venue the pair would be bought on: the exchange, or `hyperliquid:<dex>` on Hyperliquid"},"short":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$"}],"description":"Venue the pair would be sold on: the exchange, or `hyperliquid:<dex>` on Hyperliquid"},"averageSpreadBpsPerHour":{"description":"Average funding spread over the last day, in bps per hour; null when unknown","type":["number","null"]},"entryBasisBps":{"type":"number","description":"Price gap between the two venues' mids at entry, positive when the short leg is dearer"},"expectedNetBps":{"type":"number","description":"Funding expected over the configured hold at the lower of the current and the day-average spread, less the round trip cost"},"limitLeg":{"type":"string","enum":["long","short"],"description":"Which leg would rest as a post-only limit"},"roundTripCostBps":{"type":"number","description":"Fees, the hedge's book crossing, the resting leg's bid-ask spread and the entry gap, for opening and closing the pair"},"spreadBpsPerHour":{"type":"number","description":"Funding spread between the two venues, in bps per hour"},"reason":{"type":"string","enum":["cost_above_cap","expected_net_below_min"],"description":"cost_above_cap — the round trip costs more than the configured cap; expected_net_below_min — the funding expected over the hold does not clear the round trip by the configured margin"}},"required":["asset","long","short","entryBasisBps","expectedNetBps","limitLeg","roundTripCostBps","spreadBpsPerHour","reason"],"title":"BotScanNearMiss"}},"pairs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many pairs the scanner returned"},"rejected":{"type":"array","items":{"type":"object","properties":{"pairs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"How many pairs this rule dropped"},"reason":{"type":"string","enum":["average_not_paying","cost_above_cap","expected_net_below_min","no_entry_basis","no_reverse_pair","no_slippage","not_on_required_venue","spread_not_held","spread_not_held_24h","spread_not_paying"],"description":"spread_not_paying — funding does not pay in this direction; spread_not_held — the spread has not been positive for as long as the risk level asks, or its history is unknown; average_not_paying — it pays now but paid nothing net over the last day (low and medium); spread_not_held_24h — the spread turned against the pair in the last day (older scans); not_on_required_venue — neither leg is on the pinned venue; no_entry_basis — a venue is not quoting both sides, or its bid is not below its ask; no_slippage — the scanner has no slippage for the hedging leg; cost_above_cap — the round trip costs more than the configured cap; expected_net_below_min — the funding expected over the hold does not clear the round trip by the configured margin; no_reverse_pair — the venues did not quote the pair the other way (older scans)"}},"required":["pairs","reason"],"title":"BotScanRejection"},"description":"What ranking dropped, counted per rule"},"scannedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the scan ran"},"skipped":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"string","description":"Coin the pair trades, as the scanner names it"},"long":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$"}],"description":"Venue the pair would be bought on: the exchange, or `hyperliquid:<dex>` on Hyperliquid"},"short":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$"}],"description":"Venue the pair would be sold on: the exchange, or `hyperliquid:<dex>` on Hyperliquid"},"reason":{"type":"string","description":"What stopped the bot from opening this pair"}},"required":["asset","long","short","reason"],"title":"BotScanSkip"},"description":"Ranked pairs the bot could not open, with what stopped each one"}},"required":["candidates","pairs","rejected","scannedAt","skipped"],"title":"BotScan"},{"type":"null"}]},"openCycle":{"anyOf":[{"type":"object","properties":{"closeAttempts":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Exit orders the bot has sent for this pair so far, or rounds of closing an unhedged entry at market."},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Cycle identifier."},"pair":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string","description":"Coin the pair trades."},"baseQuantity":{"type":"string","description":"Size of each leg in base units."},"heldFrom":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the entry filled and the hold started; null until the hedge fills, and while the pair is unavailable."},"limitLeg":{"type":"string","enum":["long","short"],"description":"Which leg rests as a post-only limit: long (bought) or short (sold)."},"long":{"type":"object","properties":{"baseSymbol":{"type":"string","description":"Base symbol on this venue"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Venue the leg trades on"},"marketId":{"type":"string","description":"Venue-specific market identifier"},"quoteSymbol":{"type":"string","description":"Quote symbol on this venue"},"userExchangeId":{"type":"string","pattern":"^[1-9]\\d*$","description":"Venue account the leg was opened on; it stays the same even if you reconnect the venue."}},"required":["baseSymbol","exchange","marketId","quoteSymbol","userExchangeId"],"title":"BotOpenCycleLeg","description":"Leg the bot bought."},"openedAt":{"description":"When the bot sent the entry order.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"short":{"type":"object","properties":{"baseSymbol":{"type":"string","description":"Base symbol on this venue"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Venue the leg trades on"},"marketId":{"type":"string","description":"Venue-specific market identifier"},"quoteSymbol":{"type":"string","description":"Quote symbol on this venue"},"userExchangeId":{"type":"string","pattern":"^[1-9]\\d*$","description":"Venue account the leg was opened on; it stays the same even if you reconnect the venue."}},"required":["baseSymbol","exchange","marketId","quoteSymbol","userExchangeId"],"title":"BotOpenCycleLeg","description":"Leg the bot sold."}},"required":["asset","baseQuantity","heldFrom","limitLeg","long","openedAt","short"],"title":"BotOpenCyclePair"},{"type":"null"}],"description":"The pair itself, read back from the order that opened it; null when that order is no longer in the database, which leaves the bot holding a pair it cannot describe."},"phase":{"type":"string","enum":["closing","holding","opening"],"description":"opening — the entry order is working; holding — both legs are open; closing — an exit order is working, or the bot is closing what an unhedged entry filled."}},"required":["closeAttempts","id","pair","phase"],"title":"BotOpenCycle"},{"type":"null"}],"description":"The pair the bot is working on, or null while it holds none."},"status":{"type":"string","enum":["halted","running","stopped","stopping"],"description":"running — the bot executes scheduled ticks. stopping — the runner closes the pair it holds, if any, then stops. stopped — it has never been started, or you stopped it. halted — it hit a state it will not act on and stopped itself; `lastError` says which."},"updatedAt":{"description":"When the bot last changed.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["config","createdAt","id","lastError","lastScan","openCycle","status","updatedAt"],"title":"Bot"},"BotCyclesDto":{"type":"object","properties":{"cursor":{"description":"Pass as cursor to fetch the next page, or null when no more pages exist.","type":["string","null"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/BotCycleDto"},"description":"Cycles, newest first."}},"required":["cursor","items"],"title":"BotCycles"},"BotCycleDto":{"type":"object","properties":{"closedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the bot confirmed the pair was gone, or null while the cycle is open."},"createdAt":{"description":"When the cycle was recorded.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"economics":{"type":"object","properties":{"complete":{"type":"boolean","description":"Whether these figures have no known accounting gap — not a promise that the history is exhaustive; false when the pair was closed outside the bot or its entry was never confirmed, an order it names is gone, a leg the venue never acknowledged may still have filled, trades are still syncing, a fee or realized PnL is missing or paid in a token that is not a stablecoin, or an open cycle has no position the bot can read as its own."},"feesUsd":{"type":"string","description":"Trading fees you paid on the cycle, stablecoin fees only."},"fundingUsd":{"type":"string","description":"Funding you received less funding you paid on both legs, from the entry until the cycle closed or, while it is open, until now; it can lag the venue by up to an hour."},"netPnlUsd":{"type":"string","description":"Realized PnL less fees, plus funding, plus unrealized PnL while the cycle is open."},"notionalHoursUsd":{"type":"string","description":"Entry notional multiplied by the hours the pair was held, counted to the close or, while the cycle is open, to now; it is zero until the entry fills."},"notionalOpenedUsd":{"type":"string","description":"What the entry filled, both legs together."},"partial":{"type":"boolean","description":"Whether the gap behind `complete: false` is here to stay: the pair was closed outside the bot or its entry never confirmed, an order it names is gone, a fee or funding token is not a stablecoin, or the cycle is closed and its figures still have a gap after the venues were synced. False while an open cycle is only waiting for the next sync."},"realizedPnlUsd":{"type":"string","description":"Realized PnL the venues reported on the cycle trades."},"unrealizedPnlUsd":{"type":"string","description":"Unrealized PnL on the legs of an open cycle, and zero once the cycle closes."},"volumeUsd":{"type":"string","description":"Everything the cycle traded, entry and exit, both legs."}},"required":["complete","feesUsd","fundingUsd","netPnlUsd","notionalHoursUsd","notionalOpenedUsd","partial","realizedPnlUsd","unrealizedPnlUsd","volumeUsd"],"title":"BotCycleEconomics","description":"What the cycle earns and costs you."},"entry":{"description":"The scan that chose this pair, with the candidates it beat and what was passed over; null when the stored scan no longer matches the current schema.","anyOf":[{"type":"object","properties":{"candidates":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"string","description":"Coin the pair trades, as the scanner names it"},"long":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$"}],"description":"Venue the pair would be bought on: the exchange, or `hyperliquid:<dex>` on Hyperliquid"},"short":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$"}],"description":"Venue the pair would be sold on: the exchange, or `hyperliquid:<dex>` on Hyperliquid"},"averageSpreadBpsPerHour":{"description":"Average funding spread over the last day, in bps per hour; null when unknown","type":["number","null"]},"entryBasisBps":{"type":"number","description":"Price gap between the two venues' mids at entry, positive when the short leg is dearer"},"expectedNetBps":{"type":"number","description":"Funding expected over the configured hold at the lower of the current and the day-average spread, less the round trip cost"},"limitLeg":{"type":"string","enum":["long","short"],"description":"Which leg would rest as a post-only limit"},"roundTripCostBps":{"type":"number","description":"Fees, the hedge's book crossing, the resting leg's bid-ask spread and the entry gap, for opening and closing the pair"},"spreadBpsPerHour":{"type":"number","description":"Funding spread between the two venues, in bps per hour"}},"required":["asset","long","short","entryBasisBps","expectedNetBps","limitLeg","roundTripCostBps","spreadBpsPerHour"],"title":"BotScanCandidate"},"description":"The most promising pairs that passed ranking, best first; only the few the bot would try are kept, and `pairs` less the `rejected` counts is how many passed"},"nearMisses":{"default":[],"description":"The pairs only the cost cap or only the expected-profit floor refused, the two closest to each limit, the closest first: the cheapest over the cap, the highest expected net under the floor; scans stored before the field have none","type":"array","items":{"type":"object","properties":{"asset":{"type":"string","description":"Coin the pair trades, as the scanner names it"},"long":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$"}],"description":"Venue the pair would be bought on: the exchange, or `hyperliquid:<dex>` on Hyperliquid"},"short":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$"}],"description":"Venue the pair would be sold on: the exchange, or `hyperliquid:<dex>` on Hyperliquid"},"averageSpreadBpsPerHour":{"description":"Average funding spread over the last day, in bps per hour; null when unknown","type":["number","null"]},"entryBasisBps":{"type":"number","description":"Price gap between the two venues' mids at entry, positive when the short leg is dearer"},"expectedNetBps":{"type":"number","description":"Funding expected over the configured hold at the lower of the current and the day-average spread, less the round trip cost"},"limitLeg":{"type":"string","enum":["long","short"],"description":"Which leg would rest as a post-only limit"},"roundTripCostBps":{"type":"number","description":"Fees, the hedge's book crossing, the resting leg's bid-ask spread and the entry gap, for opening and closing the pair"},"spreadBpsPerHour":{"type":"number","description":"Funding spread between the two venues, in bps per hour"},"reason":{"type":"string","enum":["cost_above_cap","expected_net_below_min"],"description":"cost_above_cap — the round trip costs more than the configured cap; expected_net_below_min — the funding expected over the hold does not clear the round trip by the configured margin"}},"required":["asset","long","short","entryBasisBps","expectedNetBps","limitLeg","roundTripCostBps","spreadBpsPerHour","reason"],"title":"BotScanNearMiss"}},"pairs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many pairs the scanner returned"},"rejected":{"type":"array","items":{"type":"object","properties":{"pairs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"How many pairs this rule dropped"},"reason":{"type":"string","enum":["average_not_paying","cost_above_cap","expected_net_below_min","no_entry_basis","no_reverse_pair","no_slippage","not_on_required_venue","spread_not_held","spread_not_held_24h","spread_not_paying"],"description":"spread_not_paying — funding does not pay in this direction; spread_not_held — the spread has not been positive for as long as the risk level asks, or its history is unknown; average_not_paying — it pays now but paid nothing net over the last day (low and medium); spread_not_held_24h — the spread turned against the pair in the last day (older scans); not_on_required_venue — neither leg is on the pinned venue; no_entry_basis — a venue is not quoting both sides, or its bid is not below its ask; no_slippage — the scanner has no slippage for the hedging leg; cost_above_cap — the round trip costs more than the configured cap; expected_net_below_min — the funding expected over the hold does not clear the round trip by the configured margin; no_reverse_pair — the venues did not quote the pair the other way (older scans)"}},"required":["pairs","reason"],"title":"BotScanRejection"},"description":"What ranking dropped, counted per rule"},"scannedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the scan ran"},"skipped":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"string","description":"Coin the pair trades, as the scanner names it"},"long":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$"}],"description":"Venue the pair would be bought on: the exchange, or `hyperliquid:<dex>` on Hyperliquid"},"short":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$"}],"description":"Venue the pair would be sold on: the exchange, or `hyperliquid:<dex>` on Hyperliquid"},"reason":{"type":"string","description":"What stopped the bot from opening this pair"}},"required":["asset","long","short","reason"],"title":"BotScanSkip"},"description":"Ranked pairs the bot could not open, with what stopped each one"}},"required":["candidates","pairs","rejected","scannedAt","skipped"],"title":"BotScan"},{"type":"null"}]},"entryOrder":{"anyOf":[{"type":"object","properties":{"createdAt":{"description":"When the bot sent the order.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the order stopped working, or null while it is still open."},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Arbitrage order identifier."},"legs":{"type":"array","items":{"type":"object","properties":{"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Venue the leg trades on."},"filledSize":{"description":"Base units filled, or null while the venue has not reported a fill.","type":["string","null"]},"orderId":{"description":"Venue order identifier, or null when the venue never acknowledged the leg.","type":["string","null"]},"price":{"description":"Limit price, or null when the leg crosses at market.","type":["string","null"]},"side":{"type":"string","enum":["buy","sell"],"description":"buy or sell, as the leg was sent to the venue."},"size":{"type":"string","description":"Base units the leg asks for."}},"required":["exchange","filledSize","orderId","price","side","size"],"title":"BotCycleOrderLeg"},"description":"The resting leg and the hedging leg."},"status":{"type":"string","enum":["canceled","canceling","failed","finished","processing"],"description":"processing — the order is still working, with the resting leg or its hedge on the way; finished — both legs are done and the order is finalized; canceled — pulled before it finished; failed — needs manual handling, the legs may be directionally exposed."}},"required":["createdAt","finishedAt","id","legs","status"],"title":"BotCycleOrder"},{"type":"null"}],"description":"The order that opened the pair, or null when it is no longer in the database."},"exit":{"description":"Why the bot is leaving: spread_flipped (funding turned against the pair), max_hold (the configured hold ran out), liquidation_risk (a leg came too close to liquidation), external (the pair was closed outside the bot), stopped (you stopped the bot and asked it to close the pair), unconfirmed (the entry failed without a known fill and the venues read flat, so the venue may still hold an order), unhedged (the entry hedge did not fill after the resting leg had, so the bot closes what filled at market); null until it starts closing.","anyOf":[{"oneOf":[{"type":"object","properties":{"averageSpreadBpsPerHour":{"description":"Average funding spread over the last day the exit judged by; null when its risk level judges by the spread alone or the scanner had none","type":["number","null"]},"reason":{"type":"string","description":"Funding turned against the pair: for low and medium it paid nothing net over the last day or flipped hard, for high it turned clearly negative","enum":["spread_flipped"]},"spreadBpsPerHour":{"type":"number","description":"Funding spread when the bot decided to leave"}},"required":["reason","spreadBpsPerHour"]},{"type":"object","properties":{"heldHours":{"type":"number","description":"Hours the pair was held when the hold ran out"},"reason":{"type":"string","description":"The configured hold ran out","enum":["max_hold"]}},"required":["heldHours","reason"]},{"type":"object","properties":{"consumed":{"type":"number","description":"Share of the leg distance from entry to liquidation that the mark has used"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Venue the leg at risk trades on"},"marketId":{"type":"string","description":"Market the leg at risk trades"},"reason":{"type":"string","description":"A leg came too close to liquidation","enum":["liquidation_risk"]}},"required":["consumed","exchange","marketId","reason"]},{"type":"object","properties":{"reason":{"type":"string","description":"The pair was closed outside the bot","enum":["external"]}},"required":["reason"]},{"type":"object","properties":{"problem":{"description":"What the hedge venue answered; null when the hedge ended without an error, as one canceled unfilled does","type":["string","null"]},"reason":{"type":"string","description":"The entry hedge did not fill after the resting leg had, so the bot closes what filled at market","enum":["unhedged"]},"rounds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Rounds of closing what filled with reduce-only market orders so far, one order for each leg still open per round"},"sentAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the last round went out"}},"required":["problem","reason","rounds","sentAt"]},{"type":"object","properties":{"reason":{"type":"string","description":"You stopped the bot and asked it to close the pair","enum":["stopped"]}},"required":["reason"]},{"type":"object","properties":{"reason":{"type":"string","description":"The entry order failed without a known fill and the venues read flat; the venue may hold nothing or an order the bot could not see","enum":["unconfirmed"]}},"required":["reason"]}],"title":"BotCycleExit","type":"object"},{"type":"null"}]},"exitOrders":{"type":"array","items":{"type":"object","properties":{"createdAt":{"description":"When the bot sent the order.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the order stopped working, or null while it is still open."},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Arbitrage order identifier."},"legs":{"type":"array","items":{"type":"object","properties":{"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Venue the leg trades on."},"filledSize":{"description":"Base units filled, or null while the venue has not reported a fill.","type":["string","null"]},"orderId":{"description":"Venue order identifier, or null when the venue never acknowledged the leg.","type":["string","null"]},"price":{"description":"Limit price, or null when the leg crosses at market.","type":["string","null"]},"side":{"type":"string","enum":["buy","sell"],"description":"buy or sell, as the leg was sent to the venue."},"size":{"type":"string","description":"Base units the leg asks for."}},"required":["exchange","filledSize","orderId","price","side","size"],"title":"BotCycleOrderLeg"},"description":"The resting leg and the hedging leg."},"status":{"type":"string","enum":["canceled","canceling","failed","finished","processing"],"description":"processing — the order is still working, with the resting leg or its hedge on the way; finished — both legs are done and the order is finalized; canceled — pulled before it finished; failed — needs manual handling, the legs may be directionally exposed."}},"required":["createdAt","finishedAt","id","legs","status"],"title":"BotCycleOrder"},"description":"Every order the bot sent to close the pair, oldest first."},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Cycle identifier."},"pair":{"anyOf":[{"type":"object","properties":{"asset":{"type":"string","description":"Coin the pair trades."},"baseQuantity":{"type":"string","description":"Size of each leg in base units."},"heldFrom":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the entry filled and the hold started; null until the hedge fills, and while the pair is unavailable."},"limitLeg":{"type":"string","enum":["long","short"],"description":"Which leg rests as a post-only limit: long (bought) or short (sold)."},"long":{"type":"object","properties":{"baseSymbol":{"type":"string","description":"Base symbol on this venue"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Venue the leg trades on"},"marketId":{"type":"string","description":"Venue-specific market identifier"},"quoteSymbol":{"type":"string","description":"Quote symbol on this venue"},"userExchangeId":{"type":"string","pattern":"^[1-9]\\d*$","description":"Venue account the leg was opened on; it stays the same even if you reconnect the venue."}},"required":["baseSymbol","exchange","marketId","quoteSymbol","userExchangeId"],"title":"BotOpenCycleLeg","description":"Leg the bot bought."},"openedAt":{"description":"When the bot sent the entry order.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"short":{"type":"object","properties":{"baseSymbol":{"type":"string","description":"Base symbol on this venue"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Venue the leg trades on"},"marketId":{"type":"string","description":"Venue-specific market identifier"},"quoteSymbol":{"type":"string","description":"Quote symbol on this venue"},"userExchangeId":{"type":"string","pattern":"^[1-9]\\d*$","description":"Venue account the leg was opened on; it stays the same even if you reconnect the venue."}},"required":["baseSymbol","exchange","marketId","quoteSymbol","userExchangeId"],"title":"BotOpenCycleLeg","description":"Leg the bot sold."}},"required":["asset","baseQuantity","heldFrom","limitLeg","long","openedAt","short"],"title":"BotOpenCyclePair"},{"type":"null"}],"description":"The pair itself, read back from the order that opened it; null when that order is no longer in the database."},"phase":{"type":"string","enum":["aborted","closed","closing","holding","opening"],"description":"opening — the entry order is working; holding — both legs are open; closing — an exit order is working, or the bot is closing what an unhedged entry filled; closed — the pair was closed; aborted — the entry never filled."}},"required":["closedAt","createdAt","economics","entry","entryOrder","exit","exitOrders","id","pair","phase"],"title":"BotCycle"},"BotStatsDto":{"type":"object","properties":{"feesUsd":{"type":"string","description":"Trading fees you paid on the cycle, stablecoin fees only."},"fundingUsd":{"type":"string","description":"Funding you received less funding you paid on both legs, from the entry until the cycle closed or, while it is open, until now; it can lag the venue by up to an hour."},"netPnlUsd":{"type":"string","description":"Realized PnL less fees, plus funding, plus unrealized PnL while the cycle is open."},"notionalHoursUsd":{"type":"string","description":"Entry notional multiplied by the hours the pair was held, counted to the close or, while the cycle is open, to now; it is zero until the entry fills."},"notionalOpenedUsd":{"type":"string","description":"What the entry filled, both legs together."},"realizedPnlUsd":{"type":"string","description":"Realized PnL the venues reported on the cycle trades."},"unrealizedPnlUsd":{"type":"string","description":"Unrealized PnL on the legs of an open cycle, and zero once the cycle closes."},"volumeUsd":{"type":"string","description":"Everything the cycle traded, entry and exit, both legs."},"abortedCycles":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Cycles whose entry finished without filling, so no pair was ever held."},"cycles":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Cycles the bot has recorded."},"incompleteCycles":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Cycles whose figures are partial; every total here is a partial sum over the cycles, never null."},"openCycles":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Cycles whose pair the bot is still working on."},"partialCycles":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Cycles whose figures stay partial: closed outside the bot, never confirmed, missing an order, paid in a non-stablecoin, or closed with a gap after the venues were synced. Cycles still syncing are counted in `incompleteCycles` only."}},"required":["feesUsd","fundingUsd","netPnlUsd","notionalHoursUsd","notionalOpenedUsd","realizedPnlUsd","unrealizedPnlUsd","volumeUsd","abortedCycles","cycles","incompleteCycles","openCycles","partialCycles"],"title":"BotStats"},"StopBotBodyDto":{"default":{"closePair":false},"title":"StopBotBody","type":"object","properties":{"closePair":{"default":false,"description":"Whether the runner closes the pair at market before stopping; false leaves the positions where they are.","type":"boolean"}}},"UpdateBotBodyDto":{"type":"object","properties":{"categories":{"description":"Asset classes to trade; omit to trade every category","minItems":1,"type":"array","items":{"type":"string","enum":["commodities","crypto","etf-index","forex","pre-ipo","stocks-asia","stocks-us"],"description":"Asset class of the market"}},"exchanges":{"minItems":2,"type":"array","items":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|io|hyperliquid)$"}]},"description":"Venues the pair legs may be opened on: an exchange name for all of its markets, or `hyperliquid:<dex>` for one Hyperliquid dex (`hyperliquid:hyperliquid` for Hyperliquid's own perps, otherwise a HIP-3 dex: `xyz`, `mkts` or `io`); each leg of a pair is on a different one of these, and a bare `hyperliquid` counts as one","example":["hyperliquid:io","lighter"]},"leverage":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Leverage per leg, capped by each market limit","example":2},"maxHoldHours":{"default":24,"description":"Longest time to hold a pair before closing it even while the spread still pays; low for frequent rolls, high for carry","type":"number","exclusiveMinimum":0},"maxRoundTripCostBps":{"type":"number","exclusiveMinimum":0,"description":"Most a round trip (entry plus exit: fees, the hedge's book crossing and the resting leg's bid-ask spread) may cost, in basis points of the notional; pairs are ranked by expected funding over the hold minus this cost","example":25},"minExpectedNetBps":{"description":"Least a pair must be expected to earn over the hold after its round trip, in basis points of the notional; omit to enter on the cost cap alone, as points farming does","example":20,"type":"number"},"notionalUsd":{"type":"number","exclusiveMinimum":0,"description":"Notional per leg in USD at the full leverage; a pair trades about 5% under it, further under where a venue reserves fee and slippage beyond notionalUsd / leverage (a market leg on Extended, Lighter or Robinhood) or a market caps leverage lower","example":500},"requiredExchange":{"description":"Venue one leg of every pair must be on, an exchange or one Hyperliquid dex as in `exchanges`; omit to let any two venues pair up","anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|io|hyperliquid)$"}]},"risk":{"default":"low","type":"string","enum":["low","medium","high"],"description":"How much history the bot wants of a pair: low — a spread positive for the last 12 hours that also paid over the last day, held until the day stops paying or the spread flips hard; medium — the same with 6 hours; high — a spread paying now is enough, held until it turns clearly negative"}},"required":["exchanges","leverage","maxRoundTripCostBps","notionalUsd"],"additionalProperties":false,"title":"BotConfig"},"SetBrokerExchangeBodyDTO":{"oneOf":[{"type":"object","properties":{"limitFeeBps":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","example":"1.5","description":"Builder fee in basis points charged on orders the venue executes as limit orders"},"marketFeeBps":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","example":"1.5","description":"Builder fee in basis points charged on orders the venue executes as market orders, including trigger orders on Hyperliquid and Aster"},"maxFeeBps":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","example":"1.5","description":"Builder fee in basis points used as default during user approval"},"identifier":{"type":"string","description":"Builder Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"exchange":{"type":"string","enum":["aster"]}},"required":["limitFeeBps","marketFeeBps","maxFeeBps","identifier","exchange"]},{"type":"object","properties":{"limitFeeBps":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","example":"1.5","description":"Builder fee in basis points charged on orders the venue executes as limit orders"},"marketFeeBps":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","example":"1.5","description":"Builder fee in basis points charged on orders the venue executes as market orders, including trigger orders on Hyperliquid and Aster"},"maxFeeBps":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","example":"1.5","description":"Builder fee in basis points used as default during user approval"},"identifier":{"type":"string","description":"Builder Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"exchange":{"type":"string","enum":["hyperliquid"]}},"required":["limitFeeBps","marketFeeBps","maxFeeBps","identifier","exchange"]},{"type":"object","properties":{"limitFeeBps":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","example":"1.5","description":"Builder fee in basis points charged on orders the venue executes as limit orders"},"marketFeeBps":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","example":"1.5","description":"Builder fee in basis points charged on orders the venue executes as market orders, including trigger orders on Hyperliquid and Aster"},"maxFeeBps":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","example":"1.5","description":"Builder fee in basis points used as default during user approval"},"exchange":{"type":"string","enum":["lighter"]},"identifier":{"type":"string","pattern":"^\\d+$","description":"Integrator account index","example":"42"}},"required":["limitFeeBps","marketFeeBps","maxFeeBps","exchange","identifier"]},{"type":"object","properties":{"limitFeeBps":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","example":"1.5","description":"Builder fee in basis points charged on orders the venue executes as limit orders"},"marketFeeBps":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","example":"1.5","description":"Builder fee in basis points charged on orders the venue executes as market orders, including trigger orders on Hyperliquid and Aster"},"maxFeeBps":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","example":"1.5","description":"Builder fee in basis points used as default during user approval"},"exchange":{"type":"string","enum":["robinhood"]},"identifier":{"type":"string","pattern":"^\\d+$","description":"Integrator account index","example":"42"}},"required":["limitFeeBps","marketFeeBps","maxFeeBps","exchange","identifier"]},{"type":"object","properties":{"limitFeeBps":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","example":"1.5","description":"Builder fee in basis points charged on orders the venue executes as limit orders"},"marketFeeBps":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","example":"1.5","description":"Builder fee in basis points charged on orders the venue executes as market orders, including trigger orders on Hyperliquid and Aster"},"maxFeeBps":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","example":"1.5","description":"Builder fee in basis points used as default during user approval"},"exchange":{"type":"string","enum":["extended"]},"identifier":{"type":"string","pattern":"^[1-9]\\d*$","description":"Builder clientId from the Extended UI API page","example":"123"}},"required":["limitFeeBps","marketFeeBps","maxFeeBps","exchange","identifier"]},{"type":"object","properties":{"exchange":{"type":"string","enum":["binance"]},"identifier":{"type":"string","minLength":1,"maxLength":24,"pattern":"^[A-Za-z0-9./:_-]+$","description":"Broker tag prepended to auto-generated client order ids to attribute trades","example":"x-YAsVKTZm"}},"required":["exchange","identifier"]},{"type":"object","properties":{"exchange":{"type":"string","enum":["mexc"]},"identifier":{"type":"string","minLength":1,"pattern":"^[A-Za-z0-9./:_-]+$","description":"Broker_ID issued by MEXC, sent as the source header to attribute orders","example":"VOOI"}},"required":["exchange","identifier"]}],"title":"SetBrokerExchangeBody","type":"object"},"GetBrokerOrdersDTO":{"type":"object","properties":{"cursor":{"description":"Pass as cursor to fetch the next page. Null when no more pages exist","type":["string","null"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/BrokerOrderDto"}}},"required":["cursor","items"],"title":"BrokerOrders"},"BrokerOrderDto":{"type":"object","properties":{"baseSymbol":{"type":"string","description":"Base asset symbol","example":"ETH"},"brokerCode":{"type":"string","description":"Broker slug"},"clientOrderId":{"description":"Client order identifier","type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"orderId":{"type":"string","description":"Exchange order identifier"},"positionSide":{"type":"string","enum":["both","long","short"],"description":"Position side: both, long, or short"},"price":{"description":"Limit price in quote currency, or null for market orders","example":"1850.50","type":["string","null"]},"quoteSymbol":{"type":"string","description":"Quote asset symbol","example":"USDC"},"reduceOnly":{"description":"Whether the order only reduces an existing position","type":["boolean","null"]},"side":{"type":"string","enum":["buy","sell"],"description":"Order side: buy or sell"},"size":{"type":"string","description":"Order size in base asset","example":"0.001"},"status":{"type":"string","enum":["canceled","created","error","executed","partiallyFilled"],"description":"Order status"},"timeInForce":{"anyOf":[{"type":"string","enum":["gtc","ioc","fok","alo"]},{"type":"null"}],"description":"Time in force policy of the order. gtc — Good-Till-Cancel, ioc — Immediate-Or-Cancel, fok — Fill-Or-Kill, alo — Add Liquidity Only. Null for market, trigger, or liquidation orders where TIF is not applicable.","example":"gtc"},"triggerPrice":{"description":"Trigger price for stop-loss / take-profit orders","example":"1800.00","type":["string","null"]},"type":{"type":"string","enum":["limit","liquidation","market","other","stopLoss","stopLossLimit","takeProfit","takeProfitLimit"],"description":"Order type"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"userId":{"type":"string","description":"User wallet address"}},"required":["baseSymbol","brokerCode","clientOrderId","createdAt","exchange","orderId","positionSide","price","quoteSymbol","reduceOnly","side","size","status","timeInForce","triggerPrice","type","updatedAt","userId"],"title":"BrokerOrder"},"BrokerStatsDto":{"type":"object","properties":{"aster":{"$ref":"#/components/schemas/BrokerStatsExchangeBreakdownDto"},"binance":{"$ref":"#/components/schemas/BrokerStatsExchangeBreakdownDto"},"bybit":{"$ref":"#/components/schemas/BrokerStatsExchangeBreakdownDto"},"extended":{"$ref":"#/components/schemas/BrokerStatsExchangeBreakdownDto"},"gate":{"$ref":"#/components/schemas/BrokerStatsExchangeBreakdownDto"},"hyperliquid":{"$ref":"#/components/schemas/BrokerStatsExchangeBreakdownDto"},"lighter":{"$ref":"#/components/schemas/BrokerStatsExchangeBreakdownDto"},"mexc":{"$ref":"#/components/schemas/BrokerStatsExchangeBreakdownDto"},"ondo":{"$ref":"#/components/schemas/BrokerStatsExchangeBreakdownDto"},"robinhood":{"$ref":"#/components/schemas/BrokerStatsExchangeBreakdownDto"}},"required":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"title":"BrokerStats"},"BrokerStatsExchangeBreakdownDto":{"type":"object","properties":{"orderCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct orders (trade.orderId) with at least one trade in the period on this exchange."},"uniqueTraders":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct users with at least one trade in the period on this exchange."},"volumeUsd":{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Trade volume in USD on this exchange (sum of trade.size * trade.price across all trades in the period).","example":"0.001"}},"required":["orderCount","uniqueTraders","volumeUsd"],"title":"BrokerStatsExchangeBreakdown"},"BrokerTopVolumeUsersDto":{"type":"object","properties":{"cursor":{"description":"Pass as cursor to fetch the next page. Null when no more pages exist.","type":["string","null"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/BrokerTopVolumeUserDto"}}},"required":["cursor","items"],"title":"BrokerTopVolumeUsers"},"BrokerTopVolumeUserDto":{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"volume":{"type":"string","description":"Total executed notional in quote currency from API-created orders in the selected period.","example":"12345.67"}},"required":["userId","volume"],"title":"BrokerTopVolumeUser"},"GetBrokerTradesDTO":{"type":"object","properties":{"cursor":{"description":"Pass as cursor to fetch the next page. Null when no more pages exist","type":["string","null"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/BrokerTradeDto"}}},"required":["cursor","items"],"title":"BrokerTrades"},"BrokerTradeDto":{"type":"object","properties":{"baseSymbol":{"type":"string","description":"Base asset symbol","example":"ETH"},"brokerCode":{"type":"string","description":"Broker slug"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"fee":{"description":"Trading fee amount","type":["string","null"]},"feeToken":{"description":"Fee token symbol","type":["string","null"]},"orderId":{"description":"Exchange order ID associated with this trade","type":["string","null"]},"positionSide":{"type":"string","enum":["both","long","short"],"description":"Position side: both, long, or short"},"price":{"type":"string","description":"Execution price in quote asset","example":"1850.50"},"quoteSymbol":{"type":"string","description":"Quote asset symbol","example":"USDC"},"realizedPnl":{"description":"Realized profit and loss","example":"12.50","type":["string","null"]},"side":{"type":"string","enum":["buy","sell"],"description":"Trade side: buy or sell"},"size":{"type":"string","description":"Trade size in base asset","example":"0.001"},"tradeId":{"type":"string","description":"Unique trade identifier from the exchange"},"userId":{"type":"string","description":"User wallet address"}},"required":["baseSymbol","brokerCode","createdAt","exchange","fee","feeToken","orderId","positionSide","price","quoteSymbol","realizedPnl","side","size","tradeId","userId"],"title":"BrokerTrade"},"GetBrokerUsersStatsDTO":{"type":"object","properties":{"cursor":{"description":"Pass as cursor to fetch the next page. Null when no more pages exist","type":["string","null"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/BrokerUserStatsDto"}}},"required":["cursor","items"],"title":"BrokerUsersStats"},"BrokerUserStatsDto":{"type":"object","properties":{"tradesCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of executed trades in the selected period","example":42},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id"},"volume":{"type":"string","description":"Total executed notional in quote currency, summed from trades in the selected period","example":"12345.67"}},"required":["tradesCount","userId","volume"],"title":"BrokerUserStats"},"GetBrokerExchangeDTO":{"type":"object","properties":{"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"identifier":{"type":"string","description":"Broker identifier for the exchange","example":"0xabc..."},"limitFeeBps":{"anyOf":[{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Numeric value as string","example":"0.001"},{"type":"null"}],"description":"Broker fee in basis points charged on limit orders (orders sent with a price); null when the exchange has no builder fee","example":"10"},"marketFeeBps":{"anyOf":[{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Numeric value as string","example":"0.001"},{"type":"null"}],"description":"Broker fee in basis points charged on market orders (orders sent without a price); null when the exchange has no builder fee","example":"30"},"maxFeeBps":{"anyOf":[{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Numeric value as string","example":"0.001"},{"type":"null"}],"description":"Broker fee in basis points used as default during user approval; null when the exchange has no builder fee","example":"30"}},"required":["exchange","identifier","limitFeeBps","marketFeeBps","maxFeeBps"],"title":"BrokerExchange"},"RegisterUserBodyDTO":{"type":"object","properties":{"publicKey":{"description":"Ed25519 public key to associate with the user","type":"string","pattern":"^[0-9a-f]{64}$","example":"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"}},"title":"RegisterUser"},"SetPublicKeyBodyDTO":{"type":"object","properties":{"publicKey":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Ed25519 public key as 64-character lowercase hex string (32 bytes)","example":"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"},{"type":"null"}],"description":"Ed25519 public key to set for the user, or null to remove it"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User identifier"}},"required":["publicKey","userId"],"title":"SetPublicKey"},"BrokerSummaryDto":{"type":"object","properties":{"exchanges":{"type":"array","items":{"$ref":"#/components/schemas/BrokerSummaryExchangeDto"},"description":"Volume and unique traders per exchange (Hyperliquid split by dex); only entries with trades in the period are listed."},"totalVolume":{"type":"string","description":"Total executed notional across all exchanges.","example":"103000.00"},"uniqTradersCount":{"type":"string","description":"Distinct users with at least one trade in the period across all exchanges; a user active on several exchanges is counted once.","example":"15"}},"required":["exchanges","totalVolume","uniqTradersCount"],"title":"BrokerSummary"},"BrokerSummaryExchangeDto":{"type":"object","properties":{"exchange":{"type":"string","description":"Exchange the amounts belong to: the exchange name, or `hyperliquid:<dex>` for Hyperliquid trades (`hyperliquid:hyperliquid` for Hyperliquid's own perps, otherwise the HIP-3 dex, e.g. `hyperliquid:xyz`).","example":"hyperliquid:xyz"},"uniqTradersCount":{"type":"string","description":"Distinct users with at least one trade in the period on this exchange.","example":"12"},"volume":{"type":"string","description":"Executed notional in quote currency from orders created through this API.","example":"103000.00"}},"required":["exchange","uniqTradersCount","volume"],"title":"BrokerSummaryExchange"},"GetBrokerUserPnlDTO":{"type":"object","properties":{"exchangesPnl":{"description":"Net realized PnL per exchange over the period — trade PnL minus trading fees plus funding payments — for every trade on the connected accounts, not only api-placed orders.","$ref":"#/components/schemas/BrokerUserExchangePnl"},"totalPnl":{"type":"string","description":"Total net realized PnL across all exchanges over the period — trade PnL minus trading fees plus funding payments — for every trade on the connected accounts, not only api-placed orders.","example":"1250.00"}},"required":["exchangesPnl","totalPnl"],"title":"BrokerUserPnl"},"BrokerUserExchangePnl":{"type":"object","properties":{"aster":{"type":"string","description":"Net realized PnL on Aster in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"binance":{"type":"string","description":"Net realized PnL on Binance in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"bybit":{"type":"string","description":"Net realized PnL on Bybit in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"extended":{"type":"string","description":"Net realized PnL on Extended in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"gate":{"type":"string","description":"Net realized PnL on Gate in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"hyperliquid":{"type":"string","description":"Net realized PnL on Hyperliquid in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"lighter":{"type":"string","description":"Net realized PnL on Lighter in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"mexc":{"type":"string","description":"Net realized PnL on Mexc in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"ondo":{"type":"string","description":"Net realized PnL on Ondo in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"robinhood":{"type":"string","description":"Net realized PnL on Robinhood in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."}},"required":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"title":"BrokerUserExchangePnl"},"BrokerUserPnlChartDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BrokerUserPnlChartItemDto"}}},"required":["items"],"title":"BrokerUserPnlChart"},"BrokerUserPnlChartItemDto":{"type":"object","properties":{"date":{"description":"Start of the interval as ISO 8601 datetime (UTC).","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"exchangesPnl":{"description":"Net realized PnL per exchange in this interval of userId — trade PnL minus trading fees plus funding payments — for every trade on the connected accounts, not only api-placed orders.","$ref":"#/components/schemas/BrokerUserPnlChartExchangePnl"},"totalPnl":{"type":"string","description":"Total net realized PnL across all exchanges in this interval — trade PnL minus trading fees plus funding payments — for every trade on the connected accounts, not only api-placed orders.","example":"150"}},"required":["date","exchangesPnl","totalPnl"],"title":"BrokerUserPnlChartItem"},"BrokerUserPnlChartExchangePnl":{"type":"object","properties":{"aster":{"type":"string","description":"Net realized PnL on Aster in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"binance":{"type":"string","description":"Net realized PnL on Binance in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"bybit":{"type":"string","description":"Net realized PnL on Bybit in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"extended":{"type":"string","description":"Net realized PnL on Extended in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"gate":{"type":"string","description":"Net realized PnL on Gate in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"hyperliquid":{"type":"string","description":"Net realized PnL on Hyperliquid in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"lighter":{"type":"string","description":"Net realized PnL on Lighter in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"mexc":{"type":"string","description":"Net realized PnL on Mexc in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"ondo":{"type":"string","description":"Net realized PnL on Ondo in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."},"robinhood":{"type":"string","description":"Net realized PnL on Robinhood in quote currency — trade PnL minus trading fees plus funding payments — for every trade on the connected account, not only api-placed orders."}},"required":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"title":"BrokerUserPnlChartExchangePnl"},"GetBrokerUsersVolumeBodyDTO":{"type":"object","properties":{"exchanges":{"description":"Count trades only on these entries: an exchange name for all of its markets, or `hyperliquid:<dex>` for one Hyperliquid dex (`hyperliquid` for Hyperliquid's own perps, otherwise a HIP-3 dex: `xyz`, `mkts`, `vntl` or `io`); a dex suffix on any other exchange is rejected. When omitted, all supported exchanges are counted.","example":["hyperliquid:hyperliquid","lighter"],"minItems":1,"type":"array","items":{"anyOf":[{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},{"type":"string","pattern":"^hyperliquid:(xyz|mkts|vntl|io|hyperliquid)$"}]}},"from":{"description":"Start of the period as unix timestamp in milliseconds (inclusive). Defaults to now - 30 days (1 day for hour resolution).","example":1767225600000,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"resolution":{"default":"day","description":"Aggregation interval: day (UTC calendar day) or hour (UTC clock hour). from/to snap to interval boundaries. On series endpoints, items span one interval and hour limits the range to 7 days. Defaults to day.","type":"string","enum":["day","hour"]},"to":{"description":"End of the period as unix timestamp in milliseconds (inclusive). Defaults to now.","example":1769903999000,"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"usersList":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id."},"startedFrom":{"description":"Earliest date to count this user's trades from (timestamp ms). The effective start is max(from, startedFrom).","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["id"],"title":"BrokerUserVolumeInput"},"description":"Users to compute stats for (1-100)."}},"required":["usersList"],"title":"GetBrokerUsersVolumeBody"},"GetBrokerUsersVolumeDTO":{"type":"object","properties":{"exchanges":{"type":"array","items":{"$ref":"#/components/schemas/BrokerUserExchangeAmounts"},"description":"Volume and fees per exchange (Hyperliquid split by dex); only entries with trades in the period are listed."},"totalVolume":{"type":"string","description":"Total executed notional across all exchanges.","example":"103000.00"},"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"User id."}},"required":["exchanges","totalVolume","userId"],"title":"BrokerUserVolume"},"BrokerUserExchangeAmounts":{"type":"object","properties":{"brokerFees":{"type":"string","description":"Broker fee in quote currency, counted from orders created through this API and excluding orders created via MCP. Each trade uses the fee settings that were active when its order was created (volume times limitFeeBps for maker trades and marketFeeBps for taker-marked trades), so a period spanning a settings change mixes rates; orders created before any settings existed for the exchange contribute 0.","example":"10.30"},"exchange":{"type":"string","description":"Exchange the amounts belong to: the exchange name, or `hyperliquid:<dex>` for Hyperliquid trades (`hyperliquid:hyperliquid` for Hyperliquid's own perps, otherwise the HIP-3 dex, e.g. `hyperliquid:xyz`).","example":"hyperliquid:xyz"},"fees":{"type":"string","description":"Produced fees of fiat tokens in quote currency from orders created through this API.","example":"41.20"},"volume":{"type":"string","description":"Executed notional in quote currency from orders created through this API.","example":"103000.00"}},"required":["brokerFees","exchange","fees","volume"],"title":"BrokerUserExchangeAmounts"},"BrokerUsersVolumeChartDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BrokerUsersVolumeChartItemDto"}}},"required":["items"],"title":"BrokerUsersVolumeChart"},"BrokerUsersVolumeChartItemDto":{"type":"object","properties":{"date":{"description":"Start of the interval as ISO 8601 datetime (UTC).","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"exchanges":{"type":"array","items":{"$ref":"#/components/schemas/BrokerUsersVolumeChartExchangeVolume"},"description":"Executed notional per exchange (Hyperliquid split by dex) in this interval from orders created through this API, summed across all users in the list; only entries with trades in the interval are listed."},"totalVolume":{"type":"string","description":"Total executed notional across all exchanges in this interval.","example":"600"}},"required":["date","exchanges","totalVolume"],"title":"BrokerUsersVolumeChartItem"},"BrokerUsersVolumeChartExchangeVolume":{"type":"object","properties":{"exchange":{"type":"string","description":"Exchange the amounts belong to: the exchange name, or `hyperliquid:<dex>` for Hyperliquid trades (`hyperliquid:hyperliquid` for Hyperliquid's own perps, otherwise the HIP-3 dex, e.g. `hyperliquid:xyz`).","example":"hyperliquid:xyz"},"volume":{"type":"string","description":"Executed notional in quote currency in this interval.","example":"600"}},"required":["exchange","volume"],"title":"BrokerUsersVolumeChartExchangeVolume"},"GetBrokerUserVolumeDTO":{"type":"object","properties":{"exchanges":{"type":"array","items":{"$ref":"#/components/schemas/BrokerUserVolumeExchangeAmounts"},"description":"Volume and fees per exchange (Hyperliquid split by dex); only entries with trades in the period are listed."},"totalVolume":{"type":"string","description":"Total executed notional across all exchanges.","example":"103000.00"}},"required":["exchanges","totalVolume"],"title":"BrokerUserVolumeResult"},"BrokerUserVolumeExchangeAmounts":{"type":"object","properties":{"exchange":{"type":"string","description":"Exchange the amounts belong to: the exchange name, or `hyperliquid:<dex>` for Hyperliquid trades (`hyperliquid:hyperliquid` for Hyperliquid's own perps, otherwise the HIP-3 dex, e.g. `hyperliquid:xyz`).","example":"hyperliquid:xyz"},"fees":{"type":"string","description":"Produced fees of fiat tokens in quote currency. Covers the whole exchange account when totalAccountStats is enabled.","example":"41.20"},"volume":{"type":"string","description":"Executed notional in quote currency. Covers the whole exchange account when totalAccountStats is enabled.","example":"103000.00"}},"required":["exchange","fees","volume"],"title":"BrokerUserVolumeExchangeAmounts"},"BrokerUserVolumeChartDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BrokerUserVolumeChartItemDto"}}},"required":["items"],"title":"BrokerUserVolumeChart"},"BrokerUserVolumeChartItemDto":{"type":"object","properties":{"date":{"description":"Start of the interval as ISO 8601 datetime (UTC).","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"exchanges":{"type":"array","items":{"$ref":"#/components/schemas/BrokerUserVolumeChartExchangeVolume"},"description":"Executed notional per exchange (Hyperliquid split by dex) in this interval of userId; only entries with trades in the interval are listed. Covers the whole exchange account when totalAccountStats is enabled."},"totalVolume":{"type":"string","description":"Total executed notional across all exchanges in this interval.","example":"600"}},"required":["date","exchanges","totalVolume"],"title":"BrokerUserVolumeChartItem"},"BrokerUserVolumeChartExchangeVolume":{"type":"object","properties":{"exchange":{"type":"string","description":"Exchange the amounts belong to: the exchange name, or `hyperliquid:<dex>` for Hyperliquid trades (`hyperliquid:hyperliquid` for Hyperliquid's own perps, otherwise the HIP-3 dex, e.g. `hyperliquid:xyz`).","example":"hyperliquid:xyz"},"volume":{"type":"string","description":"Executed notional in quote currency in this interval.","example":"600"}},"required":["exchange","volume"],"title":"BrokerUserVolumeChartExchangeVolume"},"DepositResponseDto":{"type":"object","properties":{"fee":{"description":"Bridge fee deducted from the deposit amount, in the same units as amount","example":"0.1","type":"string"},"transactions":{"type":"array","items":{"type":"object","properties":{"calldata":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"data":{"type":"string","description":"Hex-encoded string","example":"0xabcdef..."},"to":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"}},"required":["chainId","data","to"],"description":"Transaction calldata for on-chain execution"},"meta":{"type":"object","properties":{"amount":{"type":"string","description":"Deposit amount in human-readable form","example":"5.0"},"type":{"type":"string","enum":["approve","transfer","contract-call"],"description":"Type of on-chain action"}},"required":["amount","type"],"description":"Transaction metadata"}},"required":["calldata","meta"]},"description":"Transactions for signing and sending, including meta information such as amount and type"}},"required":["transactions"],"title":"DepositResponse"},"FundingRatePointDto":{"type":"object","properties":{"date":{"description":"Timestamp of the 1-hour interval (ISO 8601).","example":"2024-01-01T00:00:00.000Z","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"fundingRate":{"type":"string","description":"Hourly funding rate for the market as a decimal.","example":"0.0001"}},"required":["date","fundingRate"],"title":"FundingRatePoint"},"SpreadPointDto":{"type":"object","properties":{"date":{"description":"Timestamp of the 1-hour interval (ISO 8601).","example":"2024-01-01T00:00:00.000Z","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"spread":{"type":"string","description":"Hourly funding bps rate spread (shortRate − longRate) as a decimal.","example":"0.0001"}},"required":["date","spread"],"title":"SpreadPoint"},"GetFundingStrategyDto":{"type":"object","properties":{"apr1h":{"type":"string","description":"1-hour APR as a decimal fraction.","example":"0.000215"},"apr7d":{"type":"string","description":"7-day APR as a decimal fraction.","example":"0.0361"},"apr24h":{"type":"string","description":"24-hour APR as a decimal fraction.","example":"0.00516"},"aprMaxLev":{"type":"string","description":"Annualized APR scaled by the maximum shared leverage, as a decimal fraction.","example":"5.64"},"asset":{"type":"string","description":"Cross-exchange grouping key: an alias (e.g. alias:aapl) when defined, otherwise the base symbol","example":"alias:wti"},"grossSpread":{"type":"string","description":"Annualized gross spread as a decimal fraction (grossSpreadHourly × 8760).","example":"1.8796"},"grossSpreadHourly":{"type":"string","description":"Hourly funding rate spread as a decimal fraction (shortFundingRate − longFundingRate).","example":"0.000215"},"longMarketData":{"type":"object","properties":{"baseSymbol":{"type":"string","description":"Base currency symbol.","example":"BTC"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"fundingRate":{"type":"string","description":"Hourly funding rate on the exchange.","example":"0.000105"},"maxLeverage":{"type":"number","description":"Maximum leverage available on the exchange.","example":20},"quoteSymbol":{"type":"string","description":"Quote currency symbol.","example":"USDT"}},"required":["baseSymbol","exchange","fundingRate","maxLeverage","quoteSymbol"],"title":"MarketData","description":"Market data for the long side of the strategy."},"netApr":{"type":"string","description":"Annualized net APR as a decimal fraction (currently equal to grossSpread; fees subtracted in future).","example":"1.8796"},"shortMarketData":{"type":"object","properties":{"baseSymbol":{"type":"string","description":"Base currency symbol.","example":"BTC"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"fundingRate":{"type":"string","description":"Hourly funding rate on the exchange.","example":"0.000105"},"maxLeverage":{"type":"number","description":"Maximum leverage available on the exchange.","example":20},"quoteSymbol":{"type":"string","description":"Quote currency symbol.","example":"USDT"}},"required":["baseSymbol","exchange","fundingRate","maxLeverage","quoteSymbol"],"title":"MarketData","description":"Market data for the short side of the strategy."},"volume24h":{"type":"number","description":"Combined 24-hour trading volume across both exchanges in USD.","example":3400000}},"required":["apr1h","apr7d","apr24h","aprMaxLev","asset","grossSpread","grossSpreadHourly","longMarketData","netApr","shortMarketData","volume24h"],"title":"FundingStrategy"},"BatchCancelOrderBodyDto":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/CancelOrderBodyDto"},"description":"List of orders to cancel","title":"BatchCancelOrder"},"CancelOrderBodyDto":{"type":"object","properties":{"asset":{"type":"string","minLength":1,"description":"Asset identifier: base symbol (e.g. \"ETH\") or full pair (e.g. \"ETHUSDC\").","example":"ETH"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},"orderId":{"type":"string"}},"required":["asset","exchange","orderId"],"title":"CancelOrder"},"BatchCancelOrderResultDto":{"type":"object","properties":{"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["cancelled"]}},"required":["status"],"description":"Order was cancelled successfully"},{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"status":{"type":"string","enum":["error"]}},"required":["error","status"],"description":"Order cancellation failed"}],"title":"BatchCancelOrderItemResult","type":"object"},"description":"Per-order results, index-correlated with input"}},"required":["results"],"title":"BatchCancelOrderResult"},"BatchCreateOrderBodyDto":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/CreateOrderBodyDto"},"description":"List of orders to create","title":"BatchCreateOrder"},"CreateOrderBodyDto":{"type":"object","properties":{"asset":{"type":"string","minLength":1,"description":"Asset identifier: base symbol (e.g. \"ETH\") or full pair (e.g. \"ETHUSDC\").","example":"ETH"},"broker":{"description":"Broker configuration. Hyperliquid: id is builder address, feeBps is builder fee. Lighter/Robinhood: id is integrator account index, feeBps is integrator fee (applies to both taker and maker). Aster: id is builder address, feeBps is builder fee in BPS. MEXC: id is the Broker_ID sent as the source header to attribute the order; feeBps is still required but has no effect, since MEXC charges no builder fee. On Hyperliquid, Lighter, and Robinhood the user must have pre-approved this builder/integrator on-chain (and feeBps must be ≤ the approved cap); on Aster the approval is bundled into registration. Overridden by the broker settings (if any) of the broker the user is registered through: orders the venue executes as limit take the limitFeeBps of those settings, orders it executes as market take the marketFeeBps (trigger orders count as market on Hyperliquid, Aster and Ondo), and Lighter/Robinhood receive both as maker/taker fees.","type":"object","properties":{"feeBps":{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Broker fee in bps","example":"15"},"id":{"type":"string","description":"Broker ID","example":"123"}},"required":["feeBps","id"],"title":"Broker"},"clientOrderId":{"description":"Your custom order identifier, forwarded to the exchange as-is (max 32 characters on Binance). On Binance, when omitted, an id carrying the broker rebate tag is generated instead. Ignored on Lighter/Robinhood when placing orders with takeProfit or stopLoss.","type":"string"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},"normalizeParams":{"description":"When true, forces normalization of parameters to match exchange requirements if possible.","type":"boolean"},"price":{"description":"Limit price (optional for market orders)","example":"1850.50","type":"string","pattern":"\\d+(\\.\\d+)?"},"reduceOnly":{"description":"If true, order will only reduce existing position. Used for TP/SL orders","example":true,"type":"boolean"},"side":{"type":"string","enum":["buy","sell"]},"size":{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Order size in base currency","example":"0.001"},"stopLoss":{"description":"Stop loss order configuration (combine with takeProfit for bracket orders, not supported on Aster)","type":"object","properties":{"limitPrice":{"description":"Limit price for order execution (omit for market execution)","example":"1995.00","type":"string","pattern":"\\d+(\\.\\d+)?"},"size":{"description":"Position size to close, omit to use main order size (not supported on Lighter/Robinhood — child orders are always position-tied)","example":"0.5","type":"string","pattern":"\\d+(\\.\\d+)?"},"triggerPrice":{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Trigger price at which to activate this order","example":"2000.00"}},"required":["triggerPrice"],"title":"TakeProfitStopLoss"},"takeProfit":{"description":"Take profit order configuration (combine with stopLoss for bracket orders, not supported on Aster)","type":"object","properties":{"limitPrice":{"description":"Limit price for order execution (omit for market execution)","example":"1995.00","type":"string","pattern":"\\d+(\\.\\d+)?"},"size":{"description":"Position size to close, omit to use main order size (not supported on Lighter/Robinhood — child orders are always position-tied)","example":"0.5","type":"string","pattern":"\\d+(\\.\\d+)?"},"triggerPrice":{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Trigger price at which to activate this order","example":"2000.00"}},"required":["triggerPrice"],"title":"TakeProfitStopLoss"},"timeInForce":{"description":"Order time in force policy. gtc (Good-Till-Cancel) — order stays active until filled or manually canceled. ioc (Immediate-Or-Cancel) — fills immediately (fully or partially), unfilled remainder is canceled. fok (Fill-Or-Kill) — fills entirely and immediately or is canceled completely; supported only on Aster. alo (Add Liquidity Only) — order only adds liquidity as a maker; canceled if it would execute as taker. Defaults to gtc when omitted.","example":"gtc","type":"string","enum":["gtc","ioc","fok","alo"]},"trigger":{"description":"Optional trigger configuration for stop-loss or take-profit orders","type":"object","properties":{"price":{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Trigger price at which the order will be activated","example":"1800.00"},"type":{"type":"string","enum":["sl","tp"],"description":"Trigger type: sl (stop-loss) or tp (take-profit)","example":"sl"}},"required":["price","type"]}},"required":["asset","exchange","side","size"],"title":"CreateOrder"},"BatchCreateOrderResultDto":{"type":"object","properties":{"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["created"]}},"required":["status"],"description":"Order was placed successfully"},{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Error messages"},"status":{"type":"string","enum":["error"]}},"required":["errors","status"],"description":"Order placement failed"}],"title":"BatchCreateOrderItemResult","type":"object"},"description":"Per-order results, index-correlated with input"}},"required":["results"],"title":"BatchCreateOrderResult"},"CancelAllOrdersBodyDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"}},"required":["exchange"],"title":"CancelAllOrders"},"CancelAllOrdersDto":{"type":"object","properties":{"status":{"type":"string","description":"Cancellation status","example":"ok","enum":["ok"]}},"required":["status"],"title":"CancelAllOrders"},"CancelOrderDto":{"type":"object","properties":{"status":{"type":"string","description":"Order status","example":"ok","enum":["ok"]}},"required":["status"],"title":"CancelOrder"},"CreateOrderDto":{"type":"object","properties":{"status":{"type":"string","enum":["ok"],"description":"Order status","example":"ok"}},"required":["status"],"title":"CreateOrder"},"UpdatesTokenDto":{"type":"object","properties":{"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"token":{"type":"string","description":"One-time updates token"}},"required":["expiresAt","token"],"title":"UpdatesToken"},"AsterGetAccountInfoDto":{"type":"object","properties":{"dualSidePosition":{"type":"boolean","description":"Whether hedge mode (dual position side) is enabled."},"marginType":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["cross","isolated"]},"description":"Margin type per market (marketId to cross or isolated)."},"multiAssetsMargin":{"type":"boolean","description":"Whether multi-assets margin mode is enabled."}},"required":["dualSidePosition","marginType","multiAssetsMargin"],"title":"AsterAccountInfo"},"BybitGetAccountInfoDto":{"type":"object","properties":{"marginMode":{"type":"string","enum":["cross","isolated"],"description":"Margin mode applied to the whole unified account: cross shares the account balance, isolated locks a fixed margin per position."},"unifiedMarginStatus":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bybit account upgrade status: 1 (classic), 3 and 4 (UTA 1.0, pro), 5 and 6 (UTA 2.0, pro). Only unified statuses are supported for trading.","example":6}},"required":["marginMode","unifiedMarginStatus"],"title":"BybitAccountInfo"},"ExtendedGetAccountInfoDto":{"type":"object","properties":{"referralLinkCode":{"description":"Referral code applied to the Extended account; null when none is applied.","example":"VOOI","type":["string","null"]}},"required":["referralLinkCode"],"title":"ExtendedAccountInfo"},"HyperliquidGetAccountInfoDto":{"type":"object","properties":{"abstractionMode":{"type":"string","enum":["disabled","unifiedAccount","portfolioMargin","default","dexAbstraction"],"description":"Current Hyperliquid account abstraction mode: disabled (perps-only), unifiedAccount and portfolioMargin (spot+perp unified collateral), dexAbstraction (legacy), or default (mode not yet set)."}},"required":["abstractionMode"],"title":"HyperliquidAccountInfo"},"LighterGetAccountInfoDto":{"type":"object","properties":{"accountTier":{"type":"string","description":"Fee tier the account trades on. Lighter runs standard (0 bps both sides), premium (volume- or stake-tiered fees) and plus (flat fees, higher rate limits); the Robinhood deployment runs standard and premium only. Kept as a plain string so a tier a deployment adds later still reads back.","example":"standard"},"makerFeeBps":{"type":"string","description":"Maker fee the account's tier currently charges, in bps","example":"1.2"},"takerFeeBps":{"type":"string","description":"Taker fee the account's tier currently charges, in bps","example":"3.5"}},"required":["accountTier","makerFeeBps","takerFeeBps"],"title":"LighterAccountInfo"},"GetAccountDto":{"type":"object","properties":{"availableMargin":{"type":"string","description":"Free margin available for new positions.","example":"800.00"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"marginInUse":{"type":"string","description":"Total initial margin locked across positions and open orders.","example":"200.00"},"token":{"type":"string","description":"Quote/collateral token denominating the balances (e.g. \"USDC\", \"USDH\").","example":"USDC"},"totalBalance":{"type":"string","description":"Total account equity, including unrealized PnL.","example":"1000.00"},"type":{"type":"string","description":"Account type within the exchange. Defaults to \"perps\"; Hyperliquid returns one account per supported dex (e.g. \"perps\", \"xyz\").","example":"perps"},"withdrawable":{"type":"string","description":"Amount available for withdrawal.","example":"750.00"}},"required":["availableMargin","exchange","marginInUse","token","totalBalance","type","withdrawable"],"title":"Account"},"GetMarketCategoriesDto":{"type":"object","properties":{"categories":{"type":"array","items":{"type":"string","enum":["commodities","crypto","etf-index","forex","pre-ipo","stocks-asia","stocks-us"],"description":"Asset class of the market"},"description":"Asset classes at least one open market currently belongs to, sorted alphabetically. Use them as the option list for the `categories` filter on the arbitrage scanner."}},"required":["categories"],"title":"GetMarketCategories"},"GetMarketsDto":{"type":"object","properties":{"baseDecimals":{"type":"integer","minimum":0,"maximum":9007199254740991,"example":3},"baseSymbol":{"type":"string","example":"ETH"},"category":{"type":"string","enum":["commodities","crypto","etf-index","forex","pre-ipo","stocks-asia","stocks-us"],"description":"Asset class of the underlying: `crypto` (digital assets, including tokenized-RWA protocol tokens), `stocks-us` (equities listed on a US exchange, including foreign companies trading as depositary receipts), `stocks-asia` (equities listed on an Asian exchange and not on a US one — an Asian company with a US listing is `stocks-us`, so Sony and Alibaba sit there while Tencent sits here), `etf-index` (equity, commodity and macro index products and ETFs, including funds whose exposure is a metal or commodity; crypto-native index perps such as `BTCDOM` and `DEFI` stay in `crypto`), `commodities` (physical goods priced directly — metals, energy, agricultural and hardware spot indices such as GPU rental and memory — including gold-backed tokens), `forex` (currency pairs and the dollar index), or `pre-ipo` (private companies traded ahead of listing). The value belongs to the underlying rather than the venue, so every market sharing a `unifiedSymbol` reports the same category.","example":"stocks-us"},"data":{"description":"Custom metadata for specific market"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"fundingInterval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Funding settlement interval in hours","example":1},"fundingRate":{"type":"string","description":"Hourly funding rate for the market as a decimal.","example":"0.001"},"id":{"type":"string"},"maxLeverage":{"type":"number","exclusiveMinimum":0,"description":"Highest leverage this market allows, for any account.","example":50},"nextFundingTime":{"description":"Next funding settlement time","example":"2025-01-15T12:00:00.000Z","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"open":{"type":"boolean","example":true},"openInterest":{"type":"string","description":"Open interest as USD notional, one-sided. Multiply by 2 for two-sided.","example":"12345678.9"},"price":{"type":"string","example":"1850.50"},"price24hPercent":{"type":"number","description":"Price change over the last 24 hours, as percent (e.g. -2.27 for -2.27%).","example":-2.27},"priceDecimals":{"type":"integer","minimum":0,"maximum":9007199254740991,"example":2},"quoteDecimals":{"type":"integer","minimum":0,"maximum":9007199254740991,"example":6},"quoteSymbol":{"type":"string","example":"USDC"},"schedule":{"type":"object","properties":{"corrections":{"description":"Session overrides for specific dates, in TradingView format: semicolon-separated entries, each `HHMM-HHMM:YYYYMMDD` (dates within an entry comma-separated).","example":"0930-1300:20261127","type":"string"},"session":{"type":"string","description":"Regular trading hours as a TradingView session string: `24x7` for round-the-clock, otherwise `HHMM-HHMM` windows with day codes (1=Sunday … 7=Saturday), e.g. `0930-1600:23456`.","example":"0930-1600:23456"},"sessionHolidays":{"description":"Comma-separated `YYYYMMDD` dates the market is fully closed.","example":"20261225,20270101","type":"string"},"timezone":{"type":"string","description":"IANA timezone the session and corrections are expressed in.","example":"America/New_York"}},"required":["session","timezone"],"title":"MarketSchedule","description":"The market's trading schedule in TradingView session format (`24x7` for crypto, weekday or custom session windows for tokenized stocks and other TradFi instruments)."},"unifiedSymbol":{"type":"string","description":"Cross-exchange grouping key: the alias key (e.g. `alias:aapl`) for assets listed under different venue symbols, otherwise equal to `baseSymbol`.","example":"alias:aapl"},"volume24h":{"type":"number","minimum":0,"description":"24h volume","example":100000.1234}},"required":["baseDecimals","baseSymbol","category","data","exchange","fundingInterval","fundingRate","id","maxLeverage","nextFundingTime","open","openInterest","price","price24hPercent","priceDecimals","quoteDecimals","quoteSymbol","schedule","unifiedSymbol","volume24h"],"title":"Market"},"GetMarketSettingsDto":{"type":"object","properties":{"asset":{"type":"string","minLength":1,"description":"Asset identifier: base symbol (e.g. \"ETH\") or full pair (e.g. \"ETHUSDC\").","example":"ETH"},"data":{"description":"Venue-specific limits for this market, passed through as the venue reports them. Aster returns leverageOiRemainingMap: the notional still openable platform-wide at each leverage tier, keyed by the highest leverage in the tier. Null when the venue reports no such limits or when reading them failed, so guard before you read a field."},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"leverage":{"type":"number","exclusiveMinimum":0},"marginMode":{"type":"string","enum":["isolated","cross"]},"maxLeverage":{"description":"Highest leverage your account can use on this market.","example":50,"type":"number","exclusiveMinimum":0}},"required":["asset","data","exchange","leverage","marginMode"],"title":"MarketSettings"},"OrderDto":{"type":"object","properties":{"baseSymbol":{"type":"string","example":"ETH"},"clientOrderId":{"description":"Order identifier, as returned by the exchange.","type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"filledSize":{"description":"Size already executed, in base asset units. Null when the exchange does not report it, or for orders placed before the field existed.","example":"0.0005","type":["string","null"]},"orderId":{"type":"string"},"positionSide":{"type":"string","enum":["both","long","short"]},"price":{"description":"Limit price in quote currency, or null for market orders.","example":"1800.00","type":["string","null"]},"quoteSymbol":{"type":"string","example":"USDC"},"reduceOnly":{"description":"Whether the order only reduces an existing position","type":["boolean","null"]},"side":{"type":"string","enum":["buy","sell"]},"size":{"type":"string","example":"0.001"},"status":{"type":"string","enum":["canceled","created","error","executed","partiallyFilled"]},"timeInForce":{"anyOf":[{"type":"string","enum":["gtc","ioc","fok","alo"]},{"type":"null"}],"description":"Time in force policy of the order. gtc — Good-Till-Cancel, ioc — Immediate-Or-Cancel, fok — Fill-Or-Kill, alo — Add Liquidity Only. Null for market, trigger, or liquidation orders where TIF is not applicable.","example":"gtc"},"triggerPrice":{"example":"1800.00","type":["string","null"]},"type":{"type":"string","enum":["limit","liquidation","market","other","stopLoss","stopLossLimit","takeProfit","takeProfitLimit"]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["baseSymbol","clientOrderId","createdAt","exchange","filledSize","orderId","positionSide","price","quoteSymbol","reduceOnly","side","size","status","timeInForce","triggerPrice","type","updatedAt"],"title":"Order"},"GetOrdersDto":{"type":"object","properties":{"cursor":{"description":"Pass as cursor to fetch the next page. Null when no more pages exist","type":["string","null"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderDto"}}},"required":["cursor","items"],"title":"Orders"},"GetPositionsDto":{"type":"object","properties":{"baseSymbol":{"type":"string","example":"ETH"},"entryPrice":{"type":"string","example":"1850.50"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"fundingFee":{"description":"Cumulative funding fee paid since position open in quote currency","example":"-3.25","type":["string","null"]},"isolatedMargin":{"description":"Margin allocated to this position created in isolated mode, in quote currency","example":"1000.00","type":["string","null"]},"leverage":{"example":"25","type":["string","null"]},"liquidationPrice":{"description":"Liquidation price in quote currency","example":"1200.00","type":["string","null"]},"marginMode":{"type":"string","enum":["isolated","cross"],"description":"Margin mode position is opened with","example":"cross"},"positionSide":{"type":"string","enum":["both","long","short"]},"quoteSymbol":{"type":"string","example":"USDC"},"realizedPnl":{"example":"12.50","type":["string","null"]},"roe":{"description":"Return on equity as a decimal ratio","example":"0.15","type":["string","null"]},"side":{"type":"string","enum":["buy","sell"]},"size":{"type":"string","example":"0.001"},"unrealizedPnl":{"description":"Unrealized PnL in quote currency","example":"150.25","type":["string","null"]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["baseSymbol","entryPrice","exchange","fundingFee","isolatedMargin","leverage","liquidationPrice","marginMode","positionSide","quoteSymbol","realizedPnl","roe","side","size","unrealizedPnl","updatedAt"],"title":"Position"},"GetQuotesDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"quote":{"anyOf":[{"type":"object","properties":{"averageExecutionPrice":{"type":"string","description":"Average execution price in quote currency","example":"1850.50"},"baseSize":{"type":"string","description":"Estimated size of the received base tokens","example":"0.001"},"baseSymbol":{"type":"string","description":"Base asset symbol","example":"ETH"},"feesBps":{"type":"string","description":"Trading fees in bps","example":"4.5"},"fundingRateBps":{"type":"string","description":"Current hourly funding rate for the market in bps","example":"0.12"},"liquidationPrice":{"description":"Estimated liquidation price in quote currency. Always null when the request is not authorized.","example":"1650.25","type":["string","null"]},"nextFundingTime":{"description":"Next funding settlement time","example":"2025-01-15T12:00:00.000Z","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"quoteSymbol":{"type":"string","description":"Quote currency symbol","example":"USDC"},"slippageBps":{"type":"string","description":"Estimated slippage in bps","example":"1.2"}},"required":["averageExecutionPrice","baseSize","baseSymbol","feesBps","fundingRateBps","liquidationPrice","nextFundingTime","quoteSymbol","slippageBps"],"title":"Quote"},{"type":"null"}],"description":"Quote result or null if unavailable"}},"required":["exchange","quote"],"title":"GetQuotesItem"},"GetSlippageDto":{"anyOf":[{"type":"object","properties":{"avgPrice":{"type":"number","description":"Average execution price across all filled orderbook levels","example":1852.34},"bestPrice":{"type":"number","description":"Best available price (ask for long, bid for short)","example":1850.5},"depthImpact":{"type":"number","description":"Price impact as a percentage difference from the best price on the side you take, excluding the half-spread","example":0.099432},"depthUsedUsd":{"type":"number","description":"Total USD value of orderbook depth consumed to fill the order","example":50000},"effectiveSpreadBps":{"type":"number","description":"Spread between worst and best execution price in basis points","example":12.5},"filled":{"type":"boolean","description":"Whether the order can be completely filled at current orderbook depth"},"filledPercent":{"type":"number","description":"Percentage of order filled (0-100)","example":100},"slippage":{"type":"number","description":"Price impact as percentage difference from mid-price","example":0.125432},"slippageBps":{"type":"number","description":"Price impact in basis points (slippage × 100)","example":12.54},"worstPrice":{"type":"number","description":"Worst (highest for long, lowest for short) price encountered while filling","example":1854.75}},"required":["avgPrice","bestPrice","depthImpact","depthUsedUsd","effectiveSpreadBps","filled","filledPercent","slippage","slippageBps","worstPrice"],"description":"Slippage calculation result, or null when the top of book is crossed"},{"type":"null"}],"title":"GetSlippage"},"GetTopVolumeSymbolsDto":{"type":"object","properties":{"asset":{"type":"string","description":"Base asset symbol or alias(if exists)","example":"alias:nvda"},"quotes":{"type":"array","items":{"$ref":"#/components/schemas/GetQuotesDto"},"description":"Quotes for each exchange"}},"required":["asset","quotes"],"title":"GetTopVolumeSymbolsItem"},"GetTradesDto":{"type":"object","properties":{"cursor":{"description":"Pass as cursor to fetch the next page. Null when no more pages exist","type":["string","null"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/TradeDto"}}},"required":["cursor","items"],"title":"Trades"},"TradeDto":{"type":"object","properties":{"baseSymbol":{"type":"string","example":"ETH"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"fee":{"description":"Trading fee amount","type":["string","null"]},"feeToken":{"description":"Fee token symbol","type":["string","null"]},"orderId":{"description":"Exchange order ID associated with this trade","type":["string","null"]},"positionSide":{"type":"string","enum":["both","long","short"]},"price":{"type":"string","example":"1850.50"},"quoteSymbol":{"type":"string","example":"USDC"},"realizedPnl":{"example":"12.50","type":["string","null"]},"role":{"anyOf":[{"type":"string","enum":["maker","taker"]},{"type":"null"}],"example":"taker","description":"maker (the fill rested in the order book) or taker (the fill crossed the spread). Null for trades synced before the venue role was tracked, or when the venue did not report the role"},"side":{"type":"string","enum":["buy","sell"]},"size":{"type":"string","example":"0.001"},"tradeId":{"type":"string"},"type":{"type":"string","enum":["trade","deleverage","liquidation","settlement"],"example":"trade","description":"trade (regular fill), liquidation (forced close), deleverage (ADL), settlement (market settlement)"}},"required":["baseSymbol","createdAt","exchange","fee","feeToken","orderId","positionSide","price","quoteSymbol","realizedPnl","role","side","size","tradeId","type"],"title":"Trade"},"SetLeverageBodyDto":{"type":"object","properties":{"asset":{"type":"string","minLength":1,"description":"Asset identifier: base symbol (e.g. \"ETH\") or full pair (e.g. \"ETHUSDC\").","example":"ETH"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},"leverage":{"type":"number","exclusiveMinimum":0,"example":10}},"required":["asset","exchange","leverage"],"title":"SetLeverage"},"SetMarginModeBodyDto":{"type":"object","properties":{"asset":{"type":"string","minLength":1,"description":"Asset identifier: base symbol (e.g. \"ETH\") or full pair (e.g. \"ETHUSDC\").","example":"ETH"},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},"marginMode":{"type":"string","enum":["cross","isolated"],"description":"Margin mode to set: cross uses shared account balance, isolated locks a fixed margin per position"}},"required":["asset","exchange","marginMode"],"title":"SetMarginMode"},"ExecuteApproveBrokerBodyDto":{"oneOf":[{"$ref":"#/components/schemas/ExecuteAsterApproveBrokerBodyDto"},{"$ref":"#/components/schemas/ExecuteHyperliquidApproveBrokerBodyDto"},{"$ref":"#/components/schemas/ExecuteLighterApproveBrokerBodyDto"},{"$ref":"#/components/schemas/ExecuteRobinhoodApproveBrokerBodyDto"}],"title":"ExecuteApproveBrokerBody","type":"object","discriminator":{"propertyName":"exchange","mapping":{"aster":"#/components/schemas/ExecuteAsterApproveBrokerBodyDto","hyperliquid":"#/components/schemas/ExecuteHyperliquidApproveBrokerBodyDto","lighter":"#/components/schemas/ExecuteLighterApproveBrokerBodyDto","robinhood":"#/components/schemas/ExecuteRobinhoodApproveBrokerBodyDto"}}},"ExecuteAsterApproveBrokerBodyDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["aster"]},"pendingData":{"type":"object","properties":{"asterChain":{"type":"string","description":"Aster chain identifier (e.g. \"Mainnet\")."},"builder":{"type":"string","description":"Builder (broker) EVM address, lowercased."},"builderName":{"type":"string","description":"Human-readable builder name (may be empty)."},"maxFeeRate":{"type":"string","description":"Maximum fee rate the builder may charge, as a decimal string (e.g. \"0.0015\")."},"nonce":{"type":"number","description":"Nonce (timestamp in microseconds) used for replay protection."},"user":{"type":"string","description":"Aster master user address."}},"required":["asterChain","builder","builderName","maxFeeRate","nonce","user"],"title":"AsterApproveBrokerPendingData","description":"The pendingData payload returned by POST /exchange/broker/prepare for Aster."},"signature":{"type":"string","description":"Signature produced by the Aster master wallet over the EIP-712 signData from prepare.","example":"0xabcdef..."}},"required":["exchange","pendingData","signature"],"title":"ExecuteAsterApproveBrokerBody"},"ExecuteHyperliquidApproveBrokerBodyDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["hyperliquid"]},"pendingData":{"type":"object","properties":{"action":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Json"},"description":"Hyperliquid approveBuilderFee action to be replayed in the execute step."},"nonce":{"type":"number","description":"Nonce (timestamp in ms) used for replay protection."}},"required":["action","nonce"],"title":"HyperliquidApproveBrokerPendingData","description":"The pendingData payload returned by POST /exchange/broker/prepare for Hyperliquid."},"signature":{"type":"string","description":"Signature produced by the main wallet over the EIP-712 signData from prepare.","example":"0xabcdef..."}},"required":["exchange","pendingData","signature"],"title":"ExecuteHyperliquidApproveBrokerBody"},"Json":{"description":"Any JSON value","title":"Json","anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/Json"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Json"}}]},"ExecuteLighterApproveBrokerBodyDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["lighter"]},"pendingData":{"type":"object","properties":{"txInfo":{"type":"string","description":"Serialized transaction info."},"txType":{"type":"number","description":"Transaction type identifier."}},"required":["txInfo","txType"],"title":"LighterApproveBrokerPendingData","description":"The pendingData payload returned by POST /exchange/broker/prepare for Lighter."},"signature":{"type":"string","description":"Signature produced by the Ethereum wallet over the hex message signData from prepare.","example":"0xabcdef..."}},"required":["exchange","pendingData","signature"],"title":"ExecuteLighterApproveBrokerBody"},"ExecuteRobinhoodApproveBrokerBodyDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["robinhood"]},"pendingData":{"type":"object","properties":{"txInfo":{"type":"string","description":"Serialized transaction info."},"txType":{"type":"number","description":"Transaction type identifier."}},"required":["txInfo","txType"],"title":"LighterApproveBrokerPendingData","description":"The pendingData payload returned by POST /exchange/broker/prepare for Robinhood."},"signature":{"type":"string","description":"Signature produced by the Ethereum wallet over the hex message signData from prepare.","example":"0xabcdef..."}},"required":["exchange","pendingData","signature"],"title":"ExecuteRobinhoodApproveBrokerBody"},"ExecuteApproveBrokerResponseDto":{"type":"object","properties":{"status":{"type":"string","description":"Approval status","example":"ok","enum":["ok"]}},"required":["status"],"title":"ExecuteApproveBrokerResponse"},"BrokerApprovedResponseDto":{"type":"object","properties":{"approvedMaxFees":{"description":"Builder fee (in basis points) currently approved on the exchange for the configured broker, or null when no broker is configured or nothing is approved.","type":["string","null"]},"brokerMaxFees":{"description":"Builder fee (in basis points) configured for this user in the brokerExchange table, or null when no broker is configured.","type":["string","null"]}},"required":["approvedMaxFees","brokerMaxFees"],"title":"BrokerApprovedResponse"},"PrepareApproveBrokerBodyDto":{"oneOf":[{"type":"object","properties":{"identifier":{"type":"string","description":"Builder Ethereum address. Omit if your account is registered through a broker — the configured builder address is used automatically. If provided alongside a configured broker, it must match exactly.","example":"0x1234567890abcdef1234567890abcdef12345678"},"maxFeeBps":{"description":"Builder fee in basis points. Omit if your account is registered through a broker — the configured fee is used automatically. If provided alongside a configured broker, it must match exactly.","example":"1.5","type":"string","pattern":"^\\d+(\\.\\d+)?$"},"exchange":{"type":"string","enum":["aster"]}},"required":["exchange"],"title":"PrepareAsterApproveBrokerBody"},{"type":"object","properties":{"identifier":{"type":"string","description":"Builder Ethereum address. Omit if your account is registered through a broker — the configured builder address is used automatically. If provided alongside a configured broker, it must match exactly.","example":"0x1234567890abcdef1234567890abcdef12345678"},"maxFeeBps":{"description":"Builder fee in basis points. Omit if your account is registered through a broker — the configured fee is used automatically. If provided alongside a configured broker, it must match exactly.","example":"1.5","type":"string","pattern":"^\\d+(\\.\\d+)?$"},"exchange":{"type":"string","enum":["hyperliquid"]}},"required":["exchange"],"title":"PrepareHyperliquidApproveBrokerBody"},{"type":"object","properties":{"exchange":{"type":"string","enum":["lighter"]},"identifier":{"type":"string","pattern":"^\\d+$","example":"42","description":"Integrator account index. Omit if your account is registered through a broker — the configured integrator index is used automatically. If provided alongside a configured broker, it must match exactly."},"maxFeeBps":{"description":"Builder fee in basis points. Omit if your account is registered through a broker — the configured fee is used automatically. If provided alongside a configured broker, it must match exactly.","example":"2","type":"string","pattern":"^[1-9]\\d*$"}},"required":["exchange"],"title":"PrepareLighterApproveBrokerBody"},{"type":"object","properties":{"exchange":{"type":"string","enum":["robinhood"]},"identifier":{"type":"string","pattern":"^\\d+$","example":"42","description":"Integrator account index. Omit if your account is registered through a broker — the configured integrator index is used automatically. If provided alongside a configured broker, it must match exactly."},"maxFeeBps":{"description":"Builder fee in basis points. Omit if your account is registered through a broker — the configured fee is used automatically. If provided alongside a configured broker, it must match exactly.","example":"2","type":"string","pattern":"^[1-9]\\d*$"}},"required":["exchange"],"title":"PrepareRobinhoodApproveBrokerBody"}],"title":"PrepareApproveBrokerBody","type":"object"},"PrepareHyperliquidApproveBrokerResponseDto":{"type":"object","properties":{"pendingData":{"type":"object","properties":{"action":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Json"},"description":"Hyperliquid approveBuilderFee action to be replayed in the execute step."},"nonce":{"type":"number","description":"Nonce (timestamp in ms) used for replay protection."}},"required":["action","nonce"],"title":"HyperliquidApproveBrokerPendingData","description":"Opaque payload to pass back to the execute endpoint."},"signData":{"type":"object","properties":{"domain":{"type":"object","properties":{"chainId":{"type":"number"},"name":{"type":"string"},"verifyingContract":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"version":{"type":"string"}},"required":["name","version"]},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}}},"required":["domain","message","primaryType","types"],"description":"EIP-712 typed data to sign with the main wallet."}},"required":["pendingData","signData"],"title":"PrepareHyperliquidApproveBrokerResponse"},"PrepareLighterApproveBrokerResponseDto":{"type":"object","properties":{"pendingData":{"type":"object","properties":{"txInfo":{"type":"string","description":"Serialized transaction info."},"txType":{"type":"number","description":"Transaction type identifier."}},"required":["txInfo","txType"],"title":"LighterApproveBrokerPendingData","description":"Opaque transaction data to pass back in execute step."},"signData":{"type":"string","description":"Hex message to sign with the Ethereum wallet."}},"required":["pendingData","signData"],"title":"PrepareLighterApproveBrokerResponse"},"PrepareAsterApproveBrokerResponseDto":{"type":"object","properties":{"pendingData":{"type":"object","properties":{"asterChain":{"type":"string","description":"Aster chain identifier (e.g. \"Mainnet\")."},"builder":{"type":"string","description":"Builder (broker) EVM address, lowercased."},"builderName":{"type":"string","description":"Human-readable builder name (may be empty)."},"maxFeeRate":{"type":"string","description":"Maximum fee rate the builder may charge, as a decimal string (e.g. \"0.0015\")."},"nonce":{"type":"number","description":"Nonce (timestamp in microseconds) used for replay protection."},"user":{"type":"string","description":"Aster master user address."}},"required":["asterChain","builder","builderName","maxFeeRate","nonce","user"],"title":"AsterApproveBrokerPendingData","description":"Opaque payload to pass back to the execute endpoint."},"signData":{"type":"object","properties":{"domain":{"type":"object","properties":{"chainId":{"type":"number"},"name":{"type":"string"},"verifyingContract":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"version":{"type":"string"}},"required":["name","version"]},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}}},"required":["domain","message","primaryType","types"],"description":"EIP-712 typed data to sign with the master wallet."}},"required":["pendingData","signData"],"title":"PrepareAsterApproveBrokerResponse"},"SignBybitAgreementBodyDto":{"type":"object","properties":{"asset":{"type":"string","minLength":1,"description":"The Bybit market whose agreement you are accepting; stocks, ETFs and metals share one agreement, crude oil has the other.","example":"CLUSDT"}},"required":["asset"],"title":"SignBybitAgreement"},"ExecuteHyperliquidSendAssetBodyDto":{"type":"object","properties":{"pendingData":{"type":"object","properties":{"action":{"type":"object","properties":{"amount":{"type":"string"},"destination":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"destinationDex":{"type":"string","enum":["","xyz","mkts","vntl","io"]},"fromSubAccount":{"anyOf":[{"type":"string","enum":[""]},{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"}]},"hyperliquidChain":{"type":"string","enum":["Mainnet"]},"nonce":{"type":"number"},"signatureChainId":{"type":"string","enum":["0xa4b1"]},"sourceDex":{"type":"string","enum":["","xyz","mkts","vntl","io"]},"token":{"type":"string"},"type":{"type":"string","enum":["sendAsset"]}},"required":["amount","destination","destinationDex","fromSubAccount","hyperliquidChain","nonce","signatureChainId","sourceDex","token","type"]},"destination":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"nonce":{"type":"number"}},"required":["action","destination","nonce"],"description":"The pendingData payload returned by the prepare step."},"signature":{"type":"string","description":"EIP-712 signature produced by the main wallet.","example":"0xabcdef..."}},"required":["pendingData","signature"],"title":"ExecuteHyperliquidSendAssetBody"},"ExecuteHyperliquidSetAbstractionBodyDto":{"type":"object","properties":{"pendingData":{"type":"object","properties":{"action":{"type":"object","properties":{"abstraction":{"type":"string","enum":["disabled","unifiedAccount","portfolioMargin","default","dexAbstraction"]},"hyperliquidChain":{"type":"string","enum":["Mainnet"]},"nonce":{"type":"number"},"signatureChainId":{"type":"string","enum":["0xa4b1"]},"type":{"type":"string","enum":["userSetAbstraction"]},"user":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"}},"required":["abstraction","hyperliquidChain","nonce","signatureChainId","type","user"]},"nonce":{"type":"number"}},"required":["action","nonce"],"description":"The pendingData payload returned by the prepare step."},"signature":{"type":"string","description":"EIP-712 signature produced by the main wallet.","example":"0xabcdef..."}},"required":["pendingData","signature"],"title":"ExecuteHyperliquidSetAbstractionBody"},"HyperliquidSettingsDto":{"type":"object","properties":{"abstractionMode":{"type":"string","enum":["disabled","unifiedAccount","portfolioMargin","default","dexAbstraction"],"description":"Your current Hyperliquid account abstraction mode: disabled (perps-only), unifiedAccount and portfolioMargin (spot+perp unified collateral), dexAbstraction (legacy), or default (mode not yet set)."}},"required":["abstractionMode"],"title":"HyperliquidSettings"},"PrepareHyperliquidSendAssetBodyDto":{"type":"object","properties":{"amount":{"type":"string","description":"Amount to send (decimal string, not in wei)."},"destination":{"type":"string","description":"Destination wallet address.","example":"0x1234567890abcdef1234567890abcdef12345678"},"destinationDex":{"type":"string","enum":["","xyz","mkts","vntl","io"],"description":"Destination perp DEX (\"\" for default USDC perp, \"xyz\" for trade.xyz)."},"fromSubAccount":{"default":"","description":"Source sub-account address (\"\" for the main account).","anyOf":[{"type":"string","enum":[""]},{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"}]},"sourceDex":{"type":"string","enum":["","xyz","mkts","vntl","io"],"description":"Source perp DEX (\"\" for default USDC perp, \"xyz\" for trade.xyz)."},"token":{"type":"string","description":"Token identifier."}},"required":["amount","destination","destinationDex","sourceDex","token"],"title":"PrepareHyperliquidSendAssetBody"},"PrepareHyperliquidSendAssetResponseDto":{"type":"object","properties":{"fee":{"type":"number","description":"Hyperliquid-side fee for the operation (always 0 for sendAsset)."},"pendingData":{"type":"object","properties":{"action":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Json"},"description":"Hyperliquid sendAsset action to be replayed in the execute step."},"destination":{"type":"string","description":"Destination address (lowercased)."},"nonce":{"type":"number","description":"Nonce (timestamp in ms) used for replay protection."}},"required":["action","destination","nonce"],"description":"Opaque payload to pass back to the execute endpoint."},"signData":{"type":"object","properties":{"domain":{"type":"object","properties":{"chainId":{"type":"number"},"name":{"type":"string"},"verifyingContract":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"version":{"type":"string"}},"required":["name","version"]},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}}},"required":["domain","message","primaryType","types"],"description":"EIP-712 typed data to sign with the main wallet."}},"required":["fee","pendingData","signData"],"title":"PrepareHyperliquidSendAssetResponse"},"PrepareHyperliquidSetAbstractionBodyDto":{"type":"object","properties":{"abstractionMode":{"type":"string","enum":["disabled","unifiedAccount","portfolioMargin","dexAbstraction"],"description":"Target Hyperliquid account abstraction mode to set: disabled (perps-only), unifiedAccount and portfolioMargin (spot+perp unified collateral), or dexAbstraction."}},"required":["abstractionMode"],"title":"PrepareHyperliquidSetAbstractionBody"},"PrepareHyperliquidSetAbstractionResponseDto":{"type":"object","properties":{"pendingData":{"type":"object","properties":{"action":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/Json"},"description":"Hyperliquid userSetAbstraction action to be replayed in execute step."},"nonce":{"type":"number","description":"Nonce (timestamp in ms) used for replay protection."}},"required":["action","nonce"],"description":"Opaque payload to pass back to the execute endpoint."},"signData":{"type":"object","properties":{"domain":{"type":"object","properties":{"chainId":{"type":"number"},"name":{"type":"string"},"verifyingContract":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"version":{"type":"string"}},"required":["name","version"]},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}}},"required":["domain","message","primaryType","types"],"description":"EIP-712 typed data to sign with the main wallet"}},"required":["pendingData","signData"],"title":"PrepareHyperliquidSetAbstractionResponse"},"HyperliquidStablecoinsSwapBodyDto":{"type":"object","properties":{"amount":{"type":"string","description":"Amount of tokenIn to swap, human-readable (e.g. \"10.3\")."},"tokenIn":{"type":"string","enum":["USDC","USDH"],"description":"Stablecoin to swap from."},"tokenOut":{"type":"string","enum":["USDC","USDH"],"description":"Stablecoin to receive."}},"required":["amount","tokenIn","tokenOut"],"title":"HyperliquidStablecoinsSwapBody"},"HyperliquidStablecoinsSwapResultDto":{"type":"object","properties":{"amountOut":{"type":"string","description":"Amount of tokenOut received."}},"required":["amountOut"],"title":"HyperliquidStablecoinsSwapResult"},"SetLighterAccountTierBodyDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["lighter","robinhood"],"description":"Which Lighter deployment to change the tier on"},"tier":{"type":"string","enum":["plus","premium","standard"],"description":"Tier to switch to: standard charges no fees, premium charges volume-tiered fees on Robinhood and stake-tiered fees on Lighter, and plus charges flat fees for higher rate limits and exists on Lighter only"}},"required":["exchange","tier"],"title":"SetLighterAccountTier"},"ExecuteRegistrationBodyDto":{"type":"object","properties":{"registrationToken":{"type":"string","description":"Opaque token received from the prepare endpoint"},"signatures":{"minItems":1,"type":"array","items":{"type":"string","description":"Hex-encoded string","example":"0xabcdef..."},"description":"Signatures of the signData items from the prepare response, in the same order"}},"required":["registrationToken","signatures"],"title":"ExecuteRegistrationBody"},"UserExchangeDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"valid":{"type":"boolean","description":"True if credentials are valid"}},"required":["exchange","valid"],"title":"UserExchange"},"IsRegisteredResponseDto":{"type":"object","properties":{"isRegistered":{"type":"boolean","description":"Whether the user has deposited on the exchange"}},"required":["isRegistered"],"title":"IsRegisteredResponse"},"PrepareRegistrationBody":{"type":"object","properties":{"address":{"type":"string","description":"User address","example":"0x1234567890abcdef1234567890abcdef12345678"},"agentExpiry":{"description":"Aster agent expiry timestamp (ms)","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"apiKeyIndex":{"description":"Lighter API key index","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"builderAddress":{"description":"Aster builder address signed off in the API agent approval. Defaults to the builder configured for your broker, or to a server-side constant when no broker is configured","type":"string","example":"0x1234567890abcdef1234567890abcdef12345678"},"builderName":{"description":"Aster builder display name. Defaults to a server-side constant when omitted","type":"string","minLength":1},"maxFeeBps":{"description":"Aster builder max fee cap in basis points. Defaults to the cap configured for your broker, or to 3 bps when no broker is configured","example":"3","type":"string","pattern":"^\\d+(\\.\\d+)?$"},"referralCode":{"description":"Referral code bound to the new account right after registration on aster, hyperliquid, lighter, robinhood, extended and ondo. The VOOI code is applied when you omit it","type":"string","minLength":1}},"required":["address"],"title":"PrepareRegistrationBody"},"AsterPrepareRegistrationResponseDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["aster"]},"registrationToken":{"type":"string","description":"Opaque token. Pass back unchanged in the execute request"},"signData":{"type":"array","prefixItems":[{"type":"object","properties":{"domain":{"type":"object","properties":{"chainId":{"type":"number"},"name":{"type":"string"},"verifyingContract":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"version":{"type":"string"}},"required":["name","version"]},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}}},"required":["domain","message","primaryType","types"]},{"type":"object","properties":{"domain":{"type":"object","properties":{"chainId":{"type":"number"},"name":{"type":"string"},"verifyingContract":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"version":{"type":"string"}},"required":["name","version"]},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}}},"required":["domain","message","primaryType","types"]}],"items":false,"minItems":2,"maxItems":2,"description":"Two EIP-712 messages to sign in order: [0] register and approve the VOOI API agent (registerAndApproveAgent), [1] approve the VOOI builder for order-time fee attribution."}},"required":["exchange","registrationToken","signData"],"title":"AsterPrepareRegistrationResponse"},"ExtendedPrepareRegistrationResponseDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["extended"]},"registrationToken":{"type":"string","description":"Opaque token. Pass back unchanged in the execute request"},"signData":{"type":"array","prefixItems":[{"type":"object","properties":{"domain":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"message":{"type":"object","properties":{"accountIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tosAccepted":{"type":"boolean"},"wallet":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"}},"required":["accountIndex","tosAccepted","wallet"]},"primaryType":{"type":"string","enum":["AccountCreation"]},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}}},"required":["domain","message","primaryType","types"],"description":"EIP-712 typed data to derive the Stark key pair from the wallet signature"},{"type":"object","properties":{"domain":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"message":{"type":"object","properties":{"accountIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"action":{"type":"string"},"host":{"type":"string"},"time":{"type":"string"},"tosAccepted":{"type":"boolean"},"wallet":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"}},"required":["accountIndex","action","host","time","tosAccepted","wallet"]},"primaryType":{"type":"string","enum":["AccountRegistration"]},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}}},"required":["domain","message","primaryType","types"],"description":"EIP-712 typed data sent as l1Signature on /auth/onboard"},{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["personalSign"]}},"required":["message","type"],"description":"Plain-text message to sign with personal_sign for the api-key creation call"}],"items":false,"minItems":3,"maxItems":3,"description":"Three messages to sign in order: [0] EIP-712 AccountCreation (used to derive Stark keys), [1] EIP-712 AccountRegistration (sent as l1Signature on /auth/onboard), [2] personal_sign payload for the API-key creation call."}},"required":["exchange","registrationToken","signData"],"title":"ExtendedPrepareRegistrationResponse"},"HyperliquidPrepareRegistrationResponseDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["hyperliquid"]},"registrationToken":{"type":"string","description":"Opaque token. Pass back unchanged in the execute request"},"signData":{"type":"object","properties":{"domain":{"type":"object","properties":{"chainId":{"type":"number"},"name":{"type":"string"},"verifyingContract":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"version":{"type":"string"}},"required":["name","version"]},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}}},"required":["domain","message","primaryType","types"],"description":"EIP-712 typed data to sign with your wallet"}},"required":["exchange","registrationToken","signData"],"title":"HyperliquidPrepareRegistrationResponse"},"LighterPrepareRegistrationResponseDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["lighter"]},"registrationToken":{"type":"string","description":"Opaque token. Pass back unchanged in the execute request"},"signData":{"type":"string","description":"Plain-text message to sign with your wallet"}},"required":["exchange","registrationToken","signData"],"title":"LighterPrepareRegistrationResponse"},"OndoPrepareRegistrationResponseDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["ondo"]},"registrationToken":{"type":"string","description":"Opaque token. Pass back unchanged in the execute request"},"signData":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["personalSign"]}},"required":["message","type"],"description":"Sign-In-With-Ethereum message to sign with personal_sign; completing this login creates the Ondo account when needed and issues the API key"}},"required":["exchange","registrationToken","signData"],"title":"OndoPrepareRegistrationResponse"},"RobinhoodPrepareRegistrationResponseDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["robinhood"]},"registrationToken":{"type":"string","description":"Opaque token. Pass back unchanged in the execute request"},"signData":{"type":"string","description":"Plain-text message to sign with your wallet"}},"required":["exchange","registrationToken","signData"],"title":"RobinhoodPrepareRegistrationResponse"},"SetAsterUserExchangeBodyDto":{"type":"object","properties":{"privateKey":{"type":"string","description":"Signer wallet private key (hex)","example":"0xabcdef..."},"signer":{"type":"string","description":"API wallet address","example":"0x1234567890abcdef1234567890abcdef12345678"},"user":{"type":"string","description":"Main wallet address","example":"0x1234567890abcdef1234567890abcdef12345678"}},"required":["privateKey","signer","user"],"title":"AsterUserExchange"},"SetBinanceUserExchangeBodyDto":{"type":"object","properties":{"apiKey":{"type":"string","minLength":1,"description":"Binance API key"},"apiSecret":{"type":"string","minLength":1,"description":"Binance API secret"}},"required":["apiKey","apiSecret"],"title":"BinanceUserExchange"},"SetBybitUserExchangeBodyDto":{"type":"object","properties":{"apiKey":{"type":"string","minLength":1,"description":"Bybit API key"},"apiSecret":{"type":"string","minLength":1,"description":"Bybit API secret"}},"required":["apiKey","apiSecret"],"title":"BybitUserExchange"},"SetExtendedUserExchangeBodyDto":{"type":"object","properties":{"accountId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Extended account ID"},"apiKey":{"type":"string","minLength":1,"description":"Extended API key"},"l2PrivateKey":{"type":"string","description":"Stark L2 private key (hex)","example":"0xabcdef..."},"l2PublicKey":{"type":"string","description":"Stark L2 public key (hex)","example":"0xabcdef..."},"vaultId":{"type":"string","pattern":"^[1-9]\\d*$","description":"Extended vault ID"}},"required":["accountId","apiKey","l2PrivateKey","l2PublicKey","vaultId"],"title":"ExtendedUserExchange"},"SetGateUserExchangeBodyDto":{"type":"object","properties":{"apiKey":{"type":"string","minLength":1,"description":"Gate API key"},"apiSecret":{"type":"string","minLength":1,"description":"Gate API secret"}},"required":["apiKey","apiSecret"],"title":"GateUserExchange"},"SetHyperliquidUserExchangeBodyDto":{"type":"object","properties":{"apiWalletPrivateKey":{"type":"string","description":"Hex-encoded string","example":"0xabcdef..."},"userAddress":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"}},"required":["apiWalletPrivateKey","userAddress"],"title":"HyperliquidUserExchange"},"SetLighterUserExchangeBodyDto":{"type":"object","properties":{"accountIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"apiKeyIndex":{"type":"integer","minimum":0,"maximum":255},"privateKey":{"type":"string"}},"required":["accountIndex","apiKeyIndex","privateKey"],"title":"LighterUserExchange"},"SetMexcUserExchangeBodyDto":{"type":"object","properties":{"apiKey":{"type":"string","minLength":1,"description":"MEXC API key"},"apiSecret":{"type":"string","minLength":1,"description":"MEXC API secret"}},"required":["apiKey","apiSecret"],"title":"MexcUserExchange"},"SetOndoUserExchangeBodyDto":{"type":"object","properties":{"apiKeyId":{"type":"string","minLength":1,"description":"Ondo API key id"},"apiSecret":{"type":"string","minLength":1,"description":"Ondo API secret"}},"required":["apiKeyId","apiSecret"],"title":"OndoUserExchange"},"SetRobinhoodUserExchangeBodyDto":{"type":"object","properties":{"accountIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"apiKeyIndex":{"type":"integer","minimum":0,"maximum":255},"privateKey":{"type":"string"}},"required":["accountIndex","apiKeyIndex","privateKey"],"title":"RobinhoodUserExchange"},"SyncExchangeAccountIdsResultDto":{"type":"object","properties":{"failed":{"type":"array","items":{"type":"object","properties":{"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Perpetual exchange"},"userId":{"type":"string","description":"VOOI user id"},"error":{"type":"string","description":"Error message returned by the exchange"}},"required":["exchange","userId","error"]},"description":"Connections whose exchange account id request failed"},"synced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of connections that received an exchange account id in this run"}},"required":["failed","synced"],"title":"SyncExchangeAccountIdsResult"},"ExtendedPointsSeasonDto":{"type":"object","properties":{"epochRewards":{"type":"array","items":{"type":"object","properties":{"endDate":{"type":"string","description":"Epoch end date in ISO 8601 format","example":"2026-04-27"},"epochId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Epoch identifier within the season","example":52},"pointsReward":{"type":"string","description":"Points earned during the epoch","example":"0.1"},"startDate":{"type":"string","description":"Epoch start date in ISO 8601 format","example":"2026-04-21"}},"required":["endDate","epochId","pointsReward","startDate"],"title":"ExtendedPointsEpoch"},"description":"Per-epoch point rewards within the season"},"seasonId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Season identifier","example":1}},"required":["epochRewards","seasonId"],"title":"ExtendedPointsSeason"},"ExtendedPointsStatsDto":{"type":"object","properties":{"liquidityRewardLeague":{"description":"League tier earned from liquidity provision; null when not yet ranked in this category","anyOf":[{"type":"string","enum":["KING","KNIGHT","PAWN","QUEEN","ROOK"],"description":"Reward league tier, from KING (highest) down through QUEEN, ROOK, KNIGHT to PAWN","example":"PAWN"},{"type":"null"}]},"rank":{"description":"Overall leaderboard rank across all participants; null when not yet ranked","example":42290,"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"referralRewardLeague":{"description":"League tier earned from referrals; null when not yet ranked in this category","anyOf":[{"type":"string","enum":["KING","KNIGHT","PAWN","QUEEN","ROOK"],"description":"Reward league tier, from KING (highest) down through QUEEN, ROOK, KNIGHT to PAWN","example":"PAWN"},{"type":"null"}]},"totalPoints":{"type":"string","description":"Total points earned across all seasons and epochs","example":"0.1"},"tradingRewardLeague":{"description":"League tier earned from trading activity; null when not yet ranked in this category","anyOf":[{"type":"string","enum":["KING","KNIGHT","PAWN","QUEEN","ROOK"],"description":"Reward league tier, from KING (highest) down through QUEEN, ROOK, KNIGHT to PAWN","example":"PAWN"},{"type":"null"}]}},"required":["totalPoints"],"title":"ExtendedPointsStats"},"UseReferralCodeBodyDto":{"type":"object","properties":{"code":{"type":"string","minLength":1,"description":"Referral code to apply to the Extended account","example":"VOOI"}},"required":["code"],"title":"ExtendedUseReferralCodeBody"},"UseReferralCodeResponseDto":{"type":"object","properties":{"status":{"type":"string","description":"Referral code application status","example":"ok","enum":["ok"]}},"required":["status"],"title":"ExtendedUseReferralCodeResponse"},"EnableKinetiqBodyDto":{"type":"object","properties":{"signature":{"type":"string","description":"Wallet signature (personal_sign) of the message \"kPoints account verification\", signed by your Hyperliquid wallet","example":"0xabcdef..."}},"required":["signature"],"title":"EnableKinetiqBody"},"KinetiqAccountDto":{"type":"object","properties":{"address":{"type":"string","description":"Wallet address linked to your Kinetiq kPoints"}},"required":["address"],"title":"KinetiqAccount"},"KinetiqPointsDto":{"type":"object","properties":{"address":{"type":"string","description":"Wallet address the kPoints belong to","example":"0x1234567890abcdef1234567890abcdef12345678"},"points":{"type":"number","description":"Current kPoints balance for the address"},"rank":{"description":"Leaderboard rank for the address; absent when the address has no points","type":["number","null"]},"tier":{"type":"string","description":"Current kPoints reward tier (e.g. \"Silver\")"}},"required":["address","points","tier"],"title":"KinetiqPoints"},"KinetiqStatusDto":{"type":"object","properties":{"address":{"description":"Wallet address linked to your Kinetiq kPoints, or null when not enabled","type":["string","null"]},"enabled":{"type":"boolean","description":"Whether you have enabled Kinetiq kPoints"}},"required":["address","enabled"],"title":"KinetiqStatus"},"ExecuteTransferBodyDto":{"type":"object","properties":{"quoteSignature":{"description":"Signed quoteDataToSign from the prepare step. Required on every transfer, including same-address ones; omitting it returns 400.","type":"string","example":"0xabcdef..."},"transferId":{"type":"string","description":"Pending transfer identifier from prepare step"},"transferSignature":{"type":"string","description":"Signed transfer message from the user","example":"0xabcdef..."}},"required":["transferId","transferSignature"]},"ExecuteTransferResponseDto":{"type":"object","properties":{"txHash":{"description":"Transaction hash of the executed transfer","type":"string"}},"title":"ExecuteTransferResponse"},"GetTransferHistoryResponseDto":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"string","description":"Transfer asset, e.g. USDC"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"Transfer creation timestamp"},"dest":{"anyOf":[{"type":"string","enum":["hyperliquid","lighter","arbitrum"]},{"type":"null"}],"description":"Destination network or exchange"},"destAmount":{"description":"Amount received at destination after all fees","type":["string","null"]},"destinationHash":{"description":"Destination transaction hash","type":["string","null"]},"executionTime":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Seconds elapsed from source to destination, null until paid"},"fee":{"description":"Total transfer fee in USDC (exchange fees + routing fee)","type":["string","null"]},"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Transfer ID"},"source":{"type":"string","enum":["hyperliquid","lighter","arbitrum"],"description":"Source network or exchange"},"sourceAmount":{"type":"string","description":"Total amount sent from source including exchange fees"},"sourceHash":{"description":"Source transaction hash","type":["string","null"]},"status":{"type":"string","enum":["created","pending","sent","paid","confirmed","failed","refunded"],"description":"Transfer status"}},"required":["asset","createdAt","dest","destAmount","destinationHash","executionTime","fee","id","source","sourceAmount","sourceHash","status"],"title":"MarginTransfer"},"description":"List of margin transfers"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of transfers"}},"required":["items","total"],"title":"GetTransferHistoryResponse"},"GetTransferStatusResponseDto":{"type":"object","properties":{"asset":{"type":"string","description":"Transfer asset, e.g. USDC"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"Transfer creation timestamp"},"dest":{"anyOf":[{"type":"string","enum":["hyperliquid","lighter","arbitrum"]},{"type":"null"}],"description":"Destination network or exchange"},"destAmount":{"description":"Amount received at destination after all fees, null until the bridge confirms","type":["string","null"]},"destinationHash":{"description":"Destination transaction hash once available","type":["string","null"]},"executionTime":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Seconds elapsed from source to destination, null until paid"},"fee":{"description":"Total transfer fee in USDC (exchange fees + routing fee)","type":["string","null"]},"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Transfer ID"},"source":{"type":"string","enum":["hyperliquid","lighter","arbitrum"],"description":"Source network or exchange"},"sourceAmount":{"type":"string","description":"Total amount sent from source including exchange fees"},"sourceHash":{"description":"Source transaction hash","type":["string","null"]},"status":{"type":"string","enum":["created","pending","sent","paid","confirmed","failed","refunded"],"description":"Transfer status"}},"required":["asset","createdAt","dest","destAmount","destinationHash","executionTime","fee","id","source","sourceAmount","sourceHash","status"],"title":"GetTransferStatusResponse"},"ArbitrumTransferBodyDto":{"type":"object","properties":{"address":{"type":"string","description":"Wallet address to deposit from","example":"0x1234567890abcdef1234567890abcdef12345678"},"amount":{"type":"string","description":"Amount to transfer"},"exchange":{"type":"string","enum":["hyperliquid","lighter"],"description":"Destination exchange"}},"required":["address","amount","exchange"]},"ArbitrumTransferResponseDto":{"type":"object","properties":{"calldata":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"data":{"type":"string","description":"Hex-encoded string","example":"0xabcdef..."},"to":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"}},"required":["chainId","data","to"],"description":"Transaction calldata for on-chain execution"},"fee":{"type":"number","description":"Transfer fee amount"},"transferId":{"type":"string","description":"Pending transfer identifier"}},"required":["calldata","fee","transferId"],"title":"ArbitrumTransferData"},"PrepareTransferBodyDto":{"type":"object","properties":{"address":{"description":"Custom recipient address on the destination exchange","type":"string","example":"0x1234567890abcdef1234567890abcdef12345678"},"amount":{"type":"string","description":"Amount to transfer"},"dest":{"type":"string","enum":["hyperliquid","lighter","arbitrum"],"description":"Destination exchange"},"source":{"type":"string","enum":["hyperliquid","lighter"],"description":"Source exchange"}},"required":["amount","dest","source"]},"HyperliquidTransferResponseDto":{"type":"object","properties":{"exchangeFee":{"type":"number","description":"Exchange-specific fee (included in total fee)"},"fee":{"type":"number","description":"Transfer fee amount"},"quoteDataToSign":{"type":"object","properties":{"domain":{"type":"object","properties":{"chainId":{"type":"number"},"name":{"type":"string"},"verifyingContract":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"version":{"type":"string"}},"required":["name","version"]},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}}},"required":["domain","message","primaryType","types"],"description":"EIP-712 typed data authorizing the bridge quote on the destination exchange. Always returned, including same-address transfers; sign it and pass the result back as quoteSignature on execute."},"source":{"type":"string","enum":["hyperliquid"]},"transferDataToSign":{"type":"object","properties":{"domain":{"type":"object","properties":{"chainId":{"type":"number"},"name":{"type":"string"},"verifyingContract":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"version":{"type":"string"}},"required":["name","version"]},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}}},"required":["domain","message","primaryType","types"],"description":"EIP-712 typed data to sign for the transfer"},"transferId":{"type":"string","description":"Pending transfer identifier"}},"required":["exchangeFee","fee","quoteDataToSign","source","transferDataToSign","transferId"],"title":"HyperliquidTransferData"},"LighterTransferResponseDto":{"type":"object","properties":{"exchangeFee":{"type":"number","description":"Exchange-specific fee (included in total fee)"},"fee":{"type":"number","description":"Transfer fee amount"},"quoteDataToSign":{"type":"object","properties":{"domain":{"type":"object","properties":{"chainId":{"type":"number"},"name":{"type":"string"},"verifyingContract":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"version":{"type":"string"}},"required":["name","version"]},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}}},"required":["domain","message","primaryType","types"],"description":"EIP-712 typed data authorizing the bridge quote on the destination exchange. Always returned, including same-address transfers; sign it and pass the result back as quoteSignature on execute."},"source":{"type":"string","enum":["lighter"]},"transferDataToSign":{"type":"string","description":"EIP-712 typed data to sign for the transfer"},"transferId":{"type":"string","description":"Pending transfer identifier"}},"required":["exchangeFee","fee","quoteDataToSign","source","transferDataToSign","transferId"],"title":"LighterTransferData"},"ExecuteWithdrawBodyDto":{"type":"object","properties":{"address":{"type":"string","description":"Wallet address executing the withdraw","example":"0x1234567890abcdef1234567890abcdef12345678"},"signature":{"type":"string","description":"L1 wallet signature over signData; \"0x\" when prepare returned signData: null","example":"0xabcdef..."},"withdrawId":{"type":"string","description":"Pending withdraw identifier from prepare step"}},"required":["address","signature","withdrawId"],"title":"ExecuteWithdrawBody"},"PrepareWithdrawBodyDto":{"type":"object","properties":{"address":{"type":"string","description":"Wallet address to withdraw to","example":"0x1234567890abcdef1234567890abcdef12345678"},"amount":{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Amount to withdraw","example":"0.001"},"chainId":{"description":"Target chain ID for withdraw (Aster and Ondo only, defaults to 42161 Arbitrum)","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"exchange":{"type":"string","enum":["aster","binance","bybit","extended","gate","hyperliquid","lighter","mexc","ondo","robinhood"],"description":"Supported perpetual exchange"},"symbol":{"description":"Token symbol to withdraw (Aster only, defaults to USDC)","type":"string","enum":["USDC","USDT","USDC.e","USD1","USDF","lisUSD"]}},"required":["address","amount","exchange"],"title":"PrepareWithdrawBody"},"AsterWithdrawResponseDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["aster"]},"fee":{"type":"number","description":"Withdraw fee amount"},"signData":{"type":"object","properties":{"domain":{"type":"object","properties":{"chainId":{"type":"number"},"name":{"type":"string"},"verifyingContract":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"version":{"type":"string"}},"required":["name","version"]},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}}},"required":["domain","message","primaryType","types"],"description":"EIP-712 typed data to sign"},"withdrawId":{"type":"string","description":"Pending withdraw identifier"},"withdrawLimit":{"type":"string","description":"Maximum withdraw amount"}},"required":["exchange","fee","signData","withdrawId","withdrawLimit"],"title":"AsterWithdrawData"},"HyperliquidWithdrawResponseDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["hyperliquid"]},"fee":{"type":"number","description":"Withdraw fee amount"},"signData":{"type":"object","properties":{"domain":{"type":"object","properties":{"chainId":{"type":"number"},"name":{"type":"string"},"verifyingContract":{"type":"string","description":"Ethereum address","example":"0x1234567890abcdef1234567890abcdef12345678"},"version":{"type":"string"}},"required":["name","version"]},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}}}},"required":["domain","message","primaryType","types"],"description":"EIP-712 typed data to sign"},"withdrawId":{"type":"string","description":"Pending withdraw identifier"},"withdrawLimit":{"type":"string","description":"Maximum withdraw amount"}},"required":["exchange","fee","signData","withdrawId","withdrawLimit"],"title":"HyperliquidWithdrawData"},"LighterWithdrawResponseDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["lighter"]},"fee":{"type":"number","description":"Withdraw fee amount"},"signData":{"type":"string","description":"Message that needs to be signed by the user"},"withdrawId":{"type":"string","description":"Pending withdraw identifier"},"withdrawLimit":{"type":"string","description":"Maximum fast withdraw amount"}},"required":["exchange","fee","signData","withdrawId","withdrawLimit"],"title":"LighterWithdrawData"},"OndoWithdrawResponseDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["ondo"]},"fee":{"type":"number","description":"Withdraw fee amount in USD"},"signData":{"type":"null","description":"Always null: the address is already whitelisted in the Ondo address book, so nothing needs signing. Call execute with signature \"0x\""},"withdrawId":{"type":"string","description":"Pending withdraw identifier"},"withdrawLimit":{"type":"string","description":"Maximum withdraw amount: the withdrawable margin minus the fee, which Ondo debits on top of the amount, capped by the remaining period limit"}},"required":["exchange","fee","signData","withdrawId","withdrawLimit"],"title":"OndoWithdrawData"},"RobinhoodWithdrawResponseDto":{"type":"object","properties":{"exchange":{"type":"string","enum":["robinhood"]},"fee":{"type":"number","description":"Withdraw fee amount"},"signData":{"type":"string","description":"Message that needs to be signed by the user"},"withdrawId":{"type":"string","description":"Pending withdraw identifier"},"withdrawLimit":{"type":"string","description":"Maximum fast withdraw amount"}},"required":["exchange","fee","signData","withdrawId","withdrawLimit"],"title":"RobinhoodWithdrawData"},"ExecuteExtendedWithdrawBodyDto":{"type":"object","properties":{"amount":{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Withdrawal amount from the quote step","example":"5.0"},"chainId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Target EVM chain ID from the quote step","example":42161},"quoteId":{"type":"string","description":"Bridge quote identifier from the quote step"}},"required":["amount","chainId","quoteId"],"title":"ExecuteExtendedWithdrawBody"},"ExecuteExtendedWithdrawResponseDto":{"type":"object","properties":{"quoteId":{"type":"string","description":"Bridge quote identifier that was executed"}},"required":["quoteId"],"title":"ExecuteExtendedWithdrawResponse"},"QuoteExtendedWithdrawBodyDto":{"type":"object","properties":{"amount":{"type":"string","pattern":"\\d+(\\.\\d+)?","description":"Amount to withdraw","example":"5.0"},"chainId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Target EVM chain ID","example":42161}},"required":["amount","chainId"],"title":"QuoteExtendedWithdrawBody"},"QuoteExtendedWithdrawResponseDto":{"type":"object","properties":{"fee":{"description":"Bridge fee deducted from the withdrawal amount, in the same units as amount","example":"0.1","type":"string"},"quoteId":{"type":"string","description":"Bridge quote identifier to echo back to execute"},"withdrawLimit":{"type":"string","description":"Account balance available for withdrawal; the Rhino bridge may impose a stricter per-chain minimum or maximum"}},"required":["quoteId","withdrawLimit"],"title":"QuoteExtendedWithdrawResponse"},"OndoPointsDto":{"type":"object","properties":{"alphaStratPoints":{"type":"number","description":"Points earned in the points program","example":0},"bonusPoints":{"type":"number","description":"Bonus points granted by the venue","example":0},"marketBoostPoints":{"type":"number","description":"Points earned from boosted markets","example":0},"rank":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Leaderboard rank; -1 when the account is not ranked yet","example":7241},"referralPoints":{"type":"number","description":"Points earned from referrals","example":0},"totalPoints":{"type":"number","description":"Total points across every source","example":7},"tradingPoints":{"type":"number","description":"Points earned from trading volume","example":7},"updatedUnix":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds of the last leaderboard recomputation","example":1789466461},"username":{"type":"string","description":"Pseudonym the venue assigned to the account","example":"interesting-productive-pearl-7621"}},"required":["alphaStratPoints","bonusPoints","marketBoostPoints","rank","referralPoints","totalPoints","tradingPoints","updatedUnix","username"],"title":"OndoPoints"},"OndoRewardsTotalDto":{"type":"object","properties":{"totalRewards":{"type":"string","description":"Total USDC paid out to the account across every weekly reward payout","example":"0.212475"}},"required":["totalRewards"],"title":"OndoRewardsTotal"},"RobinhoodPointsDto":{"type":"object","properties":{"lastWeekPoints":{"type":"number","description":"Points earned during the last completed week","example":1250.5},"lastWeekReferralPoints":{"type":"number","description":"Points earned from referrals during the last completed week","example":125.05},"rank":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"All-time leaderboard rank; null when the account is not ranked yet","example":42},"totalPoints":{"type":"number","description":"Total points earned across the whole points program, updated in real time","example":18400.25},"totalReferralPoints":{"type":"number","description":"Total points earned from referrals across the whole points program","example":1840.02}},"required":["lastWeekPoints","lastWeekReferralPoints","rank","totalPoints","totalReferralPoints"],"title":"RobinhoodPoints"},"ServerTimeDto":{"type":"object","properties":{"timestamp":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Current server time as Unix timestamp in milliseconds.","example":1713072000000}},"required":["timestamp"],"title":"ServerTime"}}}}