{"protocolVersion":"2025-06-18","capabilities":{"tools":{"listChanged":false}},"agentGuidance":{"description":"General guidance for external AI agents using this MCP server. Read before selecting a project endpoint, requesting tool schemas, or calling protocol tools.","skillUrl":"https://erc8004.heyanon.ai/mcp/skill.md"},"serverInfo":{"name":"heyanon-erc8004-okx","version":"1.0.0"},"tools":[{"name":"getBalance","description":"Query for balance and get the amount of funds available for trading or funds locked in orders.","inputSchema":{"type":"object","properties":{},"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createSimpleSpotOrder","description":"Create a market or limit order. Only for spot markets.","inputSchema":{"type":"object","properties":{"tokenIn":{"type":"string","description":"Unified currency code."},"tokenOut":{"type":"string","description":"Unified currency code."},"type":{"type":"string","enum":["limit","market"],"description":"The type of order to create"},"amountIn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to trade in decimal format. Set to \"-1\" if you want to sell all the balance."},"amountOut":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to get after trading in decimal format."},"price":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Price at which the order is to be fulfilled, in units of the quote currency. Ignored for market orders."}},"required":["tokenIn","tokenOut","type","amountIn","amountOut","price"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createSimpleMarginOrder","description":"Create a market or limit order. Only for margin trading.","inputSchema":{"type":"object","properties":{"tokenIn":{"type":"string","description":"Unified currency code."},"tokenOut":{"type":"string","description":"Unified currency code."},"type":{"type":"string","enum":["limit","market"]},"amountIn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to trade in decimal format."},"amountOut":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to get after trading in decimal format."},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the order is to be fulfilled, in units of the quote currency. Ignored for market orders."},"marginMode":{"type":"string","enum":["isolated","cross"],"description":"Specifies the margin mode. Use \"isolated\" for isolated margin and \"cross\" for cross margin."},"reduceOnly":{"type":"boolean","description":"Whether orders can only reduce in position size. Default is false."}},"required":["tokenIn","tokenOut","type","amountIn","amountOut","price","marginMode","reduceOnly"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createSimpleFuturesOrder","description":"Create a market or limit order. Only for future/perpetual trading.","inputSchema":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"type":{"type":"string","enum":["limit","market"]},"action":{"type":"string","enum":["open","close"],"description":"To open or close position"},"side":{"type":"string","enum":["long","short"],"description":"Type of position."},"amount":{"type":"number","description":"Amount is the FINAL trade size after leverage (total notional to transact), not margin. Do NOT scale, prorate, or recalc it by leverage or price. User always provides the final size. You must pass it as-is using the correct \"amountCurrency\" value. amountCurrency: • BASE — the first currency of the market symbol (e.g., BTC in BTC/USDT). If the user gives a BASE amount, use it directly as the trade size in BASE. • QUOTE — the second currency of the market symbol (e.g., USDT in BTC/USDT). If the user gives a QUOTE amount, use it directly as the trade size in QUOTE notional. For QUOTE, USD / $ / USDT / USDC are treated the same (USD = USDT/USDC). Do NOT convert between BASE and QUOTE."},"amountCurrency":{"type":"string","enum":["BASE","QUOTE"],"description":"Specifies whether the amount is denominated in base currency or quote currency"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the order is to be fulfilled, in units of the quote currency. Ignored for market orders."},"marginMode":{"type":"string","enum":["isolated","cross"],"description":"Specifies the margin mode. Use \"isolated\" for isolated margin and \"cross\" for cross margin."}},"required":["token1","token2","type","action","side","amount","amountCurrency","price","marginMode"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createAdvancedLimitSpotOrder","description":"Create a limit order with advanced options. Only for spot markets","inputSchema":{"type":"object","properties":{"tokenIn":{"type":"string","description":"Unified currency code."},"tokenOut":{"type":"string","description":"Unified currency code."},"type":{"type":"string","enum":["ioc","fok","post_only"],"description":"Immediate or cancel (ioc), fill or kill (fok), post only."},"amountIn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to trade in decimal format. Set to \"-1\" if you want to sell all the balance."},"amountOut":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to get after trading in decimal format."},"price":{"type":"string","description":"Price at which the order is to be fulfilled, in units of the quote currency."}},"required":["tokenIn","tokenOut","type","amountIn","amountOut","price"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createAdvancedLimitMarginOrder","description":"Create a limit order with advanced options. Only for margin trading.","inputSchema":{"type":"object","properties":{"tokenIn":{"type":"string","description":"Unified currency code."},"tokenOut":{"type":"string","description":"Unified currency code."},"amountIn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to trade in decimal format."},"amountOut":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to get after trading in decimal format."},"type":{"type":"string","enum":["ioc","fok","post_only"]},"price":{"type":"number","description":"Price at which the order is to be fulfilled, in units of the quote currency."},"marginMode":{"type":"string","enum":["isolated","cross"],"description":"Specifies the margin mode. Use \"isolated\" for isolated margin and \"cross\" for cross margin."},"reduceOnly":{"type":"boolean","description":"Whether orders can only reduce in position size. Default is false."}},"required":["tokenIn","tokenOut","amountIn","amountOut","type","price","marginMode","reduceOnly"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createAdvancedLimitFuturesOrder","description":"Create a limit order with advanced options. Only for future/perpetual trading.","inputSchema":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"type":{"type":"string","enum":["ioc","fok","post_only"]},"action":{"type":"string","enum":["open","close"],"description":"To open or close position"},"side":{"type":"string","enum":["long","short"],"description":"Type of position."},"amount":{"type":"number","description":"Amount is the FINAL trade size after leverage (total notional to transact), not margin. Do NOT scale, prorate, or recalc it by leverage or price. User always provides the final size. You must pass it as-is using the correct \"amountCurrency\" value. amountCurrency: • BASE — the first currency of the market symbol (e.g., BTC in BTC/USDT). If the user gives a BASE amount, use it directly as the trade size in BASE. • QUOTE — the second currency of the market symbol (e.g., USDT in BTC/USDT). If the user gives a QUOTE amount, use it directly as the trade size in QUOTE notional. For QUOTE, USD / $ / USDT / USDC are treated the same (USD = USDT/USDC). Do NOT convert between BASE and QUOTE."},"amountCurrency":{"type":"string","enum":["BASE","QUOTE"],"description":"Specifies whether the amount is denominated in base currency or quote currency"},"price":{"type":"number"},"marginMode":{"type":"string","enum":["isolated","cross"],"description":"Specifies the margin mode. Use \"isolated\" for isolated margin and \"cross\" for cross margin."}},"required":["token1","token2","type","action","side","amount","amountCurrency","price","marginMode"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createTriggerSpotOrder","description":"Create a trigger order. Only for spot markets","inputSchema":{"type":"object","properties":{"tokenIn":{"type":"string","description":"Unified currency code."},"tokenOut":{"type":"string","description":"Unified currency code."},"amountIn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to trade in decimal format. Set to \"-1\" if you want to sell all the balance."},"amountOut":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to get after trading in decimal format."},"triggerPrice":{"type":"number","description":"The trigger price for the order, in units of the quote currency."},"limitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the order is to be fulfilled, in units of the quote currency. Ignored for market orders."}},"required":["tokenIn","tokenOut","amountIn","amountOut","triggerPrice","limitPrice"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createTriggerFuturesOrder","description":"Create a trigger order. Only for future/perpetual markets","inputSchema":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"action":{"type":"string","enum":["open","close"],"description":"To open or close position"},"side":{"type":"string","enum":["long","short"],"description":"Type of position."},"amount":{"type":"number","description":"Amount is the FINAL trade size after leverage (total notional to transact), not margin. Do NOT scale, prorate, or recalc it by leverage or price. User always provides the final size. You must pass it as-is using the correct \"amountCurrency\" value. amountCurrency: • BASE — the first currency of the market symbol (e.g., BTC in BTC/USDT). If the user gives a BASE amount, use it directly as the trade size in BASE. • QUOTE — the second currency of the market symbol (e.g., USDT in BTC/USDT). If the user gives a QUOTE amount, use it directly as the trade size in QUOTE notional. For QUOTE, USD / $ / USDT / USDC are treated the same (USD = USDT/USDC). Do NOT convert between BASE and QUOTE."},"amountCurrency":{"type":"string","enum":["BASE","QUOTE"],"description":"Specifies whether the amount is denominated in base currency or quote currency"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the order is to be fulfilled, in units of the quote currency. Ignored for market orders."},"triggerPrice":{"type":"number","description":"The trigger price for the order, in units of the quote currency."},"marginMode":{"type":"string","enum":["isolated","cross"],"description":"Specifies the margin mode. Use \"isolated\" for isolated margin and \"cross\" for cross margin."}},"required":["token1","token2","action","side","amount","amountCurrency","price","triggerPrice","marginMode"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createTakeProfitStopLossSpotOrder","description":"Create a take profit and/or stop loss order. Only for spot markets","inputSchema":{"type":"object","properties":{"tokenIn":{"type":"string","description":"Unified currency code."},"tokenOut":{"type":"string","description":"Unified currency code."},"amountIn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to trade in decimal format. Set to \"-1\" if you want to sell all the balance."},"amountOut":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to get after trading in decimal format."},"takeProfitPrice":{"description":"Price at which the take profit order is triggered. If not specified, no take profit is attached.","type":"number"},"takeProfitLimitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the take profit order is executed once triggered. Set to null for a market order. Ignored when takeProfitPrice is not specified."},"stopLossPrice":{"description":"Price at which the stop loss order is triggered. If not specified, no stop loss is attached.","type":"number"},"stopLossLimitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the stop loss order is executed once triggered. Set to null for a market order. Ignored when stopLossPrice is not specified."}},"required":["tokenIn","tokenOut","amountIn","amountOut","takeProfitLimitPrice","stopLossLimitPrice"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createTakeProfitStopLossMarginOrder","description":"Create a take profit and/or stop loss order. Only for margin trading.","inputSchema":{"type":"object","properties":{"tokenIn":{"type":"string","description":"Unified currency code."},"tokenOut":{"type":"string","description":"Unified currency code."},"amountIn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to trade in decimal format."},"amountOut":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to get after trading in decimal format."},"takeProfitPrice":{"description":"Price at which the take profit order is triggered. If not specified, no take profit is attached.","type":"number"},"takeProfitLimitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the take profit order is executed once triggered. Set to null for a market order. Ignored when takeProfitPrice is not specified."},"stopLossPrice":{"description":"Price at which the stop loss order is triggered. If not specified, no stop loss is attached.","type":"number"},"stopLossLimitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the stop loss order is executed once triggered. Set to null for a market order. Ignored when stopLossPrice is not specified."},"marginMode":{"type":"string","enum":["isolated","cross"],"description":"Specifies the margin mode. Use \"isolated\" for isolated margin and \"cross\" for cross margin."},"reduceOnly":{"type":"boolean","description":"Whether orders can only reduce in position size. Default is false."}},"required":["tokenIn","tokenOut","amountIn","amountOut","takeProfitLimitPrice","stopLossLimitPrice","marginMode","reduceOnly"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createTakeProfitStopLossFuturesOrder","description":"Create a take profit and/or stop loss order. Only for future/perpetual trading.","inputSchema":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"action":{"type":"string","enum":["open","close"],"description":"To open or close position"},"side":{"type":"string","enum":["long","short"],"description":"Type of position."},"amount":{"type":"number","description":"Amount is the FINAL trade size after leverage (total notional to transact), not margin. Do NOT scale, prorate, or recalc it by leverage or price. User always provides the final size. You must pass it as-is using the correct \"amountCurrency\" value. amountCurrency: • BASE — the first currency of the market symbol (e.g., BTC in BTC/USDT). If the user gives a BASE amount, use it directly as the trade size in BASE. • QUOTE — the second currency of the market symbol (e.g., USDT in BTC/USDT). If the user gives a QUOTE amount, use it directly as the trade size in QUOTE notional. For QUOTE, USD / $ / USDT / USDC are treated the same (USD = USDT/USDC). Do NOT convert between BASE and QUOTE."},"amountCurrency":{"type":"string","enum":["BASE","QUOTE"],"description":"Specifies whether the amount is denominated in base currency or quote currency"},"takeProfitPrice":{"description":"Price at which the take profit order is triggered. If not specified, no take profit is attached.","type":"number"},"takeProfitLimitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the take profit order is executed once triggered. Set to null for a market order. Ignored when takeProfitPrice is not specified."},"stopLossPrice":{"description":"Price at which the stop loss order is triggered. If not specified, no stop loss is attached.","type":"number"},"stopLossLimitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the stop loss order is executed once triggered. Set to null for a market order. Ignored when stopLossPrice is not specified."},"marginMode":{"type":"string","enum":["isolated","cross"],"description":"Specifies the margin mode. Use \"isolated\" for isolated margin and \"cross\" for cross margin."}},"required":["token1","token2","action","side","amount","amountCurrency","takeProfitLimitPrice","stopLossLimitPrice","marginMode"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createTrailingStopSpotOrder","description":"Create a trailing stop order. Only for spot markets","inputSchema":{"type":"object","properties":{"tokenIn":{"type":"string","description":"Unified currency code."},"tokenOut":{"type":"string","description":"Unified currency code."},"amountIn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to trade in decimal format. Set to \"-1\" if you want to sell all the balance."},"amountOut":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to get after trading in decimal format."},"activationPrice":{"description":"Price at which the trailing stop activates. Omit to activate immediately at order placement.","type":"number"},"trailingPercent":{"description":"Trailing distance as a percentage (e.g. 2 means 2%). Provide either trailingPercent or trailingConstant, not both.","type":"number"},"trailingConstant":{"description":"Trailing distance as an absolute price offset in quote currency. Provide either trailingPercent or trailingConstant, not both.","type":"number"}},"required":["tokenIn","tokenOut","amountIn","amountOut"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createTrailingStopMarginOrder","description":"Create a trailing stop order. Only for margin markets","inputSchema":{"type":"object","properties":{"tokenIn":{"type":"string","description":"Unified currency code."},"tokenOut":{"type":"string","description":"Unified currency code."},"amountIn":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to trade in decimal format."},"amountOut":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The amount of tokens to get after trading in decimal format."},"activationPrice":{"description":"Price at which the trailing stop activates. Omit to activate immediately at order placement.","type":"number"},"trailingPercent":{"description":"Trailing distance as a percentage (e.g. 2 means 2%). Provide either trailingPercent or trailingConstant, not both.","type":"number"},"trailingConstant":{"description":"Trailing distance as an absolute price offset in quote currency. Provide either trailingPercent or trailingConstant, not both.","type":"number"},"marginMode":{"type":"string","enum":["isolated","cross"],"description":"Specifies the margin mode. Use \"isolated\" for isolated margin and \"cross\" for cross margin."},"reduceOnly":{"type":"boolean","description":"Whether orders can only reduce in position size. Default is false."}},"required":["tokenIn","tokenOut","amountIn","amountOut","marginMode","reduceOnly"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createTrailingStopFuturesOrder","description":"Create a trailing stop order. Only for future/perpetual markets","inputSchema":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"action":{"type":"string","enum":["open","close"],"description":"To open or close position"},"side":{"type":"string","enum":["long","short"],"description":"Type of position."},"amount":{"type":"number","description":"Amount is the FINAL trade size after leverage (total notional to transact), not margin. Do NOT scale, prorate, or recalc it by leverage or price. User always provides the final size. You must pass it as-is using the correct \"amountCurrency\" value. amountCurrency: • BASE — the first currency of the market symbol (e.g., BTC in BTC/USDT). If the user gives a BASE amount, use it directly as the trade size in BASE. • QUOTE — the second currency of the market symbol (e.g., USDT in BTC/USDT). If the user gives a QUOTE amount, use it directly as the trade size in QUOTE notional. For QUOTE, USD / $ / USDT / USDC are treated the same (USD = USDT/USDC). Do NOT convert between BASE and QUOTE."},"amountCurrency":{"type":"string","enum":["BASE","QUOTE"],"description":"Specifies whether the amount is denominated in base currency or quote currency"},"activationPrice":{"description":"Price at which the trailing stop activates. Omit to activate immediately at order placement.","type":"number"},"trailingPercent":{"description":"Trailing distance as a percentage (e.g. 2 means 2%). Provide either trailingPercent or trailingConstant, not both.","type":"number"},"trailingConstant":{"description":"Trailing distance as an absolute price offset in quote currency. Provide either trailingPercent or trailingConstant, not both.","type":"number"},"marginMode":{"type":"string","enum":["isolated","cross"],"description":"Specifies the margin mode. Use \"isolated\" for isolated margin and \"cross\" for cross margin."}},"required":["token1","token2","action","side","amount","amountCurrency","marginMode"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createChaseFuturesOrder","description":"Create a chase order. Only for future/perpetual markets","inputSchema":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"action":{"type":"string","enum":["open","close"],"description":"To open or close position"},"side":{"type":"string","enum":["long","short"],"description":"Type of position."},"amount":{"type":"number","description":"Amount is the FINAL trade size after leverage (total notional to transact), not margin. Do NOT scale, prorate, or recalc it by leverage or price. User always provides the final size. You must pass it as-is using the correct \"amountCurrency\" value. amountCurrency: • BASE — the first currency of the market symbol (e.g., BTC in BTC/USDT). If the user gives a BASE amount, use it directly as the trade size in BASE. • QUOTE — the second currency of the market symbol (e.g., USDT in BTC/USDT). If the user gives a QUOTE amount, use it directly as the trade size in QUOTE notional. For QUOTE, USD / $ / USDT / USDC are treated the same (USD = USDT/USDC). Do NOT convert between BASE and QUOTE."},"amountCurrency":{"type":"string","enum":["BASE","QUOTE"],"description":"Specifies whether the amount is denominated in base currency or quote currency"},"chaseType":{"type":"string","enum":["distance","ratio"]},"chaseVal":{"type":"number"},"maxChaseType":{"description":"Optional cap on the chase strategy. Must be provided together with maxChaseVal. Omit for no cap.","type":"string","enum":["distance","ratio"]},"maxChaseVal":{"description":"Value for the maxChaseType cap. Must be provided together with maxChaseType. Omit for no cap.","type":"number"},"marginMode":{"type":"string","enum":["isolated","cross"],"description":"Specifies the margin mode. Use \"isolated\" for isolated margin and \"cross\" for cross margin."}},"required":["token1","token2","action","side","amount","amountCurrency","chaseType","chaseVal","marginMode"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createTwapSpotOrder","description":"Create a twap order. Only for spot markets","inputSchema":{"type":"object","properties":{"tokenIn":{"type":"string","description":"Unified currency code."},"tokenOut":{"type":"string","description":"Unified currency code."},"totalAmount":{"type":"number","description":"Total order size across all TWAP slices. Units are controlled by amountCurrency."},"amountPerOrder":{"type":"number","description":"Size of each individual TWAP slice. Units are controlled by amountCurrency."},"amountCurrency":{"type":"string"},"priceVariancePercentage":{"description":"Maximum allowed percentage deviation from the reference price for each TWAP slice. Omit if no variance limit is desired.","type":"number"},"priceVarianceConstant":{"description":"Maximum allowed absolute deviation from the reference price for each TWAP slice, in quote currency. Omit if no variance limit is desired.","type":"number"},"limitPrice":{"type":"number"},"timeInterval":{"type":"number"}},"required":["tokenIn","tokenOut","totalAmount","amountPerOrder","amountCurrency","limitPrice","timeInterval"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createTwapMarginOrder","description":"Create a twap order. Only for margin markets","inputSchema":{"type":"object","properties":{"tokenIn":{"type":"string","description":"Unified currency code."},"tokenOut":{"type":"string","description":"Unified currency code."},"totalAmount":{"type":"number","description":"Total order size across all TWAP slices. Units are controlled by amountCurrency."},"amountPerOrder":{"type":"number","description":"Size of each individual TWAP slice. Units are controlled by amountCurrency."},"amountCurrency":{"type":"string"},"priceVariancePercentage":{"description":"Maximum allowed percentage deviation from the reference price for each TWAP slice. Omit if no variance limit is desired.","type":"number"},"priceVarianceConstant":{"description":"Maximum allowed absolute deviation from the reference price for each TWAP slice, in quote currency. Omit if no variance limit is desired.","type":"number"},"limitPrice":{"type":"number"},"timeInterval":{"type":"number"},"marginMode":{"type":"string","enum":["isolated","cross"],"description":"Specifies the margin mode. Use \"isolated\" for isolated margin and \"cross\" for cross margin."},"reduceOnly":{"type":"boolean","description":"Whether orders can only reduce in position size. Default is false."}},"required":["tokenIn","tokenOut","totalAmount","amountPerOrder","amountCurrency","limitPrice","timeInterval","marginMode","reduceOnly"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createTwapFuturesOrder","description":"Create a twap order. Only for future/perpetual markets","inputSchema":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"action":{"type":"string","enum":["open","close"],"description":"To open or close position"},"side":{"type":"string","enum":["long","short"],"description":"Type of position."},"totalAmount":{"type":"number","description":"Total order size across all TWAP slices. Units are controlled by amountCurrency."},"amountPerOrder":{"type":"number","description":"Size of each individual TWAP slice. Units are controlled by amountCurrency."},"amountCurrency":{"type":"string","enum":["BASE","QUOTE"],"description":"Specifies whether the amount is denominated in base currency or quote currency"},"priceVariancePercentage":{"description":"Maximum allowed percentage deviation from the reference price for each TWAP slice. Omit if no variance limit is desired.","type":"number"},"priceVarianceConstant":{"description":"Maximum allowed absolute deviation from the reference price for each TWAP slice, in quote currency. Omit if no variance limit is desired.","type":"number"},"limitPrice":{"type":"number"},"timeInterval":{"type":"number"},"marginMode":{"type":"string","enum":["isolated","cross"],"description":"Specifies the margin mode. Use \"isolated\" for isolated margin and \"cross\" for cross margin."}},"required":["token1","token2","action","side","totalAmount","amountPerOrder","amountCurrency","limitPrice","timeInterval","marginMode"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getOrdersById","description":"Get order details for multiple orders by their IDs.","inputSchema":{"type":"object","properties":{"orderIdsWithTokensAndType":{"type":"array","items":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"marketType":{"type":"string","enum":["spot","margin","futures"]},"orderId":{"type":"string"}},"required":["token1","token2","marketType","orderId"],"additionalProperties":false},"description":"Array of order IDs with their respective token and market information."}},"required":["orderIdsWithTokensAndType"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"cancelOrder","description":"Cancel order by order ID.","inputSchema":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"marketType":{"type":"string","enum":["spot","margin","futures"]},"orderId":{"type":"string"}},"required":["token1","token2","marketType","orderId"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"setPositionMode","description":"Set position mode.","inputSchema":{"type":"object","properties":{"hedged":{"type":"boolean","description":"Set true for hedge mode and false for one-way mode."}},"required":["hedged"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getPositionMode","description":"Get position mode.","inputSchema":{"type":"object","properties":{},"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getMarkets","description":"Query for multiple market information.","inputSchema":{"type":"object","properties":{"tokensWithType":{"type":"array","items":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"marketType":{"type":"string","enum":["spot","margin","futures"]}},"required":["token1","token2","marketType"],"additionalProperties":false}}},"required":["tokensWithType"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getTradingFees","description":"Query for trading fee information for multiple markets","inputSchema":{"type":"object","properties":{"tokensWithType":{"type":"array","items":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"marketType":{"type":"string","enum":["spot","margin","futures"]}},"required":["token1","token2","marketType"],"additionalProperties":false}}},"required":["tokensWithType"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getDepositWithdrawFees","description":"Query for deposit and withdraw fees for multiple currencies","inputSchema":{"type":"object","properties":{"codes":{"type":"array","items":{"type":"string"},"description":"Array of unified currency codes, e.g. [\"BTC\", \"USDT\"]"}},"required":["codes"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getDeposits","description":"Get all deposits made to an account for multiple currencies","inputSchema":{"type":"object","properties":{"codesWithLimit":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"limit":{"type":"number"}},"required":["code","limit"],"additionalProperties":false}}},"required":["codesWithLimit"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"withdraw","description":"Withdraw funds from an account. NEVER use \"common\" or \"transfer\" tools such as \"common-resolveTokenAddresses\" or \"transfer-getAddressWhitelist\" for this flow, because they are unrelated to CEX withdrawals.","inputSchema":{"type":"object","properties":{"code":{"type":"string"},"amount":{"type":"number"},"network":{"type":"string"},"address":{"type":"string"},"label":{"description":"Optional client-side label attached to the withdrawal. Omit if not needed.","type":"string"}},"required":["code","amount","network","address"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getWithdrawals","description":"Get all withdrawals made from an account for multiple currencies.","inputSchema":{"type":"object","properties":{"codesWithLimit":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"limit":{"type":"number"}},"required":["code","limit"],"additionalProperties":false}}},"required":["codesWithLimit"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getOrderBooks","description":"Gets information on open orders with bid and ask prices, volumes for multiple markets","inputSchema":{"type":"object","properties":{"tokensWithTypeAndLimit":{"type":"array","items":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"marketType":{"type":"string","enum":["spot","margin","futures"]},"limit":{"type":"number"}},"required":["token1","token2","marketType","limit"],"additionalProperties":false}}},"required":["tokensWithTypeAndLimit"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getTickers","description":"Get the tickers for multiple markets","inputSchema":{"type":"object","properties":{"tokensWithType":{"type":"array","items":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"marketType":{"type":"string","enum":["spot","margin","futures"]}},"required":["token1","token2","marketType"],"additionalProperties":false}}},"required":["tokensWithType"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getTransfers","description":"Get internal transfers on user account for multiple currencies","inputSchema":{"type":"object","properties":{"codesWithLimit":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"limit":{"type":"number"}},"required":["code","limit"],"additionalProperties":false}}},"required":["codesWithLimit"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"transfer","description":"Transfer funds between wallets on the same account","inputSchema":{"type":"object","properties":{"code":{"type":"string"},"amount":{"type":"number"},"fromAccount":{"type":"string","enum":["funding","trading"]},"toAccount":{"type":"string","enum":["funding","trading"]}},"required":["code","amount","fromAccount","toAccount"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getDepositAddresses","description":"Get deposit addresses for multiple currencies","inputSchema":{"type":"object","properties":{"codes":{"type":"array","items":{"type":"string"},"description":"Array of unified currency codes, e.g. [\"BTC\", \"USDT\"]"}},"required":["codes"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getFundingRates","description":"Get the current funding rates for multiple markets.","inputSchema":{"type":"object","properties":{"tokensWithType":{"type":"array","items":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"marketType":{"type":"string","enum":["margin","futures"]}},"required":["token1","token2","marketType"],"additionalProperties":false}}},"required":["tokensWithType"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getMarketsByCurrencyPair","description":"Get all markets for multiple currency pairs.","inputSchema":{"type":"object","properties":{"codePairs":{"type":"array","items":{"type":"object","properties":{"code1":{"type":"string"},"code2":{"type":"string"}},"required":["code1","code2"],"additionalProperties":false}}},"required":["codePairs"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getMarketSymbolsByCurrency","description":"Get all markets for multiple currencies.","inputSchema":{"type":"object","properties":{"codesWithPage":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"pageNumber":{"type":"number"}},"required":["code","pageNumber"],"additionalProperties":false}}},"required":["codesWithPage"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getLeverages","description":"Get the leverage for multiple markets.","inputSchema":{"type":"object","properties":{"tokensWithType":{"type":"array","items":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"marketType":{"type":"string","enum":["margin","futures"]}},"required":["token1","token2","marketType"],"additionalProperties":false}}},"required":["tokensWithType"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"setLeverage","description":"Set the leverage for a specific market.","inputSchema":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"marketType":{"type":"string","enum":["margin","futures"]},"leverage":{"type":"number"}},"required":["token1","token2","marketType","leverage"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getOrders","description":"Get cancelled, opened and closed orders for multiple order types and statuses.","inputSchema":{"type":"object","properties":{"orderTypesWithStatusAndLimit":{"type":"array","items":{"type":"object","properties":{"orderType":{"type":"string","enum":["limit/market","tp/sl","trailing","trigger","chase","twap"]},"orderStatus":{"type":"string","enum":["canceled","open","closed"]},"limit":{"type":"number"}},"required":["orderType","orderStatus","limit"],"additionalProperties":false}}},"required":["orderTypesWithStatusAndLimit"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getOpenOrders","description":"Get open orders for the trading account.","inputSchema":{"type":"object","properties":{"limit":{"description":"Maximum number of orders to return. Omit to use the default.","type":"number"}},"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getClosedOrders","description":"Get closed (filled) orders for the trading account.","inputSchema":{"type":"object","properties":{"limit":{"description":"Maximum number of orders to return. Omit to use the default.","type":"number"}},"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getCanceledOrders","description":"Get canceled orders for the trading account.","inputSchema":{"type":"object","properties":{"limit":{"description":"Maximum number of orders to return. Omit to use the default.","type":"number"}},"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getPositions","description":"Get positions details for multiple markets.","inputSchema":{"type":"object","properties":{"tokensWithType":{"type":"array","items":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"marketType":{"type":"string","enum":["margin","futures"]}},"required":["token1","token2","marketType"],"additionalProperties":false}}},"required":["tokensWithType"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"closePosition","description":"Close open position.","inputSchema":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"marketType":{"type":"string","enum":["margin","futures"]},"side":{"type":"string","enum":["long","short"],"description":"Type of position."}},"required":["token1","token2","marketType","side"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getPositionsHistory","description":"Get historical positions details.","inputSchema":{"type":"object","properties":{"limit":{"type":"number"}},"required":["limit"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"createConvertTrade","description":"Create a convert trade. Returns two unsigned actions to estimate the quote and then execute it.","inputSchema":{"type":"object","properties":{"baseSymbol":{"type":"string"},"quoteSymbol":{"type":"string"},"amount":{"type":"number"},"amountCurrency":{"type":"string"},"side":{"type":"string","enum":["buy","sell"]}},"required":["baseSymbol","quoteSymbol","amount","amountCurrency","side"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getNetworksByCurrency","description":"Get all available networks for multiple currencies.","inputSchema":{"type":"object","properties":{"codes":{"type":"array","items":{"type":"string"}}},"required":["codes"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"cexApiRequestActions":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The URL of the CEX API request"},"method":{"type":"string","enum":["POST","GET","PUT","DELETE"],"description":"HTTP method"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Request headers"},"body":{"description":"Request body as JSON string","type":"string"},"toSign":{"type":"string","description":"Raw bytes (hex) to sign/HMAC for auth header"}},"required":["url","method","headers","toSign"],"additionalProperties":false},"description":"Unsigned API requests to sign and send sequentially"}},"required":["project","operation","cexApiRequestActions"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}},{"name":"getFuturesPositionCosts","description":"Get the cost of multiple futures positions based on the amount, leverage, and price.","inputSchema":{"type":"object","properties":{"tokensWithAmountLeveragePrice":{"type":"array","items":{"type":"object","properties":{"token1":{"type":"string","description":"Unified currency code."},"token2":{"type":"string","description":"Unified currency code."},"amount":{"type":"number"},"leverage":{"type":"number"},"price":{"type":"number"}},"required":["token1","token2","amount","leverage","price"],"additionalProperties":false}}},"required":["tokensWithAmountLeveragePrice"],"additionalProperties":false},"outputSchema":{"type":"object","anyOf":[{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"note":{"description":"Human-readable summary of the action","type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"token1":{"type":"string"},"token2":{"type":"string"},"amount":{"type":"number"},"leverage":{"type":"number"},"price":{"type":"number"},"notionalUsd":{"type":"number"},"marginUsd":{"type":"number"}},"required":["token1","token2","amount","leverage","price","notionalUsd","marginUsd"],"additionalProperties":false}}},"required":["project","operation","data"],"additionalProperties":false},{"type":"object","properties":{"project":{"type":"string","description":"Protocol identifier"},"operation":{"type":"string","description":"Operation that produced this response"},"error":{"type":"string","description":"Error message"}},"required":["project","operation","error"],"additionalProperties":false}]}}]}