{"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-bybit","version":"1.0.0"},"tools":[{"name":"createSimpleOrder","description":"Create an order that is activated immediately, without a trigger attached to it. The order will execute at the current market price or a specified limit price.\n\nMarket type defaults:\n- Long/short orders default to PERPETUAL markets\n- Buy/sell orders default to SPOT markets\n- Only use DELIVERY markets when explicitly mentioned or when an expiry date is mentioned\n\nCRITICAL PREREQUISITES FOR FUTURES POSITIONS:\n\nMARGIN MODE HANDLING:\n- If the user specifies a margin mode (e.g., \"isolated\", \"cross\"), ALWAYS call setUserMarginMode FIRST\n- If setUserMarginMode fails, DO NOT proceed with position creation - explain the error to the user\n- NEVER create a position in a different margin mode than the user requested\n\nLEVERAGE HANDLING:\n- If leverage is specified in the prompt (e.g., \"10x\", \"with 50x leverage\"), ALWAYS call setUserLeverageOnMarket FIRST\n- If setUserLeverageOnMarket fails, DO NOT proceed with position creation - explain the error to the user\n- If leverage is NOT specified, proceed without setting it (the user's current leverage will be used)\n\nIMPORTANT: Both margin mode and leverage settings are BLOCKING operations. If either fails, you MUST:\n1. Stop immediately\n2. Explain the error to the user\n3. Ask the user how they want to proceed\n4. DO NOT create any position until these prerequisites are successfully met","inputSchema":{"type":"object","properties":{"market":{"type":"string","description":"Symbol of the market.  The type of the market can be inferred from the symbol: - Spot markets symbols have the form \"BTC/USDT\", where the FIRST currency is the base currency and the SECOND currency is the quote currency. - Perpetual markets symbols have the form \"BTC/USDT:USDT\", where the THIRD currency is the settlement currency. - Delivery markets (also known as expiry markets) symbols have the form \"BTC/USD:BTC-250926\", where the LAST part of the symbol is the expiry date of the contract."},"marketType":{"type":"string","enum":["spot","perpetual","delivery"],"description":"Market type. Inference rules: - \"buy\"/\"sell\" → spot market - \"long\"/\"short\" → perpetual market (default for futures) - Delivery dates mentioned → delivery market Only ask for clarification if genuinely ambiguous."},"side":{"type":"string","enum":["buy","sell","long","short"],"description":"Side of the order, either \"buy\", \"sell\", \"long\" or \"short\".  The side is ALWAYS relative to the FIRST (base) currency in the market symbol.\n\nThe behavior of the side is different for spot and futures (that is, perpetual and delivery) markets:\n- For spot markets, the side is always \"buy\" or \"sell\".\n- For futures markets, the side is always 'long' or 'short'.  If the leverage is not specified, the user-configured leverage for the market will be automatically used."},"amount":{"type":"number","description":"Amount to trade (in either base or spend currency, as specified by amountCurrency parameter)"},"amountCurrency":{"type":"string","enum":["base","spend"],"description":"Currency type for the amount parameter:\n- \"base\": Amount is in base currency (e.g., \"1 BTC\")\n- \"spend\": Amount is in spend/margin currency (e.g., \"100 USDT\")\n\nInference rules:\n- Direct amounts like \"1 BTC\" → use \"base\"\n- \"with X USDT\" or \"spend X USDT\" → use \"spend\""},"limitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the order will be executed.  Include only if explicitly specified by the user.  Pass null for a market order."}},"required":["market","marketType","side","amount","amountCurrency","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":"createConditionalOrder","description":"Create an order that is activated only after the given price condition is met, and does not utilize your balance until triggered. Once activated, the order will be executed at either the current market price or a specified limit price.  On spot markets, this tool can be used to place TP and SL orders in absence of an entry order.\n\nMarket type defaults:\n- Long/short orders default to PERPETUAL markets\n- Buy/sell orders default to SPOT markets\n- Only use DELIVERY markets when explicitly mentioned or when an expiry date is mentioned\n\nCRITICAL PREREQUISITES FOR FUTURES POSITIONS:\n\nMARGIN MODE HANDLING:\n- If the user specifies a margin mode (e.g., \"isolated\", \"cross\"), ALWAYS call setUserMarginMode FIRST\n- If setUserMarginMode fails, DO NOT proceed with position creation - explain the error to the user\n- NEVER create a position in a different margin mode than the user requested\n\nLEVERAGE HANDLING:\n- If leverage is specified in the prompt (e.g., \"10x\", \"with 50x leverage\"), ALWAYS call setUserLeverageOnMarket FIRST\n- If setUserLeverageOnMarket fails, DO NOT proceed with position creation - explain the error to the user\n- If leverage is NOT specified, proceed without setting it (the user's current leverage will be used)\n\nIMPORTANT: Both margin mode and leverage settings are BLOCKING operations. If either fails, you MUST:\n1. Stop immediately\n2. Explain the error to the user\n3. Ask the user how they want to proceed\n4. DO NOT create any position until these prerequisites are successfully met","inputSchema":{"type":"object","properties":{"market":{"type":"string","description":"Symbol of the market.  The type of the market can be inferred from the symbol: - Spot markets symbols have the form \"BTC/USDT\", where the FIRST currency is the base currency and the SECOND currency is the quote currency. - Perpetual markets symbols have the form \"BTC/USDT:USDT\", where the THIRD currency is the settlement currency. - Delivery markets (also known as expiry markets) symbols have the form \"BTC/USD:BTC-250926\", where the LAST part of the symbol is the expiry date of the contract."},"marketType":{"type":"string","enum":["spot","perpetual","delivery"],"description":"Market type. Inference rules: - \"buy\"/\"sell\" → spot market - \"long\"/\"short\" → perpetual market (default for futures) - Delivery dates mentioned → delivery market Only ask for clarification if genuinely ambiguous."},"side":{"type":"string","enum":["buy","sell","long","short"],"description":"Side of the order, either \"buy\", \"sell\", \"long\" or \"short\".  The side is ALWAYS relative to the FIRST (base) currency in the market symbol.\n\nThe behavior of the side is different for spot and futures (that is, perpetual and delivery) markets:\n- For spot markets, the side is always \"buy\" or \"sell\".\n- For futures markets, the side is always 'long' or 'short'.  If the leverage is not specified, the user-configured leverage for the market will be automatically used."},"amount":{"type":"number","description":"Amount to trade (in either base or spend currency, as specified by amountCurrency parameter)"},"amountCurrency":{"type":"string","enum":["base","spend"],"description":"Currency type for the amount parameter:\n- \"base\": Amount is in base currency (e.g., \"1 BTC\")\n- \"spend\": Amount is in spend/margin currency (e.g., \"100 USDT\")\n\nInference rules:\n- Direct amounts like \"1 BTC\" → use \"base\"\n- \"with X USDT\" or \"spend X USDT\" → use \"spend\""},"triggerPrice":{"type":"number","description":"Price at which the order will be activated"},"limitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the order will be executed.  Include only if explicitly specified by the user.  Pass null for a market order."}},"required":["market","marketType","side","amount","amountCurrency","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":"createSpotTakeProfitAndOrStopLossOrder","description":"Create ONLY conditional TP/SL orders (no immediate buy/sell). These are standalone orders that trigger at specified prices.\n\nUSE THIS TOOL WHEN user wants ONLY TP/SL orders:\n- \"Set a 10% TP and 15% SL to buy 1 BTC\" (creates conditional buy orders)\n- \"Set stop loss at $60k to sell my BTC\" (creates conditional sell order)\n- \"Place take profit at $4000 to sell ETH\" (creates conditional sell order)\n- \"Create TP/SL orders to buy back ETH at better prices\" (creates conditional buy orders)\n\nDO NOT USE when user wants IMMEDIATE execution + TP/SL:\n- \"Buy 1 BTC now with stop loss\" → Use createSpotEntryOrderWithTakeProfitAndOrStopLossAttached\n- \"Sell ETH at market with take profit\" → Use createSpotEntryOrderWithTakeProfitAndOrStopLossAttached\n\nKey difference: This tool creates WAITING orders, not immediate trades","inputSchema":{"type":"object","properties":{"market":{"type":"string","description":"Spot market symbol, e.g. \"BTC/USDT\""},"side":{"type":"string","enum":["buy","sell"],"description":"Side of the order"},"amount":{"type":"number","description":"Amount to trade (in either base or spend currency, as specified by amountCurrency parameter)"},"amountCurrency":{"type":"string","enum":["base","spend"],"description":"Currency type for the amount parameter:\n- \"base\": Amount is in base currency (e.g., \"1 BTC\")\n- \"spend\": Amount is in spend/margin currency (e.g., \"100 USDT\")\n\nInference rules:\n- Direct amounts like \"1 BTC\" → use \"base\"\n- \"with X USDT\" or \"spend X USDT\" → use \"spend\""},"takeProfitTriggerPrice":{"description":"Price at which the take profit order will be activated. Can be specified as absolute price or percentage. For sell orders, must be higher than stop loss trigger price. For buy orders, must be lower than stop loss trigger price. If not specified, the take profit order will not be created.","type":"number"},"takeProfitType":{"description":"Whether takeProfitTriggerPrice is an absolute price or a percentage from current/limit price.  Required when takeProfitTriggerPrice is provided.","type":"string","enum":["absolute","percentage"]},"takeProfitLimitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the take profit order will be executed.  Pass null for a market order."},"stopLossTriggerPrice":{"description":"Price at which the stop loss order will be activated. Can be specified as absolute price or percentage. If not specified, the stop loss order will not be created.","type":"number"},"stopLossType":{"description":"Whether stopLossTriggerPrice is an absolute price or a percentage from current/limit price.  Required when stopLossTriggerPrice is provided.","type":"string","enum":["absolute","percentage"]},"stopLossLimitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the stop loss order will be executed.  Pass null for a market order."}},"required":["market","side","amount","amountCurrency","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":"createPositionWithTakeProfitAndOrStopLossOrderAttached","description":"Create a futures position with take profit and/or stop loss orders attached to it.   Use this tool ONLY if the user explicitly specifies take profit and/or stop loss targets.  If no TP/SL is specified, use createSimpleOrder instead.\n\nCRITICAL PREREQUISITES FOR FUTURES POSITIONS:\n\nMARGIN MODE HANDLING:\n- If the user specifies a margin mode (e.g., \"isolated\", \"cross\"), ALWAYS call setUserMarginMode FIRST\n- If setUserMarginMode fails, DO NOT proceed with position creation - explain the error to the user\n- NEVER create a position in a different margin mode than the user requested\n\nLEVERAGE HANDLING:\n- If leverage is specified in the prompt (e.g., \"10x\", \"with 50x leverage\"), ALWAYS call setUserLeverageOnMarket FIRST\n- If setUserLeverageOnMarket fails, DO NOT proceed with position creation - explain the error to the user\n- If leverage is NOT specified, proceed without setting it (the user's current leverage will be used)\n\nIMPORTANT: Both margin mode and leverage settings are BLOCKING operations. If either fails, you MUST:\n1. Stop immediately\n2. Explain the error to the user\n3. Ask the user how they want to proceed\n4. DO NOT create any position until these prerequisites are successfully met","inputSchema":{"type":"object","properties":{"market":{"type":"string","description":"Futures market symbol, e.g. \"BTC/USDT:USDT\" or \"BTC/USDT:USDT-250926\""},"marketType":{"type":"string","enum":["perpetual","delivery"],"description":"Market type (only futures markets are supported)"},"side":{"type":"string","enum":["long","short"],"description":"Side of the order"},"amount":{"type":"number","description":"Amount to trade (in either base or spend currency, as specified by amountCurrency parameter)"},"amountCurrency":{"type":"string","enum":["base","spend"],"description":"Currency type for the amount parameter:\n- \"base\": Amount is in base currency (e.g., \"1 BTC\")\n- \"spend\": Amount is in spend/margin currency (e.g., \"100 USDT\")\n\nInference rules:\n- Direct amounts like \"1 BTC\" → use \"base\"\n- \"with X USDT\" or \"spend X USDT\" → use \"spend\""},"limitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the position will be opened.  Include only if explicitly specified by the user.  Pass null for a market order."},"takeProfitPrice":{"description":"Price at which the take profit order will be activated. Can be specified as absolute price or percentage. At least one of takeProfitPrice or stopLossPrice must be provided.","type":"number"},"takeProfitType":{"description":"Whether takeProfitPrice is an absolute price or a percentage from current/limit price.  Required when takeProfitPrice is provided.","type":"string","enum":["absolute","percentage"]},"stopLossPrice":{"description":"Price at which the stop loss order will be activated. Can be specified as absolute price or percentage. At least one of takeProfitPrice or stopLossPrice must be provided.","type":"number"},"stopLossType":{"description":"Whether stopLossPrice is an absolute price or a percentage from current/limit price.  Required when stopLossPrice is provided.","type":"string","enum":["absolute","percentage"]},"reduceOnly":{"description":"If true, the order will either close a position or reduce its size.  Defaults to false.","type":"boolean"}},"required":["market","marketType","side","amount","amountCurrency","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":"attachTakeProfitAndOrStopLossOrderToExistingPosition","description":"Attach take profit and/or stop loss orders to an existing futures position.  (This is sometimes called a futures OCO order.)  If the position already has TP/SL orders attached, they will be replaced.  Pass 0 as the TP price or SL price to cancel any existing TP or SL orders, respectively.","inputSchema":{"type":"object","properties":{"market":{"type":"string","description":"Futures market symbol, e.g. \"BTC/USDT:USDT\" or \"BTC/USDT:USDT-250926\""},"marketType":{"type":"string","enum":["perpetual","delivery"],"description":"Market type (only futures markets are supported)"},"takeProfitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the take profit order will be activated. Can be specified as absolute price or percentage. At least one of takeProfitPrice or stopLossPrice must be provided. Set to 0 to cancel any existing take profit order attached to the position. Pass null to leave the existing take profit order unchanged."},"takeProfitType":{"description":"Whether takeProfitPrice is an absolute price or a percentage from current price.  Required when takeProfitPrice is a non-zero, non-null value.","type":"string","enum":["absolute","percentage"]},"stopLossPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the stop loss order will be activated. Can be specified as absolute price or percentage. At least one of takeProfitPrice or stopLossPrice must be provided. Set to 0 to cancel any existing stop loss order attached to the position. Pass null to leave the existing stop loss order unchanged."},"stopLossType":{"description":"Whether stopLossPrice is an absolute price or a percentage from current price.  Required when stopLossPrice is a non-zero, non-null value.","type":"string","enum":["absolute","percentage"]}},"required":["market","marketType","takeProfitPrice","stopLossPrice"],"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":"attachTrailingStopToExistingPosition","description":"Attach a trailing stop to an existing futures position.  Pass 0 as the trailing distance to cancel any existing trailing stop attached to the position.","inputSchema":{"type":"object","properties":{"market":{"type":"string","description":"Futures market symbol, e.g. \"BTC/USDT:USDT\" or \"BTC/USDT:USDT-250926\""},"marketType":{"type":"string","enum":["perpetual","delivery"],"description":"Market type (only futures markets are supported)"},"trailingStopDistance":{"type":"number","description":"Distance (absolute price) at which the trailing stop will be activated.  Pass 0 to cancel any existing trailing stop attached to the position."},"trailingStopDistanceType":{"type":"string","enum":["absolute","percentage"],"description":"Whether trailingStopDistance is an absolute price or a percentage from current price."},"activationPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Optional activation price; ignored if trailingStopDistance is 0.  Pass null to activate the trailing stop immediately."}},"required":["market","marketType","trailingStopDistance","trailingStopDistanceType","activationPrice"],"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":"createSpotTrailingStopOrder","description":"Create a trailing stop order for a spot market.  This is not supported by Bybit API, therefore this tool will just notify the user that it is not supported.","inputSchema":{"type":"object","properties":{"market":{"type":"string","description":"Spot market symbol, e.g. \"BTC/USDT\""},"side":{"type":"string","enum":["buy","sell"],"description":"Side of the order"},"amount":{"type":"number","description":"Amount to trade (in either base or spend currency, as specified by amountCurrency parameter)"},"trailingStopDistance":{"type":"number","description":"Distance (absolute price) at which the trailing stop will be activated"}},"required":["market","side","amount","trailingStopDistance"],"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":"createSpotEntryOrderWithTakeProfitAndOrStopLossAttached","description":"Create a PRIMARY buy/sell order WITH take profit and/or stop loss attached (OTOCO order).\n\nUSE THIS TOOL when user wants ENTRY ORDER + TP/SL:\n- \"Buy 1 BTC with stop loss at $60k\" (creates buy order + SL)\n- \"Sell ETH at $3500 with take profit at $4000\" (creates sell limit order + TP)\n- \"Purchase BTC at market with 10% TP and 5% SL\" (creates market buy + both)\n\nDO NOT USE when user wants ONLY TP/SL orders:\n- \"Set a 10% TP to buy BTC\" → Use createSpotTakeProfitAndOrStopLossOrder\n- \"Place stop loss order at $60k\" → Use createSpotTakeProfitAndOrStopLossOrder\n\nKey: Creates ENTRY order (market or limit) that triggers TP/SL when filled","inputSchema":{"type":"object","properties":{"market":{"type":"string","description":"Spot market symbol, e.g. \"BTC/USDT\""},"side":{"type":"string","enum":["buy","sell"],"description":"Side of the order"},"amount":{"type":"number","description":"Amount to trade (in either base or spend currency, as specified by amountCurrency parameter)"},"amountCurrency":{"type":"string","enum":["base","spend"],"description":"Currency type for the amount parameter:\n- \"base\": Amount is in base currency (e.g., \"1 BTC\")\n- \"spend\": Amount is in spend/margin currency (e.g., \"100 USDT\")\n\nInference rules:\n- Direct amounts like \"1 BTC\" → use \"base\"\n- \"with X USDT\" or \"spend X USDT\" → use \"spend\""},"limitPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Price at which the entry order will be placed.  Include only if explicitly specified by the user.  Pass null to set it to the market last price."},"takeProfitPrice":{"description":"Price at which the take profit order will be activated. Can be specified as absolute price or percentage. At least one of takeProfitPrice or stopLossPrice must be provided.","type":"number"},"takeProfitType":{"description":"Whether takeProfitPrice is an absolute price or a percentage from current/limit price.  Required when takeProfitPrice is provided.","type":"string","enum":["absolute","percentage"]},"stopLossPrice":{"description":"Price at which the stop loss order will be activated. Can be specified as absolute price or percentage. At least one of takeProfitPrice or stopLossPrice must be provided.","type":"number"},"stopLossType":{"description":"Whether stopLossPrice is an absolute price or a percentage from current/limit price.  Required when stopLossPrice is provided.","type":"string","enum":["absolute","percentage"]}},"required":["market","side","amount","amountCurrency","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":"closePosition","description":"Close a futures position by sending an opposite market order. The position side and amount must be provided directly.","inputSchema":{"type":"object","properties":{"market":{"type":"string","description":"Futures market symbol, e.g. \"BTC/USDT:USDT\" or \"BTC/USDT:USDT-250926\""},"positionSide":{"type":"string","enum":["long","short"],"description":"The side of the position to close (long or short)"},"amount":{"type":"number","description":"The amount (in base currency / contracts) to close"}},"required":["market","positionSide","amount"],"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":"setUserMarginMode","description":"Set the margin mode for the user account.  This will change the margin mode for all of the user's open positions.","inputSchema":{"type":"object","properties":{"marginMode":{"type":"string","enum":["cross","isolated","portfolio"],"description":"Margin mode to set"}},"required":["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":"setUserLeverageOnMarket","description":"Set the user configured leverage for a specific futures market.  The function will automatically check the current leverage and only set it if it is different from the requested leverage.","inputSchema":{"type":"object","properties":{"market":{"type":"string","description":"Futures market symbol, e.g. \"BTC/USDT:USDT\" or \"BTC/USDT:USDT-250926\""},"leverage":{"type":"number","description":"Leverage to set, e.g. 10 for 10x, 50 for 50x, etc."}},"required":["market","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":"addMarginToPosition","description":"Add margin to an existing futures position","inputSchema":{"type":"object","properties":{"market":{"type":"string","description":"Futures market symbol, e.g. \"BTC/USDT:USDT\" or \"BTC/USDT:USDT-250926\""},"amount":{"type":"number","description":"Amount to add"}},"required":["market","amount"],"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":"reduceMarginFromPosition","description":"Reduce margin from an existing futures position","inputSchema":{"type":"object","properties":{"market":{"type":"string","description":"Futures market symbol, e.g. \"BTC/USDT:USDT\" or \"BTC/USDT:USDT-250926\""},"amount":{"type":"number","description":"Amount to reduce"}},"required":["market","amount"],"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":"cancelOrderByIdAndMarket","description":"Cancel a specific order by ID and market symbol.  If you only have the order ID, use getOpenOrders to get the market symbol.","inputSchema":{"type":"object","properties":{"id":{"type":"string","description":"Order ID to cancel"},"market":{"type":"string","description":"Symbol of the market.  The type of the market can be inferred from the symbol: - Spot markets symbols have the form \"BTC/USDT\", where the FIRST currency is the base currency and the SECOND currency is the quote currency. - Perpetual markets symbols have the form \"BTC/USDT:USDT\", where the THIRD currency is the settlement currency. - Delivery markets (also known as expiry markets) symbols have the form \"BTC/USD:BTC-250926\", where the LAST part of the symbol is the expiry date of the contract."}},"required":["id","market"],"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":"cancelAllOrdersOnMarket","description":"Cancel all open orders on a given market.  Before executing the tool, always get the open orders to make sure you are cancelling the correct orders.","inputSchema":{"type":"object","properties":{"market":{"type":"string","description":"Symbol of the market.  The type of the market can be inferred from the symbol: - Spot markets symbols have the form \"BTC/USDT\", where the FIRST currency is the base currency and the SECOND currency is the quote currency. - Perpetual markets symbols have the form \"BTC/USDT:USDT\", where the THIRD currency is the settlement currency. - Delivery markets (also known as expiry markets) symbols have the form \"BTC/USD:BTC-250926\", where the LAST part of the symbol is the expiry date of the contract."}},"required":["market"],"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":"transferFundsTo","description":"Transfer funds to the funding account or the unified trading account (UTA). Bybit only has these two accounts, therefore there is no need to specify the source account. Too small amount (less than $0.0001) may cause an error, so try to transfer very small amounts only if the user explicitly asks for it.","inputSchema":{"type":"object","properties":{"currency":{"type":"string","description":"Currency to transfer, e.g. \"USDT\""},"amount":{"type":"number","description":"Amount to transfer"},"destinationAccount":{"type":"string","enum":["funding","trading"],"description":"Account to transfer to"}},"required":["currency","amount","destinationAccount"],"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":"withdrawToWallet","description":"Withdraw funds from the user's funding account to an on-chain wallet address. 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":{"currency":{"type":"string","description":"Currency to withdraw, e.g. \"BTC\" or \"USDT\""},"chain":{"description":"Chain to withdraw to, e.g. \"BTC\" for Bitcoin blockchain or \"ETH\" for Ethereum blockchain.  If not specified, Bybit will reject the request.","type":"string"},"amount":{"type":"number","description":"Amount to withdraw"},"walletAddress":{"type":"string","description":"Wallet address to withdraw to"},"tag":{"description":"Tag / memo / paymentId to include in the withdrawal request.  Required for several networks (e.g. XRP, XMR, ...) lest the funds are lost.  Omit if the network does not require it.","type":"string"}},"required":["currency","amount","walletAddress"],"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":"Show the user's most recent 25 open positions on future markets, including notional, margin, and PnL.","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":"getPositionOnMarkets","description":"Show all details on the futures positions held by the user on the given future markets.  If you only have the currency, use getPositions and filter by currency.","inputSchema":{"type":"object","properties":{"markets":{"type":"array","items":{"type":"string"},"description":"Array of futures market symbols to get positions for, e.g. [\"BTC/USDT:USDT\", \"ETH/USDT:USDT\"]"}},"required":["markets"],"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":"Show the user's most recent 25 open 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":"getOrdersById","description":"Show information about multiple orders by their IDs and market symbols.  If the market is not specified, fetch all orders and filter by ID, without asking for confirmation.","inputSchema":{"type":"object","properties":{"orderIdsWithMarket":{"type":"array","items":{"type":"object","properties":{"orderId":{"type":"string","description":"Order ID to get information for"},"market":{"description":"Symbol of the market the order belongs to.  Omit if unknown.","type":"string"}},"required":["orderId"],"additionalProperties":false},"description":"Array of orders with their respective market information."}},"required":["orderIdsWithMarket"],"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":"getBalance","description":"Get the user balance for multiple currencies and accounts. The returned balance does not include open positions. For each currency, show how much is available to use. If the user generically asks for the balance or explicitly asks for TOTAL balance, include both funding and trading accounts.","inputSchema":{"type":"object","properties":{"currenciesWithAccount":{"type":"array","items":{"type":"object","properties":{"currency":{"description":"Currency code to get balance for, e.g. \"BTC\".  Omit to get all currencies.","type":"string"},"account":{"description":"Account to get balance for; defaults to \"trading\".","type":"string","enum":["funding","trading"]}},"additionalProperties":false},"description":"Array of currencies with their account types."}},"required":["currenciesWithAccount"],"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":"getCurrencyMarketsOfGivenType","description":"Show active markets (also called trading pairs) with the given currencies and market types. Show only the first 50 markets. If the user asks for future markets, the function should be called for both perpetual and delivery markets.","inputSchema":{"type":"object","properties":{"currenciesWithType":{"type":"array","items":{"type":"object","properties":{"marketType":{"type":"string","enum":["spot","perpetual","delivery"],"description":"Market type, e.g. \"spot\", \"perpetual\", \"delivery\""},"currency":{"type":"string","description":"Currency to get markets for, e.g. \"BTC\""}},"required":["marketType","currency"],"additionalProperties":false},"description":"Array of currencies with their market types."}},"required":["currenciesWithType"],"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":"string","description":"Human-readable summary of active markets for the requested currencies and market types"}},"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}]}},{"name":"getMarketsInfo","description":"Get price, volume and leverage information about multiple markets (also called trading pairs).  Prices are in quote currency.  Always use this function to get up-to-date prices.","inputSchema":{"type":"object","properties":{"markets":{"type":"array","items":{"type":"string"},"description":"Array of market symbols to get information for, e.g. [\"BTC/USDT:USDT\", \"ETH/USDT:USDT\"]"}},"required":["markets"],"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":"string","description":"Human-readable summary of price, volume and leverage for the requested markets"}},"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}]}},{"name":"getUserMarginMode","description":"Get the user configured margin mode (set at the account level)","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":"getUserLeverageOnMarkets","description":"Get the user configured leverage for multiple futures markets","inputSchema":{"type":"object","properties":{"markets":{"type":"array","items":{"type":"string"},"description":"Array of futures market symbols to get leverage for, e.g. [\"BTC/USDT:USDT\", \"ETH/USDT:USDT\"]"}},"required":["markets"],"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":"getUserDepositAddress","description":"Get the user deposit addresses for multiple currencies and chains.\nA deposit address is a unique address that can be used to deposit funds into an exchange.\nThe tool will also return the tag / memo / paymentId for chains that require it (e.g. XRP, XMR, ...).\n\nIMPORTANT: Leave the currency and chain parameters as they are specified in the prompt.  Do not change them.","inputSchema":{"type":"object","properties":{"currenciesWithChain":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","description":"Currency to get deposit address for, e.g. \"BTC\" or \"USDT\""},"chain":{"description":"Chain to get deposit address for, e.g. \"BTC\" for Bitcoin blockchain or \"ETH\" for Ethereum blockchain.  Omit to let the tool automatically infer it.","type":"string"}},"required":["currency"],"additionalProperties":false},"description":"Array of currencies with their chains."}},"required":["currenciesWithChain"],"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}]}}]}