{ "openapi": "3.0.1", "info": { "title": "futures", "description": "", "version": "1.0.0" }, "tags": [], "paths": { "/api/v1/contracts/{symbol}": { "get": { "summary": "Get Symbol", "deprecated": false, "description": "Get information of specified contracts that can be traded. This API will return a list of tradable contracts, including some key parameters of the contract such as the symbol name, tick size, mark price, etc.", "tags": [], "parameters": [ { "name": "symbol", "in": "path", "description": "Path Parameter. Symbol of the contract", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "description": "200000 is for success, other is error" }, "data": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol", "example": [ "XBTUSDTM", "XBTUSDCM", "XBTUSDM" ] }, "rootSymbol": { "type": "string", "description": "Contract group", "example": [ "USDT", "USDC", "XBT" ] }, "type": { "type": "string", "description": "Type of contract", "enum": [ "FFWCSX", "FFICSX" ], "x-api-enum": [ { "value": "FFWCSX", "name": "FFWCSX", "description": "Standardized swap contracts, standard financial futures on swaps, expiration swap funding rates" }, { "value": "FFICSX", "name": "FFICSX", "description": "Futures Contract" } ] }, "firstOpenDate": { "type": "integer", "description": "First Open Date (milliseconds)", "format": "int64" }, "expireDate": { "type": "integer", "description": "Expiration date (milliseconds) Null means it will never expire", "format": "int64" }, "settleDate": { "type": "integer", "description": "Settlement date (milliseconds) Null indicates that automatic settlement is not supported", "format": "int64" }, "baseCurrency": { "type": "string", "description": "Base currency" }, "quoteCurrency": { "type": "string", "description": "Quote currency" }, "settleCurrency": { "type": "string", "description": "Currency used to clear and settle the trades" }, "maxOrderQty": { "type": "integer", "description": "Maximum order quantity" }, "maxPrice": { "type": "number", "description": "Maximum order price" }, "lotSize": { "type": "integer", "description": "Minimum lot size" }, "tickSize": { "type": "number", "description": "Minimum price changes" }, "indexPriceTickSize": { "type": "number", "description": "Index price of tick size" }, "multiplier": { "type": "number", "description": "The basic unit of the contract API is lots. For the number of coins in each lot, please refer to the param multiplier. For example, for XBTUSDTM, multiplier=0.001, which corresponds to the value of each XBTUSDTM contract being 0.001 BTC. There is also a special case. All coin-swap contracts, such as each XBTUSDM contract, correspond to 1 USD." }, "initialMargin": { "type": "number", "description": "Initial margin requirement" }, "maintainMargin": { "type": "number", "description": "Maintenance margin requirement" }, "maxRiskLimit": { "type": "integer", "description": "Maximum risk limit (unit: XBT)" }, "minRiskLimit": { "type": "integer", "description": "Minimum risk limit (unit: XBT)" }, "riskStep": { "type": "integer", "description": "Risk limit increment value (unit: XBT)" }, "makerFeeRate": { "type": "number", "description": "Maker fee rate" }, "takerFeeRate": { "type": "number", "description": "Taker fee rate" }, "takerFixFee": { "type": "number", "description": "Deprecated param" }, "makerFixFee": { "type": "number", "description": "Deprecated param" }, "settlementFee": { "type": "number", "description": "Settlement fee" }, "isDeleverage": { "type": "boolean", "description": "Enabled ADL or not" }, "isQuanto": { "type": "boolean", "description": "Deprecated param" }, "isInverse": { "type": "boolean", "description": "Whether it is a reverse contract" }, "markMethod": { "type": "string", "description": "Marking method", "enum": [ "FairPrice" ], "x-api-enum": [ { "value": "FairPrice", "name": "FairPrice", "description": "FairPrice" } ] }, "fairMethod": { "type": "string", "description": "Fair price marking method; the Futures contract is null", "enum": [ "FundingRate" ], "x-api-enum": [ { "value": "FundingRate", "name": "FundingRate", "description": "FundingRate" } ] }, "fundingBaseSymbol": { "type": "string", "description": "Ticker symbol of the base currency" }, "fundingQuoteSymbol": { "type": "string", "description": "Ticker symbol of the quote currency" }, "fundingRateSymbol": { "type": "string", "description": "Funding rate symbol" }, "indexSymbol": { "type": "string", "description": "Index symbol" }, "settlementSymbol": { "type": "string", "description": "Settlement symbol" }, "status": { "type": "string", "description": "Contract status", "enum": [ "Init", "Open", "BeingSettled", "Settled", "Paused", "Closed", "CancelOnly" ], "x-api-enum": [ { "value": "Init", "name": "Init", "description": "Initial" }, { "value": "Open", "name": "Open", "description": "Online" }, { "value": "BeingSettled", "name": "BeingSettled", "description": "Settling" }, { "value": "Settled", "name": "Settled", "description": "Settled" }, { "value": "Paused", "name": "Paused", "description": "Suspended" }, { "value": "Closed", "name": "Closed", "description": "Offline" }, { "value": "CancelOnly", "name": "CancelOnly", "description": "Orders can only be canceled" } ] }, "fundingFeeRate": { "type": "number", "description": "Funding fee rate" }, "predictedFundingFeeRate": { "type": "number", "description": "Predicted funding fee rate" }, "fundingRateGranularity": { "type": "integer", "description": "Funding interval (milliseconds)" }, "openInterest": { "type": "string", "description": "Open interest (unit: lots)" }, "turnoverOf24h": { "type": "number", "description": "24-hour turnover" }, "volumeOf24h": { "type": "number", "description": "24-hour volume" }, "markPrice": { "type": "number", "description": "Mark price" }, "indexPrice": { "type": "number", "description": "Index price" }, "lastTradePrice": { "type": "number", "description": "Last trade price" }, "nextFundingRateTime": { "type": "integer", "description": "Next funding rate time (milliseconds)" }, "maxLeverage": { "type": "integer", "description": "Maximum leverage" }, "sourceExchanges": { "type": "array", "items": { "type": "string" }, "description": "The contract index price source exchange" }, "premiumsSymbol1M": { "type": "string", "description": "Premium index symbol (1 minute)" }, "premiumsSymbol8H": { "type": "string", "description": "Premium index symbol (8 hours)" }, "fundingBaseSymbol1M": { "type": "string", "description": "Base currency interest rate symbol (1 minute)" }, "fundingQuoteSymbol1M": { "type": "string", "description": "Quote currency interest rate symbol (1 minute)" }, "lowPrice": { "type": "number", "description": "24-hour lowest price" }, "highPrice": { "type": "number", "description": "24-hour highest price" }, "priceChgPct": { "type": "number", "description": "24-hour % price change " }, "priceChg": { "type": "number", "description": "24-hour price change" }, "k": { "type": "number" }, "m": { "type": "number" }, "f": { "type": "number" }, "mmrLimit": { "type": "number" }, "mmrLevConstant": { "type": "number" }, "supportCross": { "type": "boolean", "description": "Whether support Cross Margin" }, "buyLimit": { "type": "number", "description": "The current maximum buying price allowed" }, "sellLimit": { "type": "number", "description": "The current minimum selling price allowed" } }, "required": [ "symbol", "rootSymbol", "type", "firstOpenDate", "expireDate", "settleDate", "baseCurrency", "quoteCurrency", "settleCurrency", "maxOrderQty", "maxPrice", "lotSize", "tickSize", "indexPriceTickSize", "multiplier", "initialMargin", "maintainMargin", "maxRiskLimit", "minRiskLimit", "riskStep", "makerFeeRate", "takerFeeRate", "takerFixFee", "makerFixFee", "settlementFee", "isDeleverage", "isQuanto", "isInverse", "markMethod", "fairMethod", "fundingBaseSymbol", "fundingQuoteSymbol", "fundingRateSymbol", "indexSymbol", "settlementSymbol", "status", "fundingFeeRate", "predictedFundingFeeRate", "fundingRateGranularity", "openInterest", "turnoverOf24h", "volumeOf24h", "markPrice", "indexPrice", "lastTradePrice", "nextFundingRateTime", "maxLeverage", "sourceExchanges", "premiumsSymbol1M", "premiumsSymbol8H", "fundingBaseSymbol1M", "fundingQuoteSymbol1M", "lowPrice", "highPrice", "priceChgPct", "priceChg", "k", "m", "f", "mmrLimit", "mmrLevConstant", "supportCross", "buyLimit", "sellLimit" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470221", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "getSymbol", "x-sdk-method-description": "Get information of specified contracts that can be traded. This API will return a list of tradable contracts, including some key parameters of the contract such as the symbol name, tick size, mark price, etc.", "x-api-rate-limit-weight": 3, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"rootSymbol\\\": \\\"USDT\\\",\\n \\\"type\\\": \\\"FFWCSX\\\",\\n \\\"firstOpenDate\\\": 1585555200000,\\n \\\"expireDate\\\": null,\\n \\\"settleDate\\\": null,\\n \\\"baseCurrency\\\": \\\"XBT\\\",\\n \\\"quoteCurrency\\\": \\\"USDT\\\",\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"maxOrderQty\\\": 1000000,\\n \\\"maxPrice\\\": 1000000.0,\\n \\\"lotSize\\\": 1,\\n \\\"tickSize\\\": 0.1,\\n \\\"indexPriceTickSize\\\": 0.01,\\n \\\"multiplier\\\": 0.001,\\n \\\"initialMargin\\\": 0.008,\\n \\\"maintainMargin\\\": 0.004,\\n \\\"maxRiskLimit\\\": 100000,\\n \\\"minRiskLimit\\\": 100000,\\n \\\"riskStep\\\": 50000,\\n \\\"makerFeeRate\\\": 2.0E-4,\\n \\\"takerFeeRate\\\": 6.0E-4,\\n \\\"takerFixFee\\\": 0.0,\\n \\\"makerFixFee\\\": 0.0,\\n \\\"settlementFee\\\": null,\\n \\\"isDeleverage\\\": true,\\n \\\"isQuanto\\\": true,\\n \\\"isInverse\\\": false,\\n \\\"markMethod\\\": \\\"FairPrice\\\",\\n \\\"fairMethod\\\": \\\"FundingRate\\\",\\n \\\"fundingBaseSymbol\\\": \\\".XBTINT8H\\\",\\n \\\"fundingQuoteSymbol\\\": \\\".USDTINT8H\\\",\\n \\\"fundingRateSymbol\\\": \\\".XBTUSDTMFPI8H\\\",\\n \\\"indexSymbol\\\": \\\".KXBTUSDT\\\",\\n \\\"settlementSymbol\\\": \\\"\\\",\\n \\\"status\\\": \\\"Open\\\",\\n \\\"fundingFeeRate\\\": 5.2E-5,\\n \\\"predictedFundingFeeRate\\\": 8.3E-5,\\n \\\"fundingRateGranularity\\\": 28800000,\\n \\\"openInterest\\\": \\\"6748176\\\",\\n \\\"turnoverOf24h\\\": 1.0346431983265533E9,\\n \\\"volumeOf24h\\\": 12069.225,\\n \\\"markPrice\\\": 86378.69,\\n \\\"indexPrice\\\": 86382.64,\\n \\\"lastTradePrice\\\": 86364,\\n \\\"nextFundingRateTime\\\": 17752926,\\n \\\"maxLeverage\\\": 125,\\n \\\"sourceExchanges\\\": [\\n \\\"okex\\\",\\n \\\"binance\\\",\\n \\\"kucoin\\\",\\n \\\"bybit\\\",\\n \\\"bitmart\\\",\\n \\\"gateio\\\"\\n ],\\n \\\"premiumsSymbol1M\\\": \\\".XBTUSDTMPI\\\",\\n \\\"premiumsSymbol8H\\\": \\\".XBTUSDTMPI8H\\\",\\n \\\"fundingBaseSymbol1M\\\": \\\".XBTINT\\\",\\n \\\"fundingQuoteSymbol1M\\\": \\\".USDTINT\\\",\\n \\\"lowPrice\\\": 82205.2,\\n \\\"highPrice\\\": 89299.9,\\n \\\"priceChgPct\\\": -0.028,\\n \\\"priceChg\\\": -2495.9,\\n \\\"k\\\": 490.0,\\n \\\"m\\\": 300.0,\\n \\\"f\\\": 1.3,\\n \\\"mmrLimit\\\": 0.3,\\n \\\"mmrLevConstant\\\": 125.0,\\n \\\"supportCross\\\": true,\\n \\\"buyLimit\\\": 90700.7115,\\n \\\"sellLimit\\\": 82062.5485\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}", "operationId": "001" } }, "/api/v1/contracts/active": { "get": { "summary": "Get All Symbols", "deprecated": false, "description": "Get detailed information of all contracts that can be traded. This API will return a list of tradable contracts, including some key parameters of the contract such as the symbol name, tick size, mark price, etc.", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "description": "200000 is for success, other is error" }, "data": { "type": "array", "items": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol", "example": [ "XBTUSDTM", "XBTUSDCM", "XBTUSDM" ] }, "rootSymbol": { "type": "string", "description": "Contract group", "example": [ "USDT", "USDC", "XBT" ] }, "type": { "type": "string", "description": "Type of contract", "enum": [ "FFWCSX", "FFICSX" ], "x-api-enum": [ { "value": "FFWCSX", "name": "FFWCSX", "description": "Standardized swap contracts, standard financial futures on swaps, expiration swap funding rates" }, { "value": "FFICSX", "name": "FFICSX", "description": "Futures Contract" } ] }, "firstOpenDate": { "type": "integer", "description": "First Open Date (milliseconds)", "format": "int64" }, "expireDate": { "type": "integer", "description": "Expiration date (milliseconds) Null means it will never expire", "format": "int64" }, "settleDate": { "type": "integer", "description": "Settlement date (milliseconds) Null indicates that automatic settlement is not supported", "format": "int64" }, "baseCurrency": { "type": "string", "description": "Base currency" }, "quoteCurrency": { "type": "string", "description": "Quote currency" }, "settleCurrency": { "type": "string", "description": "Currency used to clear and settle the trades" }, "maxOrderQty": { "type": "integer", "description": "Maximum order quantity" }, "maxPrice": { "type": "number", "description": "Maximum order price" }, "lotSize": { "type": "integer", "description": "Minimum lot size" }, "tickSize": { "type": "number", "description": "Minimum price changes" }, "indexPriceTickSize": { "type": "number", "description": "Index price of tick size" }, "multiplier": { "type": "number", "description": "The basic unit of the contract API is lots. For the number of coins in each lot, please refer to the param multiplier. For example, for XBTUSDTM, multiplier=0.001, which corresponds to the value of each XBTUSDTM contract being 0.001 BTC. There is also a special case. All coin-swap contracts, such as each XBTUSDM contract, correspond to 1 USD." }, "initialMargin": { "type": "number", "description": "Initial margin requirement" }, "maintainMargin": { "type": "number", "description": "Maintenance margin requirement" }, "maxRiskLimit": { "type": "integer", "description": "Maximum risk limit (unit: XBT)" }, "minRiskLimit": { "type": "integer", "description": "Minimum risk limit (unit: XBT)" }, "riskStep": { "type": "integer", "description": "Risk limit increment value (unit: XBT)" }, "makerFeeRate": { "type": "number", "description": "Maker fee rate" }, "takerFeeRate": { "type": "number", "description": "Taker fee rate" }, "takerFixFee": { "type": "number", "description": "Deprecated param" }, "makerFixFee": { "type": "number", "description": "Deprecated param" }, "settlementFee": { "type": "number", "description": "Settlement fee" }, "isDeleverage": { "type": "boolean", "description": "Enabled ADL or not" }, "isQuanto": { "type": "boolean", "description": "Deprecated param" }, "isInverse": { "type": "boolean", "description": "Whether it is a reverse contract" }, "markMethod": { "type": "string", "description": "Marking method", "enum": [ "FairPrice" ], "x-api-enum": [ { "value": "FairPrice", "name": "FairPrice", "description": "FairPrice" } ] }, "fairMethod": { "type": "string", "description": "Fair price marking method; the Futures contract is null", "enum": [ "FundingRate" ], "x-api-enum": [ { "value": "FundingRate", "name": "FundingRate", "description": "FundingRate" } ] }, "fundingBaseSymbol": { "type": "string", "description": "Ticker symbol of the base currency" }, "fundingQuoteSymbol": { "type": "string", "description": "Ticker symbol of the quote currency" }, "fundingRateSymbol": { "type": "string", "description": "Funding rate symbol" }, "indexSymbol": { "type": "string", "description": "Index symbol" }, "settlementSymbol": { "type": "string", "description": "Settlement symbol" }, "status": { "type": "string", "description": "Contract status", "enum": [ "Init", "Open", "BeingSettled", "Settled", "Paused", "Closed", "CancelOnly" ], "x-api-enum": [ { "value": "Init", "name": "Init", "description": "Initial" }, { "value": "Open", "name": "Open", "description": "Online" }, { "value": "BeingSettled", "name": "BeingSettled", "description": "Settling" }, { "value": "Settled", "name": "Settled", "description": "Settled" }, { "value": "Paused", "name": "Paused", "description": "Suspended" }, { "value": "Closed", "name": "Closed", "description": "Offline" }, { "value": "CancelOnly", "name": "CancelOnly", "description": "Orders can only be canceled" } ] }, "fundingFeeRate": { "type": "number", "description": "Funding fee rate" }, "predictedFundingFeeRate": { "type": "number", "description": "Predicted funding fee rate" }, "fundingRateGranularity": { "type": "integer", "description": "Funding interval (milliseconds)" }, "openInterest": { "type": "string", "description": "Open interest (unit: lots)" }, "turnoverOf24h": { "type": "number", "description": "24-hour turnover" }, "volumeOf24h": { "type": "number", "description": "24-hour volume" }, "markPrice": { "type": "number", "description": "Mark price" }, "indexPrice": { "type": "number", "description": "Index price" }, "lastTradePrice": { "type": "number", "description": "Last trade price" }, "nextFundingRateTime": { "type": "integer", "description": "Next funding rate time (milliseconds)" }, "maxLeverage": { "type": "integer", "description": "Maximum leverage" }, "sourceExchanges": { "type": "array", "items": { "type": "string" }, "description": "The contract index price source exchange" }, "premiumsSymbol1M": { "type": "string", "description": "Premium index symbol (1 minute)" }, "premiumsSymbol8H": { "type": "string", "description": "Premium index symbol (8 hours)" }, "fundingBaseSymbol1M": { "type": "string", "description": "Base currency interest rate symbol (1 minute)" }, "fundingQuoteSymbol1M": { "type": "string", "description": "Quote currency interest rate symbol (1 minute)" }, "lowPrice": { "type": "number", "description": "24-hour lowest price" }, "highPrice": { "type": "number", "description": "24-hour highest price" }, "priceChgPct": { "type": "number", "description": "24-hour % price change " }, "priceChg": { "type": "number", "description": "24-hour price change" }, "k": { "type": "number" }, "m": { "type": "number" }, "f": { "type": "number" }, "mmrLimit": { "type": "number" }, "mmrLevConstant": { "type": "number" }, "supportCross": { "type": "boolean", "description": "Whether support Cross Margin" }, "buyLimit": { "type": "number", "description": "The current maximum buying price allowed" }, "sellLimit": { "type": "number", "description": "The current minimum selling price allowed" } }, "required": [ "symbol", "rootSymbol", "type", "firstOpenDate", "baseCurrency", "quoteCurrency", "settleCurrency", "maxOrderQty", "maxPrice", "lotSize", "tickSize", "indexPriceTickSize", "multiplier", "initialMargin", "maintainMargin", "maxRiskLimit", "minRiskLimit", "riskStep", "makerFeeRate", "takerFeeRate", "takerFixFee", "makerFixFee", "isDeleverage", "isQuanto", "isInverse", "markMethod", "indexSymbol", "settlementSymbol", "status", "fundingFeeRate", "predictedFundingFeeRate", "fundingRateGranularity", "openInterest", "turnoverOf24h", "volumeOf24h", "markPrice", "indexPrice", "lastTradePrice", "nextFundingRateTime", "maxLeverage", "sourceExchanges", "premiumsSymbol1M", "premiumsSymbol8H", "fundingBaseSymbol1M", "fundingQuoteSymbol1M", "lowPrice", "highPrice", "priceChgPct", "priceChg", "k", "m", "f", "mmrLimit", "mmrLevConstant", "supportCross", "buyLimit", "sellLimit" ] }, "description": "List of all contracts" } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470220", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "GetAllSymbols", "x-sdk-method-description": "Get detailed information of all contracts that can be traded. This API will return a list of tradable contracts, including some key parameters of the contract such as the symbol name, tick size, mark price, etc.", "x-api-rate-limit-weight": 3, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": [\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"rootSymbol\\\": \\\"USDT\\\",\\n \\\"type\\\": \\\"FFWCSX\\\",\\n \\\"firstOpenDate\\\": 1585555200000,\\n \\\"expireDate\\\": null,\\n \\\"settleDate\\\": null,\\n \\\"baseCurrency\\\": \\\"XBT\\\",\\n \\\"quoteCurrency\\\": \\\"USDT\\\",\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"maxOrderQty\\\": 1000000,\\n \\\"maxPrice\\\": 1000000,\\n \\\"lotSize\\\": 1,\\n \\\"tickSize\\\": 0.1,\\n \\\"indexPriceTickSize\\\": 0.01,\\n \\\"multiplier\\\": 0.001,\\n \\\"initialMargin\\\": 0.008,\\n \\\"maintainMargin\\\": 0.004,\\n \\\"maxRiskLimit\\\": 100000,\\n \\\"minRiskLimit\\\": 100000,\\n \\\"riskStep\\\": 50000,\\n \\\"makerFeeRate\\\": 0.0002,\\n \\\"takerFeeRate\\\": 0.0006,\\n \\\"takerFixFee\\\": 0,\\n \\\"makerFixFee\\\": 0,\\n \\\"settlementFee\\\": null,\\n \\\"isDeleverage\\\": true,\\n \\\"isQuanto\\\": true,\\n \\\"isInverse\\\": false,\\n \\\"markMethod\\\": \\\"FairPrice\\\",\\n \\\"fairMethod\\\": \\\"FundingRate\\\",\\n \\\"fundingBaseSymbol\\\": \\\".XBTINT8H\\\",\\n \\\"fundingQuoteSymbol\\\": \\\".USDTINT8H\\\",\\n \\\"fundingRateSymbol\\\": \\\".XBTUSDTMFPI8H\\\",\\n \\\"indexSymbol\\\": \\\".KXBTUSDT\\\",\\n \\\"settlementSymbol\\\": \\\"\\\",\\n \\\"status\\\": \\\"Open\\\",\\n \\\"fundingFeeRate\\\": 0.000052,\\n \\\"predictedFundingFeeRate\\\": 0.000083,\\n \\\"fundingRateGranularity\\\": 28800000,\\n \\\"openInterest\\\": \\\"6748176\\\",\\n \\\"turnoverOf24h\\\": 1034643198.3265533,\\n \\\"volumeOf24h\\\": 12069.225,\\n \\\"markPrice\\\": 86378.69,\\n \\\"indexPrice\\\": 86382.64,\\n \\\"lastTradePrice\\\": 86364,\\n \\\"nextFundingRateTime\\\": 17752926,\\n \\\"maxLeverage\\\": 125,\\n \\\"sourceExchanges\\\": [\\n \\\"okex\\\",\\n \\\"binance\\\",\\n \\\"kucoin\\\",\\n \\\"bybit\\\",\\n \\\"bitmart\\\",\\n \\\"gateio\\\"\\n ],\\n \\\"premiumsSymbol1M\\\": \\\".XBTUSDTMPI\\\",\\n \\\"premiumsSymbol8H\\\": \\\".XBTUSDTMPI8H\\\",\\n \\\"fundingBaseSymbol1M\\\": \\\".XBTINT\\\",\\n \\\"fundingQuoteSymbol1M\\\": \\\".USDTINT\\\",\\n \\\"lowPrice\\\": 82205.2,\\n \\\"highPrice\\\": 89299.9,\\n \\\"priceChgPct\\\": -0.028,\\n \\\"priceChg\\\": -2495.9,\\n \\\"k\\\": 490,\\n \\\"m\\\": 300,\\n \\\"f\\\": 1.3,\\n \\\"mmrLimit\\\": 0.3,\\n \\\"mmrLevConstant\\\": 125,\\n \\\"supportCross\\\": true,\\n \\\"buyLimit\\\": 90700.7115,\\n \\\"sellLimit\\\": 82062.5485\\n }\\n ]\\n}", "operationId": "002" } }, "/api/v1/ticker": { "get": { "summary": "Get Ticker", "deprecated": false, "description": "This endpoint returns \"last traded price/size\", \"best bid/ask price/size\" etc. of a single symbol. These messages can also be obtained through Websocket.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) \n\n", "required": true, "schema": { "type": "string", "example": [ "XBTUSDTM", "XBTUSDM", "ETHUSDTM" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "description": "200000 is for success, other is error" }, "data": { "type": "object", "properties": { "sequence": { "type": "integer", "description": "Sequence number, used to judge whether the messages pushed by Websocket are continuous.", "format": "int64" }, "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "side": { "type": "string", "description": "Filled side; the trade side indicates the taker order side. A taker order is the order that was matched with orders opened on the order book.", "enum": [ "buy", "sell" ], "x-api-enum": [ { "value": "buy", "name": "buy", "description": "buy" }, { "value": "sell", "name": "sell", "description": "sell" } ] }, "size": { "type": "integer", "description": "Filled quantity" }, "tradeId": { "type": "string", "description": "Transaction ID" }, "price": { "type": "string", "description": "Filled price" }, "bestBidPrice": { "type": "string", "description": "Best bid price" }, "bestBidSize": { "type": "integer", "description": "Best bid size" }, "bestAskPrice": { "type": "string", "description": "Best ask price" }, "bestAskSize": { "type": "integer", "description": "Best ask size" }, "ts": { "type": "integer", "description": "Filled time (nanoseconds)", "format": "int64" } }, "required": [ "sequence", "symbol", "side", "size", "tradeId", "price", "bestBidPrice", "bestBidSize", "bestAskPrice", "bestAskSize", "ts" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470222", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "getTicker", "x-sdk-method-description": "This endpoint returns \"last traded price/size\", \"best bid/ask price/size\" etc. of a single symbol. These messages can also be obtained through Websocket.", "x-api-rate-limit-weight": 2, "x-response-example": "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"sequence\\\":1697895100310,\\\"symbol\\\":\\\"XBTUSDM\\\",\\\"side\\\":\\\"sell\\\",\\\"size\\\":2936,\\\"tradeId\\\":\\\"1697901180000\\\",\\\"price\\\":\\\"67158.4\\\",\\\"bestBidPrice\\\":\\\"67169.6\\\",\\\"bestBidSize\\\":32345,\\\"bestAskPrice\\\":\\\"67169.7\\\",\\\"bestAskSize\\\":7251,\\\"ts\\\":1729163001780000000}}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}", "operationId": "003" } }, "/api/v1/allTickers": { "get": { "summary": "Get All Tickers", "deprecated": false, "description": "This endpoint returns \"last traded price/size\", \"best bid/ask price/size\" etc. of a single symbol. These messages can also be obtained through Websocket.", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "description": "200000 is for success, other is error" }, "data": { "type": "array", "items": { "type": "object", "properties": { "sequence": { "type": "integer", "description": "Sequence number, used to judge whether the messages pushed by Websocket are continuous.", "format": "int64" }, "symbol": { "type": "string", "description": "Symbol" }, "side": { "type": "string", "description": "Trade direction", "enum": [ "buy", "sell" ], "x-api-enum": [ { "value": "buy", "name": "BUY", "description": "" }, { "value": "sell", "name": "SELL", "description": "" } ] }, "size": { "type": "integer", "description": "Filled side; the trade side indicates the taker order side. A taker order is the order that was matched with orders opened on the order book." }, "tradeId": { "type": "string", "description": "Transaction ID" }, "price": { "type": "string", "description": "Filled price" }, "bestBidPrice": { "type": "string", "description": "Best bid price" }, "bestBidSize": { "type": "integer", "description": "Best bid size" }, "bestAskPrice": { "type": "string", "description": "Best ask price" }, "bestAskSize": { "type": "integer", "description": "Best ask size" }, "ts": { "type": "integer", "description": "Filled time (nanoseconds)", "format": "int64" } }, "required": [ "sequence", "symbol", "side", "tradeId", "price", "bestBidPrice", "bestBidSize", "bestAskPrice", "bestAskSize", "ts", "size" ] } } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470223", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "getAllTickers", "x-sdk-method-description": "This endpoint returns \"last traded price/size\", \"best bid/ask price/size\" etc. of a single symbol. These messages can also be obtained through Websocket.", "x-api-rate-limit-weight": 5, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": [\\n {\\n \\\"sequence\\\": 1707992727046,\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"side\\\": \\\"sell\\\",\\n \\\"size\\\": 21,\\n \\\"tradeId\\\": \\\"1784299761369\\\",\\n \\\"price\\\": \\\"67153\\\",\\n \\\"bestBidPrice\\\": \\\"67153\\\",\\n \\\"bestBidSize\\\": 2767,\\n \\\"bestAskPrice\\\": \\\"67153.1\\\",\\n \\\"bestAskSize\\\": 5368,\\n \\\"ts\\\": 1729163466659000000\\n },\\n {\\n \\\"sequence\\\": 1697895166299,\\n \\\"symbol\\\": \\\"XBTUSDM\\\",\\n \\\"side\\\": \\\"sell\\\",\\n \\\"size\\\": 1956,\\n \\\"tradeId\\\": \\\"1697901245065\\\",\\n \\\"price\\\": \\\"67145.2\\\",\\n \\\"bestBidPrice\\\": \\\"67135.3\\\",\\n \\\"bestBidSize\\\": 1,\\n \\\"bestAskPrice\\\": \\\"67135.8\\\",\\n \\\"bestAskSize\\\": 3,\\n \\\"ts\\\": 1729163445340000000\\n }\\n ]\\n}", "operationId": "004" } }, "/api/v1/level2/snapshot": { "get": { "summary": "Get Full OrderBook", "deprecated": false, "description": "Query for Full orderbook depth data (aggregated by price). It is generally used by professional traders because it uses more server resources and traffic, and we have strict access rate limit control. To maintain an up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) \n", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "description": "200000 is for success, other is error" }, "data": { "type": "object", "properties": { "sequence": { "type": "integer", "description": "Sequence number", "format": "int64" }, "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "bids": { "type": "array", "items": { "type": "array", "items": { "type": "number", "description": "Price, Size" } }, "description": "bids, from high to low" }, "asks": { "type": "array", "items": { "type": "array", "items": { "type": "number", "description": "Price, Size" } }, "description": "asks, from low to high" }, "ts": { "type": "integer", "format": "int64", "description": "Timestamp (nanoseconds)" } }, "required": [ "sequence", "symbol", "bids", "asks", "ts" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470224", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "getFullOrderBook", "x-sdk-method-description": "Query for Full orderbook depth data (aggregated by price). It is generally used by professional traders because it uses more server resources and traffic, and we have strict access rate limit control. To maintain an up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook.", "x-api-rate-limit-weight": 3, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"sequence\\\": 1697895963339,\\n \\\"symbol\\\": \\\"XBTUSDM\\\",\\n \\\"bids\\\": [\\n [\\n 66968,\\n 2\\n ],\\n [\\n 66964.8,\\n 25596\\n ]\\n ],\\n \\\"asks\\\": [\\n [\\n 66968.1,\\n 13501\\n ],\\n [\\n 66968.7,\\n 2032\\n ]\\n ],\\n \\\"ts\\\": 1729168101216000000\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDM\\\"}", "operationId": "005" } }, "/api/v1/level2/depth{size}": { "get": { "summary": "Get Part OrderBook", "deprecated": false, "description": "Query for part orderbook depth data. (aggregated by price). It is recommended that you request via this endpoint, as the system response will be faster and consume less traffic.", "tags": [], "parameters": [ { "name": "size", "in": "path", "description": "Get the depth layer, optional value: 20, 100", "required": true, "schema": { "type": "string" } }, { "name": "symbol", "in": "query", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "sequence": { "type": "integer", "description": "Sequence number", "format": "int64" }, "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "bids": { "type": "array", "items": { "type": "array", "items": { "type": "number", "description": "Price, Size" } }, "description": "bids, from high to low" }, "asks": { "type": "array", "items": { "type": "array", "items": { "type": "number", "description": "Price, Size" } }, "description": "asks, from low to high" }, "ts": { "type": "integer", "description": "Timestamp (nanoseconds)", "format": "int64" } }, "required": [ "sequence", "symbol", "bids", "asks", "ts" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470225", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "getPartOrderBook", "x-sdk-method-description": "Query for part orderbook depth data. (aggregated by price). It is recommended that you request via this endpoint, as the system response will be faster and consume less traffic.", "x-api-rate-limit-weight": 5, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"sequence\\\": 1697895963339,\\n \\\"symbol\\\": \\\"XBTUSDM\\\",\\n \\\"bids\\\": [\\n [\\n 66968,\\n 2\\n ],\\n [\\n 66964.8,\\n 25596\\n ]\\n ],\\n \\\"asks\\\": [\\n [\\n 66968.1,\\n 13501\\n ],\\n [\\n 66968.7,\\n 2032\\n ]\\n ],\\n \\\"ts\\\": 1729168101216000000\\n }\\n}", "x-request-example": "{\\\"size\\\": \\\"20\\\", \\\"symbol\\\": \\\"XBTUSDM\\\"}", "operationId": "006" } }, "/api/v1/trade/history": { "get": { "summary": "Get Trade History", "deprecated": false, "description": "Request the trade history of the specified symbol via this endpoint. The returned quantity is the last 100 transaction records.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "sequence": { "type": "integer", "description": "Sequence number", "format": "int64" }, "contractId": { "type": "integer", "description": "Deprecated param" }, "tradeId": { "type": "string", "description": "Transaction ID" }, "makerOrderId": { "type": "string", "description": "Maker order ID" }, "takerOrderId": { "type": "string", "description": "Taker order ID" }, "ts": { "type": "integer", "description": "Filled timestamp (nanosecond)", "format": "int64" }, "size": { "type": "integer", "description": "Filled amount" }, "price": { "type": "string", "description": "Filled price" }, "side": { "type": "string", "description": "Filled side; the trade side indicates the taker order side. A taker order is the order that was matched with orders opened on the order book.", "enum": [ "buy", "sell" ], "x-api-enum": [ { "value": "buy", "name": "buy", "description": "buy" }, { "value": "sell", "name": "sell", "description": "sell" } ] } }, "required": [ "sequence", "contractId", "tradeId", "makerOrderId", "takerOrderId", "ts", "size", "price", "side" ] } } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470232", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "getTradeHistory", "x-sdk-method-description": "Request the trade history of the specified symbol via this endpoint. The returned quantity is the last 100 transaction records.", "x-api-rate-limit-weight": 5, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": [\\n {\\n \\\"sequence\\\": 1697915257909,\\n \\\"contractId\\\": 1,\\n \\\"tradeId\\\": \\\"1697915257909\\\",\\n \\\"makerOrderId\\\": \\\"236679665752801280\\\",\\n \\\"takerOrderId\\\": \\\"236679667975745536\\\",\\n \\\"ts\\\": 1729242032152000000,\\n \\\"size\\\": 1,\\n \\\"price\\\": \\\"67878\\\",\\n \\\"side\\\": \\\"sell\\\"\\n },\\n {\\n \\\"sequence\\\": 1697915257749,\\n \\\"contractId\\\": 1,\\n \\\"tradeId\\\": \\\"1697915257749\\\",\\n \\\"makerOrderId\\\": \\\"236679660971245570\\\",\\n \\\"takerOrderId\\\": \\\"236679665400492032\\\",\\n \\\"ts\\\": 1729242031535000000,\\n \\\"size\\\": 1,\\n \\\"price\\\": \\\"67867.8\\\",\\n \\\"side\\\": \\\"sell\\\"\\n },\\n {\\n \\\"sequence\\\": 1697915257701,\\n \\\"contractId\\\": 1,\\n \\\"tradeId\\\": \\\"1697915257701\\\",\\n \\\"makerOrderId\\\": \\\"236679660971245570\\\",\\n \\\"takerOrderId\\\": \\\"236679661919211521\\\",\\n \\\"ts\\\": 1729242030932000000,\\n \\\"size\\\": 1,\\n \\\"price\\\": \\\"67867.8\\\",\\n \\\"side\\\": \\\"sell\\\"\\n }\\n ]\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDM\\\"}", "operationId": "007" } }, "/api/v1/kline/query": { "get": { "summary": "Get Klines", "deprecated": false, "description": "Get the symbol’s candlestick chart. Data are returned in grouped buckets based on requested type. For each query, the system will return at most 500 pieces of data. To obtain more data, please page the data by time.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string", "example": [ "XBTUSDTM", ".KXBTUSDT", ".XBTUSDTMPI", ".XBTUSDTMPI8H" ] } }, { "name": "granularity", "in": "query", "description": "Type of candlestick patterns (minutes)", "required": true, "schema": { "type": "integer", "enum": [ 1, 5, 15, 30, 60, 120, 240, 480, 720, 1440, 10080 ], "format": "int64", "x-api-enum": [ { "value": 1, "name": "1", "description": "1min" }, { "value": 5, "name": "5", "description": "5min" }, { "value": 15, "name": "15", "description": "15min" }, { "value": 30, "name": "30", "description": "30min" }, { "value": 60, "name": "60", "description": "1hour" }, { "value": 120, "name": "120", "description": "2hour" }, { "value": 240, "name": "240", "description": "4hour" }, { "value": 480, "name": "480", "description": "8hour" }, { "value": 720, "name": "720", "description": "12hour" }, { "value": 1440, "name": "1440", "description": "1day" }, { "value": 10080, "name": "10080", "description": "1week" } ] } }, { "name": "from", "in": "query", "description": "Start time (milliseconds)", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "to", "in": "query", "description": "End time (milliseconds)", "required": false, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "array", "items": { "type": "array", "items": { "type": "number", "description": "Start time of the candle cycle, opening price, highest price, lowest price, closing price, transaction volume" } } } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470234", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "getKlines", "x-sdk-method-description": "Get the symbol’s candlestick chart. Data are returned in grouped buckets based on requested type. For each query, the system will return at most 500 pieces of data. To obtain more data, please page the data by time.", "x-api-rate-limit-weight": 3, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": [\\n [\\n 1728576000000,\\n 60791.1,\\n 61035,\\n 58940,\\n 60300,\\n 5501167\\n ],\\n [\\n 1728604800000,\\n 60299.9,\\n 60924.1,\\n 60077.4,\\n 60666.1,\\n 1220980\\n ],\\n [\\n 1728633600000,\\n 60665.7,\\n 62436.8,\\n 60650.1,\\n 62255.1,\\n 3386359\\n ]\\n ]\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"granularity\\\": 1, \\\"from\\\": 1728552342000, \\\"to\\\": 1729243542000}", "operationId": "008" } }, "/api/v1/mark-price/{symbol}/current": { "get": { "summary": "Get Mark Price", "deprecated": false, "description": "Get the current mark price (Update snapshots once per second, real-time query).", "tags": [], "parameters": [ { "name": "symbol", "in": "path", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "granularity": { "type": "integer", "description": "Granularity (milliseconds)" }, "timePoint": { "type": "integer", "description": "Time point (milliseconds)", "format": "int64" }, "value": { "type": "number", "description": "Mark price" }, "indexPrice": { "type": "number", "description": "Index price" } }, "required": [ "symbol", "granularity", "timePoint", "value", "indexPrice" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470233", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "getMarkPrice", "x-sdk-method-description": "Get the current mark price (Update snapshots once per second, real-time query).", "x-api-rate-limit-weight": 3, "x-response-example": "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"symbol\\\":\\\"XBTUSDTM\\\",\\\"granularity\\\":1000,\\\"timePoint\\\":1729254307000,\\\"value\\\":67687.08,\\\"indexPrice\\\":67683.58}}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}", "operationId": "009" } }, "/api/v1/index/query": { "get": { "summary": "Get Spot Index Price", "deprecated": false, "description": "Get Spot Index Price (Update snapshots once per second, and there is a 5s cache when querying).", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string", "example": [ ".KXBTUSDT", ".BXBT" ] } }, { "name": "startAt", "in": "query", "description": "Start time (milliseconds)", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "endAt", "in": "query", "description": "End time (milliseconds)", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "reverse", "in": "query", "description": "This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default.", "required": false, "schema": { "type": "boolean", "default": true } }, { "name": "offset", "in": "query", "description": "Start offset. The unique attribute of the last returned result of the last request. The data of the first page will be returned by default.", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "forward", "in": "query", "description": "This parameter functions to judge whether the lookup is forward or not. True means “yes” and False means “no”. This parameter is set as true by default.", "required": false, "schema": { "type": "boolean", "default": true } }, { "name": "maxCount", "in": "query", "description": "Max. record count. The default record count is 10; the maximum length cannot exceed 100", "required": false, "schema": { "type": "integer", "format": "int64", "default": 10, "maximum": 100 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "dataList": { "type": "array", "items": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) " }, "granularity": { "type": "integer", "description": "Granularity (milliseconds)" }, "timePoint": { "type": "integer", "description": "Timestamp (milliseconds)", "format": "int64" }, "value": { "type": "number", "description": "Index Value" }, "decomposionList": { "type": "array", "items": { "type": "object", "properties": { "exchange": { "type": "string", "description": "Exchange" }, "price": { "type": "number", "description": "Price" }, "weight": { "type": "number", "description": "Weight" } }, "required": [ "exchange", "price", "weight" ] }, "description": "Component List" } }, "required": [ "symbol", "granularity", "timePoint", "value", "decomposionList" ] } }, "hasMore": { "type": "boolean", "description": "Whether there are more pages" } }, "required": [ "dataList", "hasMore" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470231", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "getSpotIndexPrice", "x-sdk-method-description": "Get Spot Index Price (Update snapshots once per second, and there is a 5s cache when querying).", "x-api-rate-limit-weight": 2, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"hasMore\\\": true,\\n \\\"dataList\\\": [\\n {\\n \\\"symbol\\\": \\\".KXBTUSDT\\\",\\n \\\"granularity\\\": 1000,\\n \\\"timePoint\\\": 1730557515000,\\n \\\"value\\\": 69202.94,\\n \\\"decomposionList\\\": [\\n {\\n \\\"exchange\\\": \\\"gateio\\\",\\n \\\"price\\\": 69209.27,\\n \\\"weight\\\": 0.0533\\n },\\n {\\n \\\"exchange\\\": \\\"bitmart\\\",\\n \\\"price\\\": 69230.77,\\n \\\"weight\\\": 0.0128\\n },\\n {\\n \\\"exchange\\\": \\\"okex\\\",\\n \\\"price\\\": 69195.34,\\n \\\"weight\\\": 0.11\\n },\\n {\\n \\\"exchange\\\": \\\"bybit\\\",\\n \\\"price\\\": 69190.33,\\n \\\"weight\\\": 0.0676\\n },\\n {\\n \\\"exchange\\\": \\\"binance\\\",\\n \\\"price\\\": 69204.55,\\n \\\"weight\\\": 0.6195\\n },\\n {\\n \\\"exchange\\\": \\\"kucoin\\\",\\n \\\"price\\\": 69202.91,\\n \\\"weight\\\": 0.1368\\n }\\n ]\\n },\\n {\\n \\\"symbol\\\": \\\".KXBTUSDT\\\",\\n \\\"granularity\\\": 1000,\\n \\\"timePoint\\\": 1730557514000,\\n \\\"value\\\": 69204.98,\\n \\\"decomposionList\\\": [\\n {\\n \\\"exchange\\\": \\\"gateio\\\",\\n \\\"price\\\": 69212.71,\\n \\\"weight\\\": 0.0808\\n },\\n {\\n \\\"exchange\\\": \\\"bitmart\\\",\\n \\\"price\\\": 69230.77,\\n \\\"weight\\\": 0.0134\\n },\\n {\\n \\\"exchange\\\": \\\"okex\\\",\\n \\\"price\\\": 69195.49,\\n \\\"weight\\\": 0.0536\\n },\\n {\\n \\\"exchange\\\": \\\"bybit\\\",\\n \\\"price\\\": 69195.97,\\n \\\"weight\\\": 0.0921\\n },\\n {\\n \\\"exchange\\\": \\\"binance\\\",\\n \\\"price\\\": 69204.56,\\n \\\"weight\\\": 0.5476\\n },\\n {\\n \\\"exchange\\\": \\\"kucoin\\\",\\n \\\"price\\\": 69207.8,\\n \\\"weight\\\": 0.2125\\n }\\n ]\\n }\\n ]\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\".KXBTUSDT\\\", \\\"startAt\\\": 123456, \\\"endAt\\\": 123456, \\\"reverse\\\": true, \\\"offset\\\": 123456, \\\"forward\\\": true, \\\"maxCount\\\": 10}", "operationId": "010" } }, "/api/v1/interest/query": { "get": { "summary": "Get Interest Rate Index", "deprecated": false, "description": "Get interest rate Index (real-time query).", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string", "example": [ ".XBTINT8H", ".USDTINT8H", ".XBTINT", ".USDTINT" ] } }, { "name": "startAt", "in": "query", "description": "Start time (milliseconds)", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "endAt", "in": "query", "description": "End time (milliseconds)", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "reverse", "in": "query", "description": "This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default.", "required": false, "schema": { "type": "boolean", "default": true } }, { "name": "offset", "in": "query", "description": "Start offset. The unique attribute of the last returned result of the last request. The data of the first page will be returned by default.", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "forward", "in": "query", "description": "This parameter functions to judge whether the lookup is forward or not. True means “yes” and False means “no”. This parameter is set as true by default.", "required": false, "schema": { "type": "boolean", "default": true } }, { "name": "maxCount", "in": "query", "description": "Max. record count. The default record count is 10; the maximum length cannot exceed 100", "required": false, "schema": { "type": "integer", "format": "int64", "default": 10, "maximum": 100 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "dataList": { "type": "array", "items": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) " }, "granularity": { "type": "integer", "description": "Granularity (milliseconds)" }, "timePoint": { "type": "integer", "description": "Timestamp (milliseconds)", "format": "int64" }, "value": { "type": "number", "description": "Interest rate value" } }, "required": [ "symbol", "granularity", "timePoint", "value" ] } }, "hasMore": { "type": "boolean", "description": "Whether there are more pages" } }, "required": [ "dataList", "hasMore" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470226", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "getInterestRateIndex", "x-sdk-method-description": "Get interest rate Index (real-time query).", "x-api-rate-limit-weight": 5, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"dataList\\\": [\\n {\\n \\\"symbol\\\": \\\".XBTINT\\\",\\n \\\"granularity\\\": 60000,\\n \\\"timePoint\\\": 1728692100000,\\n \\\"value\\\": 3.0E-4\\n },\\n {\\n \\\"symbol\\\": \\\".XBTINT\\\",\\n \\\"granularity\\\": 60000,\\n \\\"timePoint\\\": 1728692040000,\\n \\\"value\\\": 3.0E-4\\n }\\n ],\\n \\\"hasMore\\\": true\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\".XBTINT8H\\\", \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000, \\\"reverse\\\": true, \\\"offset\\\": 254062248624417, \\\"forward\\\": true, \\\"maxCount\\\": 10}", "operationId": "011" } }, "/api/v1/premium/query": { "get": { "summary": "Get Premium Index", "deprecated": false, "description": "Submit request to get premium index (Update snapshots once per second, real-time query).", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string", "example": [ ".XBTUSDTMPI", ".XBTUSDTMPI8H" ] } }, { "name": "startAt", "in": "query", "description": "Start time (milliseconds)", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "endAt", "in": "query", "description": "End time (milliseconds)", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "reverse", "in": "query", "description": "This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default.", "required": false, "schema": { "type": "boolean", "default": true } }, { "name": "offset", "in": "query", "description": "Start offset. The unique attribute of the last returned result of the last request. The data of the first page will be returned by default.", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "forward", "in": "query", "description": "This parameter functions to judge whether the lookup is forward or not. True means “yes” and False means “no”. This parameter is set as true by default.", "required": false, "schema": { "type": "boolean", "default": true } }, { "name": "maxCount", "in": "query", "description": "Max. record count. The default record count is 10; the maximum length cannot exceed 100", "required": false, "schema": { "type": "integer", "format": "int64", "default": 10, "maximum": 100 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "dataList": { "type": "array", "items": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) " }, "granularity": { "type": "integer", "description": "Granularity (milliseconds)" }, "timePoint": { "type": "integer", "description": "Timestamp (milliseconds)", "format": "int64" }, "value": { "type": "number", "description": "Premium index" } }, "required": [ "symbol", "granularity", "timePoint", "value" ] } }, "hasMore": { "type": "boolean", "description": "Whether there are more pages" } }, "required": [ "dataList", "hasMore" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470227", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "getPremiumIndex", "x-sdk-method-description": "Submit request to get premium index (Update snapshots once per second, real-time query).", "x-api-rate-limit-weight": 3, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"hasMore\\\": true,\\n \\\"dataList\\\": [\\n {\\n \\\"symbol\\\": \\\".XBTUSDTMPI\\\",\\n \\\"granularity\\\": 60000,\\n \\\"timePoint\\\": 1730558040000,\\n \\\"value\\\": 0.00006\\n },\\n {\\n \\\"symbol\\\": \\\".XBTUSDTMPI\\\",\\n \\\"granularity\\\": 60000,\\n \\\"timePoint\\\": 1730557980000,\\n \\\"value\\\": -0.000025\\n }\\n ]\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\".XBTUSDTMPI\\\", \\\"startAt\\\": 1728663338000, \\\"endAt\\\": 1728692138000, \\\"reverse\\\": true, \\\"offset\\\": 254062248624417, \\\"forward\\\": true, \\\"maxCount\\\": 10}", "operationId": "012" } }, "/api/v1/trade-statistics": { "get": { "summary": "Get 24hr stats", "deprecated": false, "description": "Get the statistics of the platform futures trading volume in the last 24 hours.", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "turnoverOf24h": { "type": "number", "description": "24-hour platform Futures trading volume. Unit is USD" } }, "required": [ "turnoverOf24h" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470228", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "get24hrStats", "x-sdk-method-description": "Get the statistics of the platform futures trading volume in the last 24 hours.", "x-api-rate-limit-weight": 3, "x-response-example": "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"turnoverOf24h\\\":1.1155733413273683E9}}", "operationId": "013" } }, "/api/v1/timestamp": { "get": { "summary": "Get Server Time", "deprecated": false, "description": "Get the API server time. This is the Unix timestamp.", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "integer", "format": "int64", "description": "ServerTime (milliseconds)" } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470229", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "getServerTime", "x-sdk-method-description": "Get the API server time. This is the Unix timestamp.", "x-api-rate-limit-weight": 2, "x-response-example": "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":1729260030774}", "operationId": "014" } }, "/api/v1/status": { "get": { "summary": "Get Service Status", "deprecated": false, "description": "Get the service status.", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "msg": { "type": "string" }, "status": { "type": "string", "description": "Status of service: open: normal transaction; close: Stop Trading/Maintenance; cancelonly: can only cancel the order but not place order", "enum": [ "open", "close", "cancelonly" ], "x-api-enum": [ { "value": "open", "name": "OPEN", "description": "normal transaction" }, { "value": "close", "name": "CLOSE", "description": "Stop Trading/Maintenance" }, { "value": "cancelonly", "name": "CANCELONLY", "description": "can only cancel the order but not place order" } ] } }, "required": [ "msg", "status" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470230", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "getServiceStatus", "x-sdk-method-description": "Get the service status.", "x-api-rate-limit-weight": 4, "x-response-example": "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"msg\\\":\\\"\\\",\\\"status\\\":\\\"open\\\"}}", "operationId": "015" } }, "/api/v1/orders": { "post": { "summary": "Add Order", "deprecated": false, "description": "Place order in the futures trading system. You can place two major types of order: Limit and market. Orders can only be placed if your account has sufficient funds. Once an order is placed, your funds will be put on hold for the duration of the order. The amount of funds on hold depends on the order type and parameters specified.", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "orderId": { "type": "string", "description": "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order." }, "clientOid": { "type": "string", "description": "The user self-defined order ID." } }, "required": [ "orderId", "clientOid" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470235", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "addOrder", "x-sdk-method-description": "Place order in the futures trading system. You can place two major types of order: Limit and market. Orders can only be placed if your account has sufficient funds. Once an order is placed, your funds will be put on hold for the duration of the order. The amount of funds on hold depends on the order type and parameters specified.", "x-api-rate-limit-weight": 2, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "clientOid": { "type": "string", "description": "Unique order ID created by users to identify their orders. The maximum length cannot exceed 40, e.g. UUID only allows numbers, characters, underline(_), and separator (-).", "example": [ "5c52e11203aa677f33e493fb" ] }, "side": { "type": "string", "description": "Specify if the order is to 'buy' or 'sell'.", "enum": [ "buy", "sell" ], "x-api-enum": [ { "value": "buy", "name": "", "description": "" }, { "value": "sell", "name": "", "description": "" } ], "example": [ "buy" ] }, "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "example": [ "XBTUSDTM" ] }, "leverage": { "type": "integer", "description": "Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required.", "example": [ 3 ] }, "type": { "type": "string", "description": "Specify if the order is a 'limit' order or 'market' order", "enum": [ "limit", "market" ], "default": "limit", "x-api-enum": [ { "value": "limit", "name": "", "description": "" }, { "value": "market", "name": "", "description": "" } ], "example": [ "limit" ] }, "remark": { "type": "string", "description": "Remark for the order: Length cannot exceed 100 utf8 characters" }, "stop": { "type": "string", "description": "Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be provided.", "enum": [ "down", "up" ], "x-api-enum": [ { "value": "down", "name": "down", "description": "Triggers when the price reaches or goes below the stopPrice." }, { "value": "up", "name": "up", "description": "Triggers when the price reaches or goes above the stopPrice." } ] }, "stopPriceType": { "type": "string", "description": "Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified.", "enum": [ "TP", "MP", "IP" ], "x-api-enum": [ { "value": "TP", "name": "trade price", "description": "TP for trade price, The last trade price is the last price at which an order was filled. This price can be found in the latest match message." }, { "value": "MP", "name": "mark price", "description": "MP for mark price. The mark price can be obtained through relevant OPEN API for index services." }, { "value": "IP", "name": "index price", "description": "IP for index price. The index price can be obtained through relevant OPEN API for index services." } ] }, "stopPrice": { "type": "string", "description": "Needs to be defined if stop is specified. " }, "reduceOnly": { "type": "boolean", "description": "A mark to reduce the position size only. Set to false by default. Need to set the position size when reduceOnly is true. If set to true, only the orders reducing the position size will be executed. If the reduce-only order size exceeds the position size, the extra size will be canceled.", "default": false }, "closeOrder": { "type": "boolean", "description": "A mark to close the position. Set to false by default. If closeOrder is set to true, the system will close the position and the position size will become 0. Side, Size and Leverage fields can be left empty and the system will determine the side and size automatically.", "default": false }, "forceHold": { "type": "boolean", "description": "A mark to force-hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to false by default. The system will force-freeze a certain amount of funds for this order, including orders whose direction is opposite to the current positions. This feature is to ensure that the order won’t be canceled by the matching engine in such a way that not enough funds are frozen for the order.", "default": false }, "stp": { "type": "string", "description": "[Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported.", "enum": [ "CN", "CO", "CB" ], "x-api-enum": [ { "value": "CN", "name": "CN", "description": "Cancel new, Cancel the new order" }, { "value": "CO", "name": "CO", "description": "Cancel old, Cancel the old order" }, { "value": "CB", "name": "CB", "description": "Cancel both, Cancel both sides" } ] }, "marginMode": { "type": "string", "description": "Margin mode: ISOLATED, CROSS, default: ISOLATED", "enum": [ "ISOLATED", "CROSS" ], "default": "ISOLATED", "x-api-enum": [ { "value": "ISOLATED", "name": "ISOLATED", "description": "Isolated Margin" }, { "value": "CROSS", "name": "CROSS", "description": "Cross Margin" } ] }, "price": { "type": "string", "description": "Required for type is 'limit' order, indicating the operating price", "example": [ "0.1" ] }, "size": { "type": "integer", "description": "**Choose one of size, qty, valueQty**, Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported." }, "timeInForce": { "type": "string", "description": "Optional for type is 'limit' order, [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading, default is GTC", "enum": [ "GTC", "IOC" ], "default": "GTC", "x-api-enum": [ { "value": "GTC", "name": "Good Till Canceled", "description": "Order remains open on the order book until canceled. This is the default type if the field is left empty." }, { "value": "IOC", "name": "Immediate Or Cancel", "description": "Being matched or not, the remaining size of the order will be instantly canceled instead of entering the order book." } ] }, "postOnly": { "type": "boolean", "description": "Optional for type is 'limit' order, post only flag, invalid when timeInForce is IOC. When postOnly is true, choosing hidden or iceberg is not allowed. The post-only flag ensures that the trader always pays the maker fee and provides liquidity to the order book. If any part of the order is going to pay taker fees, the order will be fully rejected.", "default": false }, "hidden": { "type": "boolean", "description": "Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed.", "default": false }, "iceberg": { "type": "boolean", "description": "Optional for type is 'limit' order, Only visible portion of the order is displayed in the order book. When iceberg is chosen, choosing postOnly is not allowed.", "default": false }, "visibleSize": { "type": "string", "description": "Optional for type is 'limit' order, the maximum visible size of an iceberg order. Please place order in size (lots). The units of qty (base currency) and valueQty (value) are not supported. Need to be defined if iceberg is specified." }, "qty": { "type": "string", "description": "**Choose one of size, qty, valueQty**. Order size (base currency) must be an integer multiple of the multiplier. The unit of the quantity of coin-swap is size (lot), which is not supported." }, "valueQty": { "type": "string", "description": "**Choose one of size, qty, valueQty**. Order size (Value), USDS-Swap correspond to USDT or USDC. The unit of the quantity of coin-swap is size (lot), which is not supported." } }, "required": [ "clientOid", "symbol", "side", "leverage" ] }, "example": "{\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"side\": \"buy\",\n \"symbol\": \"XBTUSDTM\",\n \"leverage\": 3,\n \"type\": \"limit\",\n \"remark\": \"order remarks\",\n \"reduceOnly\": false,\n \"marginMode\": \"ISOLATED\",\n \"price\": \"0.1\",\n \"size\": 1,\n \"timeInForce\": \"GTC\"\n}" } } }, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"orderId\\\": \\\"234125150956625920\\\",\\n \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"\\n }\\n}", "x-request-example": "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\", \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\", \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false, \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1, \\\"timeInForce\\\": \\\"GTC\\\"}", "operationId": "016" }, "get": { "summary": "Get Order List", "deprecated": false, "description": "List your current orders.", "tags": [], "parameters": [ { "name": "status", "in": "query", "description": "active or done, done as default. Only list orders for a specific status", "required": false, "schema": { "type": "string", "enum": [ "active", "done" ], "x-api-enum": [ { "value": "active", "name": "", "description": "" }, { "value": "done", "name": "", "description": "" } ] } }, { "name": "symbol", "in": "query", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": false, "schema": { "type": "string" } }, { "name": "side", "in": "query", "description": "buy or sell", "required": false, "schema": { "type": "string", "enum": [ "buy", "sell" ], "x-api-enum": [ { "value": "buy", "name": "", "description": "" }, { "value": "sell", "name": "", "description": "" } ] } }, { "name": "type", "in": "query", "description": "Order Type", "required": false, "schema": { "type": "string", "enum": [ "limit", "market", "limit_stop", "market_stop", "oco_limit", "oco_stop" ], "x-api-enum": [ { "value": "limit", "name": "limit", "description": "Limit order" }, { "value": "market", "name": "market", "description": "Market order" }, { "value": "limit_stop", "name": "limit_stop", "description": "Stop limit order" }, { "value": "market_stop", "name": "market_stop", "description": "Stop market order" }, { "value": "oco_limit", "name": "oco_limit", "description": "Oco limit order" }, { "value": "oco_stop", "name": "oco_stop", "description": "Oco stop order" } ] } }, { "name": "startAt", "in": "query", "description": "Start time (milisecond)", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "endAt", "in": "query", "description": "End time (milisecond)", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "currentPage", "in": "query", "description": "Current request page, The default currentPage is 1", "required": false, "schema": { "type": "integer", "default": 1 } }, { "name": "pageSize", "in": "query", "description": "pageSize, The default pageSize is 50, The maximum cannot exceed 1000", "required": false, "schema": { "type": "integer", "default": 50, "maximum": 1000 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "currentPage": { "type": "integer", "description": "Current request page, The default currentPage is 1" }, "pageSize": { "type": "integer", "description": "pageSize, The default pageSize is 50, The maximum cannot exceed 1000" }, "totalNum": { "type": "integer" }, "totalPage": { "type": "integer" }, "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Order ID" }, "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "type": { "type": "string", "description": "Order type, market order or limit order\n" }, "side": { "type": "string", "description": "Transaction side" }, "price": { "type": "string", "description": "Order price" }, "size": { "type": "integer", "description": "Order quantity" }, "value": { "type": "string", "description": "Order value" }, "dealValue": { "type": "string", "description": "Executed size of funds\n" }, "dealSize": { "type": "integer", "description": "Executed quantity" }, "stp": { "type": "string", "description": "self trade prevention" }, "stop": { "type": "string", "description": "A mark to the stop order type", "enum": [ "down", "up", "" ], "x-api-enum": [ { "value": "down", "name": "down", "description": "Triggers when the price reaches or goes below the stopPrice." }, { "value": "up", "name": "up", "description": "Triggers when the price reaches or goes above the stopPrice." }, { "value": "", "name": "None", "description": "Not a stop order" } ] }, "stopPriceType": { "type": "string", "description": "Trigger price type of stop orders", "enum": [ "TP", "MP", "IP", "" ], "x-api-enum": [ { "value": "TP", "name": "trade price", "description": "TP for trade price, The last trade price is the last price at which an order was filled. This price can be found in the latest match message." }, { "value": "MP", "name": "mark price", "description": "MP for mark price. The mark price can be obtained through relevant OPEN API for index services." }, { "value": "IP", "name": "index price", "description": "IP for index price. The index price can be obtained through relevant OPEN API for index services." }, { "value": "", "name": "None", "description": "Not a stop order" } ] }, "stopTriggered": { "type": "boolean", "description": "Mark to show whether the stop order is triggered" }, "stopPrice": { "type": "integer", "description": "Trigger price of stop orders" }, "timeInForce": { "type": "string", "description": "Time in force policy type" }, "postOnly": { "type": "boolean", "description": "Mark of post only" }, "hidden": { "type": "boolean", "description": "Mark of the hidden order" }, "iceberg": { "type": "boolean", "description": "Mark of the iceberg order" }, "leverage": { "type": "string", "description": "Leverage of the order" }, "forceHold": { "type": "boolean", "description": "A mark to forcely hold the funds for an order" }, "closeOrder": { "type": "boolean", "description": "A mark to close the position" }, "visibleSize": { "type": "integer", "description": "Visible size of the iceberg order" }, "clientOid": { "type": "string", "description": "Unique order id created by users to identify their orders" }, "remark": { "type": "string", "description": "Remark of the order" }, "tags": { "type": "string", "description": "tag order source" }, "isActive": { "type": "boolean", "description": "Mark of the active orders" }, "cancelExist": { "type": "boolean", "description": "Mark of the canceled orders" }, "createdAt": { "type": "integer", "description": "Time the order created", "format": "int64" }, "updatedAt": { "type": "integer", "description": "last update time", "format": "int64" }, "endAt": { "type": "integer", "description": "End time", "format": "int64" }, "orderTime": { "type": "integer", "description": "Order create time in nanosecond", "format": "int64" }, "settleCurrency": { "type": "string", "description": "settlement currency" }, "marginMode": { "type": "string", "description": "Margin mode: ISOLATED (isolated), CROSS (cross margin)." }, "avgDealPrice": { "type": "string", "description": "Average transaction price, forward contract average transaction price = sum (transaction value) / sum (transaction quantity), reverse contract average transaction price = sum (transaction quantity) / sum (transaction value). Transaction quantity = lots * multiplier" }, "status": { "type": "string", "description": "order status: “open” or “done”" }, "filledSize": { "type": "integer", "description": "Value of the executed orders" }, "filledValue": { "type": "string", "description": "Executed order quantity" }, "reduceOnly": { "type": "boolean", "description": "A mark to reduce the position size only" } }, "required": [ "id", "symbol", "type", "side", "price", "size", "value", "dealValue", "dealSize", "stp", "stop", "stopPriceType", "stopTriggered", "stopPrice", "timeInForce", "postOnly", "hidden", "iceberg", "leverage", "forceHold", "closeOrder", "visibleSize", "clientOid", "remark", "tags", "isActive", "cancelExist", "createdAt", "updatedAt", "endAt", "orderTime", "settleCurrency", "marginMode", "avgDealPrice", "status", "filledSize", "filledValue", "reduceOnly" ] } } }, "required": [ "currentPage", "pageSize", "totalNum", "totalPage", "items" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470244", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "General", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "GetOrderList", "x-sdk-method-description": "List your current orders.", "x-api-rate-limit-weight": 2, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"currentPage\\\": 1,\\n \\\"pageSize\\\": 50,\\n \\\"totalNum\\\": 1,\\n \\\"totalPage\\\": 1,\\n \\\"items\\\": [\\n {\\n \\\"id\\\": \\\"230181737576050688\\\",\\n \\\"symbol\\\": \\\"PEOPLEUSDTM\\\",\\n \\\"type\\\": \\\"limit\\\",\\n \\\"side\\\": \\\"buy\\\",\\n \\\"price\\\": \\\"0.05\\\",\\n \\\"size\\\": 10,\\n \\\"value\\\": \\\"5\\\",\\n \\\"dealValue\\\": \\\"0\\\",\\n \\\"dealSize\\\": 0,\\n \\\"stp\\\": \\\"\\\",\\n \\\"stop\\\": \\\"\\\",\\n \\\"stopPriceType\\\": \\\"\\\",\\n \\\"stopTriggered\\\": false,\\n \\\"stopPrice\\\": null,\\n \\\"timeInForce\\\": \\\"GTC\\\",\\n \\\"postOnly\\\": false,\\n \\\"hidden\\\": false,\\n \\\"iceberg\\\": false,\\n \\\"leverage\\\": \\\"1\\\",\\n \\\"forceHold\\\": false,\\n \\\"closeOrder\\\": false,\\n \\\"visibleSize\\\": 0,\\n \\\"clientOid\\\": \\\"5a80bd847f1811ef8a7faa665a37b3d7\\\",\\n \\\"remark\\\": null,\\n \\\"tags\\\": \\\"\\\",\\n \\\"isActive\\\": true,\\n \\\"cancelExist\\\": false,\\n \\\"createdAt\\\": 1727692804813,\\n \\\"updatedAt\\\": 1727692804813,\\n \\\"endAt\\\": null,\\n \\\"orderTime\\\": 1727692804808418000,\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"marginMode\\\": \\\"ISOLATED\\\",\\n \\\"avgDealPrice\\\": \\\"0\\\",\\n \\\"filledSize\\\": 0,\\n \\\"filledValue\\\": \\\"0\\\",\\n \\\"status\\\": \\\"open\\\",\\n \\\"reduceOnly\\\": false\\n }\\n ]\\n }\\n}", "x-request-example": "{\\\"status\\\": \\\"done\\\", \\\"symbol\\\": \\\"example_string_default_value\\\", \\\"side\\\": \\\"buy\\\", \\\"type\\\": \\\"limit\\\", \\\"startAt\\\": 123456, \\\"endAt\\\": 123456, \\\"currentPage\\\": 1, \\\"pageSize\\\": 50}", "operationId": "027" }, "delete": { "summary": "Cancel All Orders - V1", "deprecated": true, "description": "Cancel all open orders (excluding stop orders). The response is a list of orderIDs of the canceled orders.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "To cancel all limit orders for a specific contract only, unless otherwise specified, all limit orders will be deleted. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "cancelledOrderIds": { "type": "array", "items": { "type": "string" }, "description": "Unique ID of the canceled order" } }, "required": [ "cancelledOrderIds" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470362", "x-abandon": "abandon", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "cancelAllOrdersV1", "x-sdk-method-description": "Cancel all open orders (excluding stop orders). The response is a list of orderIDs of the canceled orders.", "x-api-rate-limit-weight": 800, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"cancelledOrderIds\\\": [\\n \\\"235919172150824960\\\",\\n \\\"235919172150824961\\\"\\n ]\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}", "operationId": "054" } }, "/api/v1/orders/test": { "post": { "summary": "Add Order Test", "deprecated": false, "description": "Place order to the futures trading system just for validation", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "orderId": { "type": "string", "description": "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order." }, "clientOid": { "type": "string", "description": "The user self-defined order id." } }, "required": [ "orderId", "clientOid" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470238", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "addOrderTest", "x-sdk-method-description": "Place order to the futures trading system just for validation", "x-api-rate-limit-weight": 2, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "clientOid": { "type": "string", "description": "Unique order id created by users to identify their orders, the maximum length cannot exceed 40, e.g. UUID, Only allows numbers, characters, underline(_), and separator(-)", "example": [ "5c52e11203aa677f33e493fb" ] }, "side": { "type": "string", "description": "specify if the order is to 'buy' or 'sell'", "enum": [ "buy", "sell" ], "x-api-enum": [ { "value": "buy", "name": "", "description": "" }, { "value": "sell", "name": "", "description": "" } ], "example": [ "buy" ] }, "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "example": [ "XBTUSDTM" ] }, "leverage": { "type": "integer", "description": "Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required.", "example": [ 3 ] }, "type": { "type": "string", "description": "specify if the order is an 'limit' order or 'market' order", "enum": [ "limit", "market" ], "default": "limit", "x-api-enum": [ { "value": "limit", "name": "", "description": "" }, { "value": "market", "name": "", "description": "" } ], "example": [ "limit" ] }, "remark": { "type": "string", "description": "remark for the order, length cannot exceed 100 utf8 characters" }, "stop": { "type": "string", "description": "Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded.", "enum": [ "down", "up" ], "x-api-enum": [ { "value": "down", "name": "down", "description": "Triggers when the price reaches or goes below the stopPrice." }, { "value": "up", "name": "up", "description": "Triggers when the price reaches or goes above the stopPrice" } ] }, "stopPriceType": { "type": "string", "description": "Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified.", "enum": [ "TP", "MP", "IP" ], "x-api-enum": [ { "value": "TP", "name": "trade price", "description": "TP for trade price, The last trade price is the last price at which an order was filled. This price can be found in the latest match message." }, { "value": "MP", "name": "mark price", "description": "MP for mark price, The mark price can be obtained through relevant OPEN API for index services" }, { "value": "IP", "name": "index price", "description": "IP for index price, The index price can be obtained through relevant OPEN API for index services" } ] }, "stopPrice": { "type": "string", "description": "Need to be defined if stop is specified. " }, "reduceOnly": { "type": "boolean", "description": "A mark to reduce the position size only. Set to false by default. Need to set the position size when reduceOnly is true. If set to true, only the orders reducing the position size will be executed. If the reduce-only order size exceeds the position size, the extra size will be canceled.", "default": false }, "closeOrder": { "type": "boolean", "description": "A mark to close the position. Set to false by default. If closeOrder is set to true, the system will close the position and the position size will become 0. Side, Size and Leverage fields can be left empty and the system will determine the side and size automatically.", "default": false }, "forceHold": { "type": "boolean", "description": "A mark to forcely hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to false by default. The system will forcely freeze certain amount of funds for this order, including orders whose direction is opposite to the current positions. This feature is to ensure that the order won’t be canceled by the matching engine in such a circumstance that not enough funds are frozen for the order.", "default": false }, "stp": { "type": "string", "description": "[Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. Not supported DC at the moment.", "enum": [ "CN", "CO", "CB" ], "x-api-enum": [ { "value": "CN", "name": "CN", "description": "Cancel new, Cancel the new order" }, { "value": "CO", "name": "CO", "description": "Cancel old, Cancel the old order" }, { "value": "CB", "name": "CB", "description": "Cancel both, Cancel both sides" } ] }, "marginMode": { "type": "string", "description": "Margin mode: ISOLATED, CROSS, default: ISOLATED", "enum": [ "ISOLATED", "CROSS" ], "default": "ISOLATED", "x-api-enum": [ { "value": "ISOLATED", "name": "", "description": "" }, { "value": "CROSS", "name": "", "description": "" } ] }, "price": { "type": "string", "description": "Required for type is 'limit' order, indicating the operating price", "example": [ "0.1" ] }, "size": { "type": "integer", "description": "**Choose one of size, qty, valueQty**, Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported." }, "timeInForce": { "type": "string", "description": "Optional for type is 'limit' order, [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading, default is GTC", "enum": [ "GTC", "IOC" ], "default": "GTC", "x-api-enum": [ { "value": "GTC", "name": "Good Till Canceled", "description": "order remains open on the order book until canceled. This is the default type if the field is left empty." }, { "value": "IOC", "name": "Immediate Or Cancel", "description": "being matched or not, the remaining size of the order will be instantly canceled instead of entering the order book." } ] }, "postOnly": { "type": "boolean", "description": "Optional for type is 'limit' order, post only flag, invalid when timeInForce is IOC. When postOnly is true, not allowed choose hidden or iceberg. The post-only flag ensures that the trader always pays the maker fee and provides liquidity to the order book. If any part of the order is going to pay taker fee, the order will be fully rejected.", "default": false }, "hidden": { "type": "boolean", "description": "Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly.", "default": false }, "iceberg": { "type": "boolean", "description": "Optional for type is 'limit' order, Only visible portion of the order is displayed in the order book. When iceberg chose, not allowed choose postOnly.", "default": false }, "visibleSize": { "type": "string", "description": "Optional for type is 'limit' order, The maximum visible size of an iceberg order. please place order in size (lots), The units of qty (base currency) and valueQty (value) are not supported. Need to be defined if iceberg is specified." }, "qty": { "type": "string", "description": "**Choose one of size, qty, valueQty**, Order size (Base currency) must be an integer multiple of the multiplier. The unit of the quantity of coin-swap is size(lot), which is not supported" }, "valueQty": { "type": "string", "description": "**Choose one of size, qty, valueQty**, Order size (Value), USDS-Swap correspond to USDT or USDC. The unit of the quantity of coin-swap is size(lot), which is not supported" } }, "required": [ "clientOid", "symbol", "type", "side", "leverage" ] }, "example": "{\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"side\": \"buy\",\n \"symbol\": \"XBTUSDTM\",\n \"leverage\": 3,\n \"type\": \"limit\",\n \"remark\": \"order remarks\",\n \"reduceOnly\": false,\n \"marginMode\": \"ISOLATED\",\n \"price\": \"0.1\",\n \"size\": 1,\n \"timeInForce\": \"GTC\"\n}" } } }, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"orderId\\\": \\\"234125150956625920\\\",\\n \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"\\n }\\n}", "x-request-example": "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\", \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\", \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false, \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1, \\\"timeInForce\\\": \\\"GTC\\\"}", "operationId": "017" } }, "/api/v1/orders/multi": { "post": { "summary": "Batch Add Orders", "deprecated": false, "description": "Place multiple order to the futures trading system, you can place two major types of orders: limit and market. Orders can only be placed if your account has sufficient funds. Once an order is placed, your funds will be put on hold for the duration of the order. The amount of funds on hold depends on the order type and parameters specified. You can place up to 20 orders at one time, including limit orders, market orders, and stop orders Please be noted that the system would hold the fees from the orders entered the orderbook in advance.", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "orderId": { "type": "string", "description": "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order." }, "clientOid": { "type": "string", "description": "Unique order id created by users to identify their orders, the maximum length cannot exceed 40, e.g. UUID, Only allows numbers, characters, underline(_), and separator(-)" }, "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "code": { "type": "string" }, "msg": { "type": "string" } }, "required": [ "orderId", "clientOid", "symbol", "code", "msg" ] } } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470236", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "batchAddOrders", "x-sdk-method-description": "Place multiple order to the futures trading system, you can place two major types of orders: limit and market. Orders can only be placed if your account has sufficient funds. Once an order is placed, your funds will be put on hold for the duration of the order. The amount of funds on hold depends on the order type and parameters specified. You can place up to 20 orders at one time, including limit orders, market orders, and stop orders Please be noted that the system would hold the fees from the orders entered the orderbook in advance.", "x-api-rate-limit-weight": 20, "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "clientOid": { "type": "string", "description": "Unique order id created by users to identify their orders, the maximum length cannot exceed 40, e.g. UUID, Only allows numbers, characters, underline(_), and separator(-)", "example": [ "5c52e11203aa677f33e493fb" ] }, "side": { "type": "string", "description": "specify if the order is to 'buy' or 'sell'", "enum": [ "buy", "sell" ], "x-api-enum": [ { "value": "buy", "name": "", "description": "" }, { "value": "sell", "name": "", "description": "" } ], "example": [ "buy" ] }, "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) ", "example": [ "XBTUSDTM" ] }, "leverage": { "type": "integer", "description": "Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required.", "example": [ 3 ] }, "type": { "type": "string", "description": "specify if the order is an 'limit' order or 'market' order", "enum": [ "limit", "market" ], "default": "limit", "x-api-enum": [ { "value": "limit", "name": "", "description": "" }, { "value": "market", "name": "", "description": "" } ], "example": [ "limit" ] }, "remark": { "type": "string", "description": "remark for the order, length cannot exceed 100 utf8 characters" }, "stop": { "type": "string", "description": "Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded.", "enum": [ "down", "up" ], "x-api-enum": [ { "value": "down", "name": "down", "description": "Triggers when the price reaches or goes below the stopPrice." }, { "value": "up", "name": "up", "description": "Triggers when the price reaches or goes above the stopPrice" } ] }, "stopPriceType": { "type": "string", "description": "Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified.", "enum": [ "TP", "MP", "IP" ], "x-api-enum": [ { "value": "TP", "name": "trade price", "description": "TP for trade price, The last trade price is the last price at which an order was filled. This price can be found in the latest match message." }, { "value": "MP", "name": "mark price", "description": "MP for mark price, The mark price can be obtained through relevant OPEN API for index services" }, { "value": "IP", "name": "index price", "description": "IP for index price, The index price can be obtained through relevant OPEN API for index services" } ] }, "stopPrice": { "type": "string", "description": "Need to be defined if stop is specified. " }, "reduceOnly": { "type": "boolean", "description": "A mark to reduce the position size only. Set to false by default. Need to set the position size when reduceOnly is true. If set to true, only the orders reducing the position size will be executed. If the reduce-only order size exceeds the position size, the extra size will be canceled.", "default": false }, "closeOrder": { "type": "boolean", "description": "A mark to close the position. Set to false by default. If closeOrder is set to true, the system will close the position and the position size will become 0. Side, Size and Leverage fields can be left empty and the system will determine the side and size automatically.", "default": false }, "forceHold": { "type": "boolean", "description": "A mark to forcely hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to false by default. The system will forcely freeze certain amount of funds for this order, including orders whose direction is opposite to the current positions. This feature is to ensure that the order won’t be canceled by the matching engine in such a circumstance that not enough funds are frozen for the order.", "default": false }, "stp": { "type": "string", "description": "[Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. Not supported DC at the moment.", "enum": [ "CN", "CO", "CB" ], "x-api-enum": [ { "value": "CN", "name": "CN", "description": "Cancel new, Cancel the new order" }, { "value": "CO", "name": "CO", "description": "Cancel old, Cancel the old order" }, { "value": "CB", "name": "CB", "description": "Cancel both, Cancel both sides" } ] }, "marginMode": { "type": "string", "description": "Margin mode: ISOLATED, CROSS, default: ISOLATED", "enum": [ "ISOLATED", "CROSS" ], "default": "ISOLATED", "x-api-enum": [ { "value": "ISOLATED", "name": "", "description": "" }, { "value": "CROSS", "name": "", "description": "" } ] }, "price": { "type": "string", "description": "Required for type is 'limit' order, indicating the operating price", "example": [ "0.1" ] }, "size": { "type": "integer", "description": "**Choose one of size, qty, valueQty**, Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported." }, "timeInForce": { "type": "string", "description": "Optional for type is 'limit' order, [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading, default is GTC", "enum": [ "GTC", "IOC" ], "default": "GTC", "x-api-enum": [ { "value": "GTC", "name": "Good Till Canceled", "description": "order remains open on the order book until canceled. This is the default type if the field is left empty." }, { "value": "IOC", "name": "Immediate Or Cancel", "description": "being matched or not, the remaining size of the order will be instantly canceled instead of entering the order book." } ] }, "postOnly": { "type": "boolean", "description": "Optional for type is 'limit' order, post only flag, invalid when timeInForce is IOC. When postOnly is true, not allowed choose hidden or iceberg. The post-only flag ensures that the trader always pays the maker fee and provides liquidity to the order book. If any part of the order is going to pay taker fee, the order will be fully rejected.", "default": false }, "hidden": { "type": "boolean", "description": "Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly.", "default": false }, "iceberg": { "type": "boolean", "description": "Optional for type is 'limit' order, Only visible portion of the order is displayed in the order book. When iceberg chose, not allowed choose postOnly.", "default": false }, "visibleSize": { "type": "string", "description": "Optional for type is 'limit' order, The maximum visible size of an iceberg order. please place order in size (lots), The units of qty (base currency) and valueQty (value) are not supported." }, "qty": { "type": "string", "description": "**Choose one of size, qty, valueQty**, Order size (Base currency) must be an integer multiple of the multiplier. The unit of the quantity of coin-swap is size(lot), which is not supported" }, "valueQty": { "type": "string", "description": "**Choose one of size, qty, valueQty**, Order size (Value), USDS-Swap correspond to USDT or USDC. The unit of the quantity of coin-swap is size(lot), which is not supported" } }, "required": [ "clientOid", "symbol", "side", "leverage" ] } }, "example": "[\n {\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"side\": \"buy\",\n \"symbol\": \"XBTUSDTM\",\n \"leverage\": 3,\n \"type\": \"limit\",\n \"remark\": \"order remarks\",\n \"reduceOnly\": false,\n \"marginMode\": \"ISOLATED\",\n \"price\": \"0.1\",\n \"size\": 1,\n \"timeInForce\": \"GTC\"\n },\n {\n \"clientOid\": \"5c52e11203aa677f33e493fc\",\n \"side\": \"buy\",\n \"symbol\": \"XBTUSDTM\",\n \"leverage\": 3,\n \"type\": \"limit\",\n \"remark\": \"order remarks\",\n \"reduceOnly\": false,\n \"marginMode\": \"ISOLATED\",\n \"price\": \"0.1\",\n \"size\": 1,\n \"timeInForce\": \"GTC\"\n }\n]" } } }, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": [\\n {\\n \\\"orderId\\\": \\\"235919387779985408\\\",\\n \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"code\\\": \\\"200000\\\",\\n \\\"msg\\\": \\\"success\\\"\\n },\\n {\\n \\\"orderId\\\": \\\"235919387855482880\\\",\\n \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fc\\\",\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"code\\\": \\\"200000\\\",\\n \\\"msg\\\": \\\"success\\\"\\n }\\n ]\\n}", "x-request-example": "[{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\", \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\", \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false, \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1, \\\"timeInForce\\\": \\\"GTC\\\"}, {\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fc\\\", \\\"side\\\": \\\"buy\\\", \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\", \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false, \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.1\\\", \\\"size\\\": 1, \\\"timeInForce\\\": \\\"GTC\\\"}]", "operationId": "018" } }, "/api/v1/st-orders": { "post": { "summary": "Add Take Profit And Stop Loss Order", "deprecated": false, "description": "Place take profit and stop loss order supports both take-profit and stop-loss functions, and other functions are exactly the same as the place order interface.", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "orderId": { "type": "string", "description": "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order." }, "clientOid": { "type": "string", "description": "The user self-defined order id." } }, "required": [ "orderId", "clientOid" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470237", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "addTPSLOrder", "x-sdk-method-description": "Place take profit and stop loss order supports both take-profit and stop-loss functions, and other functions are exactly the same as the place order interface.", "x-api-rate-limit-weight": 2, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "clientOid": { "type": "string", "description": "Unique order id created by users to identify their orders, the maximum length cannot exceed 40, e.g. UUID, Only allows numbers, characters, underline(_), and separator(-)", "example": [ "5c52e11203aa677f33e493fb" ] }, "side": { "type": "string", "description": "specify if the order is to 'buy' or 'sell'", "enum": [ "buy", "sell" ], "x-api-enum": [ { "value": "buy", "name": "", "description": "" }, { "value": "sell", "name": "", "description": "" } ], "example": [ "buy" ] }, "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "example": [ "XBTUSDTM" ] }, "leverage": { "type": "integer", "description": "Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required.", "example": [ 3 ] }, "type": { "type": "string", "description": "specify if the order is an 'limit' order or 'market' order", "enum": [ "limit", "market" ], "default": "limit", "x-api-enum": [ { "value": "limit", "name": "limit", "description": "limit order" }, { "value": "market", "name": "market", "description": "market order" } ], "example": [ "limit" ] }, "remark": { "type": "string", "description": "remark for the order, length cannot exceed 100 utf8 characters" }, "stopPriceType": { "type": "string", "description": "Either 'TP', 'IP' or 'MP'", "enum": [ "TP", "MP", "IP" ], "x-api-enum": [ { "value": "TP", "name": "trade price", "description": "TP for trade price, The last trade price is the last price at which an order was filled. This price can be found in the latest match message." }, { "value": "MP", "name": "mark price", "description": "MP for mark price, The mark price can be obtained through relevant OPEN API for index services" }, { "value": "IP", "name": "index price", "description": "IP for index price, The index price can be obtained through relevant OPEN API for index services" } ] }, "reduceOnly": { "type": "boolean", "description": "A mark to reduce the position size only. Set to false by default. Need to set the position size when reduceOnly is true. If set to true, only the orders reducing the position size will be executed. If the reduce-only order size exceeds the position size, the extra size will be canceled.", "default": false }, "closeOrder": { "type": "boolean", "description": "A mark to close the position. Set to false by default. If closeOrder is set to true, the system will close the position and the position size will become 0. Side, Size and Leverage fields can be left empty and the system will determine the side and size automatically.", "default": false }, "forceHold": { "type": "boolean", "description": "A mark to forcely hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to false by default. The system will forcely freeze certain amount of funds for this order, including orders whose direction is opposite to the current positions. This feature is to ensure that the order won’t be canceled by the matching engine in such a circumstance that not enough funds are frozen for the order.", "default": false }, "stp": { "type": "string", "description": "[Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. Not supported DC at the moment.", "enum": [ "CN", "CO", "CB" ], "x-api-enum": [ { "value": "CN", "name": "CN", "description": "Cancel new, Cancel the new order" }, { "value": "CO", "name": "CO", "description": "Cancel old, Cancel the old order" }, { "value": "CB", "name": "CB", "description": "Cancel both, Cancel both sides" } ] }, "marginMode": { "type": "string", "description": "Margin mode: ISOLATED, CROSS, default: ISOLATED", "enum": [ "ISOLATED", "CROSS" ], "default": "ISOLATED", "x-api-enum": [ { "value": "ISOLATED", "name": "", "description": "" }, { "value": "CROSS", "name": "", "description": "" } ] }, "price": { "type": "string", "description": "Required for type is 'limit' order, indicating the operating price", "example": [ "0.1" ] }, "size": { "type": "integer", "description": "**Choose one of size, qty, valueQty**, Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported." }, "timeInForce": { "type": "string", "description": "Optional for type is 'limit' order, [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading, default is GTC", "enum": [ "GTC", "IOC" ], "default": "GTC", "x-api-enum": [ { "value": "GTC", "name": "Good Till Canceled", "description": "order remains open on the order book until canceled. This is the default type if the field is left empty." }, { "value": "IOC", "name": "Immediate Or Cancel", "description": "being matched or not, the remaining size of the order will be instantly canceled instead of entering the order book." } ] }, "postOnly": { "type": "boolean", "description": "Optional for type is 'limit' order, post only flag, invalid when timeInForce is IOC. When postOnly is true, not allowed choose hidden or iceberg. The post-only flag ensures that the trader always pays the maker fee and provides liquidity to the order book. If any part of the order is going to pay taker fee, the order will be fully rejected.", "default": false }, "hidden": { "type": "boolean", "description": "Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly.", "default": false }, "iceberg": { "type": "boolean", "description": "Optional for type is 'limit' order, Only visible portion of the order is displayed in the order book. When iceberg chose, not allowed choose postOnly.", "default": false }, "visibleSize": { "type": "string", "description": "Optional for type is 'limit' order, The maximum visible size of an iceberg order. please place order in size (lots), The units of qty (base currency) and valueQty (value) are not supported. Need to be defined if iceberg is specified." }, "triggerStopUpPrice": { "type": "string", "description": "Take profit price" }, "triggerStopDownPrice": { "type": "string", "description": "Stop loss price" }, "qty": { "type": "string", "description": "**Choose one of size, qty, valueQty**, Order size (Base currency) must be an integer multiple of the multiplier. The unit of the quantity of coin-swap is size(lot), which is not supported" }, "valueQty": { "type": "string", "description": "**Choose one of size, qty, valueQty**, Order size (Value), USDS-Swap correspond to USDT or USDC. The unit of the quantity of coin-swap is size(lot), which is not supported" } }, "required": [ "clientOid", "symbol", "type", "side", "leverage" ] }, "example": "{\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"side\": \"buy\",\n \"symbol\": \"XBTUSDTM\",\n \"leverage\": 3,\n \"type\": \"limit\",\n \"remark\": \"order remarks\",\n \"reduceOnly\": false,\n \"marginMode\": \"ISOLATED\",\n \"price\": \"0.2\",\n \"size\": 1,\n \"timeInForce\": \"GTC\",\n \"triggerStopUpPrice\": \"0.3\",\n \"triggerStopDownPrice\": \"0.1\",\n \"stopPriceType\": \"TP\"\n}" } } }, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"orderId\\\": \\\"234125150956625920\\\",\\n \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"\\n }\\n}", "x-request-example": "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\", \\\"side\\\": \\\"buy\\\", \\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": 3, \\\"type\\\": \\\"limit\\\", \\\"remark\\\": \\\"order remarks\\\", \\\"reduceOnly\\\": false, \\\"marginMode\\\": \\\"ISOLATED\\\", \\\"price\\\": \\\"0.2\\\", \\\"size\\\": 1, \\\"timeInForce\\\": \\\"GTC\\\", \\\"triggerStopUpPrice\\\": \\\"0.3\\\", \\\"triggerStopDownPrice\\\": \\\"0.1\\\", \\\"stopPriceType\\\": \\\"TP\\\"}", "operationId": "019" } }, "/api/v1/orders/{orderId}": { "delete": { "summary": "Cancel Order By OrderId", "deprecated": false, "description": "Cancel order by system generated orderId.", "tags": [], "parameters": [ { "name": "orderId", "in": "path", "description": "", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "cancelledOrderIds": { "type": "array", "items": { "type": "string" }, "description": "The orderId that is to be canceled" } }, "required": [ "cancelledOrderIds" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470239", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "cancelOrderById", "x-sdk-method-description": "Cancel order by system generated orderId.", "x-api-rate-limit-weight": 1, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"cancelledOrderIds\\\": [\\n \\\"235303670076489728\\\"\\n ]\\n }\\n}", "x-request-example": "{\\\"orderId\\\": \\\"example_string_default_value\\\"}", "operationId": "020" } }, "/api/v1/orders/client-order/{clientOid}": { "delete": { "summary": "Cancel Order By ClientOid", "deprecated": false, "description": "Cancel order by client defined orderId.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string" } }, { "name": "clientOid", "in": "path", "description": "client order id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "clientOid": { "type": "string" } }, "required": [ "clientOid" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470240", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "cancelOrderByClientOid", "x-sdk-method-description": "Cancel order by client defined orderId.", "x-api-rate-limit-weight": 1, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"clientOid\\\": \\\"017485b0-2957-4681-8a14-5d46b35aee0d\\\"\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"clientOid\\\": \\\"example_string_default_value\\\"}", "operationId": "021" } }, "/api/v1/orders/multi-cancel": { "delete": { "summary": "Batch Cancel Orders", "deprecated": false, "description": "Cancel a bach of orders by client defined orderId or system generated orderId", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "orderId": { "type": "string" }, "clientOid": { "type": "string" }, "code": { "type": "string" }, "msg": { "type": "string" } }, "required": [ "orderId", "clientOid", "code", "msg" ] } } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470241", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "batchCancelOrders", "x-sdk-method-description": "Cancel a bach of orders by client defined orderId or system generated orderId", "x-api-rate-limit-weight": 20, "x-request-force-json": true, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "orderIdsList": { "type": "array", "items": { "type": "string" }, "description": "the list of orderId" }, "clientOidsList": { "type": "array", "items": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "clientOid": { "type": "string" } }, "required": [ "symbol", "clientOid" ] }, "description": "the list of client orderId" } }, "required": [ "orderIdsList", "clientOidsList" ] }, "example": "{\n \"orderIdsList\":\n [\n \"250445104152670209\",\n \"250445181751463936\"\n ]\n}\n\n\n//{\n// \"clientOidsList\":\n// [\n// {\n// \"symbol\": \"XRPUSDTM\",\n// \"clientOid\": \"5c52e11203aa1677f133e493fb\"\n// },\n// {\n// \"symbol\": \"ETHUSDTM\",\n// \"clientOid\": \"5c52214e112\"\n// }\n// ]\n//}\n" } } }, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": [\\n {\\n \\\"orderId\\\": \\\"250445104152670209\\\",\\n \\\"clientOid\\\": null,\\n \\\"code\\\": \\\"200\\\",\\n \\\"msg\\\": \\\"success\\\"\\n },\\n {\\n \\\"orderId\\\": \\\"250445181751463936\\\",\\n \\\"clientOid\\\": null,\\n \\\"code\\\": \\\"200\\\",\\n \\\"msg\\\": \\\"success\\\"\\n }\\n ]\\n}\\n", "x-request-example": "{\\\"orderIdsList\\\": [\\\"250445104152670209\\\", \\\"250445181751463936\\\"]}", "operationId": "022" } }, "/api/v3/orders": { "delete": { "summary": "Cancel All Orders", "deprecated": false, "description": "Cancel all open orders (excluding stop orders). The response is a list of orderIDs of the canceled orders.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Cancel all limit orders for a specific symbol only, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "cancelledOrderIds": { "type": "array", "items": { "type": "string" }, "description": "Unique ID of the cancelled order" } }, "required": [ "cancelledOrderIds" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470242", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "cancelAllOrdersV3", "x-sdk-method-description": "Cancel all open orders (excluding stop orders). The response is a list of orderIDs of the canceled orders.", "x-api-rate-limit-weight": 10, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"cancelledOrderIds\\\": [\\n \\\"235919172150824960\\\",\\n \\\"235919172150824961\\\"\\n ]\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}", "operationId": "023" } }, "/api/v1/stopOrders": { "delete": { "summary": "Cancel All Stop orders", "deprecated": false, "description": "Cancel all untriggered stop orders. The response is a list of orderIDs of the canceled stop orders. To cancel triggered stop orders, please use 'Cancel Multiple Futures Limit orders'.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Cancel all limit orders for a specific contract only, If not specified, all the limit orders will be deleted, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "cancelledOrderIds": { "type": "array", "items": { "type": "string" }, "description": "Unique ID of the cancelled order" } }, "required": [ "cancelledOrderIds" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470243", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "cancelAllStopOrders", "x-sdk-method-description": "Cancel all untriggered stop orders. The response is a list of orderIDs of the canceled stop orders. To cancel triggered stop orders, please use 'Cancel Multiple Futures Limit orders'.", "x-api-rate-limit-weight": 15, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"cancelledOrderIds\\\": [\\n \\\"235919172150824960\\\",\\n \\\"235919172150824961\\\"\\n ]\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}", "operationId": "024" }, "get": { "summary": "Get Stop Order List", "deprecated": false, "description": "Get the un-triggered stop orders list. Stop orders that have been triggered can be queried through the general order interface", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": false, "schema": { "type": "string" } }, { "name": "side", "in": "query", "description": "buy or sell", "required": false, "schema": { "type": "string", "enum": [ "buy", "sell" ], "x-api-enum": [ { "value": "buy", "name": "", "description": "" }, { "value": "sell", "name": "", "description": "" } ] } }, { "name": "type", "in": "query", "description": "limit, market", "required": false, "schema": { "type": "string", "enum": [ "limit", "market" ], "x-api-enum": [ { "value": "limit", "name": "", "description": "" }, { "value": "market", "name": "", "description": "" } ] } }, { "name": "startAt", "in": "query", "description": "Start time (milisecond)", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "endAt", "in": "query", "description": "End time (milisecond)", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "currentPage", "in": "query", "description": "Current request page, The default currentPage is 1", "required": false, "schema": { "type": "integer" } }, { "name": "pageSize", "in": "query", "description": "pageSize, The default pageSize is 50, The maximum cannot exceed 1000", "required": false, "schema": { "type": "integer", "maximum": 1000, "default": 50 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "currentPage": { "type": "integer", "description": "Current request page, The default currentPage is 1" }, "pageSize": { "type": "integer", "description": "pageSize, The default pageSize is 50, The maximum cannot exceed 1000" }, "totalNum": { "type": "integer" }, "totalPage": { "type": "integer" }, "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Order ID" }, "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "type": { "type": "string", "description": "Order type, market order or limit order\n" }, "side": { "type": "string", "description": "Transaction side" }, "price": { "type": "string", "description": "Order price" }, "size": { "type": "integer", "description": "Order quantity" }, "value": { "type": "string", "description": "Order value" }, "dealValue": { "type": "string", "description": "Executed size of funds\n" }, "dealSize": { "type": "integer", "description": "Executed quantity" }, "stp": { "type": "string", "description": "self trade prevention" }, "stop": { "type": "string", "description": "A mark to the stop order type", "enum": [ "down", "up", "" ], "x-api-enum": [ { "value": "down", "name": "down", "description": "Triggers when the price reaches or goes below the stopPrice." }, { "value": "up", "name": "up", "description": "Triggers when the price reaches or goes above the stopPrice." }, { "value": "", "name": "None", "description": "Not a stop order" } ] }, "stopPriceType": { "type": "string", "description": "Trigger price type of stop orders", "enum": [ "TP", "MP", "IP", "" ], "x-api-enum": [ { "value": "TP", "name": "trade price", "description": "TP for trade price, The last trade price is the last price at which an order was filled. This price can be found in the latest match message." }, { "value": "MP", "name": "mark price", "description": "MP for mark price. The mark price can be obtained through relevant OPEN API for index services." }, { "value": "IP", "name": "index price", "description": "IP for index price. The index price can be obtained through relevant OPEN API for index services." }, { "value": "", "name": "None", "description": "Not a stop order" } ] }, "stopTriggered": { "type": "boolean", "description": "Mark to show whether the stop order is triggered" }, "stopPrice": { "type": "string", "description": "Trigger price of stop orders" }, "timeInForce": { "type": "string", "description": "Time in force policy type" }, "postOnly": { "type": "boolean", "description": "Mark of post only" }, "hidden": { "type": "boolean", "description": "Mark of the hidden order" }, "iceberg": { "type": "boolean", "description": "Mark of the iceberg order" }, "leverage": { "type": "string", "description": "Leverage of the order" }, "forceHold": { "type": "boolean", "description": "A mark to forcely hold the funds for an order" }, "closeOrder": { "type": "boolean", "description": "A mark to close the position" }, "visibleSize": { "type": "integer", "description": "Visible size of the iceberg order" }, "clientOid": { "type": "string", "description": "Unique order id created by users to identify their orders" }, "remark": { "type": "string", "description": "Remark of the order" }, "tags": { "type": "string", "description": "tag order source" }, "isActive": { "type": "boolean", "description": "Mark of the active orders" }, "cancelExist": { "type": "boolean", "description": "Mark of the canceled orders" }, "createdAt": { "type": "integer", "description": "Time the order created", "format": "int64" }, "updatedAt": { "type": "integer", "description": "last update time", "format": "int64" }, "endAt": { "type": "integer", "description": "End time", "format": "int64" }, "orderTime": { "type": "integer", "description": "Order create time in nanosecond", "format": "int64" }, "settleCurrency": { "type": "string", "description": "settlement currency" }, "marginMode": { "type": "string", "description": "Margin mode: ISOLATED (isolated), CROSS (cross margin)." }, "avgDealPrice": { "type": "string", "description": "Average transaction price, forward contract average transaction price = sum (transaction value) / sum (transaction quantity), reverse contract average transaction price = sum (transaction quantity) / sum (transaction value). Transaction quantity = lots * multiplier" }, "filledSize": { "type": "integer", "description": "Value of the executed orders" }, "filledValue": { "type": "string", "description": "Executed order quantity" }, "status": { "type": "string", "description": "order status: “open” or “done”" }, "reduceOnly": { "type": "boolean", "description": "A mark to reduce the position size only" } }, "required": [ "id", "symbol", "type", "side", "price", "size", "value", "dealValue", "dealSize", "stp", "stop", "stopPriceType", "stopTriggered", "stopPrice", "timeInForce", "postOnly", "hidden", "iceberg", "leverage", "forceHold", "closeOrder", "visibleSize", "clientOid", "remark", "tags", "isActive", "cancelExist", "createdAt", "updatedAt", "endAt", "orderTime", "settleCurrency", "marginMode", "avgDealPrice", "filledSize", "filledValue", "status", "reduceOnly" ] } } }, "required": [ "currentPage", "pageSize", "totalNum", "totalPage", "items" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470247", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "General", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "GetStopOrderList", "x-sdk-method-description": "Get the un-triggered stop orders list. Stop orders that have been triggered can be queried through the general order interface", "x-api-rate-limit-weight": 6, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"currentPage\\\": 1,\\n \\\"pageSize\\\": 50,\\n \\\"totalNum\\\": 1,\\n \\\"totalPage\\\": 1,\\n \\\"items\\\": [\\n {\\n \\\"id\\\": \\\"230181737576050688\\\",\\n \\\"symbol\\\": \\\"PEOPLEUSDTM\\\",\\n \\\"type\\\": \\\"limit\\\",\\n \\\"side\\\": \\\"buy\\\",\\n \\\"price\\\": \\\"0.05\\\",\\n \\\"size\\\": 10,\\n \\\"value\\\": \\\"5\\\",\\n \\\"dealValue\\\": \\\"0\\\",\\n \\\"dealSize\\\": 0,\\n \\\"stp\\\": \\\"\\\",\\n \\\"stop\\\": \\\"\\\",\\n \\\"stopPriceType\\\": \\\"\\\",\\n \\\"stopTriggered\\\": false,\\n \\\"stopPrice\\\": null,\\n \\\"timeInForce\\\": \\\"GTC\\\",\\n \\\"postOnly\\\": false,\\n \\\"hidden\\\": false,\\n \\\"iceberg\\\": false,\\n \\\"leverage\\\": \\\"1\\\",\\n \\\"forceHold\\\": false,\\n \\\"closeOrder\\\": false,\\n \\\"visibleSize\\\": 0,\\n \\\"clientOid\\\": \\\"5a80bd847f1811ef8a7faa665a37b3d7\\\",\\n \\\"remark\\\": null,\\n \\\"tags\\\": \\\"\\\",\\n \\\"isActive\\\": true,\\n \\\"cancelExist\\\": false,\\n \\\"createdAt\\\": 1727692804813,\\n \\\"updatedAt\\\": 1727692804813,\\n \\\"endAt\\\": null,\\n \\\"orderTime\\\": 1727692804808418000,\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"marginMode\\\": \\\"ISOLATED\\\",\\n \\\"avgDealPrice\\\": \\\"0\\\",\\n \\\"filledSize\\\": 0,\\n \\\"filledValue\\\": \\\"0\\\",\\n \\\"status\\\": \\\"open\\\",\\n \\\"reduceOnly\\\": false\\n }\\n ]\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"side\\\": \\\"buy\\\", \\\"type\\\": \\\"limit\\\", \\\"startAt\\\": 123456, \\\"endAt\\\": 123456, \\\"currentPage\\\": 123456, \\\"pageSize\\\": 50}", "operationId": "029" } }, "/api/v1/orders/{order-id}": { "get": { "summary": "Get Order By OrderId", "deprecated": false, "description": "Get a single order by order id (including a stop order).", "tags": [], "parameters": [ { "name": "order-id", "in": "path", "description": "", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "id": { "type": "string", "description": "Order ID" }, "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "type": { "type": "string", "description": "Order type, market order or limit order", "enum": [ "market", "limit" ], "x-api-enum": [ { "value": "market", "name": "market", "description": "Market Order" }, { "value": "limit", "name": "limit", "description": "Limit Order" } ] }, "side": { "type": "string", "description": "Transaction side", "enum": [ "buy", "sell" ], "x-api-enum": [ { "value": "buy", "name": "buy", "description": "buy" }, { "value": "sell", "name": "sell", "description": "sell" } ] }, "price": { "type": "string", "description": "Order price" }, "size": { "type": "integer", "description": "Order quantity" }, "value": { "type": "string", "description": "Order value\n" }, "dealValue": { "type": "string", "description": "Executed size of funds\n" }, "dealSize": { "type": "integer", "description": "Executed quantity\n" }, "stp": { "type": "string", "description": "[Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. Not supported DC at the moment.", "enum": [ "", "CN", "CO", "CB" ], "x-api-enum": [ { "value": "", "name": "NULL", "description": "Null means not stp order" }, { "value": "CN", "name": "CN", "description": "Cancel new, Cancel the new order" }, { "value": "CO", "name": "CO", "description": "Cancel old, Cancel the old order" }, { "value": "CB", "name": "CB", "description": "Cancel both, Cancel both sides" } ] }, "stop": { "type": "string", "description": "A mark to the stop order type", "enum": [ "down", "up", "" ], "x-api-enum": [ { "value": "down", "name": "down", "description": "Triggers when the price reaches or goes below the stopPrice." }, { "value": "up", "name": "up", "description": "Triggers when the price reaches or goes above the stopPrice." }, { "value": "", "name": "None", "description": "Not a stop order" } ] }, "stopPriceType": { "type": "string", "description": "Trigger price type of stop orders", "enum": [ "TP", "MP", "IP", "" ], "x-api-enum": [ { "value": "TP", "name": "trade price", "description": "TP for trade price, The last trade price is the last price at which an order was filled. This price can be found in the latest match message." }, { "value": "MP", "name": "mark price", "description": "MP for mark price, The mark price can be obtained through relevant OPEN API for index services" }, { "value": "IP", "name": "index price", "description": "IP for index price, The index price can be obtained through relevant OPEN API for index services" }, { "value": "", "name": "None", "description": "Not a stop order" } ] }, "stopTriggered": { "type": "boolean", "description": "Mark to show whether the stop order is triggered" }, "stopPrice": { "type": "number", "description": "Trigger price of stop orders" }, "timeInForce": { "type": "string", "description": "Time in force policy type\n" }, "postOnly": { "type": "boolean", "description": "Mark of post only\n" }, "hidden": { "type": "boolean", "description": "Mark of the hidden order\n" }, "iceberg": { "type": "boolean", "description": "Mark of the iceberg order\n" }, "leverage": { "type": "string", "description": "Leverage of the order\n" }, "forceHold": { "type": "boolean", "description": "A mark to forcely hold the funds for an order\n" }, "closeOrder": { "type": "boolean", "description": "A mark to close the position\n" }, "visibleSize": { "type": "integer", "description": "Visible size of the iceberg order\n" }, "clientOid": { "type": "string", "description": "Unique order id created by users to identify their orders\n" }, "remark": { "type": "string", "description": "Remark" }, "tags": { "type": "string", "description": "tag order source\n" }, "isActive": { "type": "boolean", "description": "Mark of the active orders\n" }, "cancelExist": { "type": "boolean", "description": "Mark of the canceled orders\n" }, "createdAt": { "type": "integer", "description": "Time the order created\n", "format": "int64" }, "updatedAt": { "type": "integer", "description": "last update time\n", "format": "int64" }, "endAt": { "type": "integer", "description": "Order Endtime", "format": "int64" }, "orderTime": { "type": "integer", "description": "Order create time in nanosecond\n", "format": "int64" }, "settleCurrency": { "type": "string", "description": "settlement currency\n" }, "marginMode": { "type": "string", "description": "Margin mode: ISOLATED (isolated), CROSS (cross margin).\n", "enum": [ "CROSS", "ISOLATED" ], "x-api-enum": [ { "value": "CROSS", "name": "CROSS", "description": "Cross margin" }, { "value": "ISOLATED", "name": "ISOLATED", "description": "Isolated margin" } ] }, "avgDealPrice": { "type": "string", "description": "Average transaction price, forward contract average transaction price = sum (transaction value) / sum (transaction quantity), reverse contract average transaction price = sum (transaction quantity) / sum (transaction value). Transaction quantity = lots * multiplier\n" }, "filledSize": { "type": "integer", "description": "Value of the executed orders\n" }, "filledValue": { "type": "string", "description": "Executed order quantity\n" }, "status": { "type": "string", "description": "order status: “open” or “done”\n", "enum": [ "open", "done" ], "x-api-enum": [ { "value": "open", "name": "open", "description": "open order" }, { "value": "done", "name": "done", "description": "done order" } ] }, "reduceOnly": { "type": "boolean", "description": "A mark to reduce the position size only\n" } }, "required": [ "id", "symbol", "type", "side", "price", "size", "value", "dealValue", "dealSize", "stp", "stop", "stopPriceType", "stopTriggered", "stopPrice", "timeInForce", "postOnly", "hidden", "iceberg", "leverage", "forceHold", "closeOrder", "visibleSize", "clientOid", "remark", "tags", "isActive", "cancelExist", "createdAt", "updatedAt", "orderTime", "settleCurrency", "marginMode", "avgDealPrice", "filledSize", "filledValue", "status", "reduceOnly" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470245", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "General", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "getOrderByOrderId", "x-sdk-method-description": "Get a single order by order id (including a stop order).", "x-api-rate-limit-weight": 5, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"id\\\": \\\"236655147005071361\\\",\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"type\\\": \\\"limit\\\",\\n \\\"side\\\": \\\"buy\\\",\\n \\\"price\\\": \\\"0.1\\\",\\n \\\"size\\\": 1,\\n \\\"value\\\": \\\"0.0001\\\",\\n \\\"dealValue\\\": \\\"0\\\",\\n \\\"dealSize\\\": 0,\\n \\\"stp\\\": \\\"\\\",\\n \\\"stop\\\": \\\"\\\",\\n \\\"stopPriceType\\\": \\\"\\\",\\n \\\"stopTriggered\\\": false,\\n \\\"stopPrice\\\": null,\\n \\\"timeInForce\\\": \\\"GTC\\\",\\n \\\"postOnly\\\": false,\\n \\\"hidden\\\": false,\\n \\\"iceberg\\\": false,\\n \\\"leverage\\\": \\\"3\\\",\\n \\\"forceHold\\\": false,\\n \\\"closeOrder\\\": false,\\n \\\"visibleSize\\\": 0,\\n \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n \\\"remark\\\": null,\\n \\\"tags\\\": \\\"\\\",\\n \\\"isActive\\\": true,\\n \\\"cancelExist\\\": false,\\n \\\"createdAt\\\": 1729236185949,\\n \\\"updatedAt\\\": 1729236185949,\\n \\\"endAt\\\": null,\\n \\\"orderTime\\\": 1729236185885647952,\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"marginMode\\\": \\\"ISOLATED\\\",\\n \\\"avgDealPrice\\\": \\\"0\\\",\\n \\\"filledSize\\\": 0,\\n \\\"filledValue\\\": \\\"0\\\",\\n \\\"status\\\": \\\"open\\\",\\n \\\"reduceOnly\\\": false\\n }\\n}", "x-request-example": "{\\\"order-id\\\": \\\"236655147005071361\\\"}", "operationId": "025" } }, "/api/v1/orders/byClientOid": { "get": { "summary": "Get Order By ClientOid", "deprecated": false, "description": "Get a single order by client order ID (including a stop order).", "tags": [], "parameters": [ { "name": "clientOid", "in": "query", "description": "The user self-defined order ID.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "id": { "type": "string", "description": "Order ID" }, "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "type": { "type": "string", "description": "Order type, market order or limit order", "enum": [ "market", "limit" ], "x-api-enum": [ { "value": "market", "name": "market", "description": "Market Order" }, { "value": "limit", "name": "limit", "description": "Limit Order" } ] }, "side": { "type": "string", "description": "Transaction side", "enum": [ "buy", "sell" ], "x-api-enum": [ { "value": "buy", "name": "buy", "description": "buy" }, { "value": "sell", "name": "sell", "description": "sell" } ] }, "price": { "type": "string", "description": "Order Price" }, "size": { "type": "integer", "description": "Order quantity" }, "value": { "type": "string", "description": "Order value\n" }, "dealValue": { "type": "string", "description": "Executed size of funds\n" }, "dealSize": { "type": "integer", "description": "Executed quantity\n" }, "stp": { "type": "string", "description": "[Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported.", "enum": [ "", "CN", "CO", "CB" ], "x-api-enum": [ { "value": "", "name": "NULL", "description": "None" }, { "value": "CN", "name": "CN", "description": "Cancel new, Cancel the new order" }, { "value": "CO", "name": "CO", "description": "Cancel old, Cancel the old order" }, { "value": "CB", "name": "CB", "description": "Cancel both, Cancel both sides" } ] }, "stop": { "type": "string", "description": "A mark to the stop order type", "enum": [ "down", "up", "" ], "x-api-enum": [ { "value": "down", "name": "down", "description": "Triggers when the price reaches or goes below the stopPrice." }, { "value": "up", "name": "up", "description": "Triggers when the price reaches or goes above the stopPrice." }, { "value": "", "name": "None", "description": "Not a stop order" } ] }, "stopPriceType": { "type": "string", "description": "Trigger price type of stop orders", "enum": [ "TP", "MP", "IP", "" ], "x-api-enum": [ { "value": "TP", "name": "trade price", "description": "TP for trade price, The last trade price is the last price at which an order was filled. This price can be found in the latest match message." }, { "value": "MP", "name": "mark price", "description": "MP for mark price. The mark price can be obtained through relevant OPEN API for index services." }, { "value": "IP", "name": "index price", "description": "IP for index price. The index price can be obtained through relevant OPEN API for index services." }, { "value": "", "name": "None", "description": "Not a stop order" } ] }, "stopTriggered": { "type": "boolean", "description": "Mark to show whether the stop order is triggered" }, "stopPrice": { "type": "number", "description": "Trigger price of stop orders" }, "timeInForce": { "type": "string", "description": "Time in force policy type\n" }, "postOnly": { "type": "boolean", "description": "Mark of post only\n" }, "hidden": { "type": "boolean", "description": "Mark of the hidden order\n" }, "iceberg": { "type": "boolean", "description": "Mark of the iceberg order\n" }, "leverage": { "type": "string", "description": "Leverage of the order\n" }, "forceHold": { "type": "boolean", "description": "A mark to force-hold the funds for an order\n" }, "closeOrder": { "type": "boolean", "description": "A mark to close the position\n" }, "visibleSize": { "type": "integer", "description": "Visible size of the iceberg order\n" }, "clientOid": { "type": "string", "description": "Unique order ID created by users to identify their orders\n" }, "remark": { "type": "string", "description": "Remark" }, "tags": { "type": "string", "description": "Tag order source\n" }, "isActive": { "type": "boolean", "description": "Mark of the active orders\n" }, "cancelExist": { "type": "boolean", "description": "Mark of the canceled orders\n" }, "createdAt": { "type": "integer", "description": "Order creation time\n", "format": "int64" }, "updatedAt": { "type": "integer", "description": "Last update time\n", "format": "int64" }, "endAt": { "type": "integer", "description": "Order Endtime", "format": "int64" }, "orderTime": { "type": "integer", "description": "Order creation time in nanoseconds\n", "format": "int64" }, "settleCurrency": { "type": "string", "description": "Settlement currency\n" }, "marginMode": { "type": "string", "description": "Margin mode: ISOLATED (isolated), CROSS (cross margin).\n", "enum": [ "CROSS", "ISOLATED" ], "x-api-enum": [ { "value": "CROSS", "name": "CROSS", "description": "Cross margin" }, { "value": "ISOLATED", "name": "ISOLATED", "description": "Isolated margin" } ] }, "avgDealPrice": { "type": "string", "description": "Average transaction price, forward contract average transaction price = sum (transaction value) / sum (transaction quantity); reverse contract average transaction price = sum (transaction quantity) / sum (transaction value). Transaction quantity = lots * multiplier\n" }, "filledSize": { "type": "integer", "description": "Value of the executed orders\n" }, "filledValue": { "type": "string", "description": "Executed order quantity\n" }, "status": { "type": "string", "description": "order status: “open” or “done”\n", "enum": [ "open", "done" ], "x-api-enum": [ { "value": "open", "name": "open", "description": "open order" }, { "value": "done", "name": "done", "description": "done order" } ] }, "reduceOnly": { "type": "boolean", "description": "A mark to reduce the position size only\n" } }, "required": [ "id", "symbol", "type", "side", "price", "size", "value", "dealValue", "dealSize", "stp", "stop", "stopPriceType", "stopTriggered", "stopPrice", "timeInForce", "postOnly", "hidden", "iceberg", "leverage", "forceHold", "closeOrder", "visibleSize", "clientOid", "remark", "tags", "isActive", "cancelExist", "createdAt", "updatedAt", "endAt", "orderTime", "settleCurrency", "marginMode", "avgDealPrice", "filledSize", "filledValue", "status", "reduceOnly" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470352", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "General", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "getOrderByClientOid", "x-sdk-method-description": "Get a single order by client order ID (including a stop order).", "x-api-rate-limit-weight": 5, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"id\\\": \\\"250444645610336256\\\",\\n \\\"symbol\\\": \\\"XRPUSDTM\\\",\\n \\\"type\\\": \\\"limit\\\",\\n \\\"side\\\": \\\"buy\\\",\\n \\\"price\\\": \\\"0.1\\\",\\n \\\"size\\\": 1,\\n \\\"value\\\": \\\"1\\\",\\n \\\"dealValue\\\": \\\"0\\\",\\n \\\"dealSize\\\": 0,\\n \\\"stp\\\": \\\"\\\",\\n \\\"stop\\\": \\\"\\\",\\n \\\"stopPriceType\\\": \\\"\\\",\\n \\\"stopTriggered\\\": false,\\n \\\"stopPrice\\\": null,\\n \\\"timeInForce\\\": \\\"GTC\\\",\\n \\\"postOnly\\\": false,\\n \\\"hidden\\\": false,\\n \\\"iceberg\\\": false,\\n \\\"leverage\\\": \\\"3\\\",\\n \\\"forceHold\\\": false,\\n \\\"closeOrder\\\": false,\\n \\\"visibleSize\\\": 0,\\n \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n \\\"remark\\\": null,\\n \\\"tags\\\": \\\"\\\",\\n \\\"isActive\\\": true,\\n \\\"cancelExist\\\": false,\\n \\\"createdAt\\\": 1732523858568,\\n \\\"updatedAt\\\": 1732523858568,\\n \\\"endAt\\\": null,\\n \\\"orderTime\\\": 1732523858550892322,\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"marginMode\\\": \\\"ISOLATED\\\",\\n \\\"avgDealPrice\\\": \\\"0\\\",\\n \\\"filledSize\\\": 0,\\n \\\"filledValue\\\": \\\"0\\\",\\n \\\"status\\\": \\\"open\\\",\\n \\\"reduceOnly\\\": false\\n }\\n}", "x-request-example": "{\\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\"}", "operationId": "026" } }, "/api/v1/recentDoneOrders": { "get": { "summary": "Get Recent Closed Orders", "deprecated": false, "description": "Get a list of recent 1000 closed orders in the last 24 hours. If you need to get your recent traded order history with low latency, you may query this endpoint.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Order ID" }, "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "type": { "type": "string", "description": "Order type, market order or limit order" }, "side": { "type": "string", "description": "Transaction side" }, "price": { "type": "string", "description": "Order price" }, "size": { "type": "integer", "description": "Order quantity" }, "value": { "type": "string", "description": "Order value\n" }, "dealValue": { "type": "string", "description": "Executed size of funds\n" }, "dealSize": { "type": "integer", "description": "Executed quantity\n" }, "stp": { "type": "string", "description": "self trade prevention" }, "stop": { "type": "string", "description": "A mark to the stop order type", "enum": [ "down", "up", "" ], "x-api-enum": [ { "value": "down", "name": "down", "description": "Triggers when the price reaches or goes below the stopPrice." }, { "value": "up", "name": "up", "description": "Triggers when the price reaches or goes above the stopPrice." }, { "value": "", "name": "None", "description": "Not a stop order" } ] }, "stopPriceType": { "type": "string", "description": "Trigger price type of stop orders", "enum": [ "TP", "MP", "IP", "" ], "x-api-enum": [ { "value": "TP", "name": "trade price", "description": "TP for trade price, The last trade price is the last price at which an order was filled. This price can be found in the latest match message." }, { "value": "MP", "name": "mark price", "description": "MP for mark price. The mark price can be obtained through relevant OPEN API for index services." }, { "value": "IP", "name": "index price", "description": "IP for index price. The index price can be obtained through relevant OPEN API for index services." }, { "value": "", "name": "None", "description": "Not a stop order" } ] }, "stopTriggered": { "type": "boolean", "description": "Mark to show whether the stop order is triggered" }, "stopPrice": { "type": "integer", "description": "Trigger price of stop orders\n" }, "timeInForce": { "type": "string", "description": "Time in force policy type\n" }, "postOnly": { "type": "boolean", "description": "Mark of post only\n" }, "hidden": { "type": "boolean", "description": "Mark of the hidden order\n" }, "iceberg": { "type": "boolean", "description": "Mark of the iceberg order\n" }, "leverage": { "type": "string", "description": "Leverage of the order\n" }, "forceHold": { "type": "boolean", "description": "A mark to forcely hold the funds for an order\n" }, "closeOrder": { "type": "boolean", "description": "A mark to close the position\n" }, "visibleSize": { "type": "integer", "description": "Visible size of the iceberg order\n" }, "clientOid": { "type": "string", "description": "Unique order id created by users to identify their orders\n" }, "remark": { "type": "string", "description": "Remark of the order\n" }, "tags": { "type": "string", "description": "tag order source\n" }, "isActive": { "type": "boolean", "description": "Mark of the active orders\n" }, "cancelExist": { "type": "boolean", "description": "Mark of the canceled orders\n" }, "createdAt": { "type": "integer", "description": "Time the order created\n", "format": "int64" }, "updatedAt": { "type": "integer", "description": "last update time\n", "format": "int64" }, "endAt": { "type": "integer", "description": "End time\n", "format": "int64" }, "orderTime": { "type": "integer", "description": "Order create time in nanosecond\n", "format": "int64" }, "settleCurrency": { "type": "string", "description": "settlement currency\n" }, "marginMode": { "type": "string", "description": "Margin mode: ISOLATED (isolated), CROSS (cross margin).\n" }, "avgDealPrice": { "type": "string", "description": "Average transaction price, forward contract average transaction price = sum (transaction value) / sum (transaction quantity), reverse contract average transaction price = sum (transaction quantity) / sum (transaction value). Transaction quantity = lots * multiplier\n" }, "filledSize": { "type": "integer", "description": "Value of the executed orders\n" }, "filledValue": { "type": "string", "description": "Executed order quantity\n" }, "status": { "type": "string", "description": "order status: “open” or “done”\n" }, "reduceOnly": { "type": "boolean", "description": "A mark to reduce the position size only\n" } }, "required": [ "id", "symbol", "type", "side", "price", "size", "value", "dealValue", "dealSize", "stp", "stop", "stopPriceType", "stopTriggered", "stopPrice", "timeInForce", "postOnly", "hidden", "iceberg", "leverage", "forceHold", "closeOrder", "visibleSize", "clientOid", "remark", "tags", "isActive", "cancelExist", "createdAt", "updatedAt", "endAt", "orderTime", "settleCurrency", "marginMode", "avgDealPrice", "filledSize", "filledValue", "status", "reduceOnly" ] } } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470246", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "General", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "GetRecentClosedOrders", "x-sdk-method-description": "Get a list of recent 1000 closed orders in the last 24 hours. If you need to get your recent traded order history with low latency, you may query this endpoint.", "x-api-rate-limit-weight": 5, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": [\\n {\\n \\\"id\\\": \\\"236387137732231168\\\",\\n \\\"symbol\\\": \\\"XRPUSDTM\\\",\\n \\\"type\\\": \\\"market\\\",\\n \\\"side\\\": \\\"buy\\\",\\n \\\"price\\\": \\\"0\\\",\\n \\\"size\\\": 1,\\n \\\"value\\\": \\\"5.51\\\",\\n \\\"dealValue\\\": \\\"5.511\\\",\\n \\\"dealSize\\\": 1,\\n \\\"stp\\\": \\\"\\\",\\n \\\"stop\\\": \\\"\\\",\\n \\\"stopPriceType\\\": \\\"\\\",\\n \\\"stopTriggered\\\": false,\\n \\\"stopPrice\\\": null,\\n \\\"timeInForce\\\": \\\"GTC\\\",\\n \\\"postOnly\\\": false,\\n \\\"hidden\\\": false,\\n \\\"iceberg\\\": false,\\n \\\"leverage\\\": \\\"10.0\\\",\\n \\\"forceHold\\\": false,\\n \\\"closeOrder\\\": false,\\n \\\"visibleSize\\\": 0,\\n \\\"clientOid\\\": \\\"16698fe6-2746-4aeb-a7fa-61f633ab6090\\\",\\n \\\"remark\\\": null,\\n \\\"tags\\\": \\\"\\\",\\n \\\"isActive\\\": false,\\n \\\"cancelExist\\\": false,\\n \\\"createdAt\\\": 1729172287496,\\n \\\"updatedAt\\\": 1729172287568,\\n \\\"endAt\\\": 1729172287568,\\n \\\"orderTime\\\": 1729172287496950800,\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"marginMode\\\": \\\"ISOLATED\\\",\\n \\\"avgDealPrice\\\": \\\"0.5511\\\",\\n \\\"filledSize\\\": 1,\\n \\\"filledValue\\\": \\\"5.511\\\",\\n \\\"status\\\": \\\"done\\\",\\n \\\"reduceOnly\\\": false\\n },\\n {\\n \\\"id\\\": \\\"236317213710184449\\\",\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"type\\\": \\\"market\\\",\\n \\\"side\\\": \\\"buy\\\",\\n \\\"price\\\": \\\"0\\\",\\n \\\"size\\\": 1,\\n \\\"value\\\": \\\"67.4309\\\",\\n \\\"dealValue\\\": \\\"67.4309\\\",\\n \\\"dealSize\\\": 1,\\n \\\"stp\\\": \\\"\\\",\\n \\\"stop\\\": \\\"\\\",\\n \\\"stopPriceType\\\": \\\"\\\",\\n \\\"stopTriggered\\\": false,\\n \\\"stopPrice\\\": null,\\n \\\"timeInForce\\\": \\\"GTC\\\",\\n \\\"postOnly\\\": false,\\n \\\"hidden\\\": false,\\n \\\"iceberg\\\": false,\\n \\\"leverage\\\": \\\"3\\\",\\n \\\"forceHold\\\": false,\\n \\\"closeOrder\\\": false,\\n \\\"visibleSize\\\": 0,\\n \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n \\\"remark\\\": null,\\n \\\"tags\\\": \\\"\\\",\\n \\\"isActive\\\": false,\\n \\\"cancelExist\\\": false,\\n \\\"createdAt\\\": 1729155616310,\\n \\\"updatedAt\\\": 1729155616324,\\n \\\"endAt\\\": 1729155616324,\\n \\\"orderTime\\\": 1729155616310180400,\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"marginMode\\\": \\\"ISOLATED\\\",\\n \\\"avgDealPrice\\\": \\\"67430.9\\\",\\n \\\"filledSize\\\": 1,\\n \\\"filledValue\\\": \\\"67.4309\\\",\\n \\\"status\\\": \\\"done\\\",\\n \\\"reduceOnly\\\": false\\n },\\n {\\n \\\"id\\\": \\\"236317094436728832\\\",\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"type\\\": \\\"market\\\",\\n \\\"side\\\": \\\"buy\\\",\\n \\\"price\\\": \\\"0\\\",\\n \\\"size\\\": 1,\\n \\\"value\\\": \\\"67.445\\\",\\n \\\"dealValue\\\": \\\"67.445\\\",\\n \\\"dealSize\\\": 1,\\n \\\"stp\\\": \\\"\\\",\\n \\\"stop\\\": \\\"\\\",\\n \\\"stopPriceType\\\": \\\"\\\",\\n \\\"stopTriggered\\\": false,\\n \\\"stopPrice\\\": null,\\n \\\"timeInForce\\\": \\\"GTC\\\",\\n \\\"postOnly\\\": false,\\n \\\"hidden\\\": false,\\n \\\"iceberg\\\": false,\\n \\\"leverage\\\": \\\"3\\\",\\n \\\"forceHold\\\": false,\\n \\\"closeOrder\\\": false,\\n \\\"visibleSize\\\": 0,\\n \\\"clientOid\\\": \\\"5c52e11203aa677f33e493fb\\\",\\n \\\"remark\\\": null,\\n \\\"tags\\\": \\\"\\\",\\n \\\"isActive\\\": false,\\n \\\"cancelExist\\\": false,\\n \\\"createdAt\\\": 1729155587873,\\n \\\"updatedAt\\\": 1729155587946,\\n \\\"endAt\\\": 1729155587946,\\n \\\"orderTime\\\": 1729155587873332000,\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"marginMode\\\": \\\"ISOLATED\\\",\\n \\\"avgDealPrice\\\": \\\"67445.0\\\",\\n \\\"filledSize\\\": 1,\\n \\\"filledValue\\\": \\\"67.445\\\",\\n \\\"status\\\": \\\"done\\\",\\n \\\"reduceOnly\\\": false\\n }\\n ]\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}", "operationId": "028" } }, "/api/v1/openOrderStatistics": { "get": { "summary": "Get Open Order Value", "deprecated": false, "description": "You can query this endpoint to get the total number and value of all your active orders.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "openOrderBuySize": { "type": "integer", "description": "Total number of unexecuted buy orders\n" }, "openOrderSellSize": { "type": "integer", "description": "Total number of unexecuted sell orders\n" }, "openOrderBuyCost": { "type": "string", "description": "Value of all unexecuted buy orders\n" }, "openOrderSellCost": { "type": "string", "description": "Value of all unexecuted sell orders\n" }, "settleCurrency": { "type": "string", "description": "Settlement currency\n" } }, "required": [ "openOrderBuySize", "openOrderSellSize", "openOrderBuyCost", "openOrderSellCost", "settleCurrency" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470250", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "General", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "GetOpenOrderValue", "x-sdk-method-description": "You can query this endpoint to get the total number and value of all your active orders.", "x-api-rate-limit-weight": 10, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"openOrderBuySize\\\": 1,\\n \\\"openOrderSellSize\\\": 0,\\n \\\"openOrderBuyCost\\\": \\\"0.0001\\\",\\n \\\"openOrderSellCost\\\": \\\"0\\\",\\n \\\"settleCurrency\\\": \\\"USDT\\\"\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}", "operationId": "030" } }, "/api/v1/recentFills": { "get": { "summary": "Get Recent Trade History", "deprecated": false, "description": "Get a list of recent 1000 fills in the last 24 hours. If you need to get your recently traded order history with low latency, you may query this endpoint.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "tradeId": { "type": "string", "description": "Trade ID\n" }, "orderId": { "type": "string", "description": "Order ID\n" }, "side": { "type": "string", "description": "Transaction side\n", "enum": [ "buy", "sell" ], "x-api-enum": [ { "value": "buy", "name": "buy", "description": "buy" }, { "value": "sell", "name": "sell", "description": "sell" } ] }, "liquidity": { "type": "string", "description": "Liquidity-taker or -maker\n", "enum": [ "taker", "maker" ], "x-api-enum": [ { "value": "taker", "name": "taker", "description": "taker" }, { "value": "maker", "name": "maker", "description": "maker" } ] }, "forceTaker": { "type": "boolean", "description": "Whether to force processing as a taker\n" }, "price": { "type": "string", "description": "Filled price\n" }, "size": { "type": "integer", "description": "Filled amount\n" }, "value": { "type": "string", "description": "Order value\n" }, "openFeePay": { "type": "string", "description": "Opening transaction fee\n" }, "closeFeePay": { "type": "string", "description": "Closing transaction fee\n" }, "stop": { "type": "string", "description": "A mark to the stop order type", "enum": [ "down", "up", "" ], "x-api-enum": [ { "value": "down", "name": "down", "description": "Triggers when the price reaches or goes below the stopPrice." }, { "value": "up", "name": "up", "description": "Triggers when the price reaches or goes above the stopPrice." }, { "value": "", "name": "None", "description": "Not a stop order" } ] }, "feeRate": { "type": "string", "description": "Fee Rate" }, "fixFee": { "type": "string", "description": "Fixed fees (Deprecated field, no actual use of the value field)\n" }, "feeCurrency": { "type": "string", "description": "Charging currency\n" }, "tradeTime": { "type": "integer", "description": "Trade time in nanoseconds\n", "format": "int64" }, "subTradeType": { "type": "string", "description": "Deprecated field, no actual use of the value field" }, "marginMode": { "type": "string", "description": "Margin mode: ISOLATED (isolated), CROSS (cross margin).\n", "enum": [ "ISOLATED", "CROSS" ], "x-api-enum": [ { "value": "ISOLATED", "name": "ISOLATED", "description": "Isolated Margin" }, { "value": "CROSS", "name": "CROSS", "description": "Cross Margin" } ] }, "displayType": { "type": "string", "enum": [ "limit", "market", "limit_stop", "market_stop" ], "description": "Order Type", "x-api-enum": [ { "value": "limit", "name": "limit", "description": "Limit order" }, { "value": "market", "name": "market", "description": "Market order" }, { "value": "limit_stop", "name": "limit_stop", "description": "Stop limit order" }, { "value": "market_stop", "name": "market_stop", "description": "Stop Market order" } ] }, "fee": { "type": "string", "description": "Transaction fee\n" }, "settleCurrency": { "type": "string", "description": "Settle Currency" }, "orderType": { "type": "string", "description": "Order type\n", "enum": [ "market", "limit" ], "x-api-enum": [ { "value": "market", "name": "market", "description": "market" }, { "value": "limit", "name": "limit", "description": "limit" } ] }, "tradeType": { "type": "string", "description": "Trade type (trade, liquid, cancel, adl or settlement)\n", "enum": [ "trade", "cancel", "liquid", "adl", "settlement" ], "x-api-enum": [ { "value": "trade", "name": "trade", "description": "trade" }, { "value": "cancel", "name": "cancel", "description": "Partially filled and canceled orders" }, { "value": "liquid", "name": "liquid", "description": "liquid" }, { "value": "adl", "name": "adl", "description": "adl" }, { "value": "settlement", "name": "settlement", "description": "settlement" } ] }, "createdAt": { "type": "integer", "description": "Order creation time\n", "format": "int64" } }, "required": [ "symbol", "tradeId", "orderId", "side", "liquidity", "forceTaker", "price", "size", "value", "openFeePay", "closeFeePay", "stop", "feeRate", "fixFee", "feeCurrency", "tradeTime", "subTradeType", "marginMode", "displayType", "fee", "settleCurrency", "orderType", "tradeType", "createdAt" ] } } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470249", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "getRecentTradeHistory", "x-sdk-method-description": "Get a list of recent 1000 fills in the last 24 hours. If you need to get your recently traded order history with low latency, you may query this endpoint.", "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": [\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"tradeId\\\": \\\"1784277229880\\\",\\n \\\"orderId\\\": \\\"236317213710184449\\\",\\n \\\"side\\\": \\\"buy\\\",\\n \\\"liquidity\\\": \\\"taker\\\",\\n \\\"forceTaker\\\": false,\\n \\\"price\\\": \\\"67430.9\\\",\\n \\\"size\\\": 1,\\n \\\"value\\\": \\\"67.4309\\\",\\n \\\"openFeePay\\\": \\\"0.04045854\\\",\\n \\\"closeFeePay\\\": \\\"0\\\",\\n \\\"stop\\\": \\\"\\\",\\n \\\"feeRate\\\": \\\"0.00060\\\",\\n \\\"fixFee\\\": \\\"0\\\",\\n \\\"feeCurrency\\\": \\\"USDT\\\",\\n \\\"marginMode\\\": \\\"ISOLATED\\\",\\n \\\"fee\\\": \\\"0.04045854\\\",\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"orderType\\\": \\\"market\\\",\\n \\\"displayType\\\": \\\"market\\\",\\n \\\"tradeType\\\": \\\"trade\\\",\\n \\\"subTradeType\\\": null,\\n \\\"tradeTime\\\": 1729155616320000000,\\n \\\"createdAt\\\": 1729155616493\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"tradeId\\\": \\\"1784277132002\\\",\\n \\\"orderId\\\": \\\"236317094436728832\\\",\\n \\\"side\\\": \\\"buy\\\",\\n \\\"liquidity\\\": \\\"taker\\\",\\n \\\"forceTaker\\\": false,\\n \\\"price\\\": \\\"67445\\\",\\n \\\"size\\\": 1,\\n \\\"value\\\": \\\"67.445\\\",\\n \\\"openFeePay\\\": \\\"0\\\",\\n \\\"closeFeePay\\\": \\\"0.040467\\\",\\n \\\"stop\\\": \\\"\\\",\\n \\\"feeRate\\\": \\\"0.00060\\\",\\n \\\"fixFee\\\": \\\"0\\\",\\n \\\"feeCurrency\\\": \\\"USDT\\\",\\n \\\"marginMode\\\": \\\"ISOLATED\\\",\\n \\\"fee\\\": \\\"0.040467\\\",\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"orderType\\\": \\\"market\\\",\\n \\\"displayType\\\": \\\"market\\\",\\n \\\"tradeType\\\": \\\"trade\\\",\\n \\\"subTradeType\\\": null,\\n \\\"tradeTime\\\": 1729155587944000000,\\n \\\"createdAt\\\": 1729155588104\\n }\\n ]\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}", "operationId": "031" } }, "/api/v1/fills": { "get": { "summary": "Get Trade History", "deprecated": false, "description": "Get a list of recent fills. If you need to get your recent trade history with low latency, please query endpoint Get List of Orders Completed in 24h. The requested data is not real-time.", "tags": [], "parameters": [ { "name": "orderId", "in": "query", "description": "List fills for a specific order only (if you specify orderId, other parameters can be ignored)", "required": false, "schema": { "type": "string" } }, { "name": "symbol", "in": "query", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": false, "schema": { "type": "string" } }, { "name": "side", "in": "query", "description": "Order side", "required": false, "schema": { "type": "string", "enum": [ "buy", "sell" ], "x-api-enum": [ { "value": "buy", "name": "buy", "description": "buy" }, { "value": "sell", "name": "sell", "description": "sell" } ] } }, { "name": "type", "in": "query", "description": "Order Type", "required": false, "schema": { "type": "string", "enum": [ "limit", "market", "limit_stop", "market_stop" ], "x-api-enum": [ { "value": "limit", "name": "limit", "description": "Limit order" }, { "value": "market", "name": "market", "description": "Market order" }, { "value": "limit_stop", "name": "limit_stop", "description": "Stop limit order" }, { "value": "market_stop", "name": "market_stop", "description": "Stop Market order" } ] } }, { "name": "tradeTypes", "in": "query", "description": "Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all types when empty", "required": false, "schema": { "type": "string", "example": [ "trade", "adl", "liquid", "settlement", "adl,liquid" ] } }, { "name": "startAt", "in": "query", "description": "Start time (milliseconds)", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "endAt", "in": "query", "description": "End time (milliseconds)", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "currentPage", "in": "query", "description": "Current request page. The default currentPage is 1", "required": false, "schema": { "type": "integer", "default": 1 } }, { "name": "pageSize", "in": "query", "description": "pageSize, The default pageSize is 50; the maximum cannot exceed 1000", "required": false, "schema": { "type": "integer", "default": 50, "maximum": 1000 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "currentPage": { "type": "integer" }, "pageSize": { "type": "integer" }, "totalNum": { "type": "integer" }, "totalPage": { "type": "integer" }, "items": { "type": "array", "items": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "tradeId": { "type": "string", "description": "Trade ID\n" }, "orderId": { "type": "string", "description": "Order ID\n" }, "side": { "type": "string", "description": "Transaction side", "enum": [ "buy", "sell" ], "x-api-enum": [ { "value": "buy", "name": "buy", "description": "buy" }, { "value": "sell", "name": "sell", "description": "sell" } ] }, "liquidity": { "type": "string", "description": "Liquidity-taker or -maker", "enum": [ "taker", "maker" ], "x-api-enum": [ { "value": "taker", "name": "taker", "description": "taker" }, { "value": "maker", "name": "maker", "description": "maker" } ] }, "forceTaker": { "type": "boolean", "description": "Whether to force processing as a taker\n" }, "price": { "type": "string", "description": "Filled price" }, "size": { "type": "integer", "description": "Filled amount" }, "value": { "type": "string", "description": "Order value" }, "openFeePay": { "type": "string", "description": "Opening transaction fee" }, "closeFeePay": { "type": "string", "description": "Closing transaction fee" }, "stop": { "type": "string", "description": "A mark to the stop order type", "enum": [ "down", "up", "" ], "x-api-enum": [ { "value": "down", "name": "down", "description": "Triggers when the price reaches or goes below the stopPrice." }, { "value": "up", "name": "up", "description": "Triggers when the price reaches or goes above the stopPrice." }, { "value": "", "name": "None", "description": "Not a stop order" } ] }, "feeRate": { "type": "string", "description": "Fee Rate" }, "fixFee": { "type": "string", "description": "Fixed fees (Deprecated field, no actual use of the value field)" }, "feeCurrency": { "type": "string", "description": "Charging currency" }, "tradeTime": { "type": "integer", "description": "Trade time in nanoseconds", "format": "int64" }, "subTradeType": { "type": "string", "description": "Deprecated field, no actual use of the value field" }, "marginMode": { "type": "string", "description": "Margin mode: ISOLATED (isolated), CROSS (cross margin).", "enum": [ "ISOLATED", "CROSS" ], "x-api-enum": [ { "value": "ISOLATED", "name": "ISOLATED", "description": "Isolated margin" }, { "value": "CROSS", "name": "CROSS", "description": "Cross margin" } ] }, "settleCurrency": { "type": "string", "description": "Settle currency" }, "displayType": { "type": "string", "description": "Order type", "enum": [ "limit", "market", "limit_stop", "market_stop" ], "x-api-enum": [ { "value": "limit", "name": "limit", "description": "limit order" }, { "value": "market", "name": "market", "description": "market order" }, { "value": "limit_stop", "name": "limit_stop", "description": "stop limit order" }, { "value": "market_stop", "name": "market_stop", "description": "stop market order" } ] }, "fee": { "type": "string", "description": "Trading fee" }, "orderType": { "type": "string", "description": "Order type", "enum": [ "market", "limit" ], "x-api-enum": [ { "value": "market", "name": "market", "description": "market" }, { "value": "limit", "name": "limit", "description": "limit" } ] }, "tradeType": { "type": "string", "description": "Trade type (trade, liquid, adl or settlement)\n", "enum": [ "trade", "liquid", "adl", "settlement" ], "x-api-enum": [ { "value": "trade", "name": "trade", "description": "trade" }, { "value": "liquid", "name": "liquid", "description": "liquid" }, { "value": "adl", "name": "adl", "description": "adl" }, { "value": "settlement", "name": "settlement", "description": "settlement" } ] }, "createdAt": { "type": "integer", "description": "Order creation time\n", "format": "int64" }, "openFeeTaxPay": { "type": "string", "description": "Opening tax fee (Only KYC users in some regions have this parameter)" }, "closeFeeTaxPay": { "type": "string", "description": "Close tax fee (Only KYC users in some regions have this parameter)" } }, "required": [ "symbol", "tradeId", "orderId", "side", "liquidity", "forceTaker", "price", "size", "value", "openFeePay", "closeFeePay", "stop", "feeRate", "fixFee", "feeCurrency", "tradeTime", "subTradeType", "marginMode", "openFeeTaxPay", "closeFeeTaxPay", "displayType", "fee", "settleCurrency", "orderType", "tradeType", "createdAt" ] } } }, "required": [ "currentPage", "pageSize", "totalNum", "totalPage", "items" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470248", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "General", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Order", "x-sdk-method-name": "getTradeHistory", "x-sdk-method-description": "Get a list of recent fills. If you need to get your recent trade history with low latency, please query endpoint Get List of Orders Completed in 24h. The requested data is not real-time.", "x-api-rate-limit-weight": 5, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"currentPage\\\": 1,\\n \\\"pageSize\\\": 50,\\n \\\"totalNum\\\": 2,\\n \\\"totalPage\\\": 1,\\n \\\"items\\\": [\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"tradeId\\\": \\\"1828954878212\\\",\\n \\\"orderId\\\": \\\"284486580251463680\\\",\\n \\\"side\\\": \\\"buy\\\",\\n \\\"liquidity\\\": \\\"taker\\\",\\n \\\"forceTaker\\\": false,\\n \\\"price\\\": \\\"86275.1\\\",\\n \\\"size\\\": 1,\\n \\\"value\\\": \\\"86.2751\\\",\\n \\\"openFeePay\\\": \\\"0.05176506\\\",\\n \\\"closeFeePay\\\": \\\"0\\\",\\n \\\"stop\\\": \\\"\\\",\\n \\\"feeRate\\\": \\\"0.00060\\\",\\n \\\"fixFee\\\": \\\"0\\\",\\n \\\"feeCurrency\\\": \\\"USDT\\\",\\n \\\"subTradeType\\\": null,\\n \\\"marginMode\\\": \\\"CROSS\\\",\\n \\\"openFeeTaxPay\\\": \\\"0\\\",\\n \\\"closeFeeTaxPay\\\": \\\"0\\\",\\n \\\"displayType\\\": \\\"market\\\",\\n \\\"fee\\\": \\\"0.05176506\\\",\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"orderType\\\": \\\"market\\\",\\n \\\"tradeType\\\": \\\"trade\\\",\\n \\\"tradeTime\\\": 1740640088244000000,\\n \\\"createdAt\\\": 1740640088427\\n }\\n ]\\n }\\n}", "x-request-example": "{\\\"orderId\\\": \\\"236655147005071361\\\", \\\"symbol\\\": \\\"example_string_default_value\\\", \\\"side\\\": \\\"buy\\\", \\\"type\\\": \\\"limit\\\", \\\"tradeTypes\\\": \\\"trade\\\", \\\"startAt\\\": 123456, \\\"endAt\\\": 123456, \\\"currentPage\\\": 1, \\\"pageSize\\\": 50}", "operationId": "032" } }, "/api/v2/position/getMarginMode": { "get": { "summary": "Get Margin Mode", "deprecated": false, "description": "This interface can query the margin mode of the current symbol.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "marginMode": { "type": "string", "description": "Margin mode: ISOLATED (isolated), CROSS (cross margin).", "enum": [ "ISOLATED", "CROSS" ], "x-api-enum": [ { "value": "ISOLATED", "name": "ISOLATED", "description": "isolated margin" }, { "value": "CROSS", "name": "CROSS", "description": "cross margin" } ] } }, "required": [ "symbol", "marginMode" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470259", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "getMarginMode", "x-sdk-method-description": "This interface can query the margin mode of the current symbol.", "x-api-rate-limit-weight": 2, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"marginMode\\\": \\\"ISOLATED\\\"\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}", "operationId": "033" } }, "/api/v2/position/changeMarginMode": { "post": { "summary": "Switch Margin Mode", "deprecated": false, "description": "This interface can modify the margin mode of the current symbol.", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "marginMode": { "type": "string", "description": "Margin mode: ISOLATED (isolated), CROSS (cross margin).", "enum": [ "ISOLATED", "CROSS" ], "x-api-enum": [ { "value": "ISOLATED", "name": "ISOLATED", "description": "isolated margin" }, { "value": "CROSS", "name": "CROSS", "description": "cross margin" } ] } }, "required": [ "symbol", "marginMode" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470262", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "switchMarginMode", "x-sdk-method-description": "This interface can modify the margin mode of the current symbol.", "x-api-rate-limit-weight": 2, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "example": [ "XBTUSDTM", "XBTUSDCM", "ETHUSDTM" ] }, "marginMode": { "type": "string", "description": "Modified margin model: ISOLATED (isolated), CROSS (cross margin).", "enum": [ "ISOLATED", "CROSS" ], "x-api-enum": [ { "value": "ISOLATED", "name": "ISOLATED", "description": "Isolated Margin Mode" }, { "value": "CROSS", "name": "CROSS", "description": "Cross Margin MOde" } ] } }, "required": [ "symbol", "marginMode" ] }, "example": "{\n \"symbol\": \"XBTUSDTM\",\n \"marginMode\": \"ISOLATED\"\n}" } } }, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"marginMode\\\": \\\"ISOLATED\\\"\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"marginMode\\\": \\\"ISOLATED\\\"}", "operationId": "034" } }, "/api/v2/position/batchChangeMarginMode": { "post": { "summary": "Batch Switch Margin Mode", "deprecated": false, "description": "Batch modify the margin mode of the symbols.", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "marginMode": { "type": "object", "properties": {}, "description": "Target Margin Model, Symbols that failed to be modified will also be included", "additionalProperties": { "type": "string" } }, "errors": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "description": "Error code" }, "msg": { "type": "string", "description": "Error message" }, "symbol": { "type": "string", "description": "Symbol" } } }, "description": "Symbol which modification failed" } }, "required": [ "marginMode", "errors" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3472403", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "batchSwitchMarginMode", "x-sdk-method-description": "Batch modify the margin mode of the symbols.", "x-api-rate-limit-weight": 2, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "marginMode": { "type": "string", "description": "Modified margin model: ISOLATED (isolated), CROSS (cross margin).", "enum": [ "ISOLATED", "CROSS" ], "x-api-enum": [ { "value": "ISOLATED", "name": "ISOLATED", "description": "Isolated Margin Mode" }, { "value": "CROSS", "name": "CROSS", "description": "Cross Margin MOde" } ] }, "symbols": { "type": "array", "items": { "type": "string" }, "description": "Symbol list of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " } }, "required": [ "marginMode", "symbols" ] }, "example": "{\n \"marginMode\": \"ISOLATED\",\n \"symbols\": [\n \"XBTUSDTM\",\n \"ETHUSDTM\"\n ]\n}" } } }, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"marginMode\\\": {\\n \\\"ETHUSDTM\\\": \\\"ISOLATED\\\",\\n \\\"XBTUSDTM\\\": \\\"CROSS\\\"\\n },\\n \\\"errors\\\": [\\n {\\n \\\"code\\\": \\\"50002\\\",\\n \\\"msg\\\": \\\"exist.order.or.position\\\",\\n \\\"symbol\\\": \\\"XBTUSDTM\\\"\\n }\\n ]\\n }\\n}", "x-request-example": "{\\\"marginMode\\\": \\\"ISOLATED\\\", \\\"symbols\\\": [\\\"XBTUSDTM\\\", \\\"ETHUSDTM\\\"]}", "operationId": "035" } }, "/api/v2/getMaxOpenSize": { "get": { "summary": "Get Max Open Size", "deprecated": false, "description": "Get Maximum Open Position Size.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string", "example": [ "XBTUSDTM", "XBTUSDM", "ETHUSDTM" ] } }, { "name": "price", "in": "query", "description": "Order Price\n", "required": true, "schema": { "type": "string" } }, { "name": "leverage", "in": "query", "description": "Leverage\n", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "maxBuyOpenSize": { "type": "integer", "description": "Maximum buy size (unit: lot)\n" }, "maxSellOpenSize": { "type": "integer", "description": "Maximum buy size (unit: lot)\n" } }, "required": [ "symbol", "maxBuyOpenSize", "maxSellOpenSize" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470251", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "GetMaxOpenSize", "x-sdk-method-description": "Get Maximum Open Position Size.", "x-api-rate-limit-weight": 2, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"maxBuyOpenSize\\\": 0,\\n \\\"maxSellOpenSize\\\": 0\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"price\\\": \\\"example_string_default_value\\\", \\\"leverage\\\": 123456}", "operationId": "036" } }, "/api/v1/position": { "get": { "summary": "Get Position Details", "deprecated": false, "description": "Get the position details of a specified position.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "id": { "type": "string", "description": "Position ID\n" }, "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "example": [ "XBTUSDTM", "XBTUSDM", "ETHUSDTM" ] }, "crossMode": { "type": "boolean", "description": "Whether it is cross margin." }, "delevPercentage": { "type": "number", "description": "ADL ranking percentile\n" }, "openingTimestamp": { "type": "integer", "description": "First opening time", "format": "int64" }, "currentTimestamp": { "type": "integer", "description": "Current timestamp\n", "format": "int64" }, "currentQty": { "type": "integer", "description": "Current postion quantity\n" }, "currentCost": { "type": "number", "description": "Current postion value\n" }, "currentComm": { "type": "number", "description": "Current commission\n" }, "unrealisedCost": { "type": "number", "description": "Unrealised value\n" }, "realisedGrossCost": { "type": "number", "description": "Accumulated realised gross profit value\n" }, "realisedCost": { "type": "number", "description": "Current realised position value\n" }, "isOpen": { "type": "boolean", "description": "Opened position or not\n" }, "markPrice": { "type": "number", "description": "Mark price\n" }, "markValue": { "type": "number", "description": "Mark Value\n" }, "posCost": { "type": "number", "description": "Position value\n" }, "posInit": { "type": "number", "description": "Inital margin Cross = opening value/cross leverage; isolated = accumulation of initial margin for each transaction\n" }, "posMargin": { "type": "number", "description": "Bankruptcy cost Cross = mark value * imr; Isolated = position margin (accumulation of initial margin, additional margin, generated funding fees, etc.)\n" }, "realisedGrossPnl": { "type": "number", "description": "Accumulated realised gross profit value\n" }, "realisedPnl": { "type": "number", "description": "Realised profit and loss\n" }, "unrealisedPnl": { "type": "number", "description": "Unrealised profit and loss\n" }, "unrealisedPnlPcnt": { "type": "number", "description": "Profit-loss ratio of the position\n" }, "unrealisedRoePcnt": { "type": "number", "description": "Rate of return on investment\n" }, "avgEntryPrice": { "type": "number", "description": "Average entry price\n" }, "liquidationPrice": { "type": "number", "description": "Liquidation price For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate.\n" }, "bankruptPrice": { "type": "number", "description": "Bankruptcy price For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate.\n" }, "settleCurrency": { "type": "string", "description": "Currency used to clear and settle the trades\n" }, "isInverse": { "type": "boolean", "description": "Reverse contract or not\n" }, "marginMode": { "type": "string", "description": "Margin Mode: CROSS,ISOLATED\n", "enum": [ "CROSS", "ISOLATED" ], "x-api-enum": [ { "value": "CROSS", "name": "CROSS", "description": "cross margin" }, { "value": "ISOLATED", "name": "ISOLATED", "description": "isolated margin" } ] }, "positionSide": { "type": "string", "description": "Position Side\n", "enum": [ "BOTH" ], "x-api-enum": [ { "value": "BOTH", "name": "BOTH", "description": "One-way position" } ] }, "leverage": { "type": "number", "description": "Leverage" }, "autoDeposit": { "type": "boolean", "description": "Auto deposit margin or not **Only applicable to Isolated Margin**\n" }, "maintMarginReq": { "type": "number", "description": "Maintenance margin requirement\n" }, "riskLimit": { "type": "integer", "description": "Risk limit **Only applicable to Isolated Margin**\n" }, "realLeverage": { "type": "number", "description": "Leverage of the order **Only applicable to Isolated Margin**\n" }, "posCross": { "type": "number", "description": "added margin **Only applicable to Isolated Margin**\n" }, "posCrossMargin": { "type": "integer", "description": "Additional margin calls (automatic, manual, adjusted risk limits) **Only applicable to Isolated Margin**\n" }, "posComm": { "type": "number", "description": "Bankruptcy cost **Only applicable to Isolated Margin**\n" }, "posCommCommon": { "type": "number", "description": "Part of bankruptcy cost (positioning, add margin) **Only applicable to Isolated Margin**\n" }, "posLoss": { "type": "number", "description": "Funding fees paid out **Only applicable to Isolated Margin**\n" }, "posFunding": { "type": "number", "description": "The current remaining unsettled funding fee for the position **Only applicable to Isolated Margin**\n" }, "posMaint": { "type": "number", "description": "Maintenance margin\n" }, "maintMargin": { "type": "number", "description": "Position margin **Only applicable to Isolated Margin**\n" }, "maintainMargin": { "type": "number", "description": "Maintenance margin rate **Only applicable to Isolated Margin**\n" } }, "required": [ "id", "symbol", "crossMode", "delevPercentage", "openingTimestamp", "currentTimestamp", "currentQty", "currentCost", "currentComm", "unrealisedCost", "realisedGrossCost", "realisedCost", "isOpen", "markPrice", "markValue", "posCost", "posInit", "posMargin", "realisedGrossPnl", "realisedPnl", "unrealisedPnl", "unrealisedPnlPcnt", "unrealisedRoePcnt", "avgEntryPrice", "liquidationPrice", "bankruptPrice", "settleCurrency", "isInverse", "marginMode", "positionSide", "leverage" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470252", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "GetPositionDetails", "x-sdk-method-description": "Get the position details of a specified position.", "x-api-rate-limit-weight": 2, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"id\\\": \\\"500000000000988255\\\",\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"autoDeposit\\\": false,\\n \\\"crossMode\\\": false,\\n \\\"maintMarginReq\\\": 0.005,\\n \\\"riskLimit\\\": 500000,\\n \\\"realLeverage\\\": 2.88,\\n \\\"delevPercentage\\\": 0.18,\\n \\\"openingTimestamp\\\": 1729155616322,\\n \\\"currentTimestamp\\\": 1729482542135,\\n \\\"currentQty\\\": 1,\\n \\\"currentCost\\\": 67.4309,\\n \\\"currentComm\\\": 0.01925174,\\n \\\"unrealisedCost\\\": 67.4309,\\n \\\"realisedGrossCost\\\": 0.0,\\n \\\"realisedCost\\\": 0.01925174,\\n \\\"isOpen\\\": true,\\n \\\"markPrice\\\": 68900.7,\\n \\\"markValue\\\": 68.9007,\\n \\\"posCost\\\": 67.4309,\\n \\\"posCross\\\": 0.01645214,\\n \\\"posCrossMargin\\\": 0,\\n \\\"posInit\\\": 22.4769666644,\\n \\\"posComm\\\": 0.0539546299,\\n \\\"posCommCommon\\\": 0.0539447199,\\n \\\"posLoss\\\": 0.03766885,\\n \\\"posMargin\\\": 22.5097045843,\\n \\\"posFunding\\\": -0.0212068,\\n \\\"posMaint\\\": 0.3931320569,\\n \\\"maintMargin\\\": 23.9795045843,\\n \\\"realisedGrossPnl\\\": 0.0,\\n \\\"realisedPnl\\\": -0.06166534,\\n \\\"unrealisedPnl\\\": 1.4698,\\n \\\"unrealisedPnlPcnt\\\": 0.0218,\\n \\\"unrealisedRoePcnt\\\": 0.0654,\\n \\\"avgEntryPrice\\\": 67430.9,\\n \\\"liquidationPrice\\\": 45314.33,\\n \\\"bankruptPrice\\\": 44975.16,\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"maintainMargin\\\": 0.005,\\n \\\"riskLimitLevel\\\": 2,\\n \\\"marginMode\\\": \\\"ISOLATED\\\",\\n \\\"positionSide\\\": \\\"BOTH\\\",\\n \\\"leverage\\\": 2.88\\n }\\n}\\n", "x-request-example": "{\\\"symbol\\\": \\\"example_string_default_value\\\"}", "operationId": "037" } }, "/api/v1/positions": { "get": { "summary": "Get Position List", "deprecated": false, "description": "Get the position details of a specified position.", "tags": [], "parameters": [ { "name": "currency", "in": "query", "description": "Quote currency code, Please refer to [rootSymbol](https://www.kucoin.com/docs-new/api-221752070) , such as USDT,XBT. Query all positions when empty", "required": false, "schema": { "type": "string", "example": [ "USDT", "XBT", "ETH" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Position ID\n" }, "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "example": [ "XBTUSDTM", "XBTUSDM", "ETHUSDTM" ] }, "crossMode": { "type": "boolean", "description": "Whether it is cross margin." }, "delevPercentage": { "type": "number", "description": "ADL ranking percentile\n" }, "openingTimestamp": { "type": "integer", "description": "First opening time", "format": "int64" }, "currentTimestamp": { "type": "integer", "description": "Current timestamp\n", "format": "int64" }, "currentQty": { "type": "integer", "description": "Current postion quantity\n" }, "currentCost": { "type": "number", "description": "Current postion value\n" }, "currentComm": { "type": "number", "description": "Current commission\n" }, "unrealisedCost": { "type": "number", "description": "Unrealised value\n" }, "realisedGrossCost": { "type": "number", "description": "Accumulated realised gross profit value\n" }, "realisedCost": { "type": "number", "description": "Current realised position value\n" }, "isOpen": { "type": "boolean", "description": "Opened position or not\n" }, "markPrice": { "type": "number", "description": "Mark price\n" }, "markValue": { "type": "number", "description": "Mark Value\n" }, "posCost": { "type": "number", "description": "Position value\n" }, "posInit": { "type": "number", "description": "Inital margin Cross = opening value/cross leverage; isolated = accumulation of initial margin for each transaction\n" }, "posMargin": { "type": "number", "description": "Bankruptcy cost Cross = mark value * imr; Isolated = position margin (accumulation of initial margin, additional margin, generated funding fees, etc.)\n" }, "realisedGrossPnl": { "type": "number", "description": "Accumulated realised gross profit value\n" }, "realisedPnl": { "type": "number", "description": "Realised profit and loss\n" }, "unrealisedPnl": { "type": "number", "description": "Unrealised profit and loss\n" }, "unrealisedPnlPcnt": { "type": "number", "description": "Profit-loss ratio of the position\n" }, "unrealisedRoePcnt": { "type": "number", "description": "Rate of return on investment\n" }, "avgEntryPrice": { "type": "number", "description": "Average entry price\n" }, "liquidationPrice": { "type": "number", "description": "Liquidation price For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate.\n" }, "bankruptPrice": { "type": "number", "description": "Bankruptcy price For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate.\n" }, "settleCurrency": { "type": "string", "description": "Currency used to clear and settle the trades\n" }, "isInverse": { "type": "boolean", "description": "Reverse contract or not\n" }, "marginMode": { "type": "string", "description": "Margin Mode: CROSS,ISOLATED\n", "enum": [ "CROSS", "ISOLATED" ], "x-api-enum": [ { "value": "CROSS", "name": "CROSS", "description": "cross margin" }, { "value": "ISOLATED", "name": "ISOLATED", "description": "isolated margin" } ] }, "positionSide": { "type": "string", "description": "Position Side\n", "enum": [ "BOTH" ], "x-api-enum": [ { "value": "BOTH", "name": "BOTH", "description": "One-way position" } ] }, "leverage": { "type": "number", "description": "Leverage" }, "autoDeposit": { "type": "boolean", "description": "Auto deposit margin or not **Only applicable to Isolated Margin**\n" }, "maintMarginReq": { "type": "number", "description": "Maintenance margin requirement\n" }, "riskLimit": { "type": "number", "description": "Risk limit **Only applicable to Isolated Margin**\n" }, "realLeverage": { "type": "number", "description": "Leverage of the order **Only applicable to Isolated Margin**\n" }, "posCross": { "type": "number", "description": "added margin **Only applicable to Isolated Margin**\n" }, "posCrossMargin": { "type": "number", "description": "Additional margin calls (automatic, manual, adjusted risk limits) **Only applicable to Isolated Margin**\n" }, "posComm": { "type": "number", "description": "Bankruptcy cost **Only applicable to Isolated Margin**\n" }, "posCommCommon": { "type": "number", "description": "Part of bankruptcy cost (positioning, add margin) **Only applicable to Isolated Margin**\n" }, "posLoss": { "type": "number", "description": "Funding fees paid out **Only applicable to Isolated Margin**\n" }, "posFunding": { "type": "number", "description": "The current remaining unsettled funding fee for the position **Only applicable to Isolated Margin**\n" }, "posMaint": { "type": "number", "description": "Maintenance margin" }, "maintMargin": { "type": "number", "description": "Position margin **Only applicable to Isolated Margin**\n" }, "maintainMargin": { "type": "number", "description": "Maintenance margin rate **Only applicable to Isolated Margin**\n" } }, "required": [ "id", "symbol", "crossMode", "delevPercentage", "openingTimestamp", "currentTimestamp", "currentQty", "currentCost", "currentComm", "unrealisedCost", "realisedGrossCost", "realisedCost", "isOpen", "markPrice", "markValue", "posCost", "posInit", "posMargin", "realisedGrossPnl", "realisedPnl", "unrealisedPnl", "unrealisedPnlPcnt", "unrealisedRoePcnt", "avgEntryPrice", "liquidationPrice", "bankruptPrice", "settleCurrency", "isInverse", "marginMode", "positionSide", "leverage" ] } } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470253", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "GetPositionList", "x-sdk-method-description": "Get the position details of a specified position.", "x-api-rate-limit-weight": 2, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": [\\n {\\n \\\"id\\\": \\\"500000000001046430\\\",\\n \\\"symbol\\\": \\\"ETHUSDM\\\",\\n \\\"crossMode\\\": true,\\n \\\"delevPercentage\\\": 0.71,\\n \\\"openingTimestamp\\\": 1730635780702,\\n \\\"currentTimestamp\\\": 1730636040926,\\n \\\"currentQty\\\": 1,\\n \\\"currentCost\\\": -4.069805E-4,\\n \\\"currentComm\\\": 2.441E-7,\\n \\\"unrealisedCost\\\": -4.069805E-4,\\n \\\"realisedGrossCost\\\": 0.0,\\n \\\"realisedCost\\\": 2.441E-7,\\n \\\"isOpen\\\": true,\\n \\\"markPrice\\\": 2454.12,\\n \\\"markValue\\\": -4.07478E-4,\\n \\\"posCost\\\": -4.069805E-4,\\n \\\"posInit\\\": 4.06981E-5,\\n \\\"posMargin\\\": 4.07478E-5,\\n \\\"realisedGrossPnl\\\": 0.0,\\n \\\"realisedPnl\\\": -2.441E-7,\\n \\\"unrealisedPnl\\\": -4.975E-7,\\n \\\"unrealisedPnlPcnt\\\": -0.0012,\\n \\\"unrealisedRoePcnt\\\": -0.0122,\\n \\\"avgEntryPrice\\\": 2457.12,\\n \\\"liquidationPrice\\\": 1429.96,\\n \\\"bankruptPrice\\\": 1414.96,\\n \\\"settleCurrency\\\": \\\"ETH\\\",\\n \\\"isInverse\\\": true,\\n \\\"marginMode\\\": \\\"CROSS\\\",\\n \\\"positionSide\\\": \\\"BOTH\\\",\\n \\\"leverage\\\": 10\\n },\\n {\\n \\\"id\\\": \\\"500000000000988255\\\",\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"autoDeposit\\\": true,\\n \\\"crossMode\\\": false,\\n \\\"maintMarginReq\\\": 0.005,\\n \\\"riskLimit\\\": 500000,\\n \\\"realLeverage\\\": 2.97,\\n \\\"delevPercentage\\\": 0.5,\\n \\\"openingTimestamp\\\": 1729155616322,\\n \\\"currentTimestamp\\\": 1730636040926,\\n \\\"currentQty\\\": 1,\\n \\\"currentCost\\\": 67.4309,\\n \\\"currentComm\\\": -0.15936162,\\n \\\"unrealisedCost\\\": 67.4309,\\n \\\"realisedGrossCost\\\": 0.0,\\n \\\"realisedCost\\\": -0.15936162,\\n \\\"isOpen\\\": true,\\n \\\"markPrice\\\": 68323.06,\\n \\\"markValue\\\": 68.32306,\\n \\\"posCost\\\": 67.4309,\\n \\\"posCross\\\": 0.06225152,\\n \\\"posCrossMargin\\\": 0,\\n \\\"posInit\\\": 22.2769666644,\\n \\\"posComm\\\": 0.0539821899,\\n \\\"posCommCommon\\\": 0.0539447199,\\n \\\"posLoss\\\": 0.26210915,\\n \\\"posMargin\\\": 22.1310912243,\\n \\\"posFunding\\\": -0.19982016,\\n \\\"posMaint\\\": 0.4046228699,\\n \\\"maintMargin\\\": 23.0232512243,\\n \\\"realisedGrossPnl\\\": 0.0,\\n \\\"realisedPnl\\\": -0.2402787,\\n \\\"unrealisedPnl\\\": 0.89216,\\n \\\"unrealisedPnlPcnt\\\": 0.0132,\\n \\\"unrealisedRoePcnt\\\": 0.04,\\n \\\"avgEntryPrice\\\": 67430.9,\\n \\\"liquidationPrice\\\": 45704.44,\\n \\\"bankruptPrice\\\": 45353.8,\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"isInverse\\\": false,\\n \\\"maintainMargin\\\": 0.005,\\n \\\"marginMode\\\": \\\"ISOLATED\\\",\\n \\\"positionSide\\\": \\\"BOTH\\\",\\n \\\"leverage\\\": 2.97\\n }\\n ]\\n}", "x-request-example": "{\\\"currency\\\": \\\"USDT\\\"}", "operationId": "038" } }, "/api/v1/history-positions": { "get": { "summary": "Get Positions History", "deprecated": false, "description": "This interface can query position history information records.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": false, "schema": { "type": "string" } }, { "name": "from", "in": "query", "description": "Closing start time(ms)\n", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "to", "in": "query", "description": "Closing end time(ms)\n", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "limit", "in": "query", "description": "Number of requests per page, max 200, default 10\n", "required": false, "schema": { "type": "integer", "maximum": 200, "default": 10 } }, { "name": "pageId", "in": "query", "description": "Current page number, default 1\n", "required": false, "schema": { "type": "integer", "default": 1 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "currentPage": { "type": "integer", "description": "Current page number\n" }, "pageSize": { "type": "integer", "description": "Number of results per page\n" }, "totalNum": { "type": "integer", "description": "Total number of results\n" }, "totalPage": { "type": "integer", "description": "Total number of pages\n" }, "items": { "type": "array", "items": { "type": "object", "properties": { "closeId": { "type": "string", "description": "Close ID\n" }, "userId": { "type": "string", "description": "User ID" }, "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "settleCurrency": { "type": "string", "description": "Currency used to settle trades\n" }, "leverage": { "type": "string", "description": "Leverage applied to the order\n" }, "type": { "type": "string", "description": "Type of closure\n" }, "pnl": { "type": "string", "description": "Net profit and loss (after deducting fees and funding costs)\n" }, "realisedGrossCost": { "type": "string", "description": "Accumulated realised gross profit value\n" }, "withdrawPnl": { "type": "string", "description": "Accumulated realised profit withdrawn from the position\n" }, "tradeFee": { "type": "string", "description": "Accumulated trading fees\n" }, "fundingFee": { "type": "string", "description": "Accumulated funding fees\n" }, "openTime": { "type": "integer", "description": "Time when the position was opened\n", "format": "int64" }, "closeTime": { "type": "integer", "description": "Time when the position was closed (default sorted in descending order)\n", "format": "int64" }, "openPrice": { "type": "string", "description": "Opening price of the position\n" }, "closePrice": { "type": "string", "description": "Closing price of the position\n" }, "marginMode": { "type": "string", "description": "Margin Mode: CROSS,ISOLATED", "enum": [ "CROSS", "ISOLATED" ], "x-api-enum": [ { "value": "CROSS", "name": "CROSS", "description": "cross margin" }, { "value": "ISOLATED", "name": "ISOLATED", "description": "isolated margin" } ] }, "realisedGrossCostNew": { "type": "string" }, "tax": { "type": "string", "description": "Tax" }, "roe": { "type": "string" }, "liquidAmount": { "type": "string" }, "liquidPrice": { "type": "string" }, "side": { "type": "string", "description": "Position side" } }, "required": [ "closeId", "userId", "symbol", "settleCurrency", "leverage", "type", "pnl", "realisedGrossCost", "withdrawPnl", "tradeFee", "fundingFee", "openTime", "closeTime", "openPrice", "closePrice", "marginMode", "realisedGrossCostNew", "tax", "liquidAmount", "liquidPrice", "side" ] } } }, "required": [ "currentPage", "pageSize", "totalNum", "totalPage", "items" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470254", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "GetPositionsHistory", "x-sdk-method-description": "This interface can query position history information records.", "x-api-rate-limit-weight": 2, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"currentPage\\\": 1,\\n \\\"pageSize\\\": 10,\\n \\\"totalNum\\\": 1,\\n \\\"totalPage\\\": 1,\\n \\\"items\\\": [\\n {\\n \\\"closeId\\\": \\\"500000000036305465\\\",\\n \\\"userId\\\": \\\"633559791e1cbc0001f319bc\\\",\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"leverage\\\": \\\"1.0\\\",\\n \\\"type\\\": \\\"CLOSE_LONG\\\",\\n \\\"pnl\\\": \\\"0.51214413\\\",\\n \\\"realisedGrossCost\\\": \\\"-0.5837\\\",\\n \\\"realisedGrossCostNew\\\": \\\"-0.5837\\\",\\n \\\"withdrawPnl\\\": \\\"0.0\\\",\\n \\\"tradeFee\\\": \\\"0.03766066\\\",\\n \\\"fundingFee\\\": \\\"-0.03389521\\\",\\n \\\"openTime\\\": 1735549162120,\\n \\\"closeTime\\\": 1735589352069,\\n \\\"openPrice\\\": \\\"93859.8\\\",\\n \\\"closePrice\\\": \\\"94443.5\\\",\\n \\\"marginMode\\\": \\\"CROSS\\\",\\n \\\"tax\\\": \\\"0.0\\\",\\n \\\"roe\\\": null,\\n \\\"liquidAmount\\\": null,\\n \\\"liquidPrice\\\": null,\\n \\\"side\\\": \\\"LONG\\\"\\n }\\n ]\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"example_string_default_value\\\", \\\"from\\\": 123456, \\\"to\\\": 123456, \\\"limit\\\": 10, \\\"pageId\\\": 1}", "operationId": "039" } }, "/api/v1/margin/maxWithdrawMargin": { "get": { "summary": "Get Max Withdraw Margin", "deprecated": false, "description": "This interface can query the maximum amount of margin that the current position supports withdrawal.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "string", "description": "The size of the position that can be deposited. If it is USDT-margin, it represents the amount of USDT. If it is coin-margin, this value represents the number of coins\n" } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470258", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "GetMaxWithdrawMargin", "x-sdk-method-description": "This interface can query the maximum amount of margin that the current position supports withdrawal.", "x-api-rate-limit-weight": 10, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": \\\"21.1135719252\\\"\\n}", "x-request-example": "{\\\"symbol\\\": \\\"example_string_default_value\\\"}", "operationId": "040" } }, "/api/v2/getCrossUserLeverage": { "get": { "summary": "Get Cross Margin Leverage", "deprecated": false, "description": "This interface can query the current symbol’s cross-margin leverage multiple.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "leverage": { "type": "string", "description": "Leverage multiple" } }, "required": [ "symbol", "leverage" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470260", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "getCrossMarginLeverage", "x-sdk-method-description": "This interface can query the current symbol’s cross-margin leverage multiple.", "x-api-rate-limit-weight": 2, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"leverage\\\": \\\"3\\\"\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}", "operationId": "041" } }, "/api/v2/changeCrossUserLeverage": { "post": { "summary": "Modify Cross Margin Leverage", "deprecated": false, "description": "This interface can modify the current symbol’s cross-margin leverage multiple.", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "boolean" } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470261", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "ModifyMarginLeverage", "x-sdk-method-description": "This interface can modify the current symbol’s cross-margin leverage multiple.", "x-api-rate-limit-weight": 2, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "leverage": { "type": "string", "description": "Leverage multiple" } }, "required": [ "symbol", "leverage" ] }, "example": "{\n \"symbol\": \"XBTUSDTM\",\n \"leverage\" : \"10\"\n}" } } }, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": true\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"leverage\\\": \\\"10\\\"}", "operationId": "042" } }, "/api/v1/position/margin/deposit-margin": { "post": { "summary": "Add Isolated Margin", "deprecated": false, "description": "Add Isolated Margin Manually.", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "id": { "type": "string", "description": "Position ID" }, "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "autoDeposit": { "type": "boolean", "description": "Auto deposit margin or not" }, "maintMarginReq": { "type": "number", "description": "Maintenance margin requirement\n\n" }, "riskLimit": { "type": "integer", "description": "Risk limit\n" }, "realLeverage": { "type": "number", "description": "Leverage o the order" }, "crossMode": { "type": "boolean", "description": "Cross mode or not" }, "delevPercentage": { "type": "number", "description": "ADL ranking percentile" }, "openingTimestamp": { "type": "integer", "description": "Open time", "format": "int64" }, "currentTimestamp": { "type": "integer", "format": "int64", "description": "Current timestamp\n" }, "currentQty": { "type": "integer", "description": "Current postion quantity" }, "currentCost": { "type": "number", "description": "Current postion value" }, "currentComm": { "type": "number", "description": "Current commission" }, "unrealisedCost": { "type": "number", "description": "Unrealised value" }, "realisedGrossCost": { "type": "number", "description": "Accumulated realised gross profit value" }, "realisedCost": { "type": "number", "description": "Current realised position value" }, "isOpen": { "type": "boolean", "description": "Opened position or not" }, "markPrice": { "type": "number", "description": "Mark price" }, "markValue": { "type": "number", "description": "Mark value\n" }, "posCost": { "type": "number", "description": "Position value" }, "posCross": { "type": "number", "description": "added margin" }, "posInit": { "type": "number", "description": "Leverage margin" }, "posComm": { "type": "number", "description": "Bankruptcy cost" }, "posLoss": { "type": "number", "description": "Funding fees paid out" }, "posMargin": { "type": "number", "description": "Position margin" }, "posMaint": { "type": "number", "description": "Maintenance margin" }, "maintMargin": { "type": "number", "description": "Position margin" }, "realisedGrossPnl": { "type": "number", "description": "Accumulated realised gross profit value" }, "realisedPnl": { "type": "number", "description": "Realised profit and loss" }, "unrealisedPnl": { "type": "number", "description": "Unrealised profit and loss" }, "unrealisedPnlPcnt": { "type": "number", "description": "Profit-loss ratio of the position" }, "unrealisedRoePcnt": { "type": "number", "description": "Rate of return on investment" }, "avgEntryPrice": { "type": "number", "description": "Average entry price" }, "liquidationPrice": { "type": "number", "description": "Liquidation price" }, "bankruptPrice": { "type": "number", "description": "Bankruptcy price" }, "userId": { "type": "integer", "description": "userId" }, "settleCurrency": { "type": "string", "description": "Currency used to clear and settle the trades" } }, "required": [ "id", "symbol", "autoDeposit", "maintMarginReq", "riskLimit", "realLeverage", "crossMode", "delevPercentage", "openingTimestamp", "currentTimestamp", "currentQty", "currentCost", "currentComm", "unrealisedCost", "realisedGrossCost", "realisedCost", "isOpen", "markPrice", "markValue", "posCost", "posCross", "posInit", "posComm", "posLoss", "posMargin", "posMaint", "maintMargin", "realisedGrossPnl", "realisedPnl", "unrealisedPnl", "unrealisedPnlPcnt", "unrealisedRoePcnt", "avgEntryPrice", "liquidationPrice", "bankruptPrice", "userId", "settleCurrency" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470257", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "AddIsolatedMargin", "x-sdk-method-description": "Add Isolated Margin Manually.", "x-api-rate-limit-weight": 4, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "margin": { "type": "number", "description": "Margin amount (min. margin amount≥0.00001667XBT)" }, "bizNo": { "type": "string", "description": "A unique ID generated by the user, to ensure the operation is processed by the system only once, The maximum length cannot exceed 36" } }, "required": [ "symbol", "margin", "bizNo" ] }, "example": "{\n \"symbol\": \"string\",\n \"margin\": 0,\n \"bizNo\": \"string\"\n}" } } }, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"id\\\": \\\"6200c9b83aecfb000152ddcd\\\",\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"autoDeposit\\\": false,\\n \\\"maintMarginReq\\\": 0.005,\\n \\\"riskLimit\\\": 500000,\\n \\\"realLeverage\\\": 18.72,\\n \\\"crossMode\\\": false,\\n \\\"delevPercentage\\\": 0.66,\\n \\\"openingTimestamp\\\": 1646287090131,\\n \\\"currentTimestamp\\\": 1646295055021,\\n \\\"currentQty\\\": 1,\\n \\\"currentCost\\\": 43.388,\\n \\\"currentComm\\\": 0.0260328,\\n \\\"unrealisedCost\\\": 43.388,\\n \\\"realisedGrossCost\\\": 0,\\n \\\"realisedCost\\\": 0.0260328,\\n \\\"isOpen\\\": true,\\n \\\"markPrice\\\": 43536.65,\\n \\\"markValue\\\": 43.53665,\\n \\\"posCost\\\": 43.388,\\n \\\"posCross\\\": 0.000024985,\\n \\\"posInit\\\": 2.1694,\\n \\\"posComm\\\": 0.02733446,\\n \\\"posLoss\\\": 0,\\n \\\"posMargin\\\": 2.19675944,\\n \\\"posMaint\\\": 0.24861326,\\n \\\"maintMargin\\\": 2.34540944,\\n \\\"realisedGrossPnl\\\": 0,\\n \\\"realisedPnl\\\": -0.0260328,\\n \\\"unrealisedPnl\\\": 0.14865,\\n \\\"unrealisedPnlPcnt\\\": 0.0034,\\n \\\"unrealisedRoePcnt\\\": 0.0685,\\n \\\"avgEntryPrice\\\": 43388,\\n \\\"liquidationPrice\\\": 41440,\\n \\\"bankruptPrice\\\": 41218,\\n \\\"userId\\\": 1234321123,\\n \\\"settleCurrency\\\": \\\"USDT\\\"\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"string\\\", \\\"margin\\\": 0, \\\"bizNo\\\": \\\"string\\\"}", "operationId": "043" } }, "/api/v1/margin/withdrawMargin": { "post": { "summary": "Remove Isolated Margin", "deprecated": false, "description": "Remove Isolated Margin Manually.", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "string", "description": "The size of the position deposited. If it is USDT-margin, it represents the amount of USDT. If it is coin-margin, this value represents the number of coins\n" } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470256", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "RemoveIsolatedMargin", "x-sdk-method-description": "Remove Isolated Margin Manually.", "x-api-rate-limit-weight": 10, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "withdrawAmount": { "type": "string", "description": "The size of the position that can be deposited. If it is USDT-margin, it represents the amount of USDT. If it is coin-margin, this value represents the number of coins\n" } }, "required": [ "symbol", "withdrawAmount" ] }, "example": "{\n \"symbol\": \"XBTUSDTM\",\n \"withdrawAmount\": \"0.0000001\"\n}" } } }, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": \\\"0.1\\\"\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"withdrawAmount\\\": \\\"0.0000001\\\"}", "operationId": "044" } }, "/api/v2/batchGetCrossOrderLimit": { "get": { "summary": "Get Cross Margin Risk Limit", "deprecated": false, "description": "Batch get cross margin risk limit.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220), (You may add up to 50 symbols. Use a halfwidth comma to each IP)", "required": true, "schema": { "type": "string", "example": [ "XBTUSDTM", "XBTUSDTM,ETHUSDTM" ] } }, { "name": "totalMargin", "in": "query", "description": "The position opening amount, in the contract's settlement currency.\nDefaults to 10,000 in margin currency for max position calculation.\nFor USDT/USDC, it's 10,000 USD; for others, it's 10,000 divided by the token's USDT price.", "required": false, "schema": { "type": "string" } }, { "name": "leverage", "in": "query", "description": "Calculates the max position size at the specified leverage.\nDefaults to the symbol’s max cross leverage.", "required": false, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220)" }, "maxOpenSize": { "type": "integer", "description": "Maximum amount of open position(Unit is **lots**)\n" }, "maxOpenValue": { "type": "string", "description": "Maximum value of open position(Unit is **quoteCcy**)\n" }, "totalMargin": { "type": "string", "description": "Margin amount used for max position calculation." }, "price": { "type": "string", "description": "Price used for max position calculation. Defaults to latest transaction price" }, "leverage": { "type": "string", "description": "Leverage used for max position calculation." }, "mmr": { "type": "string", "description": "Maintenance Margin Rate" }, "imr": { "type": "string", "description": "Initial Margin Rate" }, "currency": { "type": "string", "description": "Margin Currency" } }, "required": [ "symbol", "maxOpenSize", "maxOpenValue", "totalMargin", "price", "leverage", "mmr", "imr", "currency" ] } } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3472655", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "getCrossMarginRiskLimit", "x-sdk-method-description": "Batch get cross margin risk limit.", "x-api-rate-limit-weight": 2, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": [\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"maxOpenSize\\\": 12102,\\n \\\"maxOpenValue\\\": \\\"1234549.2240000000\\\",\\n \\\"totalMargin\\\": \\\"10000\\\",\\n \\\"price\\\": \\\"102012\\\",\\n \\\"leverage\\\": \\\"125.00\\\",\\n \\\"mmr\\\": \\\"0.00416136\\\",\\n \\\"imr\\\": \\\"0.008\\\",\\n \\\"currency\\\": \\\"USDT\\\"\\n },\\n {\\n \\\"symbol\\\": \\\"ETHUSDTM\\\",\\n \\\"maxOpenSize\\\": 38003,\\n \\\"maxOpenValue\\\": \\\"971508.6920000000\\\",\\n \\\"totalMargin\\\": \\\"10000\\\",\\n \\\"price\\\": \\\"2556.4\\\",\\n \\\"leverage\\\": \\\"100.00\\\",\\n \\\"mmr\\\": \\\"0.0054623236\\\",\\n \\\"imr\\\": \\\"0.01\\\",\\n \\\"currency\\\": \\\"USDT\\\"\\n }\\n ]\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"totalMargin\\\": \\\"example_string_default_value\\\", \\\"leverage\\\": 123456}", "operationId": "045" } }, "/api/v1/contracts/risk-limit/{symbol}": { "get": { "summary": "Get Isolated Margin Risk Limit", "deprecated": false, "description": "This interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin).", "tags": [], "parameters": [ { "name": "symbol", "in": "path", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "level": { "type": "integer", "description": "Level\n" }, "maxRiskLimit": { "type": "integer", "description": "Upper limit USDT (included)\n" }, "minRiskLimit": { "type": "integer", "description": "Lower limit USDT\n" }, "maxLeverage": { "type": "integer", "description": "Max. leverage\n" }, "initialMargin": { "type": "number", "description": "Initial margin rate\n" }, "maintainMargin": { "type": "number", "description": "Maintenance margin rate\n" } }, "required": [ "symbol", "level", "maxRiskLimit", "minRiskLimit", "maxLeverage", "initialMargin", "maintainMargin" ] } } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470263", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "getIsolatedMarginRiskLimit", "x-sdk-method-description": "This interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin).", "x-api-rate-limit-weight": 5, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": [\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"level\\\": 1,\\n \\\"maxRiskLimit\\\": 100000,\\n \\\"minRiskLimit\\\": 0,\\n \\\"maxLeverage\\\": 125,\\n \\\"initialMargin\\\": 0.008,\\n \\\"maintainMargin\\\": 0.004\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"level\\\": 2,\\n \\\"maxRiskLimit\\\": 500000,\\n \\\"minRiskLimit\\\": 100000,\\n \\\"maxLeverage\\\": 100,\\n \\\"initialMargin\\\": 0.01,\\n \\\"maintainMargin\\\": 0.005\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"level\\\": 3,\\n \\\"maxRiskLimit\\\": 1000000,\\n \\\"minRiskLimit\\\": 500000,\\n \\\"maxLeverage\\\": 75,\\n \\\"initialMargin\\\": 0.014,\\n \\\"maintainMargin\\\": 0.007\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"level\\\": 4,\\n \\\"maxRiskLimit\\\": 2000000,\\n \\\"minRiskLimit\\\": 1000000,\\n \\\"maxLeverage\\\": 50,\\n \\\"initialMargin\\\": 0.02,\\n \\\"maintainMargin\\\": 0.01\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"level\\\": 5,\\n \\\"maxRiskLimit\\\": 3000000,\\n \\\"minRiskLimit\\\": 2000000,\\n \\\"maxLeverage\\\": 30,\\n \\\"initialMargin\\\": 0.034,\\n \\\"maintainMargin\\\": 0.017\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"level\\\": 6,\\n \\\"maxRiskLimit\\\": 5000000,\\n \\\"minRiskLimit\\\": 3000000,\\n \\\"maxLeverage\\\": 20,\\n \\\"initialMargin\\\": 0.05,\\n \\\"maintainMargin\\\": 0.025\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"level\\\": 7,\\n \\\"maxRiskLimit\\\": 8000000,\\n \\\"minRiskLimit\\\": 5000000,\\n \\\"maxLeverage\\\": 10,\\n \\\"initialMargin\\\": 0.1,\\n \\\"maintainMargin\\\": 0.05\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"level\\\": 8,\\n \\\"maxRiskLimit\\\": 12000000,\\n \\\"minRiskLimit\\\": 8000000,\\n \\\"maxLeverage\\\": 5,\\n \\\"initialMargin\\\": 0.2,\\n \\\"maintainMargin\\\": 0.1\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"level\\\": 9,\\n \\\"maxRiskLimit\\\": 20000000,\\n \\\"minRiskLimit\\\": 12000000,\\n \\\"maxLeverage\\\": 4,\\n \\\"initialMargin\\\": 0.25,\\n \\\"maintainMargin\\\": 0.125\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"level\\\": 10,\\n \\\"maxRiskLimit\\\": 30000000,\\n \\\"minRiskLimit\\\": 20000000,\\n \\\"maxLeverage\\\": 3,\\n \\\"initialMargin\\\": 0.334,\\n \\\"maintainMargin\\\": 0.167\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"level\\\": 11,\\n \\\"maxRiskLimit\\\": 40000000,\\n \\\"minRiskLimit\\\": 30000000,\\n \\\"maxLeverage\\\": 2,\\n \\\"initialMargin\\\": 0.5,\\n \\\"maintainMargin\\\": 0.25\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"level\\\": 12,\\n \\\"maxRiskLimit\\\": 50000000,\\n \\\"minRiskLimit\\\": 40000000,\\n \\\"maxLeverage\\\": 1,\\n \\\"initialMargin\\\": 1.0,\\n \\\"maintainMargin\\\": 0.5\\n }\\n ]\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}", "operationId": "046" } }, "/api/v1/position/risk-limit-level/change": { "post": { "summary": "Modify Isolated Margin Risk Limit", "deprecated": false, "description": "This interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin).", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "boolean", "description": "Adjusting the level will result in the cancellation of any open orders. The response will indicate only whether the adjustment request was successfully submitted.\n" } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470264", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "modifyIsolatedMarginRiskLimt", "x-sdk-method-description": "This interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin).", "x-api-rate-limit-weight": 5, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "level": { "type": "integer", "description": "Level" } }, "required": [ "symbol", "level" ] }, "example": "{\n \"symbol\" : \"XBTUSDTM\",\n \"level\" : 2\n}" } } }, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": true\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"level\\\": 2}", "operationId": "047" } }, "/api/v1/funding-rate/{symbol}/current": { "get": { "summary": "Get Current Funding Rate", "deprecated": false, "description": "Get Current Funding Rate.", "tags": [], "parameters": [ { "name": "symbol", "in": "path", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Funding Rate Symbol\n" }, "granularity": { "type": "integer", "description": "Granularity (milliseconds)\n" }, "timePoint": { "type": "integer", "description": "The funding rate settlement time point of the previous cycle\n(milliseconds)\nBefore going live, the system will pre-generate the first funding rate record to ensure the billing cycle can start immediately after the contract is launched.\n The timePoint field represents the time the funding rate data was generated, not the actual time it takes effect or is settled.\n The first actual settlement will occur at the designated settlement time (00:00 / 08:00 / 14:00) after the contract goes live.\n\n", "format": "int64" }, "value": { "type": "number", "description": "Current cycle funding rate\n" }, "predictedValue": { "type": "number", "description": "Predicted funding rate\n" }, "fundingRateCap": { "type": "number", "description": "Maximum Funding Rate" }, "fundingRateFloor": { "type": "number", "description": "Minimum Funding Rate" }, "period": { "type": "integer", "enum": [ 1, 0 ], "description": "Indicates whether the current funding fee is charged within this cycle", "x-api-enum": [ { "value": 1, "name": "1", "description": "Indicates that funding will be charged in the current cycle" }, { "value": 0, "name": "0", "description": "Indicates a cross-cycle expense record that is not charged in the current cycle." } ] }, "fundingTime": { "type": "integer", "description": "Indicates the next funding fee settlement time point, which can be used to synchronize periodic settlement timing.", "format": "int64" } }, "required": [ "symbol", "granularity", "timePoint", "value", "predictedValue", "fundingRateCap", "fundingRateFloor", "period", "fundingTime" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470265", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "FundingFees", "x-sdk-method-name": "getCurrentFundingRate", "x-sdk-method-description": "Get Current Funding Rate.", "x-api-rate-limit-weight": 2, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"symbol\\\": \\\".XBTUSDTMFPI8H\\\",\\n \\\"granularity\\\": 28800000,\\n \\\"timePoint\\\": 1748462400000,\\n \\\"value\\\": 6.1E-5,\\n \\\"predictedValue\\\": 1.09E-4,\\n \\\"fundingRateCap\\\": 0.003,\\n \\\"fundingRateFloor\\\": -0.003,\\n \\\"period\\\": 0,\\n \\\"fundingTime\\\": 1748491200000\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\"}", "operationId": "048" } }, "/api/v1/contract/funding-rates": { "get": { "summary": "Get Public Funding History", "deprecated": false, "description": "Query the funding rate at each settlement time point within a certain time range of the corresponding contract.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string" } }, { "name": "from", "in": "query", "description": "Begin time (milliseconds)\n", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "to", "in": "query", "description": "End time (milliseconds)\n", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "fundingRate": { "type": "number", "description": "Funding rate" }, "timepoint": { "type": "integer", "description": "Time point (milliseconds)\n\n", "format": "int64" } }, "required": [ "symbol", "fundingRate", "timepoint" ] } } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470266", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "FundingFees", "x-sdk-method-name": "getPublicFundingHistory", "x-sdk-method-description": "Query the funding rate at each settlement time point within a certain time range of the corresponding contract.", "x-api-rate-limit-weight": 5, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": [\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 2.1E-4,\\n \\\"timepoint\\\": 1702296000000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 3.47E-4,\\n \\\"timepoint\\\": 1702267200000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 4.52E-4,\\n \\\"timepoint\\\": 1702238400000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 5.13E-4,\\n \\\"timepoint\\\": 1702209600000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 4.21E-4,\\n \\\"timepoint\\\": 1702180800000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 5.06E-4,\\n \\\"timepoint\\\": 1702152000000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 7.68E-4,\\n \\\"timepoint\\\": 1702123200000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 4.82E-4,\\n \\\"timepoint\\\": 1702094400000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 4.0E-4,\\n \\\"timepoint\\\": 1702065600000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 5.46E-4,\\n \\\"timepoint\\\": 1702036800000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 7.97E-4,\\n \\\"timepoint\\\": 1702008000000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 5.76E-4,\\n \\\"timepoint\\\": 1701979200000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 4.22E-4,\\n \\\"timepoint\\\": 1701950400000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 3.92E-4,\\n \\\"timepoint\\\": 1701921600000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 4.1E-4,\\n \\\"timepoint\\\": 1701892800000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 4.48E-4,\\n \\\"timepoint\\\": 1701864000000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 3.68E-4,\\n \\\"timepoint\\\": 1701835200000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 3.51E-4,\\n \\\"timepoint\\\": 1701806400000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.44E-4,\\n \\\"timepoint\\\": 1701777600000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 4.25E-4,\\n \\\"timepoint\\\": 1701748800000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": -8.2E-5,\\n \\\"timepoint\\\": 1701720000000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 4.64E-4,\\n \\\"timepoint\\\": 1701691200000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 4.14E-4,\\n \\\"timepoint\\\": 1701662400000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 2.44E-4,\\n \\\"timepoint\\\": 1701633600000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.99E-4,\\n \\\"timepoint\\\": 1701604800000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.79E-4,\\n \\\"timepoint\\\": 1701576000000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 8.7E-5,\\n \\\"timepoint\\\": 1701547200000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.6E-5,\\n \\\"timepoint\\\": 1701518400000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": -3.7E-5,\\n \\\"timepoint\\\": 1701489600000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.5E-5,\\n \\\"timepoint\\\": 1701460800000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 6.8E-5,\\n \\\"timepoint\\\": 1701432000000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 7.2E-5,\\n \\\"timepoint\\\": 1701403200000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.45E-4,\\n \\\"timepoint\\\": 1701374400000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.41E-4,\\n \\\"timepoint\\\": 1701345600000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 9.4E-5,\\n \\\"timepoint\\\": 1701316800000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.08E-4,\\n \\\"timepoint\\\": 1701288000000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 7.6E-5,\\n \\\"timepoint\\\": 1701259200000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.0E-5,\\n \\\"timepoint\\\": 1701230400000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.0E-5,\\n \\\"timepoint\\\": 1701201600000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.16E-4,\\n \\\"timepoint\\\": 1701172800000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 2.04E-4,\\n \\\"timepoint\\\": 1701144000000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 2.3E-4,\\n \\\"timepoint\\\": 1701115200000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 6.2E-5,\\n \\\"timepoint\\\": 1701086400000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.33E-4,\\n \\\"timepoint\\\": 1701057600000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 8.0E-5,\\n \\\"timepoint\\\": 1701028800000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.11E-4,\\n \\\"timepoint\\\": 1701000000000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 7.4E-5,\\n \\\"timepoint\\\": 1700971200000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.01E-4,\\n \\\"timepoint\\\": 1700942400000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 3.9E-5,\\n \\\"timepoint\\\": 1700913600000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.1E-5,\\n \\\"timepoint\\\": 1700884800000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 3.0E-6,\\n \\\"timepoint\\\": 1700856000000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.03E-4,\\n \\\"timepoint\\\": 1700827200000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 3.0E-6,\\n \\\"timepoint\\\": 1700798400000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 6.7E-5,\\n \\\"timepoint\\\": 1700769600000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.47E-4,\\n \\\"timepoint\\\": 1700740800000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 7.8E-5,\\n \\\"timepoint\\\": 1700712000000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.39E-4,\\n \\\"timepoint\\\": 1700683200000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 7.5E-5,\\n \\\"timepoint\\\": 1700654400000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.11E-4,\\n \\\"timepoint\\\": 1700625600000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 9.8E-5,\\n \\\"timepoint\\\": 1700596800000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.18E-4,\\n \\\"timepoint\\\": 1700568000000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.16E-4,\\n \\\"timepoint\\\": 1700539200000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.6E-4,\\n \\\"timepoint\\\": 1700510400000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.92E-4,\\n \\\"timepoint\\\": 1700481600000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.13E-4,\\n \\\"timepoint\\\": 1700452800000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 2.47E-4,\\n \\\"timepoint\\\": 1700424000000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 2.3E-4,\\n \\\"timepoint\\\": 1700395200000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 2.63E-4,\\n \\\"timepoint\\\": 1700366400000\\n },\\n {\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"fundingRate\\\": 1.32E-4,\\n \\\"timepoint\\\": 1700337600000\\n }\\n ]\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"from\\\": 1700310700000, \\\"to\\\": 1702310700000}", "operationId": "049" } }, "/api/v1/funding-history": { "get": { "summary": "Get Private Funding History", "deprecated": false, "description": "Submit request to get the funding history.", "tags": [], "parameters": [ { "name": "symbol", "in": "query", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) ", "required": true, "schema": { "type": "string" } }, { "name": "startAt", "in": "query", "description": "Begin time (milliseconds)\n", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "endAt", "in": "query", "description": "End time (milliseconds)\n", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "reverse", "in": "query", "description": "This parameter functions to judge whether the lookup is forward or not. True means “yes” and False means “no”. This parameter is set as true by default.\n", "required": false, "schema": { "type": "boolean" } }, { "name": "offset", "in": "query", "description": "Start offset. The unique attribute of the last returned result of the last request. The data of the first page will be returned by default.\n", "required": false, "schema": { "type": "integer" } }, { "name": "forward", "in": "query", "description": "This parameter functions to judge whether the lookup is forward or not. True means “yes” and False means “no”. This parameter is set as true by default.\n", "required": false, "schema": { "type": "boolean" } }, { "name": "maxCount", "in": "query", "description": "Max. record count. The default record count is 10", "required": false, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "dataList": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "description": "ID", "format": "int64" }, "symbol": { "type": "string", "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, "timePoint": { "type": "integer", "description": "Time point (milliseconds)\n", "format": "int64" }, "fundingRate": { "type": "number", "description": "Funding rate\n" }, "markPrice": { "type": "number", "description": "Mark price\n" }, "positionQty": { "type": "integer", "description": "Position size" }, "positionCost": { "type": "number", "description": "Position value at settlement period\n" }, "funding": { "type": "number", "description": "Settled funding fees A positive number means that the user received the funding fee, and vice versa.\n" }, "settleCurrency": { "type": "string", "description": "Settlement currency\n" }, "context": { "type": "string", "description": "Context" }, "marginMode": { "type": "string", "description": "Margin mode: ISOLATED (isolated), CROSS (cross margin).", "enum": [ "ISOLATED", "CROSS" ], "x-api-enum": [ { "value": "ISOLATED", "name": "ISOLATED", "description": "isolated margin" }, { "value": "CROSS", "name": "CROSS", "description": "cross margin" } ] } }, "required": [ "id", "symbol", "timePoint", "fundingRate", "markPrice", "positionQty", "positionCost", "funding", "settleCurrency", "context", "marginMode" ] } }, "hasMore": { "type": "boolean", "description": "Whether there are more pages\n" } }, "required": [ "dataList", "hasMore" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470267", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "FundingFees", "x-sdk-method-name": "getPrivateFundingHistory", "x-sdk-method-description": "Submit request to get the funding history.", "x-api-rate-limit-weight": 5, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"dataList\\\": [\\n {\\n \\\"id\\\": 1472387374042586,\\n \\\"symbol\\\": \\\"XBTUSDTM\\\",\\n \\\"timePoint\\\": 1731470400000,\\n \\\"fundingRate\\\": 6.41E-4,\\n \\\"markPrice\\\": 87139.92,\\n \\\"positionQty\\\": 1,\\n \\\"positionCost\\\": 87.13992,\\n \\\"funding\\\": -0.05585669,\\n \\\"settleCurrency\\\": \\\"USDT\\\",\\n \\\"context\\\": \\\"{\\\\\\\"marginMode\\\\\\\": \\\\\\\"ISOLATED\\\\\\\", \\\\\\\"positionSide\\\\\\\": \\\\\\\"BOTH\\\\\\\"}\\\",\\n \\\"marginMode\\\": \\\"ISOLATED\\\"\\n }\\n ],\\n \\\"hasMore\\\": true\\n }\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"startAt\\\": 1700310700000, \\\"endAt\\\": 1702310700000, \\\"reverse\\\": true, \\\"offset\\\": 123456, \\\"forward\\\": true, \\\"maxCount\\\": 123456}", "operationId": "050" } }, "/api/v1/bullet-public": { "post": { "summary": "Get Public Token - Futures", "deprecated": false, "description": "This interface can obtain the token required for Websocket to establish a Futures connection. If you need use public channels (e.g. all public market data), please make request as follows to obtain the server list and public token", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "token": { "type": "string", "description": "The token required to establish a Websocket connection" }, "instanceServers": { "type": "array", "items": { "type": "object", "properties": { "endpoint": { "type": "string", "description": "Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change." }, "encrypt": { "type": "boolean", "description": "Whether to encrypt. Currently only supports wss, not ws" }, "protocol": { "type": "string", "description": "Network Protocol", "enum": [ "websocket" ], "x-api-enum": [ { "value": "websocket", "name": "Websocket", "description": "Websocket" } ] }, "pingInterval": { "type": "integer", "description": "Recommended ping interval (milliseconds)" }, "pingTimeout": { "type": "integer", "description": "Heartbeat timeout (milliseconds)" } }, "required": [ "endpoint", "encrypt", "protocol", "pingInterval", "pingTimeout" ] } } }, "required": [ "token", "instanceServers" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470297", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Public", "x-api-permission": "NULL", "x-api-rate-limit-pool": "Public", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "getPublicToken", "x-sdk-method-description": "This interface can obtain the token required for Websocket to establish a Futures connection. If you need use public channels (e.g. all public market data), please make request as follows to obtain the server list and public token", "x-api-rate-limit-weight": 10, "x-response-example": "{\\\"code\\\":\\\"200000\\\",\\\"data\\\":{\\\"token\\\":\\\"2neAiuYvAU61ZDXANAGAsiL4-iAExhsBXZxftpOeh_55i3Ysy2q2LEsEWU64mdzUOPusi34M_wGoSf7iNyEWJ6dACm4ny9vJtLTRq_YsRUlG5ADnAawegdiYB9J6i9GjsxUuhPw3Blq6rhZlGykT3Vp1phUafnulOOpts-MEmEF-3bpfetLOAjsMMBS5qwTWJBvJHl5Vs9Y=.gJEIAywPXFr_4L-WG10eug==\\\",\\\"instanceServers\\\":[{\\\"endpoint\\\":\\\"wss://ws-api-futures.kucoin.com/\\\",\\\"encrypt\\\":true,\\\"protocol\\\":\\\"websocket\\\",\\\"pingInterval\\\":18000,\\\"pingTimeout\\\":10000}]}}", "operationId": "051" } }, "/api/v1/bullet-private": { "post": { "summary": "Get Private Token - Futures", "deprecated": false, "description": "This interface can obtain the token required for Websocket to establish a Futures private connection. If you need use private channels (e.g. account balance notice), please make request as follows to obtain the server list and private token", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "object", "properties": { "token": { "type": "string", "description": "The token required to establish a Websocket connection" }, "instanceServers": { "type": "array", "items": { "type": "object", "properties": { "endpoint": { "type": "string", "description": "Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change." }, "encrypt": { "type": "boolean", "description": "Whether to encrypt. Currently only supports wss, not ws" }, "protocol": { "type": "string", "description": "Network Protocol", "enum": [ "websocket" ], "x-api-enum": [ { "value": "websocket", "name": "Websocket", "description": "Websocket" } ] }, "pingInterval": { "type": "integer", "description": "Recommended ping interval (milliseconds)" }, "pingTimeout": { "type": "integer", "description": "Heartbeat timeout (milliseconds)" } }, "required": [ "protocol", "pingInterval", "pingTimeout", "encrypt", "endpoint" ] } } }, "required": [ "token", "instanceServers" ] } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470296", "x-abandon": "normal", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "General", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Market", "x-sdk-method-name": "getPrivateToken", "x-sdk-method-description": "This interface can obtain the token required for Websocket to establish a Futures private connection. If you need use private channels (e.g. account balance notice), please make request as follows to obtain the server list and private token", "x-api-rate-limit-weight": 10, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": {\\n \\\"token\\\": \\\"2neAiuYvAU737TOajb2U3uT8AEZqSWYe0fBD4LoHuXJDSC7gIzJiH4kNTWhCPISWo6nDpAe7aUaaHJ4fG8oRjFgMfUI2sM4IySWHrBceFocY8pKy2REU1HwZIngtMdMrjqPnP-biofFWbNaP1cl0X1pZc2SQ-33hDH1LgNP-yg8bktVoIG0dIxSN4m3uzO8u.ueCCihQ5_4GPpXKxWTDiFQ==\\\",\\n \\\"instanceServers\\\": [\\n {\\n \\\"endpoint\\\": \\\"wss://ws-api-futures.kucoin.com/\\\",\\n \\\"encrypt\\\": true,\\n \\\"protocol\\\": \\\"websocket\\\",\\n \\\"pingInterval\\\": 18000,\\n \\\"pingTimeout\\\": 10000\\n }\\n ]\\n }\\n}", "operationId": "052" } }, "/api/v1/position/margin/auto-deposit-status": { "post": { "summary": "Modify Isolated Margin Auto-Deposit Status", "deprecated": true, "description": "This endpoint is only applicable to isolated margin and is no longer recommended. It is recommended to use cross margin instead.", "tags": [], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" }, "data": { "type": "boolean" } }, "required": [ "code", "data" ] } } } } }, "x-api-doc": "https://www.kucoin.com/docs-new/api-3470255", "x-abandon": "abandon", "x-domain": "Futures", "x-api-channel": "Private", "x-api-permission": "Futures", "x-api-rate-limit-pool": "Futures", "x-sdk-service": "Futures", "x-sdk-sub-service": "Positions", "x-sdk-method-name": "modifyAutoDepositStatus", "x-sdk-method-description": "This endpoint is only applicable to isolated margin and is no longer recommended. It is recommended to use cross margin instead.", "x-api-rate-limit-weight": 4, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "symbol": { "type": "string", "description": "Symbol of the contract\n", "example": [ "XBTUSDTM", "ETHUSDTM" ] }, "status": { "type": "boolean", "description": "Status" } }, "required": [ "symbol", "status" ] }, "example": "{\n \"symbol\": \"XBTUSDTM\",\n \"status\": true\n}" } } }, "x-response-example": "{\\n \\\"code\\\": \\\"200000\\\",\\n \\\"data\\\": true\\n}", "x-request-example": "{\\\"symbol\\\": \\\"XBTUSDTM\\\", \\\"status\\\": true}", "operationId": "053" } } }, "components": { "schemas": {} } }