diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e4aa90e..421cd2f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +API documentation [Changelog](https://www.kucoin.com/docs-new/change-log) + +Current synchronized API documentation version [20250313](https://www.kucoin.com/docs-new/change-log#20250313) + +## 2025-03-21(1.2.0) +- Update the latest APIs, documentation, etc +- Remove range validation in Python +- Update API KEY verification version to 3 +- Fix the bug related to resubscribing +- The Node.js SDK has been changed to the official unified version +- Fix issues with automated test execution. + ## 2025-03-04(Python 1.1.1) - Update __init__.py to enhance the import experience - Reduce unnecessary log output diff --git a/Dockerfile b/Dockerfile index e7643e11..db27b5e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ RUN --mount=type=cache,target=/root/.m2,sharing=locked mvn -U clean package -Dsk # build tools FROM openapitools/openapi-generator-cli:v7.7.0 -RUN apt-get update && apt-get install python3 python3-pip python3.8-venv nodejs npm -y +RUN apt-get update && apt-get install python3 python3-pip python3.8-venv nodejs jq npm -y RUN pip install yapf ENV GOLANG_VERSION=1.22.2 RUN curl -OL https://golang.org/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz && \ diff --git a/Makefile b/Makefile index fa1ad39e..00a0727a 100644 --- a/Makefile +++ b/Makefile @@ -88,7 +88,11 @@ SUBDIRS := $(shell find ./sdk -mindepth 1 -maxdepth 1 -type d) test: $(SUBDIRS) $(SUBDIRS): @echo "Running tests in $@" - @docker run --rm -v ./$@:/app -w /app $(IMAGE_NAME):$(IMAGE_TAG) \ + @docker run --rm \ + -v venv-test-cache:/app/.venv-test \ + -v go-mod-cache:/go/pkg/mod \ + -v go-build-cache:/root/.cache/go-build \ + -v ./$@:/app -w /app $(IMAGE_NAME):$(IMAGE_TAG) \ bash run_test.sh @echo "Completed tests in $@" @@ -97,7 +101,7 @@ generate: setup-logs $(call generate-postman) $(call generate-code,golang,/pkg/generate) $(call generate-code,python,/kucoin_universal_sdk/generate) - $(call generate-code,node,/src/generate,v0.1.1-alpha) + $(call generate-code,node,/src/generate) .PHONY: gen-postman gen-postman: preprocessor diff --git a/README.md b/README.md index 3a498d27..cecb1292 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # KuCoin Universal SDK ![License Badge](https://img.shields.io/badge/license-MIT-green) -![Language](https://img.shields.io/badge/language-Python|Go-blue) +![Language](https://img.shields.io/badge/language-Python|Go|Node.js-blue) The **KuCoin Universal SDK** is the official SDK provided by KuCoin, offering a unified and seamless interface for accessing KuCoin's trading platform. Built using code generation technology, it ensures consistency and rapid updates across multiple programming languages, simplifying integration with consistent APIs. @@ -32,9 +32,9 @@ The **KuCoin Universal SDK** is the official SDK provided by KuCoin, offering a ## 🛠️ Installation -### Latest Version: `1.1.0`(Global API version) +### Latest Version: `1.2.0`(Global API version) -### Python Installation(`1.1.1`) +### Python Installation ```bash pip install kucoin-universal-sdk @@ -47,8 +47,7 @@ go get github.com/Kucoin/kucoin-universal-sdk/sdk/golang go mod tidy ``` -### Node.js Installation (`0.1.1-alpha`) -Note: This SDK is currently in the Alpha phase. We are actively iterating and improving its features, stability, and documentation. Feedback and contributions are highly encouraged to help us refine the SDK. +### Node.js Installation ```bash npm install kucoin-universal-sdk ``` @@ -64,12 +63,12 @@ Here's a quick example to get you started with the SDK in **Python**. import logging import os -from kucoin_universal_sdk.api.client import DefaultClient -from kucoin_universal_sdk.generate.spot.market.model_get_part_order_book_req import GetPartOrderBookReqBuilder -from kucoin_universal_sdk.model.client_option import ClientOptionBuilder -from kucoin_universal_sdk.model.constants import GLOBAL_API_ENDPOINT, GLOBAL_FUTURES_API_ENDPOINT, \ +from kucoin_universal_sdk.api import DefaultClient +from kucoin_universal_sdk.generate.spot.market import GetPartOrderBookReqBuilder +from kucoin_universal_sdk.model import ClientOptionBuilder +from kucoin_universal_sdk.model import GLOBAL_API_ENDPOINT, GLOBAL_FUTURES_API_ENDPOINT, \ GLOBAL_BROKER_API_ENDPOINT -from kucoin_universal_sdk.model.transport_option import TransportOptionBuilder +from kucoin_universal_sdk.model import TransportOptionBuilder def example(): diff --git a/VERSION b/VERSION index 992977ad..0408c30b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v1.1.0 \ No newline at end of file +v1.2.0 \ No newline at end of file diff --git a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/PythonSdkGenerator.java b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/PythonSdkGenerator.java index 8c3920a3..0fad99da 100644 --- a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/PythonSdkGenerator.java +++ b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/PythonSdkGenerator.java @@ -452,13 +452,13 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List { - String importName = (String)m.get("importPath"); + allModels.forEach(m -> { + String importName = (String) m.get("importPath"); String fileName = m.getModel().getClassFilename(); // from .model_get_part_order_book_req import GetPartOrderBookReqBuilder exports.add(String.format("from .%s import %s", fileName, importName)); if (m.getModel().getVendorExtensions().containsKey("x-request-model")) { - exports.add(String.format("from .%s import %s", fileName, importName+"Builder")); + exports.add(String.format("from .%s import %s", fileName, importName + "Builder")); } }); exports.add(String.format("from .%s import %sAPI", toApiFilename(meta.getSubService()), formatService(meta.getSubService()))); @@ -477,8 +477,8 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List { - String importName = (String)m.get("importPath"); + allModels.forEach(m -> { + String importName = (String) m.get("importPath"); String fileName = m.getModel().getClassFilename(); // from .model_get_part_order_book_req import GetPartOrderBookReqBuilder exports.add(String.format("from .%s import %s", fileName, importName)); @@ -775,8 +775,8 @@ public Map postProcessSupportingFileData(Map obj throw new RuntimeException("read csv fail", e); } - services.forEach(s-> { - Map specialKeywords = Map.of("copytrading", "CopyTrading", "viplending", "VIPLending"); + services.forEach(s -> { + Map specialKeywords = Map.of("copytrading", "CopyTrading", "viplending", "VIPLending"); String service = formatService(specialKeywords.getOrDefault(s, s)); serviceExports.add(String.format("from .%s_api import %sService", s, service)); }); @@ -1178,100 +1178,23 @@ private PythonType mapType(IJsonSchemaValidationProperties cp) { } private PythonType numberType(IJsonSchemaValidationProperties cp) { - if (cp.getHasValidation()) { - PythonType floatt = new PythonType("float"); - - // e.g. confloat(ge=10, le=100, strict=True) - if (cp.getMaximum() != null) { - if (cp.getExclusiveMaximum()) { - floatt.constrain("lt", cp.getMaximum(), false); - } else { - floatt.constrain("le", cp.getMaximum(), false); - } - } - if (cp.getMinimum() != null) { - if (cp.getExclusiveMinimum()) { - floatt.constrain("gt", cp.getMinimum(), false); - } else { - floatt.constrain("ge", cp.getMinimum(), false); - } - } - if (cp.getMultipleOf() != null) { - floatt.constrain("multiple_of", cp.getMultipleOf()); - } - - return floatt; - } else { - return new PythonType("float"); - } + return new PythonType("float"); } private PythonType intType(IJsonSchemaValidationProperties cp) { - if (cp.getHasValidation()) { - PythonType pt = new PythonType("int"); - // e.g. conint(ge=10, le=100, strict=True) - pt.constrain("strict", true); - if (cp.getMaximum() != null) { - if (cp.getExclusiveMaximum()) { - pt.constrain("lt", cp.getMaximum(), false); - } else { - pt.constrain("le", cp.getMaximum(), false); - } - } - if (cp.getMinimum() != null) { - if (cp.getExclusiveMinimum()) { - pt.constrain("gt", cp.getMinimum(), false); - } else { - pt.constrain("ge", cp.getMinimum(), false); - } - } - if (cp.getMultipleOf() != null) { - pt.constrain("multiple_of", cp.getMultipleOf()); - } - return pt; - } else { - return new PythonType("int"); - } + return new PythonType("int"); } private PythonType binaryType(IJsonSchemaValidationProperties cp) { - if (cp.getHasValidation()) { - PythonType bytest = new PythonType("bytes"); - PythonType strt = new PythonType("str"); - - // e.g. conbytes(min_length=2, max_length=10) - bytest.constrain("strict", true); - strt.constrain("strict", true); - if (cp.getMaxLength() != null) { - bytest.constrain("max_length", cp.getMaxLength()); - strt.constrain("max_length", cp.getMaxLength()); - } - if (cp.getMinLength() != null) { - bytest.constrain("min_length", cp.getMinLength()); - strt.constrain("min_length", cp.getMinLength()); - } - if (cp.getPattern() != null) { - moduleImports.add("pydantic", "field_validator"); - // use validator instead as regex doesn't support flags, e.g. IGNORECASE - //fieldCustomization.add(Locale.ROOT, String.format(Locale.ROOT, "regex=r'%s'", cp.getPattern())); - } - - moduleImports.add("typing", "Union"); - PythonType pt = new PythonType("Union"); - pt.addTypeParam(bytest); - pt.addTypeParam(strt); - return pt; - } else { - // same as above which has validation - moduleImports.add("pydantic", "StrictBytes"); - moduleImports.add("pydantic", "StrictStr"); - moduleImports.add("typing", "Union"); - - PythonType pt = new PythonType("Union"); - pt.addTypeParam(new PythonType("StrictBytes")); - pt.addTypeParam(new PythonType("StrictStr")); - return pt; - } + // same as above which has validation + moduleImports.add("pydantic", "StrictBytes"); + moduleImports.add("pydantic", "StrictStr"); + moduleImports.add("typing", "Union"); + + PythonType pt = new PythonType("Union"); + pt.addTypeParam(new PythonType("StrictBytes")); + pt.addTypeParam(new PythonType("StrictStr")); + return pt; } private PythonType boolType(IJsonSchemaValidationProperties cp) { @@ -1281,29 +1204,6 @@ private PythonType boolType(IJsonSchemaValidationProperties cp) { private PythonType decimalType(IJsonSchemaValidationProperties cp) { PythonType pt = new PythonType("Decimal"); moduleImports.add("decimal", "Decimal"); - - if (cp.getHasValidation()) { - // e.g. condecimal(ge=10, le=100, strict=True) - pt.constrain("strict", true); - if (cp.getMaximum() != null) { - if (cp.getExclusiveMaximum()) { - pt.constrain("gt", cp.getMaximum(), false); - } else { - pt.constrain("ge", cp.getMaximum(), false); - } - } - if (cp.getMinimum() != null) { - if (cp.getExclusiveMinimum()) { - pt.constrain("lt", cp.getMinimum(), false); - } else { - pt.constrain("le", cp.getMinimum(), false); - } - } - if (cp.getMultipleOf() != null) { - pt.constrain("multiple_of", cp.getMultipleOf()); - } - } - return pt; } diff --git a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/service/impl/OperationServiceImpl.java b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/service/impl/OperationServiceImpl.java index f0c81f87..72553846 100644 --- a/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/service/impl/OperationServiceImpl.java +++ b/generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/service/impl/OperationServiceImpl.java @@ -143,7 +143,7 @@ private void checkUpdateExtension(String path, PathItem.HttpMethod httpMethod, O {"API-CHANNEL", operation.getExtensions().getOrDefault("x-api-channel", "NULL").toString().toUpperCase()}, {"API-PERMISSION", operation.getExtensions().getOrDefault("x-api-permission", "NULL").toString().toUpperCase()}, {"API-RATE-LIMIT-POOL", operation.getExtensions().getOrDefault("x-api-rate-limit-pool", "NULL").toString().toUpperCase()}, - {"API-RATE-LIMIT", operation.getExtensions().getOrDefault("x-api-rate-limit", "NULL").toString().toUpperCase()}, + {"API-RATE-LIMIT-WEIGHT", operation.getExtensions().getOrDefault("x-api-rate-limit-weight", "NULL").toString().toUpperCase()}, }; String[] extraComment = AsciiTable.getTable(AsciiTable.BASIC_ASCII_NO_DATA_SEPARATORS, new Column[]{ diff --git a/generator/postman/script_broker_template.js b/generator/postman/script_broker_template.js index 1870727c..dc2ee21f 100644 --- a/generator/postman/script_broker_template.js +++ b/generator/postman/script_broker_template.js @@ -41,7 +41,7 @@ function auth(apiKey, method, url, data) { 'KC-API-PASSPHRASE': sign(apiKey.passphrase || '', apiKey.secret), 'Content-Type': 'application/json', 'User-Agent': `Kucoin-Universal-Postman-SDK/{{SDK-VERSION}}`, - 'KC-API-KEY-VERSION': 2, + 'KC-API-KEY-VERSION': 3, 'KC-API-PARTNER': apiKey.partner, 'KC-BROKER-NAME': apiKey.brokerName, 'KC-API-PARTNER-VERIFY': 'true', diff --git a/generator/postman/script_template.js b/generator/postman/script_template.js index fd0d8991..29be464f 100644 --- a/generator/postman/script_template.js +++ b/generator/postman/script_template.js @@ -37,7 +37,7 @@ function auth(apiKey, method, url, data) { 'KC-API-PASSPHRASE': sign(apiKey.passphrase || '', apiKey.secret), 'Content-Type': 'application/json', 'User-Agent': `Kucoin-Universal-Postman-SDK/{{SDK-VERSION}}`, - 'KC-API-KEY-VERSION': 2, + 'KC-API-KEY-VERSION': 3, }; } diff --git a/sdk/golang/CHANGELOG.md b/sdk/golang/CHANGELOG.md index b078f665..421cd2f9 100644 --- a/sdk/golang/CHANGELOG.md +++ b/sdk/golang/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +API documentation [Changelog](https://www.kucoin.com/docs-new/change-log) + +Current synchronized API documentation version [20250313](https://www.kucoin.com/docs-new/change-log#20250313) + +## 2025-03-21(1.2.0) +- Update the latest APIs, documentation, etc +- Remove range validation in Python +- Update API KEY verification version to 3 +- Fix the bug related to resubscribing +- The Node.js SDK has been changed to the official unified version +- Fix issues with automated test execution. + +## 2025-03-04(Python 1.1.1) +- Update __init__.py to enhance the import experience +- Reduce unnecessary log output +- Optimize WebSocket reconnection logic + +## 2025-02-26(Nodejs 0.1.0-alpha) +- Release Node.js implementation + ## 2025-01-16(1.1.0) - Updated the API sequence to be consistent with the documentation. - Updated the license. diff --git a/sdk/golang/README.md b/sdk/golang/README.md index 976973aa..a57a2d7b 100644 --- a/sdk/golang/README.md +++ b/sdk/golang/README.md @@ -9,7 +9,7 @@ For an overview of the project and SDKs in other languages, refer to the [Main R ## 📦 Installation -### Latest Version: `1.1.0` +### Latest Version: `1.2.0` Install the Golang SDK using `go get`: ```bash diff --git a/sdk/golang/example/example_sign.go b/sdk/golang/example/example_sign.go index f5c76fa5..4a32e0e8 100644 --- a/sdk/golang/example/example_sign.go +++ b/sdk/golang/example/example_sign.go @@ -7,12 +7,13 @@ import ( "encoding/base64" "encoding/json" "fmt" - "github.com/google/uuid" "io" "net/http" "os" "strconv" "time" + + "github.com/google/uuid" ) type KcSigner struct { @@ -37,7 +38,7 @@ func (ks *KcSigner) Headers(plain string) map[string]string { "KC-API-PASSPHRASE": ks.apiPassPhrase, "KC-API-TIMESTAMP": t, "KC-API-SIGN": s, - "KC-API-KEY-VERSION": "2", + "KC-API-KEY-VERSION": "3", } return ksHeaders } diff --git a/sdk/golang/internal/infra/default_signer.go b/sdk/golang/internal/infra/default_signer.go index d0bd24f4..cdfe52ae 100644 --- a/sdk/golang/internal/infra/default_signer.go +++ b/sdk/golang/internal/infra/default_signer.go @@ -38,7 +38,7 @@ func (ks *KcSigner) Headers(plain string) map[string]string { "KC-API-PASSPHRASE": ks.apiPassPhrase, "KC-API-TIMESTAMP": t, "KC-API-SIGN": s, - "KC-API-KEY-VERSION": "2", + "KC-API-KEY-VERSION": "3", } return ksHeaders } @@ -55,7 +55,7 @@ func (ks *KcSigner) BrokerHeaders(plain string) map[string]string { "KC-API-PASSPHRASE": ks.apiPassPhrase, "KC-API-TIMESTAMP": t, "KC-API-SIGN": s, - "KC-API-KEY-VERSION": "2", + "KC-API-KEY-VERSION": "3", "KC-API-PARTNER": ks.brokerPartner, "KC-BROKER-NAME": ks.brokerName, "KC-API-PARTNER-VERIFY": "true", diff --git a/sdk/golang/internal/infra/default_ws_callback.go b/sdk/golang/internal/infra/default_ws_callback.go index fb448f54..0c638769 100644 --- a/sdk/golang/internal/infra/default_ws_callback.go +++ b/sdk/golang/internal/infra/default_ws_callback.go @@ -48,7 +48,7 @@ func (s *CallbackManager) GetSubInfo() []*util.SubInfo { } for topic, _ := range topics { parts := strings.Split(topic, ":") - if len(parts) == 2 { + if len(parts) == 2 && parts[1] != "all" { info.Args = append(info.Args, parts[1]) } info.Callback = s.topicCallbackMapping[topic].callback diff --git a/sdk/golang/internal/infra/default_ws_service_test.go b/sdk/golang/internal/infra/default_ws_service_test.go index 3647dcf4..fb8916db 100644 --- a/sdk/golang/internal/infra/default_ws_service_test.go +++ b/sdk/golang/internal/infra/default_ws_service_test.go @@ -378,9 +378,9 @@ func TestDefaultWsService_ReSubscribe(t *testing.T) { assert.Nil(t, err) _, err = wsService.Subscribe("/mock2", []string{"b", "c"}, newEmptyCallback()) assert.Nil(t, err) + _, err = wsService.Subscribe("/mock3:all", []string{}, newEmptyCallback()) + assert.Nil(t, err) mock.resubMsg <- struct{}{} - <-time.After(time.Millisecond * 300) - - assert.Equal(t, int64(6), mock.writeCnt) + <-time.After(time.Millisecond * 2000) } diff --git a/sdk/golang/pkg/generate/account/account/api_account.go b/sdk/golang/pkg/generate/account/account/api_account.go index 9f1cb60a..fb0e1795 100644 --- a/sdk/golang/pkg/generate/account/account/api_account.go +++ b/sdk/golang/pkg/generate/account/account/api_account.go @@ -12,213 +12,213 @@ type AccountAPI interface { // GetAccountInfo Get Account Summary Info // Description: This endpoint can be used to obtain account summary information. // Documentation: https://www.kucoin.com/docs-new/api-3470119 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ GetAccountInfo(ctx context.Context) (*GetAccountInfoResp, error) // GetApikeyInfo Get Apikey Info - // Description: Get the information of the api key. Use the api key pending to be checked to call the endpoint. Both master and sub user's api key are applicable. + // Description: Get the api key information. Use the api key awaiting checking to call the endpoint. Both master and sub user's api key are applicable. // Documentation: https://www.kucoin.com/docs-new/api-3470130 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ GetApikeyInfo(ctx context.Context) (*GetApikeyInfoResp, error) // GetSpotAccountType Get Account Type - Spot // Description: This interface determines whether the current user is a spot high-frequency user or a spot low-frequency user. // Documentation: https://www.kucoin.com/docs-new/api-3470120 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 30 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 30 | + // +-----------------------+---------+ GetSpotAccountType(ctx context.Context) (*GetSpotAccountTypeResp, error) // GetSpotAccountList Get Account List - Spot - // Description: Get a list of accounts. Please Deposit to the main account firstly, then transfer the funds to the trade account via Inner Transfer before transaction. + // Description: Get a list of accounts. Please deposit funds into the main account first, then use the Transfer function to move them to the trade account before trading. // Documentation: https://www.kucoin.com/docs-new/api-3470125 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 5 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+------------+ GetSpotAccountList(req *GetSpotAccountListReq, ctx context.Context) (*GetSpotAccountListResp, error) // GetSpotAccountDetail Get Account Detail - Spot - // Description: get Information for a single spot account. Use this endpoint when you know the accountId. + // Description: Get information for a single spot account. Use this endpoint when you know the accountId. // Documentation: https://www.kucoin.com/docs-new/api-3470126 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 5 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+------------+ GetSpotAccountDetail(req *GetSpotAccountDetailReq, ctx context.Context) (*GetSpotAccountDetailResp, error) // GetCrossMarginAccount Get Account - Cross Margin - // Description: Request via this endpoint to get the info of the cross margin account. + // Description: Request cross margin account info via this endpoint. // Documentation: https://www.kucoin.com/docs-new/api-3470127 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 15 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 15 | + // +-----------------------+---------+ GetCrossMarginAccount(req *GetCrossMarginAccountReq, ctx context.Context) (*GetCrossMarginAccountResp, error) // GetIsolatedMarginAccount Get Account - Isolated Margin - // Description: Request via this endpoint to get the info of the isolated margin account. + // Description: Request isolated margin account info via this endpoint. // Documentation: https://www.kucoin.com/docs-new/api-3470128 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 15 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 15 | + // +-----------------------+---------+ GetIsolatedMarginAccount(req *GetIsolatedMarginAccountReq, ctx context.Context) (*GetIsolatedMarginAccountResp, error) // GetFuturesAccount Get Account - Futures - // Description: Request via this endpoint to get the info of the futures account. + // Description: Request futures account info via this endpoint. // Documentation: https://www.kucoin.com/docs-new/api-3470129 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetFuturesAccount(req *GetFuturesAccountReq, ctx context.Context) (*GetFuturesAccountResp, error) // GetSpotLedger Get Account Ledgers - Spot/Margin - // Description: This interface is for transaction records from all types of your accounts, supporting inquiry of various currencies. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. + // Description: This interface is for transaction records from all your account types, supporting various currency inquiries. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. // Documentation: https://www.kucoin.com/docs-new/api-3470121 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 2 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+------------+ GetSpotLedger(req *GetSpotLedgerReq, ctx context.Context) (*GetSpotLedgerResp, error) // GetSpotHFLedger Get Account Ledgers - Trade_hf - // Description: This API endpoint returns all transfer (in and out) records in high-frequency trading account and supports multi-coin queries. The query results are sorted in descending order by createdAt and id. + // Description: This API endpoint returns all transfer (in and out) records in high-frequency trading accounts and supports multi-coin queries. The query results are sorted in descending order by createdAt and ID. // Documentation: https://www.kucoin.com/docs-new/api-3470122 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetSpotHFLedger(req *GetSpotHFLedgerReq, ctx context.Context) (*GetSpotHFLedgerResp, error) // GetMarginHFLedger Get Account Ledgers - Margin_hf - // Description: This API endpoint returns all transfer (in and out) records in high-frequency margin trading account and supports multi-coin queries. The query results are sorted in descending order by createdAt and id. + // Description: This API endpoint returns all transfer (in and out) records in high-frequency margin trading accounts and supports multi-coin queries. The query results are sorted in descending order by createdAt and ID. // Documentation: https://www.kucoin.com/docs-new/api-3470123 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetMarginHFLedger(req *GetMarginHFLedgerReq, ctx context.Context) (*GetMarginHFLedgerResp, error) // GetFuturesLedger Get Account Ledgers - Futures - // Description: This interface can query the ledger records of the futures business line + // Description: This interface can query the ledger records of the futures business line. // Documentation: https://www.kucoin.com/docs-new/api-3470124 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetFuturesLedger(req *GetFuturesLedgerReq, ctx context.Context) (*GetFuturesLedgerResp, error) // GetMarginAccountDetail Get Account Detail - Margin - // Description: Request via this endpoint to get the info of the margin account. + // Description: Request margin account info via this endpoint. // Documentation: https://www.kucoin.com/docs-new/api-3470311 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 40 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 40 | + // +-----------------------+---------+ // Deprecated GetMarginAccountDetail(ctx context.Context) (*GetMarginAccountDetailResp, error) // GetIsolatedMarginAccountListV1 Get Account List - Isolated Margin - V1 - // Description: Request via this endpoint to get the info list of the isolated margin account. + // Description: Request the isolated margin account info list via this endpoint. // Documentation: https://www.kucoin.com/docs-new/api-3470314 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 50 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 50 | + // +-----------------------+---------+ // Deprecated GetIsolatedMarginAccountListV1(req *GetIsolatedMarginAccountListV1Req, ctx context.Context) (*GetIsolatedMarginAccountListV1Resp, error) // GetIsolatedMarginAccountDetailV1 Get Account Detail - Isolated Margin - V1 - // Description: Request via this endpoint to get the info of the isolated margin account. + // Description: Request isolated margin account info via this endpoint. // Documentation: https://www.kucoin.com/docs-new/api-3470315 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 50 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 50 | + // +-----------------------+---------+ // Deprecated GetIsolatedMarginAccountDetailV1(req *GetIsolatedMarginAccountDetailV1Req, ctx context.Context) (*GetIsolatedMarginAccountDetailV1Resp, error) } diff --git a/sdk/golang/pkg/generate/account/account/api_account_test.go b/sdk/golang/pkg/generate/account/account/api_account_test.go index dc4947c3..8c9c94b1 100644 --- a/sdk/golang/pkg/generate/account/account/api_account_test.go +++ b/sdk/golang/pkg/generate/account/account/api_account_test.go @@ -205,7 +205,7 @@ func TestAccountGetFuturesAccountRespModel(t *testing.T) { // Get Account - Futures // /api/v1/account-overview - data := "{\n \"code\": \"200000\",\n \"data\": {\n \"currency\": \"USDT\",\n \"accountEquity\": 48.921913718,\n \"unrealisedPNL\": 1.59475,\n \"marginBalance\": 47.548728628,\n \"positionMargin\": 34.1577964733,\n \"orderMargin\": 0,\n \"frozenFunds\": 0,\n \"availableBalance\": 14.7876172447,\n \"riskRatio\": 0.0090285199\n }\n}" + data := "{\n \"code\": \"200000\",\n \"data\": {\n \"accountEquity\": 394.439280806,\n \"unrealisedPNL\": 20.15278,\n \"marginBalance\": 371.394298816,\n \"positionMargin\": 102.20664159,\n \"orderMargin\": 10.06002012,\n \"frozenFunds\": 0.0,\n \"availableBalance\": 290.326799096,\n \"currency\": \"USDT\",\n \"riskRatio\": 0.0065289525,\n \"maxWithdrawAmount\": 290.326419096\n }\n}" commonResp := &types.RestResponse{} err := json.Unmarshal([]byte(data), commonResp) assert.Nil(t, err) diff --git a/sdk/golang/pkg/generate/account/account/types_get_account_info_resp.go b/sdk/golang/pkg/generate/account/account/types_get_account_info_resp.go index 0edae181..6e144479 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_account_info_resp.go +++ b/sdk/golang/pkg/generate/account/account/types_get_account_info_resp.go @@ -22,17 +22,17 @@ type GetAccountInfoResp struct { FuturesSubQuantity int32 `json:"futuresSubQuantity,omitempty"` // Number of sub-accounts with option trading permissions enabled OptionSubQuantity int32 `json:"optionSubQuantity,omitempty"` - // Max number of sub-accounts = maxDefaultSubQuantity + maxSpotSubQuantity + // Max. number of sub-accounts = maxDefaultSubQuantity + maxSpotSubQuantity MaxSubQuantity int32 `json:"maxSubQuantity,omitempty"` - // Max number of default open sub-accounts (according to VIP level) + // Max. number of default open sub-accounts (according to VIP level) MaxDefaultSubQuantity int32 `json:"maxDefaultSubQuantity,omitempty"` - // Max number of sub-accounts with additional Spot trading permissions + // Max. number of sub-accounts with additional spot trading permissions MaxSpotSubQuantity int32 `json:"maxSpotSubQuantity,omitempty"` - // Max number of sub-accounts with additional margin trading permissions + // Max. number of sub-accounts with additional margin trading permissions MaxMarginSubQuantity int32 `json:"maxMarginSubQuantity,omitempty"` - // Max number of sub-accounts with additional futures trading permissions + // Max. number of sub-accounts with additional futures trading permissions MaxFuturesSubQuantity int32 `json:"maxFuturesSubQuantity,omitempty"` - // Max number of sub-accounts with additional Option trading permissions + // Max. number of sub-accounts with additional option trading permissions MaxOptionSubQuantity int32 `json:"maxOptionSubQuantity,omitempty"` } diff --git a/sdk/golang/pkg/generate/account/account/types_get_cross_margin_account_resp.go b/sdk/golang/pkg/generate/account/account/types_get_cross_margin_account_resp.go index 4a35200e..73ad22ad 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_cross_margin_account_resp.go +++ b/sdk/golang/pkg/generate/account/account/types_get_cross_margin_account_resp.go @@ -16,7 +16,7 @@ type GetCrossMarginAccountResp struct { TotalLiabilityOfQuoteCurrency string `json:"totalLiabilityOfQuoteCurrency,omitempty"` // debt ratio DebtRatio string `json:"debtRatio,omitempty"` - // Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW borrowing + // Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW-borrowing Status string `json:"status,omitempty"` // Margin account list Accounts []GetCrossMarginAccountAccounts `json:"accounts,omitempty"` diff --git a/sdk/golang/pkg/generate/account/account/types_get_futures_account_req.go b/sdk/golang/pkg/generate/account/account/types_get_futures_account_req.go index 6623cdf6..6a488f51 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_futures_account_req.go +++ b/sdk/golang/pkg/generate/account/account/types_get_futures_account_req.go @@ -4,7 +4,7 @@ package account // GetFuturesAccountReq struct for GetFuturesAccountReq type GetFuturesAccountReq struct { - // Currecny, Default XBT + // Currency, Default XBT Currency *string `json:"currency,omitempty" url:"currency,omitempty"` } @@ -40,7 +40,7 @@ func NewGetFuturesAccountReqBuilder() *GetFuturesAccountReqBuilder { return &GetFuturesAccountReqBuilder{obj: NewGetFuturesAccountReqWithDefaults()} } -// Currecny, Default XBT +// Currency, Default XBT func (builder *GetFuturesAccountReqBuilder) SetCurrency(value string) *GetFuturesAccountReqBuilder { builder.obj.Currency = &value return builder diff --git a/sdk/golang/pkg/generate/account/account/types_get_futures_account_resp.go b/sdk/golang/pkg/generate/account/account/types_get_futures_account_resp.go index 64f9e531..db446f9f 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_futures_account_resp.go +++ b/sdk/golang/pkg/generate/account/account/types_get_futures_account_resp.go @@ -10,11 +10,11 @@ import ( type GetFuturesAccountResp struct { // common response CommonResponse *types.RestResponse - // Account equity = marginBalance + Unrealised PNL + // Account equity = marginBalance + unrealizedPNL AccountEquity float32 `json:"accountEquity,omitempty"` - // Unrealised profit and loss + // Unrealized profit and loss UnrealisedPNL float32 `json:"unrealisedPNL,omitempty"` - // Margin balance = positionMargin + orderMargin + frozenFunds + availableBalance - unrealisedPNL + // Margin balance = positionMargin + orderMargin + frozenFunds + availableBalance - unrealizedPNL MarginBalance float32 `json:"marginBalance,omitempty"` // Position margin PositionMargin float32 `json:"positionMargin,omitempty"` @@ -28,11 +28,13 @@ type GetFuturesAccountResp struct { Currency string `json:"currency,omitempty"` // Cross margin risk rate RiskRatio float32 `json:"riskRatio,omitempty"` + // Maximum amount that can be withdrawn/transferred. + MaxWithdrawAmount float32 `json:"maxWithdrawAmount,omitempty"` } // NewGetFuturesAccountResp instantiates a new GetFuturesAccountResp object // This constructor will assign default values to properties that have it defined -func NewGetFuturesAccountResp(accountEquity float32, unrealisedPNL float32, marginBalance float32, positionMargin float32, orderMargin float32, frozenFunds float32, availableBalance float32, currency string, riskRatio float32) *GetFuturesAccountResp { +func NewGetFuturesAccountResp(accountEquity float32, unrealisedPNL float32, marginBalance float32, positionMargin float32, orderMargin float32, frozenFunds float32, availableBalance float32, currency string, riskRatio float32, maxWithdrawAmount float32) *GetFuturesAccountResp { this := GetFuturesAccountResp{} this.AccountEquity = accountEquity this.UnrealisedPNL = unrealisedPNL @@ -43,6 +45,7 @@ func NewGetFuturesAccountResp(accountEquity float32, unrealisedPNL float32, marg this.AvailableBalance = availableBalance this.Currency = currency this.RiskRatio = riskRatio + this.MaxWithdrawAmount = maxWithdrawAmount return &this } @@ -64,6 +67,7 @@ func (o *GetFuturesAccountResp) ToMap() map[string]interface{} { toSerialize["availableBalance"] = o.AvailableBalance toSerialize["currency"] = o.Currency toSerialize["riskRatio"] = o.RiskRatio + toSerialize["maxWithdrawAmount"] = o.MaxWithdrawAmount return toSerialize } diff --git a/sdk/golang/pkg/generate/account/account/types_get_futures_ledger_data_list.go b/sdk/golang/pkg/generate/account/account/types_get_futures_ledger_data_list.go index 11a26cbd..e130ee7c 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_futures_ledger_data_list.go +++ b/sdk/golang/pkg/generate/account/account/types_get_futures_ledger_data_list.go @@ -4,7 +4,7 @@ package account // GetFuturesLedgerDataList struct for GetFuturesLedgerDataList type GetFuturesLedgerDataList struct { - // ledger time + // Ledger time Time int64 `json:"time,omitempty"` // Type: RealisedPNL, Deposit, Withdrawal, TransferIn, TransferOut Type string `json:"type,omitempty"` diff --git a/sdk/golang/pkg/generate/account/account/types_get_futures_ledger_req.go b/sdk/golang/pkg/generate/account/account/types_get_futures_ledger_req.go index a99fd518..ea94ff05 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_futures_ledger_req.go +++ b/sdk/golang/pkg/generate/account/account/types_get_futures_ledger_req.go @@ -6,17 +6,17 @@ package account type GetFuturesLedgerReq struct { // Currency of transaction history, XBT or USDT Currency *string `json:"currency,omitempty" url:"currency,omitempty"` - // Type RealisedPNL-Realised profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out + // Type RealizedPNL-Realized profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out Type *string `json:"type,omitempty" url:"type,omitempty"` - // Start offset. Generally, the only attribute of the last returned result of the previous request is used, and the first page is returned by default + // Start offset. Generally, only the attributes of the last returned result of the previous request are used, and the first page is returned by default Offset *int64 `json:"offset,omitempty" url:"offset,omitempty"` - // 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 + // 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. Forward *bool `json:"forward,omitempty" url:"forward,omitempty"` // Displayed size per page. The default size is 50 MaxCount *int64 `json:"maxCount,omitempty" url:"maxCount,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` } @@ -68,19 +68,19 @@ func (builder *GetFuturesLedgerReqBuilder) SetCurrency(value string) *GetFutures return builder } -// Type RealisedPNL-Realised profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out +// Type RealizedPNL-Realized profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out func (builder *GetFuturesLedgerReqBuilder) SetType(value string) *GetFuturesLedgerReqBuilder { builder.obj.Type = &value return builder } -// Start offset. Generally, the only attribute of the last returned result of the previous request is used, and the first page is returned by default +// Start offset. Generally, only the attributes of the last returned result of the previous request are used, and the first page is returned by default func (builder *GetFuturesLedgerReqBuilder) SetOffset(value int64) *GetFuturesLedgerReqBuilder { builder.obj.Offset = &value return builder } -// 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 +// 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. func (builder *GetFuturesLedgerReqBuilder) SetForward(value bool) *GetFuturesLedgerReqBuilder { builder.obj.Forward = &value return builder @@ -92,13 +92,13 @@ func (builder *GetFuturesLedgerReqBuilder) SetMaxCount(value int64) *GetFuturesL return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetFuturesLedgerReqBuilder) SetStartAt(value int64) *GetFuturesLedgerReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetFuturesLedgerReqBuilder) SetEndAt(value int64) *GetFuturesLedgerReqBuilder { builder.obj.EndAt = &value return builder diff --git a/sdk/golang/pkg/generate/account/account/types_get_futures_ledger_resp.go b/sdk/golang/pkg/generate/account/account/types_get_futures_ledger_resp.go index aa1d00fd..e66b8b44 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_futures_ledger_resp.go +++ b/sdk/golang/pkg/generate/account/account/types_get_futures_ledger_resp.go @@ -11,7 +11,7 @@ type GetFuturesLedgerResp struct { // common response CommonResponse *types.RestResponse DataList []GetFuturesLedgerDataList `json:"dataList,omitempty"` - // Is it the last page. If it is false, it means it is the last page, and if it is true, it means need to turn the page. + // Is it the last page? If it is false, it means it is the last page, and if it is true, it means you need to move to the next page. HasMore bool `json:"hasMore,omitempty"` } diff --git a/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_assets.go b/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_assets.go index b012ddf5..36f8b41e 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_assets.go +++ b/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_assets.go @@ -6,7 +6,7 @@ package account type GetIsolatedMarginAccountAssets struct { // Symbol Symbol string `json:"symbol,omitempty"` - // Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW borrowing + // Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW-borrowing Status string `json:"status,omitempty"` // debt ratio DebtRatio string `json:"debtRatio,omitempty"` diff --git a/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_detail_v1_resp.go b/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_detail_v1_resp.go index 2cad63e8..f414b54a 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_detail_v1_resp.go +++ b/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_detail_v1_resp.go @@ -12,7 +12,7 @@ type GetIsolatedMarginAccountDetailV1Resp struct { CommonResponse *types.RestResponse // Symbol Symbol string `json:"symbol,omitempty"` - // The position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW . + // Position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW . Status string `json:"status,omitempty"` // debt ratio DebtRatio string `json:"debtRatio,omitempty"` diff --git a/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_list_v1_assets.go b/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_list_v1_assets.go index d83307e1..55cea8c6 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_list_v1_assets.go +++ b/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_list_v1_assets.go @@ -6,7 +6,7 @@ package account type GetIsolatedMarginAccountListV1Assets struct { // Symbol Symbol string `json:"symbol,omitempty"` - // The position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW . + // Position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW . Status string `json:"status,omitempty"` // debt ratio DebtRatio string `json:"debtRatio,omitempty"` diff --git a/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_list_v1_resp.go b/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_list_v1_resp.go index ffac61a7..de837a28 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_list_v1_resp.go +++ b/sdk/golang/pkg/generate/account/account/types_get_isolated_margin_account_list_v1_resp.go @@ -10,9 +10,9 @@ import ( type GetIsolatedMarginAccountListV1Resp struct { // common response CommonResponse *types.RestResponse - // The total balance of the isolated margin account(in the request coin) + // The total balance of the isolated margin account (in the request coin) TotalConversionBalance string `json:"totalConversionBalance,omitempty"` - // Total liabilities of the isolated margin account(in the request coin) + // Total liabilities of the isolated margin account (in the request coin) LiabilityConversionBalance string `json:"liabilityConversionBalance,omitempty"` // Account list Assets []GetIsolatedMarginAccountListV1Assets `json:"assets,omitempty"` diff --git a/sdk/golang/pkg/generate/account/account/types_get_margin_hf_ledger_data.go b/sdk/golang/pkg/generate/account/account/types_get_margin_hf_ledger_data.go index e7a67bec..b55651dd 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_margin_hf_ledger_data.go +++ b/sdk/golang/pkg/generate/account/account/types_get_margin_hf_ledger_data.go @@ -9,15 +9,15 @@ type GetMarginHFLedgerData struct { Currency *string `json:"currency,omitempty"` // Change in funds balance Amount *string `json:"amount,omitempty"` - // Deposit or withdrawal fee + // Transaction, Deposit or withdrawal fee Fee *string `json:"fee,omitempty"` // Total balance of funds after change Balance *string `json:"balance,omitempty"` // Master account type TRADE_HF AccountType *string `json:"accountType,omitempty"` - // Trnasaction type,such as TRANSFER, TRADE_EXCHANGE, etc. + // Trnasaction type, such as TRANSFER, TRADE_EXCHANGE, etc. BizType *string `json:"bizType,omitempty"` - // Direction of transfer( out or in) + // Direction of transfer (out or in) Direction *string `json:"direction,omitempty"` // Ledger creation time CreatedAt *int64 `json:"createdAt,omitempty"` diff --git a/sdk/golang/pkg/generate/account/account/types_get_margin_hf_ledger_req.go b/sdk/golang/pkg/generate/account/account/types_get_margin_hf_ledger_req.go index 2379b47a..394272ca 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_margin_hf_ledger_req.go +++ b/sdk/golang/pkg/generate/account/account/types_get_margin_hf_ledger_req.go @@ -4,19 +4,19 @@ package account // GetMarginHFLedgerReq struct for GetMarginHFLedgerReq type GetMarginHFLedgerReq struct { - // currency, optional,can select more than one,separate with commas,select no more than 10 currencys,the default will be to query for all currencys if left empty + // Currency optional; more than one can be selected; separate using commas; select no more than 10 currencies; the default will be to query for all currencies if left empty Currency *string `json:"currency,omitempty" url:"currency,omitempty"` // direction: in, out Direction *string `json:"direction,omitempty" url:"direction,omitempty"` - // Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE - cross margin trade, ISOLATED_EXCHANGE - isolated margin trade, LIQUIDATION - liquidation, ASSERT_RETURN - forced liquidation asset return + // Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE-cross margin trade, ISOLATED_EXCHANGE-isolated margin trade, LIQUIDATION-liquidation, ASSERT_RETURN-forced liquidation asset return BizType *string `json:"bizType,omitempty" url:"bizType,omitempty"` - // The id of the last set of data from the previous batch of data. By default, the latest information is given. + // The ID of the last set of data from the previous data batch. By default, the latest information is given. LastId *int64 `json:"lastId,omitempty" url:"lastId,omitempty"` - // Default100,Max200 + // Default100, Max200 Limit *int32 `json:"limit,omitempty" url:"limit,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` } @@ -58,7 +58,7 @@ func NewGetMarginHFLedgerReqBuilder() *GetMarginHFLedgerReqBuilder { return &GetMarginHFLedgerReqBuilder{obj: NewGetMarginHFLedgerReqWithDefaults()} } -// currency, optional,can select more than one,separate with commas,select no more than 10 currencys,the default will be to query for all currencys if left empty +// Currency optional; more than one can be selected; separate using commas; select no more than 10 currencies; the default will be to query for all currencies if left empty func (builder *GetMarginHFLedgerReqBuilder) SetCurrency(value string) *GetMarginHFLedgerReqBuilder { builder.obj.Currency = &value return builder @@ -70,31 +70,31 @@ func (builder *GetMarginHFLedgerReqBuilder) SetDirection(value string) *GetMargi return builder } -// Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE - cross margin trade, ISOLATED_EXCHANGE - isolated margin trade, LIQUIDATION - liquidation, ASSERT_RETURN - forced liquidation asset return +// Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE-cross margin trade, ISOLATED_EXCHANGE-isolated margin trade, LIQUIDATION-liquidation, ASSERT_RETURN-forced liquidation asset return func (builder *GetMarginHFLedgerReqBuilder) SetBizType(value string) *GetMarginHFLedgerReqBuilder { builder.obj.BizType = &value return builder } -// The id of the last set of data from the previous batch of data. By default, the latest information is given. +// The ID of the last set of data from the previous data batch. By default, the latest information is given. func (builder *GetMarginHFLedgerReqBuilder) SetLastId(value int64) *GetMarginHFLedgerReqBuilder { builder.obj.LastId = &value return builder } -// Default100,Max200 +// Default100, Max200 func (builder *GetMarginHFLedgerReqBuilder) SetLimit(value int32) *GetMarginHFLedgerReqBuilder { builder.obj.Limit = &value return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetMarginHFLedgerReqBuilder) SetStartAt(value int64) *GetMarginHFLedgerReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetMarginHFLedgerReqBuilder) SetEndAt(value int64) *GetMarginHFLedgerReqBuilder { builder.obj.EndAt = &value return builder diff --git a/sdk/golang/pkg/generate/account/account/types_get_spot_account_list_data.go b/sdk/golang/pkg/generate/account/account/types_get_spot_account_list_data.go index a6b2d6f9..78c1134d 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_spot_account_list_data.go +++ b/sdk/golang/pkg/generate/account/account/types_get_spot_account_list_data.go @@ -8,7 +8,7 @@ type GetSpotAccountListData struct { Id string `json:"id,omitempty"` // Currency Currency string `json:"currency,omitempty"` - // Account type:,main、trade、isolated(abandon)、margin(abandon) + // Account type: main, trade, isolated (abandon), margin (abandon) Type string `json:"type,omitempty"` // Total funds in the account Balance string `json:"balance,omitempty"` diff --git a/sdk/golang/pkg/generate/account/account/types_get_spot_account_list_req.go b/sdk/golang/pkg/generate/account/account/types_get_spot_account_list_req.go index a36aa77b..fe2867f4 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_spot_account_list_req.go +++ b/sdk/golang/pkg/generate/account/account/types_get_spot_account_list_req.go @@ -6,7 +6,7 @@ package account type GetSpotAccountListReq struct { // currency Currency *string `json:"currency,omitempty" url:"currency,omitempty"` - // Account type main、trade + // Account type Type *string `json:"type,omitempty" url:"type,omitempty"` } @@ -45,7 +45,7 @@ func (builder *GetSpotAccountListReqBuilder) SetCurrency(value string) *GetSpotA return builder } -// Account type main、trade +// Account type func (builder *GetSpotAccountListReqBuilder) SetType(value string) *GetSpotAccountListReqBuilder { builder.obj.Type = &value return builder diff --git a/sdk/golang/pkg/generate/account/account/types_get_spot_hf_ledger_data.go b/sdk/golang/pkg/generate/account/account/types_get_spot_hf_ledger_data.go index 64fe4737..ed1cf9ee 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_spot_hf_ledger_data.go +++ b/sdk/golang/pkg/generate/account/account/types_get_spot_hf_ledger_data.go @@ -4,22 +4,22 @@ package account // GetSpotHFLedgerData struct for GetSpotHFLedgerData type GetSpotHFLedgerData struct { - // Unique id + // Unique ID Id string `json:"id,omitempty"` // currency Currency string `json:"currency,omitempty"` // Change in funds balance Amount string `json:"amount,omitempty"` - // Deposit or withdrawal fee + // Transaction, Deposit or withdrawal fee Fee string `json:"fee,omitempty"` Tax string `json:"tax,omitempty"` // Total balance of funds after change Balance string `json:"balance,omitempty"` // Master account type TRADE_HF AccountType string `json:"accountType,omitempty"` - // Trnasaction type,such as TRANSFER, TRADE_EXCHANGE, etc. + // Trnasaction type, such as TRANSFER, TRADE_EXCHANGE, etc. BizType string `json:"bizType,omitempty"` - // Direction of transfer( out or in) + // Direction of transfer (out or in) Direction string `json:"direction,omitempty"` // Created time CreatedAt string `json:"createdAt,omitempty"` diff --git a/sdk/golang/pkg/generate/account/account/types_get_spot_hf_ledger_req.go b/sdk/golang/pkg/generate/account/account/types_get_spot_hf_ledger_req.go index 62c63af2..e5be62ad 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_spot_hf_ledger_req.go +++ b/sdk/golang/pkg/generate/account/account/types_get_spot_hf_ledger_req.go @@ -4,19 +4,19 @@ package account // GetSpotHFLedgerReq struct for GetSpotHFLedgerReq type GetSpotHFLedgerReq struct { - // Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default. + // Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default. Currency *string `json:"currency,omitempty" url:"currency,omitempty"` // direction: in, out Direction *string `json:"direction,omitempty" url:"direction,omitempty"` - // Transaction type: TRANSFER-transfer funds,TRADE_EXCHANGE-Trade + // Transaction type BizType *string `json:"bizType,omitempty" url:"bizType,omitempty"` - // The id of the last set of data from the previous batch of data. By default, the latest information is given. + // The ID of the last set of data from the previous data batch. By default, the latest information is given. LastId *int64 `json:"lastId,omitempty" url:"lastId,omitempty"` - // Default100,Max200 + // Default100, Max200 Limit *int32 `json:"limit,omitempty" url:"limit,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` } @@ -58,7 +58,7 @@ func NewGetSpotHFLedgerReqBuilder() *GetSpotHFLedgerReqBuilder { return &GetSpotHFLedgerReqBuilder{obj: NewGetSpotHFLedgerReqWithDefaults()} } -// Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default. +// Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default. func (builder *GetSpotHFLedgerReqBuilder) SetCurrency(value string) *GetSpotHFLedgerReqBuilder { builder.obj.Currency = &value return builder @@ -70,31 +70,31 @@ func (builder *GetSpotHFLedgerReqBuilder) SetDirection(value string) *GetSpotHFL return builder } -// Transaction type: TRANSFER-transfer funds,TRADE_EXCHANGE-Trade +// Transaction type func (builder *GetSpotHFLedgerReqBuilder) SetBizType(value string) *GetSpotHFLedgerReqBuilder { builder.obj.BizType = &value return builder } -// The id of the last set of data from the previous batch of data. By default, the latest information is given. +// The ID of the last set of data from the previous data batch. By default, the latest information is given. func (builder *GetSpotHFLedgerReqBuilder) SetLastId(value int64) *GetSpotHFLedgerReqBuilder { builder.obj.LastId = &value return builder } -// Default100,Max200 +// Default100, Max200 func (builder *GetSpotHFLedgerReqBuilder) SetLimit(value int32) *GetSpotHFLedgerReqBuilder { builder.obj.Limit = &value return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetSpotHFLedgerReqBuilder) SetStartAt(value int64) *GetSpotHFLedgerReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetSpotHFLedgerReqBuilder) SetEndAt(value int64) *GetSpotHFLedgerReqBuilder { builder.obj.EndAt = &value return builder diff --git a/sdk/golang/pkg/generate/account/account/types_get_spot_ledger_items.go b/sdk/golang/pkg/generate/account/account/types_get_spot_ledger_items.go index 27d3ead0..56ee1139 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_spot_ledger_items.go +++ b/sdk/golang/pkg/generate/account/account/types_get_spot_ledger_items.go @@ -6,23 +6,23 @@ package account type GetSpotLedgerItems struct { // unique id Id *string `json:"id,omitempty"` - // The currency of an account + // Currency Currency *string `json:"currency,omitempty"` - // The total amount of assets (fees included) involved in assets changes such as transaction, withdrawal and bonus distribution. + // The total amount of assets (fees included) involved in assets changes such as transactions, withdrawals and bonus distributions. Amount *string `json:"amount,omitempty"` // Fees generated in transaction, withdrawal, etc. Fee *string `json:"fee,omitempty"` - // Remaining funds after the transaction. + // Remaining funds after the transaction. (Deprecated field, no actual use of the value field) Balance *string `json:"balance,omitempty"` - // The account type of the master user: MAIN, TRADE, MARGIN or CONTRACT. + // Master user account types: MAIN, TRADE, MARGIN or CONTRACT. AccountType *string `json:"accountType,omitempty"` - // Business type leading to the changes in funds, such as exchange, withdrawal, deposit, KUCOIN_BONUS, REFERRAL_BONUS, Lendings etc. + // Business type leading to changes in funds, such as exchange, withdrawal, deposit, KUCOIN_BONUS, REFERRAL_BONUS, Lendings, etc. BizType *string `json:"bizType,omitempty"` // Side, out or in Direction *string `json:"direction,omitempty"` - // Time of the event + // Time of event CreatedAt *int64 `json:"createdAt,omitempty"` - // Business related information such as order ID, serial No., etc. + // Business related information such as order ID, serial no., etc. Context *string `json:"context,omitempty"` } diff --git a/sdk/golang/pkg/generate/account/account/types_get_spot_ledger_req.go b/sdk/golang/pkg/generate/account/account/types_get_spot_ledger_req.go index 63225018..f06a2136 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_spot_ledger_req.go +++ b/sdk/golang/pkg/generate/account/account/types_get_spot_ledger_req.go @@ -4,15 +4,15 @@ package account // GetSpotLedgerReq struct for GetSpotLedgerReq type GetSpotLedgerReq struct { - // Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default. + // Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default. Currency *string `json:"currency,omitempty" url:"currency,omitempty"` // direction: in, out Direction *string `json:"direction,omitempty" url:"direction,omitempty"` - // Type: DEPOSIT -deposit, WITHDRAW -withdraw, TRANSFER -transfer, SUB_TRANSFER -subaccount transfer,TRADE_EXCHANGE -trade, MARGIN_EXCHANGE -margin trade, KUCOIN_BONUS -bonus, BROKER_TRANSFER -Broker transfer record + // Type: DEPOSIT-deposit, WITHDRAW-withdraw, TRANSFER-transfer, SUB_TRANSFER-sub-account transfer, TRADE_EXCHANGE-trade, MARGIN_EXCHANGE-margin trade, KUCOIN_BONUS-bonus, BROKER_TRANSFER-Broker transfer record BizType *string `json:"bizType,omitempty" url:"bizType,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` // Current request page. CurrentPage *int32 `json:"currentPage,omitempty" url:"currentPage,omitempty"` @@ -62,7 +62,7 @@ func NewGetSpotLedgerReqBuilder() *GetSpotLedgerReqBuilder { return &GetSpotLedgerReqBuilder{obj: NewGetSpotLedgerReqWithDefaults()} } -// Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default. +// Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default. func (builder *GetSpotLedgerReqBuilder) SetCurrency(value string) *GetSpotLedgerReqBuilder { builder.obj.Currency = &value return builder @@ -74,19 +74,19 @@ func (builder *GetSpotLedgerReqBuilder) SetDirection(value string) *GetSpotLedge return builder } -// Type: DEPOSIT -deposit, WITHDRAW -withdraw, TRANSFER -transfer, SUB_TRANSFER -subaccount transfer,TRADE_EXCHANGE -trade, MARGIN_EXCHANGE -margin trade, KUCOIN_BONUS -bonus, BROKER_TRANSFER -Broker transfer record +// Type: DEPOSIT-deposit, WITHDRAW-withdraw, TRANSFER-transfer, SUB_TRANSFER-sub-account transfer, TRADE_EXCHANGE-trade, MARGIN_EXCHANGE-margin trade, KUCOIN_BONUS-bonus, BROKER_TRANSFER-Broker transfer record func (builder *GetSpotLedgerReqBuilder) SetBizType(value string) *GetSpotLedgerReqBuilder { builder.obj.BizType = &value return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetSpotLedgerReqBuilder) SetStartAt(value int64) *GetSpotLedgerReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetSpotLedgerReqBuilder) SetEndAt(value int64) *GetSpotLedgerReqBuilder { builder.obj.EndAt = &value return builder diff --git a/sdk/golang/pkg/generate/account/account/types_get_spot_ledger_resp.go b/sdk/golang/pkg/generate/account/account/types_get_spot_ledger_resp.go index 11a98e2e..1f889a82 100644 --- a/sdk/golang/pkg/generate/account/account/types_get_spot_ledger_resp.go +++ b/sdk/golang/pkg/generate/account/account/types_get_spot_ledger_resp.go @@ -16,7 +16,7 @@ type GetSpotLedgerResp struct { PageSize int32 `json:"pageSize,omitempty"` // total number TotalNum int32 `json:"totalNum,omitempty"` - // total page + // total pages TotalPage int32 `json:"totalPage,omitempty"` Items []GetSpotLedgerItems `json:"items,omitempty"` } diff --git a/sdk/golang/pkg/generate/account/deposit/api_deposit.go b/sdk/golang/pkg/generate/account/deposit/api_deposit.go index e14aa500..d152d23e 100644 --- a/sdk/golang/pkg/generate/account/deposit/api_deposit.go +++ b/sdk/golang/pkg/generate/account/deposit/api_deposit.go @@ -9,105 +9,105 @@ import ( type DepositAPI interface { - // AddDepositAddressV3 Add Deposit Address(V3) - // Description: Request via this endpoint to create a deposit address for a currency you intend to deposit. + // AddDepositAddressV3 Add Deposit Address (V3) + // Description: Request via this endpoint the creation of a deposit address for a currency you intend to deposit. // Documentation: https://www.kucoin.com/docs-new/api-3470142 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ AddDepositAddressV3(req *AddDepositAddressV3Req, ctx context.Context) (*AddDepositAddressV3Resp, error) - // GetDepositAddressV3 Get Deposit Address(V3) - // Description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to Add Deposit Address first. + // GetDepositAddressV3 Get Deposit Address (V3) + // Description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to add the deposit address first. // Documentation: https://www.kucoin.com/docs-new/api-3470140 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 5 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+------------+ GetDepositAddressV3(req *GetDepositAddressV3Req, ctx context.Context) (*GetDepositAddressV3Resp, error) // GetDepositHistory Get Deposit History - // Description: Request via this endpoint to get deposit list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. + // Description: Request a deposit list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. // Documentation: https://www.kucoin.com/docs-new/api-3470141 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 5 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+------------+ GetDepositHistory(req *GetDepositHistoryReq, ctx context.Context) (*GetDepositHistoryResp, error) - // GetDepositAddressV2 Get Deposit Addresses(V2) - // Description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to Add Deposit Address first. + // GetDepositAddressV2 Get Deposit Addresses (V2) + // Description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to add the deposit address first. // Documentation: https://www.kucoin.com/docs-new/api-3470300 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 5 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+------------+ // Deprecated GetDepositAddressV2(req *GetDepositAddressV2Req, ctx context.Context) (*GetDepositAddressV2Resp, error) // GetDepositAddressV1 Get Deposit Addresses - V1 - // Description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to Add Deposit Address first. + // Description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to add the deposit address first. // Documentation: https://www.kucoin.com/docs-new/api-3470305 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 5 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+------------+ // Deprecated GetDepositAddressV1(req *GetDepositAddressV1Req, ctx context.Context) (*GetDepositAddressV1Resp, error) // GetDepositHistoryOld Get Deposit History - Old - // Description: Request via this endpoint to get the V1 historical deposits list on KuCoin. The return value is the data after Pagination, sorted in descending order according to time. + // Description: Request the V1 historical deposits list on KuCoin via this endpoint. The return value is the data after Pagination, sorted in descending order according to time. // Documentation: https://www.kucoin.com/docs-new/api-3470306 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 5 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+------------+ // Deprecated GetDepositHistoryOld(req *GetDepositHistoryOldReq, ctx context.Context) (*GetDepositHistoryOldResp, error) // AddDepositAddressV1 Add Deposit Address - V1 - // Description: Request via this endpoint to create a deposit address for a currency you intend to deposit. + // Description: Request via this endpoint the creation of a deposit address for a currency you intend to deposit. // Documentation: https://www.kucoin.com/docs-new/api-3470309 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ // Deprecated AddDepositAddressV1(req *AddDepositAddressV1Req, ctx context.Context) (*AddDepositAddressV1Resp, error) } diff --git a/sdk/golang/pkg/generate/account/deposit/api_deposit.template b/sdk/golang/pkg/generate/account/deposit/api_deposit.template index 993bec7e..c679e904 100644 --- a/sdk/golang/pkg/generate/account/deposit/api_deposit.template +++ b/sdk/golang/pkg/generate/account/deposit/api_deposit.template @@ -3,7 +3,7 @@ func TestDepositAddDepositAddressV3Req(t *testing.T) { // AddDepositAddressV3 - // Add Deposit Address(V3) + // Add Deposit Address (V3) // /api/v3/deposit-address/create builder := deposit.NewAddDepositAddressV3ReqBuilder() @@ -26,7 +26,7 @@ func TestDepositAddDepositAddressV3Req(t *testing.T) { func TestDepositGetDepositAddressV3Req(t *testing.T) { // GetDepositAddressV3 - // Get Deposit Address(V3) + // Get Deposit Address (V3) // /api/v3/deposit-addresses builder := deposit.NewGetDepositAddressV3ReqBuilder() @@ -72,11 +72,11 @@ func TestDepositGetDepositHistoryReq(t *testing.T) { func TestDepositGetDepositAddressV2Req(t *testing.T) { // GetDepositAddressV2 - // Get Deposit Addresses(V2) + // Get Deposit Addresses (V2) // /api/v2/deposit-addresses builder := deposit.NewGetDepositAddressV2ReqBuilder() - builder.SetCurrency(?) + builder.SetCurrency(?).SetChain(?) req := builder.Build() resp, err := depositApi.GetDepositAddressV2(req, context.TODO()) @@ -145,7 +145,7 @@ func TestDepositAddDepositAddressV1Req(t *testing.T) { // /api/v1/deposit-addresses builder := deposit.NewAddDepositAddressV1ReqBuilder() - builder.SetCurrency(?).SetChain(?) + builder.SetCurrency(?).SetChain(?).SetTo(?) req := builder.Build() resp, err := depositApi.AddDepositAddressV1(req, context.TODO()) diff --git a/sdk/golang/pkg/generate/account/deposit/api_deposit_test.go b/sdk/golang/pkg/generate/account/deposit/api_deposit_test.go index 6a1fdfd7..5ac26707 100644 --- a/sdk/golang/pkg/generate/account/deposit/api_deposit_test.go +++ b/sdk/golang/pkg/generate/account/deposit/api_deposit_test.go @@ -9,7 +9,7 @@ import ( func TestDepositAddDepositAddressV3ReqModel(t *testing.T) { // AddDepositAddressV3 - // Add Deposit Address(V3) + // Add Deposit Address (V3) // /api/v3/deposit-address/create data := "{\"currency\": \"TON\", \"chain\": \"ton\", \"to\": \"trade\"}" @@ -21,7 +21,7 @@ func TestDepositAddDepositAddressV3ReqModel(t *testing.T) { func TestDepositAddDepositAddressV3RespModel(t *testing.T) { // AddDepositAddressV3 - // Add Deposit Address(V3) + // Add Deposit Address (V3) // /api/v3/deposit-address/create data := "{\"code\":\"200000\",\"data\":{\"address\":\"EQCA1BI4QRZ8qYmskSRDzJmkucGodYRTZCf_b9hckjla6dZl\",\"memo\":\"2090821203\",\"chainId\":\"ton\",\"to\":\"TRADE\",\"expirationDate\":0,\"currency\":\"TON\",\"chainName\":\"TON\"}}" @@ -37,10 +37,10 @@ func TestDepositAddDepositAddressV3RespModel(t *testing.T) { func TestDepositGetDepositAddressV3ReqModel(t *testing.T) { // GetDepositAddressV3 - // Get Deposit Address(V3) + // Get Deposit Address (V3) // /api/v3/deposit-addresses - data := "{\"currency\": \"BTC\", \"amount\": \"example_string_default_value\", \"chain\": \"example_string_default_value\"}" + data := "{\"currency\": \"BTC\", \"amount\": \"example_string_default_value\", \"chain\": \"eth\"}" req := &GetDepositAddressV3Req{} err := json.Unmarshal([]byte(data), req) req.ToMap() @@ -49,7 +49,7 @@ func TestDepositGetDepositAddressV3ReqModel(t *testing.T) { func TestDepositGetDepositAddressV3RespModel(t *testing.T) { // GetDepositAddressV3 - // Get Deposit Address(V3) + // Get Deposit Address (V3) // /api/v3/deposit-addresses data := "{\"code\":\"200000\",\"data\":[{\"address\":\"TSv3L1fS7yA3SxzKD8c1qdX4nLP6rqNxYz\",\"memo\":\"\",\"chainId\":\"trx\",\"to\":\"TRADE\",\"expirationDate\":0,\"currency\":\"USDT\",\"contractAddress\":\"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\",\"chainName\":\"TRC20\"},{\"address\":\"0x551e823a3b36865e8c5dc6e6ac6cc0b00d98533e\",\"memo\":\"\",\"chainId\":\"kcc\",\"to\":\"TRADE\",\"expirationDate\":0,\"currency\":\"USDT\",\"contractAddress\":\"0x0039f574ee5cc39bdd162e9a88e3eb1f111baf48\",\"chainName\":\"KCC\"},{\"address\":\"EQCA1BI4QRZ8qYmskSRDzJmkucGodYRTZCf_b9hckjla6dZl\",\"memo\":\"2085202643\",\"chainId\":\"ton\",\"to\":\"TRADE\",\"expirationDate\":0,\"currency\":\"USDT\",\"contractAddress\":\"EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs\",\"chainName\":\"TON\"},{\"address\":\"0x0a2586d5a901c8e7e68f6b0dc83bfd8bd8600ff5\",\"memo\":\"\",\"chainId\":\"eth\",\"to\":\"MAIN\",\"expirationDate\":0,\"currency\":\"USDT\",\"contractAddress\":\"0xdac17f958d2ee523a2206206994597c13d831ec7\",\"chainName\":\"ERC20\"}]}" @@ -93,10 +93,10 @@ func TestDepositGetDepositHistoryRespModel(t *testing.T) { func TestDepositGetDepositAddressV2ReqModel(t *testing.T) { // GetDepositAddressV2 - // Get Deposit Addresses(V2) + // Get Deposit Addresses (V2) // /api/v2/deposit-addresses - data := "{\"currency\": \"BTC\"}" + data := "{\"currency\": \"BTC\", \"chain\": \"eth\"}" req := &GetDepositAddressV2Req{} err := json.Unmarshal([]byte(data), req) req.ToMap() @@ -105,7 +105,7 @@ func TestDepositGetDepositAddressV2ReqModel(t *testing.T) { func TestDepositGetDepositAddressV2RespModel(t *testing.T) { // GetDepositAddressV2 - // Get Deposit Addresses(V2) + // Get Deposit Addresses (V2) // /api/v2/deposit-addresses data := "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"address\": \"0x02028456*****87ede7a73d7c\",\n \"memo\": \"\",\n \"chain\": \"ERC20\",\n \"chainId\": \"eth\",\n \"to\": \"MAIN\",\n \"currency\": \"ETH\",\n \"contractAddress\": \"\"\n }\n ]\n}" diff --git a/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v1_req.go b/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v1_req.go index 2955272a..239e1d3a 100644 --- a/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v1_req.go +++ b/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v1_req.go @@ -6,8 +6,10 @@ package deposit type AddDepositAddressV1Req struct { // currency Currency string `json:"currency,omitempty"` - // The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + // The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. Chain *string `json:"chain,omitempty"` + // Deposit account type: main (funding account), trade (spot trading account); the default is main + To *string `json:"to,omitempty"` } // NewAddDepositAddressV1Req instantiates a new AddDepositAddressV1Req object @@ -17,6 +19,8 @@ func NewAddDepositAddressV1Req(currency string) *AddDepositAddressV1Req { this.Currency = currency var chain string = "eth" this.Chain = &chain + var to string = "main" + this.To = &to return &this } @@ -26,6 +30,8 @@ func NewAddDepositAddressV1ReqWithDefaults() *AddDepositAddressV1Req { this := AddDepositAddressV1Req{} var chain string = "eth" this.Chain = &chain + var to string = "main" + this.To = &to return &this } @@ -33,6 +39,7 @@ func (o *AddDepositAddressV1Req) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} toSerialize["currency"] = o.Currency toSerialize["chain"] = o.Chain + toSerialize["to"] = o.To return toSerialize } @@ -50,12 +57,18 @@ func (builder *AddDepositAddressV1ReqBuilder) SetCurrency(value string) *AddDepo return builder } -// The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. +// The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. func (builder *AddDepositAddressV1ReqBuilder) SetChain(value string) *AddDepositAddressV1ReqBuilder { builder.obj.Chain = &value return builder } +// Deposit account type: main (funding account), trade (spot trading account); the default is main +func (builder *AddDepositAddressV1ReqBuilder) SetTo(value string) *AddDepositAddressV1ReqBuilder { + builder.obj.To = &value + return builder +} + func (builder *AddDepositAddressV1ReqBuilder) Build() *AddDepositAddressV1Req { return builder.obj } diff --git a/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v1_resp.go b/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v1_resp.go index b58319b8..d036da05 100644 --- a/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v1_resp.go +++ b/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v1_resp.go @@ -12,7 +12,7 @@ type AddDepositAddressV1Resp struct { CommonResponse *types.RestResponse // Deposit address Address string `json:"address,omitempty"` - // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. Memo string `json:"memo,omitempty"` // The chainName of currency Chain string `json:"chain,omitempty"` diff --git a/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v3_req.go b/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v3_req.go index 778c0ab8..93ac675d 100644 --- a/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v3_req.go +++ b/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v3_req.go @@ -6,9 +6,9 @@ package deposit type AddDepositAddressV3Req struct { // currency Currency string `json:"currency,omitempty"` - // The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. - Chain *string `json:"chain,omitempty"` - // Deposit account type: main (funding account), trade (spot trading account), the default is main + // The currency chainId, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. + Chain string `json:"chain,omitempty"` + // Deposit account type: MAIN (funding account), TRADE (spot trading account); the default is MAIN To *string `json:"to,omitempty"` // Deposit amount. This parameter is only used when applying for invoices on the Lightning Network. This parameter is invalid if it is not passed through the Lightning Network. Amount *string `json:"amount,omitempty"` @@ -16,11 +16,10 @@ type AddDepositAddressV3Req struct { // NewAddDepositAddressV3Req instantiates a new AddDepositAddressV3Req object // This constructor will assign default values to properties that have it defined -func NewAddDepositAddressV3Req(currency string) *AddDepositAddressV3Req { +func NewAddDepositAddressV3Req(currency string, chain string) *AddDepositAddressV3Req { this := AddDepositAddressV3Req{} this.Currency = currency - var chain string = "eth" - this.Chain = &chain + this.Chain = chain var to string = "main" this.To = &to return &this @@ -31,7 +30,7 @@ func NewAddDepositAddressV3Req(currency string) *AddDepositAddressV3Req { func NewAddDepositAddressV3ReqWithDefaults() *AddDepositAddressV3Req { this := AddDepositAddressV3Req{} var chain string = "eth" - this.Chain = &chain + this.Chain = chain var to string = "main" this.To = &to return &this @@ -60,13 +59,13 @@ func (builder *AddDepositAddressV3ReqBuilder) SetCurrency(value string) *AddDepo return builder } -// The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. +// The currency chainId, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. func (builder *AddDepositAddressV3ReqBuilder) SetChain(value string) *AddDepositAddressV3ReqBuilder { - builder.obj.Chain = &value + builder.obj.Chain = value return builder } -// Deposit account type: main (funding account), trade (spot trading account), the default is main +// Deposit account type: MAIN (funding account), TRADE (spot trading account); the default is MAIN func (builder *AddDepositAddressV3ReqBuilder) SetTo(value string) *AddDepositAddressV3ReqBuilder { builder.obj.To = &value return builder diff --git a/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v3_resp.go b/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v3_resp.go index 6ba068cc..e249eb65 100644 --- a/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v3_resp.go +++ b/sdk/golang/pkg/generate/account/deposit/types_add_deposit_address_v3_resp.go @@ -12,13 +12,13 @@ type AddDepositAddressV3Resp struct { CommonResponse *types.RestResponse // Deposit address Address string `json:"address,omitempty"` - // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. Memo string `json:"memo,omitempty"` // The chainId of currency ChainId string `json:"chainId,omitempty"` - // Deposit account type: main (funding account), trade (spot trading account) + // Deposit account type: MAIN (funding account), TRADE (spot trading account) To string `json:"to,omitempty"` - // Expiration time, Lightning network expiration time, non-Lightning network this field is invalid + // Expiration time; Lightning network expiration time; this field is not applicable to non-Lightning networks ExpirationDate int32 `json:"expirationDate,omitempty"` // currency Currency string `json:"currency,omitempty"` diff --git a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v1_req.go b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v1_req.go index 85780540..42185531 100644 --- a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v1_req.go +++ b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v1_req.go @@ -6,7 +6,7 @@ package deposit type GetDepositAddressV1Req struct { // currency Currency *string `json:"currency,omitempty" url:"currency,omitempty"` - // The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + // The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. Chain *string `json:"chain,omitempty" url:"chain,omitempty"` } @@ -49,7 +49,7 @@ func (builder *GetDepositAddressV1ReqBuilder) SetCurrency(value string) *GetDepo return builder } -// The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. +// The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. func (builder *GetDepositAddressV1ReqBuilder) SetChain(value string) *GetDepositAddressV1ReqBuilder { builder.obj.Chain = &value return builder diff --git a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v1_resp.go b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v1_resp.go index a8311a53..d70a64e0 100644 --- a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v1_resp.go +++ b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v1_resp.go @@ -12,7 +12,7 @@ type GetDepositAddressV1Resp struct { CommonResponse *types.RestResponse // Deposit address Address *string `json:"address,omitempty"` - // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. Memo *string `json:"memo,omitempty"` // The chainName of currency Chain *string `json:"chain,omitempty"` diff --git a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v2_data.go b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v2_data.go index bb256ab3..0923f099 100644 --- a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v2_data.go +++ b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v2_data.go @@ -6,7 +6,7 @@ package deposit type GetDepositAddressV2Data struct { // Deposit address Address *string `json:"address,omitempty"` - // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. Memo *string `json:"memo,omitempty"` // The chainName of currency Chain *string `json:"chain,omitempty"` diff --git a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v2_req.go b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v2_req.go index 08cecdfb..dbd0f0be 100644 --- a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v2_req.go +++ b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v2_req.go @@ -6,6 +6,8 @@ package deposit type GetDepositAddressV2Req struct { // currency Currency *string `json:"currency,omitempty" url:"currency,omitempty"` + // Chain ID of currency + Chain *string `json:"chain,omitempty" url:"chain,omitempty"` } // NewGetDepositAddressV2Req instantiates a new GetDepositAddressV2Req object @@ -25,6 +27,7 @@ func NewGetDepositAddressV2ReqWithDefaults() *GetDepositAddressV2Req { func (o *GetDepositAddressV2Req) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} toSerialize["currency"] = o.Currency + toSerialize["chain"] = o.Chain return toSerialize } @@ -42,6 +45,12 @@ func (builder *GetDepositAddressV2ReqBuilder) SetCurrency(value string) *GetDepo return builder } +// Chain ID of currency +func (builder *GetDepositAddressV2ReqBuilder) SetChain(value string) *GetDepositAddressV2ReqBuilder { + builder.obj.Chain = &value + return builder +} + func (builder *GetDepositAddressV2ReqBuilder) Build() *GetDepositAddressV2Req { return builder.obj } diff --git a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v3_data.go b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v3_data.go index bc900513..2eb0ea36 100644 --- a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v3_data.go +++ b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_address_v3_data.go @@ -6,13 +6,13 @@ package deposit type GetDepositAddressV3Data struct { // Deposit address Address string `json:"address,omitempty"` - // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. Memo string `json:"memo,omitempty"` // The chainId of currency ChainId string `json:"chainId,omitempty"` - // Deposit account type: main (funding account), trade (spot trading account) + // Deposit account type: MAIN (funding account), TRADE (spot trading account) To string `json:"to,omitempty"` - // Expiration time, Lightning network expiration time, non-Lightning network this field is invalid + // Expiration time; Lightning network expiration time; this field is not applicable to non-Lightning networks ExpirationDate int32 `json:"expirationDate,omitempty"` // currency Currency string `json:"currency,omitempty"` diff --git a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_items.go b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_items.go index 26220519..da6a59d9 100644 --- a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_items.go +++ b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_items.go @@ -22,7 +22,7 @@ type GetDepositHistoryItems struct { Fee *string `json:"fee,omitempty"` // Wallet Txid WalletTxId *string `json:"walletTxId,omitempty"` - // Creation time of the database record + // Database record creation time CreatedAt *int64 `json:"createdAt,omitempty"` // Update time of the database record UpdatedAt *int64 `json:"updatedAt,omitempty"` diff --git a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_old_items.go b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_old_items.go index be04c895..3888dfd9 100644 --- a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_old_items.go +++ b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_old_items.go @@ -6,7 +6,7 @@ package deposit type GetDepositHistoryOldItems struct { // Currency Currency *string `json:"currency,omitempty"` - // Creation time of the database record + // Database record creation time CreateAt *int32 `json:"createAt,omitempty"` // Deposit amount Amount *string `json:"amount,omitempty"` diff --git a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_old_req.go b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_old_req.go index 73833f50..bf64d5df 100644 --- a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_old_req.go +++ b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_old_req.go @@ -8,9 +8,9 @@ type GetDepositHistoryOldReq struct { Currency *string `json:"currency,omitempty" url:"currency,omitempty"` // Status. Available value: PROCESSING, SUCCESS, and FAILURE Status *string `json:"status,omitempty" url:"status,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` } @@ -57,13 +57,13 @@ func (builder *GetDepositHistoryOldReqBuilder) SetStatus(value string) *GetDepos return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetDepositHistoryOldReqBuilder) SetStartAt(value int64) *GetDepositHistoryOldReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetDepositHistoryOldReqBuilder) SetEndAt(value int64) *GetDepositHistoryOldReqBuilder { builder.obj.EndAt = &value return builder diff --git a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_old_resp.go b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_old_resp.go index ebc4e199..85e3df4e 100644 --- a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_old_resp.go +++ b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_old_resp.go @@ -16,7 +16,7 @@ type GetDepositHistoryOldResp struct { PageSize int32 `json:"pageSize,omitempty"` // total number TotalNum int32 `json:"totalNum,omitempty"` - // total page + // total pages TotalPage int32 `json:"totalPage,omitempty"` Items []GetDepositHistoryOldItems `json:"items,omitempty"` } diff --git a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_req.go b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_req.go index 75123c54..dacbc20f 100644 --- a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_req.go +++ b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_req.go @@ -8,9 +8,9 @@ type GetDepositHistoryReq struct { Currency *string `json:"currency,omitempty" url:"currency,omitempty"` // Status. Available value: PROCESSING, SUCCESS, and FAILURE Status *string `json:"status,omitempty" url:"status,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` // Current request page. CurrentPage *int32 `json:"currentPage,omitempty" url:"currentPage,omitempty"` @@ -67,13 +67,13 @@ func (builder *GetDepositHistoryReqBuilder) SetStatus(value string) *GetDepositH return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetDepositHistoryReqBuilder) SetStartAt(value int64) *GetDepositHistoryReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetDepositHistoryReqBuilder) SetEndAt(value int64) *GetDepositHistoryReqBuilder { builder.obj.EndAt = &value return builder diff --git a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_resp.go b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_resp.go index 9081b996..0fa3977f 100644 --- a/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_resp.go +++ b/sdk/golang/pkg/generate/account/deposit/types_get_deposit_history_resp.go @@ -16,7 +16,7 @@ type GetDepositHistoryResp struct { PageSize int32 `json:"pageSize,omitempty"` // total number TotalNum int32 `json:"totalNum,omitempty"` - // total page + // total pages TotalPage int32 `json:"totalPage,omitempty"` Items []GetDepositHistoryItems `json:"items,omitempty"` } diff --git a/sdk/golang/pkg/generate/account/fee/api_fee.go b/sdk/golang/pkg/generate/account/fee/api_fee.go index cc6e58c2..a6796223 100644 --- a/sdk/golang/pkg/generate/account/fee/api_fee.go +++ b/sdk/golang/pkg/generate/account/fee/api_fee.go @@ -10,45 +10,45 @@ import ( type FeeAPI interface { // GetBasicFee Get Basic Fee - Spot/Margin - // Description: This interface is for the spot/margin basic fee rate of users + // Description: This interface is for the user’s spot/margin basic fee rate. // Documentation: https://www.kucoin.com/docs-new/api-3470149 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ GetBasicFee(req *GetBasicFeeReq, ctx context.Context) (*GetBasicFeeResp, error) // GetSpotActualFee Get Actual Fee - Spot/Margin - // Description: This interface is for the actual fee rate of the trading pair. You can inquire about fee rates of 10 trading pairs each time at most. The fee rate of your sub-account is the same as that of the master account. + // Description: This interface is for the trading pair’s actual fee rate. You can inquire about fee rates of 10 trading pairs each time at most. The fee rate of your sub-account is the same as that of the master account. // Documentation: https://www.kucoin.com/docs-new/api-3470150 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ GetSpotActualFee(req *GetSpotActualFeeReq, ctx context.Context) (*GetSpotActualFeeResp, error) // GetFuturesActualFee Get Actual Fee - Futures - // Description: This interface is for the actual futures fee rate of the trading pair. The fee rate of your sub-account is the same as that of the master account. + // Description: This interface is for the trading pair’s actual futures fee rate. The fee rate of your sub-account is the same as that of the master account. // Documentation: https://www.kucoin.com/docs-new/api-3470151 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ GetFuturesActualFee(req *GetFuturesActualFeeReq, ctx context.Context) (*GetFuturesActualFeeResp, error) } diff --git a/sdk/golang/pkg/generate/account/fee/types_get_basic_fee_req.go b/sdk/golang/pkg/generate/account/fee/types_get_basic_fee_req.go index d7631c8d..1d73a73b 100644 --- a/sdk/golang/pkg/generate/account/fee/types_get_basic_fee_req.go +++ b/sdk/golang/pkg/generate/account/fee/types_get_basic_fee_req.go @@ -4,7 +4,7 @@ package fee // GetBasicFeeReq struct for GetBasicFeeReq type GetBasicFeeReq struct { - // Currency type: 0-crypto currency, 1-fiat currency. default is 0-crypto currency + // Currency type: 0-crypto currency, 1-fiat currency. Default is 0-crypto currency CurrencyType *int32 `json:"currencyType,omitempty" url:"currencyType,omitempty"` } @@ -40,7 +40,7 @@ func NewGetBasicFeeReqBuilder() *GetBasicFeeReqBuilder { return &GetBasicFeeReqBuilder{obj: NewGetBasicFeeReqWithDefaults()} } -// Currency type: 0-crypto currency, 1-fiat currency. default is 0-crypto currency +// Currency type: 0-crypto currency, 1-fiat currency. Default is 0-crypto currency func (builder *GetBasicFeeReqBuilder) SetCurrencyType(value int32) *GetBasicFeeReqBuilder { builder.obj.CurrencyType = &value return builder diff --git a/sdk/golang/pkg/generate/account/fee/types_get_futures_actual_fee_req.go b/sdk/golang/pkg/generate/account/fee/types_get_futures_actual_fee_req.go index 2e5640a6..a1b14102 100644 --- a/sdk/golang/pkg/generate/account/fee/types_get_futures_actual_fee_req.go +++ b/sdk/golang/pkg/generate/account/fee/types_get_futures_actual_fee_req.go @@ -4,7 +4,7 @@ package fee // GetFuturesActualFeeReq struct for GetFuturesActualFeeReq type GetFuturesActualFeeReq struct { - // Trading pair + // The unique identity of the trading pair; will not change even if the trading pair is renamed Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` } @@ -36,7 +36,7 @@ func NewGetFuturesActualFeeReqBuilder() *GetFuturesActualFeeReqBuilder { return &GetFuturesActualFeeReqBuilder{obj: NewGetFuturesActualFeeReqWithDefaults()} } -// Trading pair +// The unique identity of the trading pair; will not change even if the trading pair is renamed func (builder *GetFuturesActualFeeReqBuilder) SetSymbol(value string) *GetFuturesActualFeeReqBuilder { builder.obj.Symbol = &value return builder diff --git a/sdk/golang/pkg/generate/account/fee/types_get_futures_actual_fee_resp.go b/sdk/golang/pkg/generate/account/fee/types_get_futures_actual_fee_resp.go index 1aa7e13e..bb99958a 100644 --- a/sdk/golang/pkg/generate/account/fee/types_get_futures_actual_fee_resp.go +++ b/sdk/golang/pkg/generate/account/fee/types_get_futures_actual_fee_resp.go @@ -10,7 +10,7 @@ import ( type GetFuturesActualFeeResp struct { // common response CommonResponse *types.RestResponse - // The unique identity of the trading pair and will not change even if the trading pair is renamed + // The unique identity of the trading pair; will not change even if the trading pair is renamed Symbol string `json:"symbol,omitempty"` // Actual taker fee rate of the trading pair TakerFeeRate string `json:"takerFeeRate,omitempty"` diff --git a/sdk/golang/pkg/generate/account/fee/types_get_spot_actual_fee_data.go b/sdk/golang/pkg/generate/account/fee/types_get_spot_actual_fee_data.go index ff560a61..80d4d724 100644 --- a/sdk/golang/pkg/generate/account/fee/types_get_spot_actual_fee_data.go +++ b/sdk/golang/pkg/generate/account/fee/types_get_spot_actual_fee_data.go @@ -4,12 +4,16 @@ package fee // GetSpotActualFeeData struct for GetSpotActualFeeData type GetSpotActualFeeData struct { - // The unique identity of the trading pair and will not change even if the trading pair is renamed + // The unique identity of the trading pair; will not change even if the trading pair is renamed Symbol string `json:"symbol,omitempty"` // Actual taker fee rate of the symbol TakerFeeRate string `json:"takerFeeRate,omitempty"` // Actual maker fee rate of the symbol MakerFeeRate string `json:"makerFeeRate,omitempty"` + // Buy tax rate; this field is visible to users in certain countries + SellTaxRate *string `json:"sellTaxRate,omitempty"` + // Sell tax rate; this field is visible to users in certain countries + BuyTaxRate *string `json:"buyTaxRate,omitempty"` } // NewGetSpotActualFeeData instantiates a new GetSpotActualFeeData object @@ -34,5 +38,7 @@ func (o *GetSpotActualFeeData) ToMap() map[string]interface{} { toSerialize["symbol"] = o.Symbol toSerialize["takerFeeRate"] = o.TakerFeeRate toSerialize["makerFeeRate"] = o.MakerFeeRate + toSerialize["sellTaxRate"] = o.SellTaxRate + toSerialize["buyTaxRate"] = o.BuyTaxRate return toSerialize } diff --git a/sdk/golang/pkg/generate/account/fee/types_get_spot_actual_fee_req.go b/sdk/golang/pkg/generate/account/fee/types_get_spot_actual_fee_req.go index ab2b5633..1f28f718 100644 --- a/sdk/golang/pkg/generate/account/fee/types_get_spot_actual_fee_req.go +++ b/sdk/golang/pkg/generate/account/fee/types_get_spot_actual_fee_req.go @@ -4,7 +4,7 @@ package fee // GetSpotActualFeeReq struct for GetSpotActualFeeReq type GetSpotActualFeeReq struct { - // Trading pair (optional, you can inquire fee rates of 10 trading pairs each time at most) + // Trading pair (optional; you can inquire fee rates of 10 trading pairs each time at most) Symbols *string `json:"symbols,omitempty" url:"symbols,omitempty"` } @@ -36,7 +36,7 @@ func NewGetSpotActualFeeReqBuilder() *GetSpotActualFeeReqBuilder { return &GetSpotActualFeeReqBuilder{obj: NewGetSpotActualFeeReqWithDefaults()} } -// Trading pair (optional, you can inquire fee rates of 10 trading pairs each time at most) +// Trading pair (optional; you can inquire fee rates of 10 trading pairs each time at most) func (builder *GetSpotActualFeeReqBuilder) SetSymbols(value string) *GetSpotActualFeeReqBuilder { builder.obj.Symbols = &value return builder diff --git a/sdk/golang/pkg/generate/account/subaccount/api_sub_account.go b/sdk/golang/pkg/generate/account/subaccount/api_sub_account.go index 093058f1..72a8e775 100644 --- a/sdk/golang/pkg/generate/account/subaccount/api_sub_account.go +++ b/sdk/golang/pkg/generate/account/subaccount/api_sub_account.go @@ -9,187 +9,187 @@ import ( type SubAccountAPI interface { - // AddSubAccount Add SubAccount + // AddSubAccount Add sub-account // Description: This endpoint can be used to create sub-accounts. // Documentation: https://www.kucoin.com/docs-new/api-3470135 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 15 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 15 | + // +-----------------------+------------+ AddSubAccount(req *AddSubAccountReq, ctx context.Context) (*AddSubAccountResp, error) - // AddSubAccountMarginPermission Add SubAccount Margin Permission - // Description: This endpoint can be used to add sub-accounts Margin permission. Before using this endpoints, you need to ensure that the master account apikey has Margin permissions and the Margin function has been activated. + // AddSubAccountMarginPermission Add sub-account Margin Permission + // Description: This endpoint can be used to add sub-account Margin permissions. Before using this endpoint, you need to ensure that the master account apikey has Margin permissions and the Margin function has been activated. // Documentation: https://www.kucoin.com/docs-new/api-3470331 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 15 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 15 | + // +-----------------------+------------+ AddSubAccountMarginPermission(req *AddSubAccountMarginPermissionReq, ctx context.Context) (*AddSubAccountMarginPermissionResp, error) - // AddSubAccountFuturesPermission Add SubAccount Futures Permission - // Description: This endpoint can be used to add sub-accounts Futures permission. Before using this endpoints, you need to ensure that the master account apikey has Futures permissions and the Futures function has been activated. + // AddSubAccountFuturesPermission Add sub-account Futures Permission + // Description: This endpoint can be used to add sub-account Futures permissions. Before using this endpoint, you need to ensure that the master account apikey has Futures permissions and the Futures function has been activated. // Documentation: https://www.kucoin.com/docs-new/api-3470332 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 15 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 15 | + // +-----------------------+------------+ AddSubAccountFuturesPermission(req *AddSubAccountFuturesPermissionReq, ctx context.Context) (*AddSubAccountFuturesPermissionResp, error) - // GetSpotSubAccountsSummaryV2 Get SubAccount List - Summary Info + // GetSpotSubAccountsSummaryV2 Get sub-account List - Summary Info // Description: This endpoint can be used to get a paginated list of sub-accounts. Pagination is required. // Documentation: https://www.kucoin.com/docs-new/api-3470131 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ GetSpotSubAccountsSummaryV2(req *GetSpotSubAccountsSummaryV2Req, ctx context.Context) (*GetSpotSubAccountsSummaryV2Resp, error) - // GetSpotSubAccountDetail Get SubAccount Detail - Balance + // GetSpotSubAccountDetail Get sub-account Detail - Balance // Description: This endpoint returns the account info of a sub-user specified by the subUserId. // Documentation: https://www.kucoin.com/docs-new/api-3470132 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 15 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 15 | + // +-----------------------+------------+ GetSpotSubAccountDetail(req *GetSpotSubAccountDetailReq, ctx context.Context) (*GetSpotSubAccountDetailResp, error) - // GetSpotSubAccountListV2 Get SubAccount List - Spot Balance(V2) + // GetSpotSubAccountListV2 Get sub-account List - Spot Balance (V2) // Description: This endpoint can be used to get paginated Spot sub-account information. Pagination is required. // Documentation: https://www.kucoin.com/docs-new/api-3470133 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ GetSpotSubAccountListV2(req *GetSpotSubAccountListV2Req, ctx context.Context) (*GetSpotSubAccountListV2Resp, error) - // GetFuturesSubAccountListV2 Get SubAccount List - Futures Balance(V2) + // GetFuturesSubAccountListV2 Get sub-account List - Futures Balance (V2) // Description: This endpoint can be used to get Futures sub-account information. // Documentation: https://www.kucoin.com/docs-new/api-3470134 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 6 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 6 | + // +-----------------------+---------+ GetFuturesSubAccountListV2(req *GetFuturesSubAccountListV2Req, ctx context.Context) (*GetFuturesSubAccountListV2Resp, error) - // AddSubAccountApi Add SubAccount API + // AddSubAccountApi Add sub-account API // Description: This endpoint can be used to create APIs for sub-accounts. // Documentation: https://www.kucoin.com/docs-new/api-3470138 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ AddSubAccountApi(req *AddSubAccountApiReq, ctx context.Context) (*AddSubAccountApiResp, error) - // ModifySubAccountApi Modify SubAccount API + // ModifySubAccountApi Modify sub-account API // Description: This endpoint can be used to modify sub-account APIs. // Documentation: https://www.kucoin.com/docs-new/api-3470139 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 30 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 30 | + // +-----------------------+------------+ ModifySubAccountApi(req *ModifySubAccountApiReq, ctx context.Context) (*ModifySubAccountApiResp, error) - // GetSubAccountApiList Get SubAccount API List - // Description: This endpoint can be used to obtain a list of APIs pertaining to a sub-account.(Not contain ND Broker Sub Account) + // GetSubAccountApiList Get sub-account API List + // Description: This endpoint can be used to obtain a list of APIs pertaining to a sub-account (not including ND broker sub-accounts). // Documentation: https://www.kucoin.com/docs-new/api-3470136 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ GetSubAccountApiList(req *GetSubAccountApiListReq, ctx context.Context) (*GetSubAccountApiListResp, error) - // DeleteSubAccountApi Delete SubAccount API + // DeleteSubAccountApi Delete sub-account API // Description: This endpoint can be used to delete sub-account APIs. // Documentation: https://www.kucoin.com/docs-new/api-3470137 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 30 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 30 | + // +-----------------------+------------+ DeleteSubAccountApi(req *DeleteSubAccountApiReq, ctx context.Context) (*DeleteSubAccountApiResp, error) - // GetSpotSubAccountsSummaryV1 Get SubAccount List - Summary Info(V1) - // Description: You can get the user info of all sub-account via this interface It is recommended to use the GET /api/v2/sub/user interface for paging query + // GetSpotSubAccountsSummaryV1 Get sub-account List - Summary Info (V1) + // Description: You can get the user info of all sub-account via this interface; it is recommended to use the GET /api/v2/sub/user interface for paging query // Documentation: https://www.kucoin.com/docs-new/api-3470298 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ // Deprecated GetSpotSubAccountsSummaryV1(ctx context.Context) (*GetSpotSubAccountsSummaryV1Resp, error) - // GetSpotSubAccountListV1 Get SubAccount List - Spot Balance(V1) + // GetSpotSubAccountListV1 Get sub-account List - Spot Balance (V1) // Description: This endpoint returns the account info of all sub-users. // Documentation: https://www.kucoin.com/docs-new/api-3470299 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ // Deprecated GetSpotSubAccountListV1(ctx context.Context) (*GetSpotSubAccountListV1Resp, error) } diff --git a/sdk/golang/pkg/generate/account/subaccount/api_sub_account.template b/sdk/golang/pkg/generate/account/subaccount/api_sub_account.template index 2d8d3f91..b1761d31 100644 --- a/sdk/golang/pkg/generate/account/subaccount/api_sub_account.template +++ b/sdk/golang/pkg/generate/account/subaccount/api_sub_account.template @@ -3,7 +3,7 @@ func TestSubAccountAddSubAccountReq(t *testing.T) { // AddSubAccount - // Add SubAccount + // Add sub-account // /api/v2/sub/user/created builder := subaccount.NewAddSubAccountReqBuilder() @@ -26,7 +26,7 @@ func TestSubAccountAddSubAccountReq(t *testing.T) { func TestSubAccountAddSubAccountMarginPermissionReq(t *testing.T) { // AddSubAccountMarginPermission - // Add SubAccount Margin Permission + // Add sub-account Margin Permission // /api/v3/sub/user/margin/enable builder := subaccount.NewAddSubAccountMarginPermissionReqBuilder() @@ -49,7 +49,7 @@ func TestSubAccountAddSubAccountMarginPermissionReq(t *testing.T) { func TestSubAccountAddSubAccountFuturesPermissionReq(t *testing.T) { // AddSubAccountFuturesPermission - // Add SubAccount Futures Permission + // Add sub-account Futures Permission // /api/v3/sub/user/futures/enable builder := subaccount.NewAddSubAccountFuturesPermissionReqBuilder() @@ -72,7 +72,7 @@ func TestSubAccountAddSubAccountFuturesPermissionReq(t *testing.T) { func TestSubAccountGetSpotSubAccountsSummaryV2Req(t *testing.T) { // GetSpotSubAccountsSummaryV2 - // Get SubAccount List - Summary Info + // Get sub-account List - Summary Info // /api/v2/sub/user builder := subaccount.NewGetSpotSubAccountsSummaryV2ReqBuilder() @@ -95,11 +95,11 @@ func TestSubAccountGetSpotSubAccountsSummaryV2Req(t *testing.T) { func TestSubAccountGetSpotSubAccountDetailReq(t *testing.T) { // GetSpotSubAccountDetail - // Get SubAccount Detail - Balance + // Get sub-account Detail - Balance // /api/v1/sub-accounts/{subUserId} builder := subaccount.NewGetSpotSubAccountDetailReqBuilder() - builder.SetSubUserId(?).SetIncludeBaseAmount(?) + builder.SetSubUserId(?).SetIncludeBaseAmount(?).SetBaseCurrency(?).SetBaseAmount(?) req := builder.Build() resp, err := subaccountApi.GetSpotSubAccountDetail(req, context.TODO()) @@ -118,7 +118,7 @@ func TestSubAccountGetSpotSubAccountDetailReq(t *testing.T) { func TestSubAccountGetSpotSubAccountListV2Req(t *testing.T) { // GetSpotSubAccountListV2 - // Get SubAccount List - Spot Balance(V2) + // Get sub-account List - Spot Balance (V2) // /api/v2/sub-accounts builder := subaccount.NewGetSpotSubAccountListV2ReqBuilder() @@ -141,7 +141,7 @@ func TestSubAccountGetSpotSubAccountListV2Req(t *testing.T) { func TestSubAccountGetFuturesSubAccountListV2Req(t *testing.T) { // GetFuturesSubAccountListV2 - // Get SubAccount List - Futures Balance(V2) + // Get sub-account List - Futures Balance (V2) // /api/v1/account-overview-all builder := subaccount.NewGetFuturesSubAccountListV2ReqBuilder() @@ -164,7 +164,7 @@ func TestSubAccountGetFuturesSubAccountListV2Req(t *testing.T) { func TestSubAccountAddSubAccountApiReq(t *testing.T) { // AddSubAccountApi - // Add SubAccount API + // Add sub-account API // /api/v1/sub/api-key builder := subaccount.NewAddSubAccountApiReqBuilder() @@ -187,7 +187,7 @@ func TestSubAccountAddSubAccountApiReq(t *testing.T) { func TestSubAccountModifySubAccountApiReq(t *testing.T) { // ModifySubAccountApi - // Modify SubAccount API + // Modify sub-account API // /api/v1/sub/api-key/update builder := subaccount.NewModifySubAccountApiReqBuilder() @@ -210,7 +210,7 @@ func TestSubAccountModifySubAccountApiReq(t *testing.T) { func TestSubAccountGetSubAccountApiListReq(t *testing.T) { // GetSubAccountApiList - // Get SubAccount API List + // Get sub-account API List // /api/v1/sub/api-key builder := subaccount.NewGetSubAccountApiListReqBuilder() @@ -233,7 +233,7 @@ func TestSubAccountGetSubAccountApiListReq(t *testing.T) { func TestSubAccountDeleteSubAccountApiReq(t *testing.T) { // DeleteSubAccountApi - // Delete SubAccount API + // Delete sub-account API // /api/v1/sub/api-key builder := subaccount.NewDeleteSubAccountApiReqBuilder() @@ -256,7 +256,7 @@ func TestSubAccountDeleteSubAccountApiReq(t *testing.T) { func TestSubAccountGetSpotSubAccountsSummaryV1Req(t *testing.T) { // GetSpotSubAccountsSummaryV1 - // Get SubAccount List - Summary Info(V1) + // Get sub-account List - Summary Info (V1) // /api/v1/sub/user @@ -276,7 +276,7 @@ func TestSubAccountGetSpotSubAccountsSummaryV1Req(t *testing.T) { func TestSubAccountGetSpotSubAccountListV1Req(t *testing.T) { // GetSpotSubAccountListV1 - // Get SubAccount List - Spot Balance(V1) + // Get sub-account List - Spot Balance (V1) // /api/v1/sub-accounts diff --git a/sdk/golang/pkg/generate/account/subaccount/api_sub_account_test.go b/sdk/golang/pkg/generate/account/subaccount/api_sub_account_test.go index 96274ab3..6ecd0469 100644 --- a/sdk/golang/pkg/generate/account/subaccount/api_sub_account_test.go +++ b/sdk/golang/pkg/generate/account/subaccount/api_sub_account_test.go @@ -9,7 +9,7 @@ import ( func TestSubAccountAddSubAccountReqModel(t *testing.T) { // AddSubAccount - // Add SubAccount + // Add sub-account // /api/v2/sub/user/created data := "{\"password\": \"1234567\", \"remarks\": \"TheRemark\", \"subName\": \"Name1234567\", \"access\": \"Spot\"}" @@ -21,7 +21,7 @@ func TestSubAccountAddSubAccountReqModel(t *testing.T) { func TestSubAccountAddSubAccountRespModel(t *testing.T) { // AddSubAccount - // Add SubAccount + // Add sub-account // /api/v2/sub/user/created data := "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 10,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"userId\": \"63743f07e0c5230001761d08\",\n \"uid\": 169579801,\n \"subName\": \"testapi6\",\n \"status\": 2,\n \"type\": 0,\n \"access\": \"All\",\n \"createdAt\": 1668562696000,\n \"remarks\": \"remarks\",\n \"tradeTypes\": [\n \"Spot\",\n \"Futures\",\n \"Margin\"\n ],\n \"openedTradeTypes\": [\n \"Spot\"\n ],\n \"hostedStatus\": null\n }\n ]\n }\n}" @@ -37,7 +37,7 @@ func TestSubAccountAddSubAccountRespModel(t *testing.T) { func TestSubAccountAddSubAccountMarginPermissionReqModel(t *testing.T) { // AddSubAccountMarginPermission - // Add SubAccount Margin Permission + // Add sub-account Margin Permission // /api/v3/sub/user/margin/enable data := "{\"uid\": \"169579801\"}" @@ -49,7 +49,7 @@ func TestSubAccountAddSubAccountMarginPermissionReqModel(t *testing.T) { func TestSubAccountAddSubAccountMarginPermissionRespModel(t *testing.T) { // AddSubAccountMarginPermission - // Add SubAccount Margin Permission + // Add sub-account Margin Permission // /api/v3/sub/user/margin/enable data := "{\n \"code\": \"200000\",\n \"data\": null\n}" @@ -65,7 +65,7 @@ func TestSubAccountAddSubAccountMarginPermissionRespModel(t *testing.T) { func TestSubAccountAddSubAccountFuturesPermissionReqModel(t *testing.T) { // AddSubAccountFuturesPermission - // Add SubAccount Futures Permission + // Add sub-account Futures Permission // /api/v3/sub/user/futures/enable data := "{\"uid\": \"169579801\"}" @@ -77,7 +77,7 @@ func TestSubAccountAddSubAccountFuturesPermissionReqModel(t *testing.T) { func TestSubAccountAddSubAccountFuturesPermissionRespModel(t *testing.T) { // AddSubAccountFuturesPermission - // Add SubAccount Futures Permission + // Add sub-account Futures Permission // /api/v3/sub/user/futures/enable data := "{\n \"code\": \"200000\",\n \"data\": null\n}" @@ -93,7 +93,7 @@ func TestSubAccountAddSubAccountFuturesPermissionRespModel(t *testing.T) { func TestSubAccountGetSpotSubAccountsSummaryV2ReqModel(t *testing.T) { // GetSpotSubAccountsSummaryV2 - // Get SubAccount List - Summary Info + // Get sub-account List - Summary Info // /api/v2/sub/user data := "{\"currentPage\": 1, \"pageSize\": 10}" @@ -105,7 +105,7 @@ func TestSubAccountGetSpotSubAccountsSummaryV2ReqModel(t *testing.T) { func TestSubAccountGetSpotSubAccountsSummaryV2RespModel(t *testing.T) { // GetSpotSubAccountsSummaryV2 - // Get SubAccount List - Summary Info + // Get sub-account List - Summary Info // /api/v2/sub/user data := "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 10,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"userId\": \"63743f07e0c5230001761d08\",\n \"uid\": 169579801,\n \"subName\": \"testapi6\",\n \"status\": 2,\n \"type\": 0,\n \"access\": \"All\",\n \"createdAt\": 1668562696000,\n \"remarks\": \"remarks\",\n \"tradeTypes\": [\n \"Spot\",\n \"Futures\",\n \"Margin\"\n ],\n \"openedTradeTypes\": [\n \"Spot\"\n ],\n \"hostedStatus\": null\n }\n ]\n }\n}" @@ -121,10 +121,10 @@ func TestSubAccountGetSpotSubAccountsSummaryV2RespModel(t *testing.T) { func TestSubAccountGetSpotSubAccountDetailReqModel(t *testing.T) { // GetSpotSubAccountDetail - // Get SubAccount Detail - Balance + // Get sub-account Detail - Balance // /api/v1/sub-accounts/{subUserId} - data := "{\"subUserId\": \"63743f07e0c5230001761d08\", \"includeBaseAmount\": true}" + data := "{\"subUserId\": \"63743f07e0c5230001761d08\", \"includeBaseAmount\": true, \"baseCurrency\": \"example_string_default_value\", \"baseAmount\": \"example_string_default_value\"}" req := &GetSpotSubAccountDetailReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() @@ -133,7 +133,7 @@ func TestSubAccountGetSpotSubAccountDetailReqModel(t *testing.T) { func TestSubAccountGetSpotSubAccountDetailRespModel(t *testing.T) { // GetSpotSubAccountDetail - // Get SubAccount Detail - Balance + // Get sub-account Detail - Balance // /api/v1/sub-accounts/{subUserId} data := "{\n \"code\": \"200000\",\n \"data\": {\n \"subUserId\": \"63743f07e0c5230001761d08\",\n \"subName\": \"testapi6\",\n \"mainAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62384.3\",\n \"baseAmount\": \"0.00000016\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"tradeAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62384.3\",\n \"baseAmount\": \"0.00000016\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"marginAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62384.3\",\n \"baseAmount\": \"0.00000016\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"tradeHFAccounts\": []\n }\n}" @@ -149,7 +149,7 @@ func TestSubAccountGetSpotSubAccountDetailRespModel(t *testing.T) { func TestSubAccountGetSpotSubAccountListV2ReqModel(t *testing.T) { // GetSpotSubAccountListV2 - // Get SubAccount List - Spot Balance(V2) + // Get sub-account List - Spot Balance (V2) // /api/v2/sub-accounts data := "{\"currentPage\": 1, \"pageSize\": 10}" @@ -161,7 +161,7 @@ func TestSubAccountGetSpotSubAccountListV2ReqModel(t *testing.T) { func TestSubAccountGetSpotSubAccountListV2RespModel(t *testing.T) { // GetSpotSubAccountListV2 - // Get SubAccount List - Spot Balance(V2) + // Get sub-account List - Spot Balance (V2) // /api/v2/sub-accounts data := "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 10,\n \"totalNum\": 3,\n \"totalPage\": 1,\n \"items\": [\n {\n \"subUserId\": \"63743f07e0c5230001761d08\",\n \"subName\": \"testapi6\",\n \"mainAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62514.5\",\n \"baseAmount\": \"0.00000015\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"tradeAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62514.5\",\n \"baseAmount\": \"0.00000015\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"marginAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62514.5\",\n \"baseAmount\": \"0.00000015\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"tradeHFAccounts\": []\n },\n {\n \"subUserId\": \"670538a31037eb000115b076\",\n \"subName\": \"Name1234567\",\n \"mainAccounts\": [],\n \"tradeAccounts\": [],\n \"marginAccounts\": [],\n \"tradeHFAccounts\": []\n },\n {\n \"subUserId\": \"66b0c0905fc1480001c14c36\",\n \"subName\": \"LTkucoin1491\",\n \"mainAccounts\": [],\n \"tradeAccounts\": [],\n \"marginAccounts\": [],\n \"tradeHFAccounts\": []\n }\n ]\n }\n}" @@ -177,7 +177,7 @@ func TestSubAccountGetSpotSubAccountListV2RespModel(t *testing.T) { func TestSubAccountGetFuturesSubAccountListV2ReqModel(t *testing.T) { // GetFuturesSubAccountListV2 - // Get SubAccount List - Futures Balance(V2) + // Get sub-account List - Futures Balance (V2) // /api/v1/account-overview-all data := "{\"currency\": \"USDT\"}" @@ -189,7 +189,7 @@ func TestSubAccountGetFuturesSubAccountListV2ReqModel(t *testing.T) { func TestSubAccountGetFuturesSubAccountListV2RespModel(t *testing.T) { // GetFuturesSubAccountListV2 - // Get SubAccount List - Futures Balance(V2) + // Get sub-account List - Futures Balance (V2) // /api/v1/account-overview-all data := "{\n \"code\": \"200000\",\n \"data\": {\n \"summary\": {\n \"accountEquityTotal\": 103.899081508,\n \"unrealisedPNLTotal\": 38.81075,\n \"marginBalanceTotal\": 65.336985668,\n \"positionMarginTotal\": 68.9588320683,\n \"orderMarginTotal\": 0,\n \"frozenFundsTotal\": 0,\n \"availableBalanceTotal\": 67.2492494397,\n \"currency\": \"USDT\"\n },\n \"accounts\": [\n {\n \"accountName\": \"Name1234567\",\n \"accountEquity\": 0,\n \"unrealisedPNL\": 0,\n \"marginBalance\": 0,\n \"positionMargin\": 0,\n \"orderMargin\": 0,\n \"frozenFunds\": 0,\n \"availableBalance\": 0,\n \"currency\": \"USDT\"\n },\n {\n \"accountName\": \"LTkucoin1491\",\n \"accountEquity\": 0,\n \"unrealisedPNL\": 0,\n \"marginBalance\": 0,\n \"positionMargin\": 0,\n \"orderMargin\": 0,\n \"frozenFunds\": 0,\n \"availableBalance\": 0,\n \"currency\": \"USDT\"\n },\n {\n \"accountName\": \"manage112233\",\n \"accountEquity\": 0,\n \"unrealisedPNL\": 0,\n \"marginBalance\": 0,\n \"positionMargin\": 0,\n \"orderMargin\": 0,\n \"frozenFunds\": 0,\n \"availableBalance\": 0,\n \"currency\": \"USDT\"\n },\n {\n \"accountName\": \"testapi6\",\n \"accountEquity\": 27.30545128,\n \"unrealisedPNL\": 22.549,\n \"marginBalance\": 4.75645128,\n \"positionMargin\": 24.1223749975,\n \"orderMargin\": 0,\n \"frozenFunds\": 0,\n \"availableBalance\": 25.7320762825,\n \"currency\": \"USDT\"\n },\n {\n \"accountName\": \"main\",\n \"accountEquity\": 76.593630228,\n \"unrealisedPNL\": 16.26175,\n \"marginBalance\": 60.580534388,\n \"positionMargin\": 44.8364570708,\n \"orderMargin\": 0,\n \"frozenFunds\": 0,\n \"availableBalance\": 41.5171731572,\n \"currency\": \"USDT\"\n }\n ]\n }\n}" @@ -205,7 +205,7 @@ func TestSubAccountGetFuturesSubAccountListV2RespModel(t *testing.T) { func TestSubAccountAddSubAccountApiReqModel(t *testing.T) { // AddSubAccountApi - // Add SubAccount API + // Add sub-account API // /api/v1/sub/api-key data := "{\"subName\": \"testapi6\", \"passphrase\": \"11223344\", \"remark\": \"TheRemark\", \"permission\": \"General,Spot,Futures\"}" @@ -217,7 +217,7 @@ func TestSubAccountAddSubAccountApiReqModel(t *testing.T) { func TestSubAccountAddSubAccountApiRespModel(t *testing.T) { // AddSubAccountApi - // Add SubAccount API + // Add sub-account API // /api/v1/sub/api-key data := "{\n \"code\": \"200000\",\n \"data\": {\n \"subName\": \"testapi6\",\n \"remark\": \"TheRemark\",\n \"apiKey\": \"670621e3a25958000159c82f\",\n \"apiSecret\": \"46fd8974******896f005b2340\",\n \"apiVersion\": 3,\n \"passphrase\": \"11223344\",\n \"permission\": \"General,Futures\",\n \"createdAt\": 1728455139000\n }\n}" @@ -233,7 +233,7 @@ func TestSubAccountAddSubAccountApiRespModel(t *testing.T) { func TestSubAccountModifySubAccountApiReqModel(t *testing.T) { // ModifySubAccountApi - // Modify SubAccount API + // Modify sub-account API // /api/v1/sub/api-key/update data := "{\"subName\": \"testapi6\", \"apiKey\": \"670621e3a25958000159c82f\", \"passphrase\": \"11223344\", \"permission\": \"General,Spot,Futures\"}" @@ -245,7 +245,7 @@ func TestSubAccountModifySubAccountApiReqModel(t *testing.T) { func TestSubAccountModifySubAccountApiRespModel(t *testing.T) { // ModifySubAccountApi - // Modify SubAccount API + // Modify sub-account API // /api/v1/sub/api-key/update data := "{\n \"code\": \"200000\",\n \"data\": {\n \"subName\": \"testapi6\",\n \"apiKey\": \"670621e3a25958000159c82f\",\n \"permission\": \"General,Futures,Spot\"\n }\n}" @@ -261,7 +261,7 @@ func TestSubAccountModifySubAccountApiRespModel(t *testing.T) { func TestSubAccountGetSubAccountApiListReqModel(t *testing.T) { // GetSubAccountApiList - // Get SubAccount API List + // Get sub-account API List // /api/v1/sub/api-key data := "{\"apiKey\": \"example_string_default_value\", \"subName\": \"testapi6\"}" @@ -273,7 +273,7 @@ func TestSubAccountGetSubAccountApiListReqModel(t *testing.T) { func TestSubAccountGetSubAccountApiListRespModel(t *testing.T) { // GetSubAccountApiList - // Get SubAccount API List + // Get sub-account API List // /api/v1/sub/api-key data := "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"subName\": \"apiSdkTest\",\n \"remark\": \"sdk_test_integration\",\n \"apiKey\": \"673eab2a955ebf000195d7e4\",\n \"apiVersion\": 3,\n \"permission\": \"General\",\n \"ipWhitelist\": \"10.**.1\",\n \"createdAt\": 1732160298000,\n \"uid\": 215112467,\n \"isMaster\": false\n }\n ]\n}" @@ -289,7 +289,7 @@ func TestSubAccountGetSubAccountApiListRespModel(t *testing.T) { func TestSubAccountDeleteSubAccountApiReqModel(t *testing.T) { // DeleteSubAccountApi - // Delete SubAccount API + // Delete sub-account API // /api/v1/sub/api-key data := "{\"apiKey\": \"670621e3a25958000159c82f\", \"subName\": \"testapi6\", \"passphrase\": \"11223344\"}" @@ -301,7 +301,7 @@ func TestSubAccountDeleteSubAccountApiReqModel(t *testing.T) { func TestSubAccountDeleteSubAccountApiRespModel(t *testing.T) { // DeleteSubAccountApi - // Delete SubAccount API + // Delete sub-account API // /api/v1/sub/api-key data := "{\"code\":\"200000\",\"data\":{\"subName\":\"testapi6\",\"apiKey\":\"670621e3a25958000159c82f\"}}" @@ -317,14 +317,14 @@ func TestSubAccountDeleteSubAccountApiRespModel(t *testing.T) { func TestSubAccountGetSpotSubAccountsSummaryV1ReqModel(t *testing.T) { // GetSpotSubAccountsSummaryV1 - // Get SubAccount List - Summary Info(V1) + // Get sub-account List - Summary Info (V1) // /api/v1/sub/user } func TestSubAccountGetSpotSubAccountsSummaryV1RespModel(t *testing.T) { // GetSpotSubAccountsSummaryV1 - // Get SubAccount List - Summary Info(V1) + // Get sub-account List - Summary Info (V1) // /api/v1/sub/user data := "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"userId\": \"63743f07e0c5230001761d08\",\n \"uid\": 169579801,\n \"subName\": \"testapi6\",\n \"type\": 0,\n \"remarks\": \"remarks\",\n \"access\": \"All\"\n },\n {\n \"userId\": \"670538a31037eb000115b076\",\n \"uid\": 225139445,\n \"subName\": \"Name1234567\",\n \"type\": 0,\n \"remarks\": \"TheRemark\",\n \"access\": \"All\"\n }\n ]\n}" @@ -340,14 +340,14 @@ func TestSubAccountGetSpotSubAccountsSummaryV1RespModel(t *testing.T) { func TestSubAccountGetSpotSubAccountListV1ReqModel(t *testing.T) { // GetSpotSubAccountListV1 - // Get SubAccount List - Spot Balance(V1) + // Get sub-account List - Spot Balance (V1) // /api/v1/sub-accounts } func TestSubAccountGetSpotSubAccountListV1RespModel(t *testing.T) { // GetSpotSubAccountListV1 - // Get SubAccount List - Spot Balance(V1) + // Get sub-account List - Spot Balance (V1) // /api/v1/sub-accounts data := "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"subUserId\": \"63743f07e0c5230001761d08\",\n \"subName\": \"testapi6\",\n \"mainAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62489.8\",\n \"baseAmount\": \"0.00000016\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"tradeAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62489.8\",\n \"baseAmount\": \"0.00000016\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"marginAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62489.8\",\n \"baseAmount\": \"0.00000016\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"tradeHFAccounts\": []\n },\n {\n \"subUserId\": \"670538a31037eb000115b076\",\n \"subName\": \"Name1234567\",\n \"mainAccounts\": [],\n \"tradeAccounts\": [],\n \"marginAccounts\": [],\n \"tradeHFAccounts\": []\n },\n {\n \"subUserId\": \"66b0c0905fc1480001c14c36\",\n \"subName\": \"LTkucoin1491\",\n \"mainAccounts\": [],\n \"tradeAccounts\": [],\n \"marginAccounts\": [],\n \"tradeHFAccounts\": []\n }\n ]\n}" diff --git a/sdk/golang/pkg/generate/account/subaccount/types_add_sub_account_api_req.go b/sdk/golang/pkg/generate/account/subaccount/types_add_sub_account_api_req.go index 9b1aa44a..84152d46 100644 --- a/sdk/golang/pkg/generate/account/subaccount/types_add_sub_account_api_req.go +++ b/sdk/golang/pkg/generate/account/subaccount/types_add_sub_account_api_req.go @@ -4,15 +4,15 @@ package subaccount // AddSubAccountApiReq struct for AddSubAccountApiReq type AddSubAccountApiReq struct { - // Password(Must contain 7-32 characters. Cannot contain any spaces.) + // Password (Must contain 7–32 characters. Cannot contain any spaces.) Passphrase string `json:"passphrase,omitempty"` - // Remarks(1~24 characters) + // Remarks (1–24 characters) Remark string `json:"remark,omitempty"` - // [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") + // [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") Permission *string `json:"permission,omitempty"` - // IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) + // IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) IpWhitelist *string `json:"ipWhitelist,omitempty"` - // API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 + // API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 Expire *string `json:"expire,omitempty"` // Sub-account name, create sub account name of API Key. SubName string `json:"subName,omitempty"` @@ -62,31 +62,31 @@ func NewAddSubAccountApiReqBuilder() *AddSubAccountApiReqBuilder { return &AddSubAccountApiReqBuilder{obj: NewAddSubAccountApiReqWithDefaults()} } -// Password(Must contain 7-32 characters. Cannot contain any spaces.) +// Password (Must contain 7–32 characters. Cannot contain any spaces.) func (builder *AddSubAccountApiReqBuilder) SetPassphrase(value string) *AddSubAccountApiReqBuilder { builder.obj.Passphrase = value return builder } -// Remarks(1~24 characters) +// Remarks (1–24 characters) func (builder *AddSubAccountApiReqBuilder) SetRemark(value string) *AddSubAccountApiReqBuilder { builder.obj.Remark = value return builder } -// [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") +// [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") func (builder *AddSubAccountApiReqBuilder) SetPermission(value string) *AddSubAccountApiReqBuilder { builder.obj.Permission = &value return builder } -// IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) +// IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) func (builder *AddSubAccountApiReqBuilder) SetIpWhitelist(value string) *AddSubAccountApiReqBuilder { builder.obj.IpWhitelist = &value return builder } -// API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 +// API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 func (builder *AddSubAccountApiReqBuilder) SetExpire(value string) *AddSubAccountApiReqBuilder { builder.obj.Expire = &value return builder diff --git a/sdk/golang/pkg/generate/account/subaccount/types_add_sub_account_api_resp.go b/sdk/golang/pkg/generate/account/subaccount/types_add_sub_account_api_resp.go index 89e707d3..d24ca346 100644 --- a/sdk/golang/pkg/generate/account/subaccount/types_add_sub_account_api_resp.go +++ b/sdk/golang/pkg/generate/account/subaccount/types_add_sub_account_api_resp.go @@ -26,7 +26,7 @@ type AddSubAccountApiResp struct { Permission string `json:"permission,omitempty"` // IP whitelist IpWhitelist *string `json:"ipWhitelist,omitempty"` - // Time of the event + // Time of event CreatedAt int64 `json:"createdAt,omitempty"` } diff --git a/sdk/golang/pkg/generate/account/subaccount/types_add_sub_account_req.go b/sdk/golang/pkg/generate/account/subaccount/types_add_sub_account_req.go index 5a2b869e..d02efcfa 100644 --- a/sdk/golang/pkg/generate/account/subaccount/types_add_sub_account_req.go +++ b/sdk/golang/pkg/generate/account/subaccount/types_add_sub_account_req.go @@ -4,11 +4,11 @@ package subaccount // AddSubAccountReq struct for AddSubAccountReq type AddSubAccountReq struct { - // Password(7-24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) + // Password (7–24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) Password string `json:"password,omitempty"` - // Remarks(1~24 characters) + // Remarks (1–24 characters) Remarks *string `json:"remarks,omitempty"` - // Sub-account name(must contain 7-32 characters, at least one number and one letter. Cannot contain any spaces.) + // Sub-account name (must contain 7–32 characters, at least one number and one letter. Cannot contain any spaces.) SubName string `json:"subName,omitempty"` // Permission (types include Spot, Futures, Margin permissions, which can be used alone or in combination). Access string `json:"access,omitempty"` @@ -48,19 +48,19 @@ func NewAddSubAccountReqBuilder() *AddSubAccountReqBuilder { return &AddSubAccountReqBuilder{obj: NewAddSubAccountReqWithDefaults()} } -// Password(7-24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) +// Password (7–24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) func (builder *AddSubAccountReqBuilder) SetPassword(value string) *AddSubAccountReqBuilder { builder.obj.Password = value return builder } -// Remarks(1~24 characters) +// Remarks (1–24 characters) func (builder *AddSubAccountReqBuilder) SetRemarks(value string) *AddSubAccountReqBuilder { builder.obj.Remarks = &value return builder } -// Sub-account name(must contain 7-32 characters, at least one number and one letter. Cannot contain any spaces.) +// Sub-account name (must contain 7–32 characters, at least one number and one letter. Cannot contain any spaces.) func (builder *AddSubAccountReqBuilder) SetSubName(value string) *AddSubAccountReqBuilder { builder.obj.SubName = value return builder diff --git a/sdk/golang/pkg/generate/account/subaccount/types_delete_sub_account_api_req.go b/sdk/golang/pkg/generate/account/subaccount/types_delete_sub_account_api_req.go index 07186940..cb18677f 100644 --- a/sdk/golang/pkg/generate/account/subaccount/types_delete_sub_account_api_req.go +++ b/sdk/golang/pkg/generate/account/subaccount/types_delete_sub_account_api_req.go @@ -8,7 +8,7 @@ type DeleteSubAccountApiReq struct { ApiKey *string `json:"apiKey,omitempty" url:"apiKey,omitempty"` // Sub-account name. SubName *string `json:"subName,omitempty" url:"subName,omitempty"` - // Password(Password of the API key) + // Password (password of the API key) Passphrase *string `json:"passphrase,omitempty" url:"passphrase,omitempty"` } @@ -54,7 +54,7 @@ func (builder *DeleteSubAccountApiReqBuilder) SetSubName(value string) *DeleteSu return builder } -// Password(Password of the API key) +// Password (password of the API key) func (builder *DeleteSubAccountApiReqBuilder) SetPassphrase(value string) *DeleteSubAccountApiReqBuilder { builder.obj.Passphrase = &value return builder diff --git a/sdk/golang/pkg/generate/account/subaccount/types_get_futures_sub_account_list_v2_req.go b/sdk/golang/pkg/generate/account/subaccount/types_get_futures_sub_account_list_v2_req.go index bb78c4bf..67c218d9 100644 --- a/sdk/golang/pkg/generate/account/subaccount/types_get_futures_sub_account_list_v2_req.go +++ b/sdk/golang/pkg/generate/account/subaccount/types_get_futures_sub_account_list_v2_req.go @@ -4,7 +4,7 @@ package subaccount // GetFuturesSubAccountListV2Req struct for GetFuturesSubAccountListV2Req type GetFuturesSubAccountListV2Req struct { - // Currecny, Default XBT + // Currency, Default XBT Currency *string `json:"currency,omitempty" url:"currency,omitempty"` } @@ -40,7 +40,7 @@ func NewGetFuturesSubAccountListV2ReqBuilder() *GetFuturesSubAccountListV2ReqBui return &GetFuturesSubAccountListV2ReqBuilder{obj: NewGetFuturesSubAccountListV2ReqWithDefaults()} } -// Currecny, Default XBT +// Currency, Default XBT func (builder *GetFuturesSubAccountListV2ReqBuilder) SetCurrency(value string) *GetFuturesSubAccountListV2ReqBuilder { builder.obj.Currency = &value return builder diff --git a/sdk/golang/pkg/generate/account/subaccount/types_get_futures_sub_account_list_v2_summary.go b/sdk/golang/pkg/generate/account/subaccount/types_get_futures_sub_account_list_v2_summary.go index 0d446b8e..930cbf51 100644 --- a/sdk/golang/pkg/generate/account/subaccount/types_get_futures_sub_account_list_v2_summary.go +++ b/sdk/golang/pkg/generate/account/subaccount/types_get_futures_sub_account_list_v2_summary.go @@ -6,7 +6,7 @@ package subaccount type GetFuturesSubAccountListV2Summary struct { // Total Account Equity AccountEquityTotal float32 `json:"accountEquityTotal,omitempty"` - // Total unrealisedPNL + // Total unrealizedPNL UnrealisedPNLTotal float32 `json:"unrealisedPNLTotal,omitempty"` // Total Margin Balance MarginBalanceTotal float32 `json:"marginBalanceTotal,omitempty"` @@ -15,7 +15,7 @@ type GetFuturesSubAccountListV2Summary struct { OrderMarginTotal float32 `json:"orderMarginTotal,omitempty"` // Total frozen funds for withdrawal and out-transfer FrozenFundsTotal float32 `json:"frozenFundsTotal,omitempty"` - // total available balance + // Total available balance AvailableBalanceTotal float32 `json:"availableBalanceTotal,omitempty"` Currency string `json:"currency,omitempty"` } diff --git a/sdk/golang/pkg/generate/account/subaccount/types_get_spot_sub_account_detail_req.go b/sdk/golang/pkg/generate/account/subaccount/types_get_spot_sub_account_detail_req.go index a6ac94a2..145f3744 100644 --- a/sdk/golang/pkg/generate/account/subaccount/types_get_spot_sub_account_detail_req.go +++ b/sdk/golang/pkg/generate/account/subaccount/types_get_spot_sub_account_detail_req.go @@ -6,14 +6,20 @@ package subaccount type GetSpotSubAccountDetailReq struct { // the userID of a sub-account. SubUserId *string `json:"subUserId,omitempty" path:"subUserId" url:"-"` - // false: do not display the currency which asset is 0, true: display all currency + // False: Do not display currencies with 0 assets; True: display all currencies IncludeBaseAmount *bool `json:"includeBaseAmount,omitempty" url:"includeBaseAmount,omitempty"` + // Specify the currency used to convert assets + BaseCurrency *string `json:"baseCurrency,omitempty" url:"baseCurrency,omitempty"` + // The currency balance specified must be greater than or equal to the amount + BaseAmount *string `json:"baseAmount,omitempty" url:"baseAmount,omitempty"` } // NewGetSpotSubAccountDetailReq instantiates a new GetSpotSubAccountDetailReq object // This constructor will assign default values to properties that have it defined func NewGetSpotSubAccountDetailReq() *GetSpotSubAccountDetailReq { this := GetSpotSubAccountDetailReq{} + var includeBaseAmount bool = false + this.IncludeBaseAmount = &includeBaseAmount return &this } @@ -21,6 +27,8 @@ func NewGetSpotSubAccountDetailReq() *GetSpotSubAccountDetailReq { // This constructor will only assign default values to properties that have it defined, func NewGetSpotSubAccountDetailReqWithDefaults() *GetSpotSubAccountDetailReq { this := GetSpotSubAccountDetailReq{} + var includeBaseAmount bool = false + this.IncludeBaseAmount = &includeBaseAmount return &this } @@ -28,6 +36,8 @@ func (o *GetSpotSubAccountDetailReq) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} toSerialize["subUserId"] = o.SubUserId toSerialize["includeBaseAmount"] = o.IncludeBaseAmount + toSerialize["baseCurrency"] = o.BaseCurrency + toSerialize["baseAmount"] = o.BaseAmount return toSerialize } @@ -45,12 +55,24 @@ func (builder *GetSpotSubAccountDetailReqBuilder) SetSubUserId(value string) *Ge return builder } -// false: do not display the currency which asset is 0, true: display all currency +// False: Do not display currencies with 0 assets; True: display all currencies func (builder *GetSpotSubAccountDetailReqBuilder) SetIncludeBaseAmount(value bool) *GetSpotSubAccountDetailReqBuilder { builder.obj.IncludeBaseAmount = &value return builder } +// Specify the currency used to convert assets +func (builder *GetSpotSubAccountDetailReqBuilder) SetBaseCurrency(value string) *GetSpotSubAccountDetailReqBuilder { + builder.obj.BaseCurrency = &value + return builder +} + +// The currency balance specified must be greater than or equal to the amount +func (builder *GetSpotSubAccountDetailReqBuilder) SetBaseAmount(value string) *GetSpotSubAccountDetailReqBuilder { + builder.obj.BaseAmount = &value + return builder +} + func (builder *GetSpotSubAccountDetailReqBuilder) Build() *GetSpotSubAccountDetailReq { return builder.obj } diff --git a/sdk/golang/pkg/generate/account/subaccount/types_get_spot_sub_accounts_summary_v2_items.go b/sdk/golang/pkg/generate/account/subaccount/types_get_spot_sub_accounts_summary_v2_items.go index 94317723..10120850 100644 --- a/sdk/golang/pkg/generate/account/subaccount/types_get_spot_sub_accounts_summary_v2_items.go +++ b/sdk/golang/pkg/generate/account/subaccount/types_get_spot_sub_accounts_summary_v2_items.go @@ -4,7 +4,7 @@ package subaccount // GetSpotSubAccountsSummaryV2Items struct for GetSpotSubAccountsSummaryV2Items type GetSpotSubAccountsSummaryV2Items struct { - // Sub-account User Id + // Sub-account User ID UserId string `json:"userId,omitempty"` // Sub-account UID Uid int32 `json:"uid,omitempty"` @@ -16,13 +16,13 @@ type GetSpotSubAccountsSummaryV2Items struct { Type int32 `json:"type,omitempty"` // Sub-account Permission Access string `json:"access,omitempty"` - // Time of the event + // Time of event CreatedAt int64 `json:"createdAt,omitempty"` // Remarks Remarks string `json:"remarks,omitempty"` - // Subaccount Permissions + // Sub-account Permissions TradeTypes []string `json:"tradeTypes,omitempty"` - // Subaccount active permissions,If do not have the corresponding permissions, need to log in to the sub-account and go to the corresponding web page to activate + // Sub-account active permissions: If you do not have the corresponding permissions, you must log in to the sub-account and go to the corresponding web page to activate. OpenedTradeTypes []string `json:"openedTradeTypes,omitempty"` HostedStatus string `json:"hostedStatus,omitempty"` } diff --git a/sdk/golang/pkg/generate/account/subaccount/types_get_spot_sub_accounts_summary_v2_resp.go b/sdk/golang/pkg/generate/account/subaccount/types_get_spot_sub_accounts_summary_v2_resp.go index 12307c3e..5751a3eb 100644 --- a/sdk/golang/pkg/generate/account/subaccount/types_get_spot_sub_accounts_summary_v2_resp.go +++ b/sdk/golang/pkg/generate/account/subaccount/types_get_spot_sub_accounts_summary_v2_resp.go @@ -16,7 +16,7 @@ type GetSpotSubAccountsSummaryV2Resp struct { PageSize int32 `json:"pageSize,omitempty"` // Total number of messages TotalNum int32 `json:"totalNum,omitempty"` - // Total number of page + // Total number of pages TotalPage int32 `json:"totalPage,omitempty"` Items []GetSpotSubAccountsSummaryV2Items `json:"items,omitempty"` } diff --git a/sdk/golang/pkg/generate/account/subaccount/types_modify_sub_account_api_req.go b/sdk/golang/pkg/generate/account/subaccount/types_modify_sub_account_api_req.go index 10e136c2..44f31a37 100644 --- a/sdk/golang/pkg/generate/account/subaccount/types_modify_sub_account_api_req.go +++ b/sdk/golang/pkg/generate/account/subaccount/types_modify_sub_account_api_req.go @@ -4,17 +4,17 @@ package subaccount // ModifySubAccountApiReq struct for ModifySubAccountApiReq type ModifySubAccountApiReq struct { - // Password(Must contain 7-32 characters. Cannot contain any spaces.) + // Password (Must contain 7–32 characters. Cannot contain any spaces.) Passphrase string `json:"passphrase,omitempty"` - // [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") + // [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") Permission *string `json:"permission,omitempty"` - // IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) + // IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) IpWhitelist *string `json:"ipWhitelist,omitempty"` - // API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 + // API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 Expire *string `json:"expire,omitempty"` // Sub-account name, create sub account name of API Key. SubName string `json:"subName,omitempty"` - // API-Key(Sub-account APIKey) + // API-Key (Sub-account APIKey) ApiKey string `json:"apiKey,omitempty"` } @@ -62,25 +62,25 @@ func NewModifySubAccountApiReqBuilder() *ModifySubAccountApiReqBuilder { return &ModifySubAccountApiReqBuilder{obj: NewModifySubAccountApiReqWithDefaults()} } -// Password(Must contain 7-32 characters. Cannot contain any spaces.) +// Password (Must contain 7–32 characters. Cannot contain any spaces.) func (builder *ModifySubAccountApiReqBuilder) SetPassphrase(value string) *ModifySubAccountApiReqBuilder { builder.obj.Passphrase = value return builder } -// [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") +// [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") func (builder *ModifySubAccountApiReqBuilder) SetPermission(value string) *ModifySubAccountApiReqBuilder { builder.obj.Permission = &value return builder } -// IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) +// IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) func (builder *ModifySubAccountApiReqBuilder) SetIpWhitelist(value string) *ModifySubAccountApiReqBuilder { builder.obj.IpWhitelist = &value return builder } -// API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 +// API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 func (builder *ModifySubAccountApiReqBuilder) SetExpire(value string) *ModifySubAccountApiReqBuilder { builder.obj.Expire = &value return builder @@ -92,7 +92,7 @@ func (builder *ModifySubAccountApiReqBuilder) SetSubName(value string) *ModifySu return builder } -// API-Key(Sub-account APIKey) +// API-Key (Sub-account APIKey) func (builder *ModifySubAccountApiReqBuilder) SetApiKey(value string) *ModifySubAccountApiReqBuilder { builder.obj.ApiKey = value return builder diff --git a/sdk/golang/pkg/generate/account/transfer/api_transfer.go b/sdk/golang/pkg/generate/account/transfer/api_transfer.go index 5cb8880f..6f60a0f7 100644 --- a/sdk/golang/pkg/generate/account/transfer/api_transfer.go +++ b/sdk/golang/pkg/generate/account/transfer/api_transfer.go @@ -12,105 +12,105 @@ type TransferAPI interface { // GetTransferQuotas Get Transfer Quotas // Description: This endpoint returns the transferable balance of a specified account. // Documentation: https://www.kucoin.com/docs-new/api-3470148 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ GetTransferQuotas(req *GetTransferQuotasReq, ctx context.Context) (*GetTransferQuotasResp, error) // FlexTransfer Flex Transfer - // Description: This interface can be used for transfers between master and sub accounts and inner transfers + // Description: This interface can be used for transfers between master- and sub-accounts and transfers // Documentation: https://www.kucoin.com/docs-new/api-3470147 - // +---------------------+---------------+ - // | Extra API Info | Value | - // +---------------------+---------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FLEXTRANSFERS | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 4 | - // +---------------------+---------------+ + // +-----------------------+---------------+ + // | Extra API Info | Value | + // +-----------------------+---------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FLEXTRANSFERS | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 4 | + // +-----------------------+---------------+ FlexTransfer(req *FlexTransferReq, ctx context.Context) (*FlexTransferResp, error) - // SubAccountTransfer SubAccount Transfer + // SubAccountTransfer Sub-account Transfer // Description: Funds in the main account, trading account and margin account of a Master Account can be transferred to the main account, trading account, futures account and margin account of its Sub-Account. The futures account of both the Master Account and Sub-Account can only accept funds transferred in from the main account, trading account and margin account and cannot transfer out to these accounts. // Documentation: https://www.kucoin.com/docs-new/api-3470301 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 30 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 30 | + // +-----------------------+------------+ // Deprecated SubAccountTransfer(req *SubAccountTransferReq, ctx context.Context) (*SubAccountTransferResp, error) - // InnerTransfer Inner Transfer - // Description: This API endpoint can be used to transfer funds between accounts internally. Users can transfer funds between their account free of charge. + // InnerTransfer Internal Transfer + // Description: This API endpoint can be used to transfer funds between accounts internally. Users can transfer funds between their accounts free of charge. // Documentation: https://www.kucoin.com/docs-new/api-3470302 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 10 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+------------+ // Deprecated InnerTransfer(req *InnerTransferReq, ctx context.Context) (*InnerTransferResp, error) + // GetFuturesAccountTransferOutLedger Get Futures Account Transfer Out Ledger + // Description: Futures account transfer out ledgers can be obtained at this endpoint. + // Documentation: https://www.kucoin.com/docs-new/api-3470307 + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ + // Deprecated + GetFuturesAccountTransferOutLedger(req *GetFuturesAccountTransferOutLedgerReq, ctx context.Context) (*GetFuturesAccountTransferOutLedgerResp, error) + // FuturesAccountTransferOut Futures Account Transfer Out // Description: The amount to be transferred will be deducted from the KuCoin Futures Account. Please ensure that you have sufficient funds in your KuCoin Futures Account, or the transfer will fail. // Documentation: https://www.kucoin.com/docs-new/api-3470303 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ // Deprecated FuturesAccountTransferOut(req *FuturesAccountTransferOutReq, ctx context.Context) (*FuturesAccountTransferOutResp, error) // FuturesAccountTransferIn Futures Account Transfer In - // Description: The amount to be transferred will be deducted from the payAccount. Please ensure that you have sufficient funds in your payAccount Account, or the transfer will fail. + // Description: The amount to be transferred will be deducted from the payAccount. Please ensure that you have sufficient funds in your payAccount account, or the transfer will fail. // Documentation: https://www.kucoin.com/docs-new/api-3470304 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ // Deprecated FuturesAccountTransferIn(req *FuturesAccountTransferInReq, ctx context.Context) (*FuturesAccountTransferInResp, error) - - // GetFuturesAccountTransferOutLedger Get Futures Account Transfer Out Ledger - // Description: This endpoint can get futures account transfer out ledger - // Documentation: https://www.kucoin.com/docs-new/api-3470307 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ - // Deprecated - GetFuturesAccountTransferOutLedger(req *GetFuturesAccountTransferOutLedgerReq, ctx context.Context) (*GetFuturesAccountTransferOutLedgerResp, error) } type TransferAPIImpl struct { @@ -145,6 +145,12 @@ func (impl *TransferAPIImpl) InnerTransfer(req *InnerTransferReq, ctx context.Co return resp, err } +func (impl *TransferAPIImpl) GetFuturesAccountTransferOutLedger(req *GetFuturesAccountTransferOutLedgerReq, ctx context.Context) (*GetFuturesAccountTransferOutLedgerResp, error) { + resp := &GetFuturesAccountTransferOutLedgerResp{} + err := impl.transport.Call(ctx, "futures", false, "Get", "/api/v1/transfer-list", req, resp, false) + return resp, err +} + func (impl *TransferAPIImpl) FuturesAccountTransferOut(req *FuturesAccountTransferOutReq, ctx context.Context) (*FuturesAccountTransferOutResp, error) { resp := &FuturesAccountTransferOutResp{} err := impl.transport.Call(ctx, "futures", false, "Post", "/api/v3/transfer-out", req, resp, false) @@ -156,9 +162,3 @@ func (impl *TransferAPIImpl) FuturesAccountTransferIn(req *FuturesAccountTransfe err := impl.transport.Call(ctx, "futures", false, "Post", "/api/v1/transfer-in", req, resp, false) return resp, err } - -func (impl *TransferAPIImpl) GetFuturesAccountTransferOutLedger(req *GetFuturesAccountTransferOutLedgerReq, ctx context.Context) (*GetFuturesAccountTransferOutLedgerResp, error) { - resp := &GetFuturesAccountTransferOutLedgerResp{} - err := impl.transport.Call(ctx, "futures", false, "Get", "/api/v1/transfer-list", req, resp, false) - return resp, err -} diff --git a/sdk/golang/pkg/generate/account/transfer/api_transfer.template b/sdk/golang/pkg/generate/account/transfer/api_transfer.template index 150e36f2..11a031ef 100644 --- a/sdk/golang/pkg/generate/account/transfer/api_transfer.template +++ b/sdk/golang/pkg/generate/account/transfer/api_transfer.template @@ -49,11 +49,11 @@ func TestTransferFlexTransferReq(t *testing.T) { func TestTransferSubAccountTransferReq(t *testing.T) { // SubAccountTransfer - // SubAccount Transfer + // Sub-account Transfer // /api/v2/accounts/sub-transfer builder := transfer.NewSubAccountTransferReqBuilder() - builder.SetClientOid(?).SetCurrency(?).SetAmount(?).SetDirection(?).SetAccountType(?).SetSubAccountType(?).SetSubUserId(?) + builder.SetClientOid(?).SetCurrency(?).SetAmount(?).SetDirection(?).SetAccountType(?).SetSubAccountType(?).SetSubUserId(?).SetTag(?).SetSubTag(?) req := builder.Build() resp, err := transferApi.SubAccountTransfer(req, context.TODO()) @@ -72,7 +72,7 @@ func TestTransferSubAccountTransferReq(t *testing.T) { func TestTransferInnerTransferReq(t *testing.T) { // InnerTransfer - // Inner Transfer + // Internal Transfer // /api/v2/accounts/inner-transfer builder := transfer.NewInnerTransferReqBuilder() @@ -93,16 +93,16 @@ func TestTransferInnerTransferReq(t *testing.T) { } -func TestTransferFuturesAccountTransferOutReq(t *testing.T) { - // FuturesAccountTransferOut - // Futures Account Transfer Out - // /api/v3/transfer-out +func TestTransferGetFuturesAccountTransferOutLedgerReq(t *testing.T) { + // GetFuturesAccountTransferOutLedger + // Get Futures Account Transfer Out Ledger + // /api/v1/transfer-list - builder := transfer.NewFuturesAccountTransferOutReqBuilder() - builder.SetCurrency(?).SetAmount(?).SetRecAccountType(?) + builder := transfer.NewGetFuturesAccountTransferOutLedgerReqBuilder() + builder.SetCurrency(?).SetType(?).SetTag(?).SetStartAt(?).SetEndAt(?).SetCurrentPage(?).SetPageSize(?) req := builder.Build() - resp, err := transferApi.FuturesAccountTransferOut(req, context.TODO()) + resp, err := transferApi.GetFuturesAccountTransferOutLedger(req, context.TODO()) if err != nil { panic(err) } @@ -116,16 +116,16 @@ func TestTransferFuturesAccountTransferOutReq(t *testing.T) { } -func TestTransferFuturesAccountTransferInReq(t *testing.T) { - // FuturesAccountTransferIn - // Futures Account Transfer In - // /api/v1/transfer-in +func TestTransferFuturesAccountTransferOutReq(t *testing.T) { + // FuturesAccountTransferOut + // Futures Account Transfer Out + // /api/v3/transfer-out - builder := transfer.NewFuturesAccountTransferInReqBuilder() - builder.SetCurrency(?).SetAmount(?).SetPayAccountType(?) + builder := transfer.NewFuturesAccountTransferOutReqBuilder() + builder.SetCurrency(?).SetAmount(?).SetRecAccountType(?) req := builder.Build() - resp, err := transferApi.FuturesAccountTransferIn(req, context.TODO()) + resp, err := transferApi.FuturesAccountTransferOut(req, context.TODO()) if err != nil { panic(err) } @@ -139,16 +139,16 @@ func TestTransferFuturesAccountTransferInReq(t *testing.T) { } -func TestTransferGetFuturesAccountTransferOutLedgerReq(t *testing.T) { - // GetFuturesAccountTransferOutLedger - // Get Futures Account Transfer Out Ledger - // /api/v1/transfer-list +func TestTransferFuturesAccountTransferInReq(t *testing.T) { + // FuturesAccountTransferIn + // Futures Account Transfer In + // /api/v1/transfer-in - builder := transfer.NewGetFuturesAccountTransferOutLedgerReqBuilder() - builder.SetCurrency(?).SetType(?).SetTag(?).SetStartAt(?).SetEndAt(?).SetCurrentPage(?).SetPageSize(?) + builder := transfer.NewFuturesAccountTransferInReqBuilder() + builder.SetCurrency(?).SetAmount(?).SetPayAccountType(?) req := builder.Build() - resp, err := transferApi.GetFuturesAccountTransferOutLedger(req, context.TODO()) + resp, err := transferApi.FuturesAccountTransferIn(req, context.TODO()) if err != nil { panic(err) } diff --git a/sdk/golang/pkg/generate/account/transfer/api_transfer_test.go b/sdk/golang/pkg/generate/account/transfer/api_transfer_test.go index 6eb8952a..bfcc1167 100644 --- a/sdk/golang/pkg/generate/account/transfer/api_transfer_test.go +++ b/sdk/golang/pkg/generate/account/transfer/api_transfer_test.go @@ -65,7 +65,7 @@ func TestTransferFlexTransferRespModel(t *testing.T) { func TestTransferSubAccountTransferReqModel(t *testing.T) { // SubAccountTransfer - // SubAccount Transfer + // Sub-account Transfer // /api/v2/accounts/sub-transfer data := "{\"clientOid\": \"64ccc0f164781800010d8c09\", \"currency\": \"USDT\", \"amount\": \"0.01\", \"direction\": \"OUT\", \"accountType\": \"MAIN\", \"subAccountType\": \"MAIN\", \"subUserId\": \"63743f07e0c5230001761d08\"}" @@ -77,7 +77,7 @@ func TestTransferSubAccountTransferReqModel(t *testing.T) { func TestTransferSubAccountTransferRespModel(t *testing.T) { // SubAccountTransfer - // SubAccount Transfer + // Sub-account Transfer // /api/v2/accounts/sub-transfer data := "{\"code\":\"200000\",\"data\":{\"orderId\":\"670be6b0b1b9080007040a9b\"}}" @@ -93,7 +93,7 @@ func TestTransferSubAccountTransferRespModel(t *testing.T) { func TestTransferInnerTransferReqModel(t *testing.T) { // InnerTransfer - // Inner Transfer + // Internal Transfer // /api/v2/accounts/inner-transfer data := "{\"clientOid\": \"64ccc0f164781800010d8c09\", \"currency\": \"USDT\", \"amount\": \"0.01\", \"from\": \"main\", \"to\": \"trade\"}" @@ -105,7 +105,7 @@ func TestTransferInnerTransferReqModel(t *testing.T) { func TestTransferInnerTransferRespModel(t *testing.T) { // InnerTransfer - // Inner Transfer + // Internal Transfer // /api/v2/accounts/inner-transfer data := "{\"code\":\"200000\",\"data\":{\"orderId\":\"670beb3482a1bb0007dec644\"}}" @@ -119,6 +119,34 @@ func TestTransferInnerTransferRespModel(t *testing.T) { assert.Nil(t, err) } +func TestTransferGetFuturesAccountTransferOutLedgerReqModel(t *testing.T) { + // GetFuturesAccountTransferOutLedger + // Get Futures Account Transfer Out Ledger + // /api/v1/transfer-list + + data := "{\"currency\": \"XBT\", \"type\": \"MAIN\", \"tag\": [\"mock_a\", \"mock_b\"], \"startAt\": 1728663338000, \"endAt\": 1728692138000, \"currentPage\": 1, \"pageSize\": 50}" + req := &GetFuturesAccountTransferOutLedgerReq{} + err := json.Unmarshal([]byte(data), req) + req.ToMap() + assert.Nil(t, err) +} + +func TestTransferGetFuturesAccountTransferOutLedgerRespModel(t *testing.T) { + // GetFuturesAccountTransferOutLedger + // Get Futures Account Transfer Out Ledger + // /api/v1/transfer-list + + data := "{\"code\":\"200000\",\"data\":{\"currentPage\":1,\"pageSize\":50,\"totalNum\":1,\"totalPage\":1,\"items\":[{\"applyId\":\"670bf84c577f6c00017a1c48\",\"currency\":\"USDT\",\"recRemark\":\"\",\"recSystem\":\"KUCOIN\",\"status\":\"SUCCESS\",\"amount\":\"0.01\",\"reason\":\"\",\"offset\":1519769124134806,\"createdAt\":1728837708000,\"remark\":\"\"}]}}" + commonResp := &types.RestResponse{} + err := json.Unmarshal([]byte(data), commonResp) + assert.Nil(t, err) + assert.NotNil(t, commonResp.Data) + resp := &GetFuturesAccountTransferOutLedgerResp{} + err = json.Unmarshal([]byte(commonResp.Data), resp) + resp.ToMap() + assert.Nil(t, err) +} + func TestTransferFuturesAccountTransferOutReqModel(t *testing.T) { // FuturesAccountTransferOut // Futures Account Transfer Out @@ -174,31 +202,3 @@ func TestTransferFuturesAccountTransferInRespModel(t *testing.T) { resp.ToMap() assert.Nil(t, err) } - -func TestTransferGetFuturesAccountTransferOutLedgerReqModel(t *testing.T) { - // GetFuturesAccountTransferOutLedger - // Get Futures Account Transfer Out Ledger - // /api/v1/transfer-list - - data := "{\"currency\": \"XBT\", \"type\": \"MAIN\", \"tag\": [\"mock_a\", \"mock_b\"], \"startAt\": 1728663338000, \"endAt\": 1728692138000, \"currentPage\": 1, \"pageSize\": 50}" - req := &GetFuturesAccountTransferOutLedgerReq{} - err := json.Unmarshal([]byte(data), req) - req.ToMap() - assert.Nil(t, err) -} - -func TestTransferGetFuturesAccountTransferOutLedgerRespModel(t *testing.T) { - // GetFuturesAccountTransferOutLedger - // Get Futures Account Transfer Out Ledger - // /api/v1/transfer-list - - data := "{\"code\":\"200000\",\"data\":{\"currentPage\":1,\"pageSize\":50,\"totalNum\":1,\"totalPage\":1,\"items\":[{\"applyId\":\"670bf84c577f6c00017a1c48\",\"currency\":\"USDT\",\"recRemark\":\"\",\"recSystem\":\"KUCOIN\",\"status\":\"SUCCESS\",\"amount\":\"0.01\",\"reason\":\"\",\"offset\":1519769124134806,\"createdAt\":1728837708000,\"remark\":\"\"}]}}" - commonResp := &types.RestResponse{} - err := json.Unmarshal([]byte(data), commonResp) - assert.Nil(t, err) - assert.NotNil(t, commonResp.Data) - resp := &GetFuturesAccountTransferOutLedgerResp{} - err = json.Unmarshal([]byte(commonResp.Data), resp) - resp.ToMap() - assert.Nil(t, err) -} diff --git a/sdk/golang/pkg/generate/account/transfer/types_flex_transfer_req.go b/sdk/golang/pkg/generate/account/transfer/types_flex_transfer_req.go index 74776377..031116b6 100644 --- a/sdk/golang/pkg/generate/account/transfer/types_flex_transfer_req.go +++ b/sdk/golang/pkg/generate/account/transfer/types_flex_transfer_req.go @@ -4,25 +4,25 @@ package transfer // FlexTransferReq struct for FlexTransferReq type FlexTransferReq struct { - // Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + // Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits ClientOid string `json:"clientOid,omitempty"` // currency Currency string `json:"currency,omitempty"` - // Transfer amount, the amount is a positive integer multiple of the currency precision. + // Transfer amount: The amount is a positive integer multiple of the currency precision. Amount string `json:"amount,omitempty"` - // Transfer out UserId, This is required when transferring sub-account to master-account. It is optional for internal transfers. + // Transfer out UserId: This is required when transferring from sub-account to master-account. It is optional for internal transfers. FromUserId *string `json:"fromUserId,omitempty"` - // Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 + // Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 FromAccountType string `json:"fromAccountType,omitempty"` - // Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT + // Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT FromAccountTag *string `json:"fromAccountTag,omitempty"` - // Transfer type:INTERNAL(Transfer within account)、PARENT_TO_SUB(Transfer from master-account to sub-account),SUB_TO_PARENT(Transfer from sub-account to master-account) + // Transfer type: INTERNAL (Transfer within account), PARENT_TO_SUB (Transfer from master-account to sub-account), SUB_TO_PARENT (Transfer from sub-account to master-account) Type string `json:"type,omitempty"` - // Transfer in UserId, This is required when transferring master-account to sub-account. It is optional for internal transfers. + // Transfer in UserId: This is required when transferring master-account to sub-account. It is optional for internal transfers. ToUserId *string `json:"toUserId,omitempty"` - // Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 + // Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 ToAccountType string `json:"toAccountType,omitempty"` - // Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT + // Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT ToAccountTag *string `json:"toAccountTag,omitempty"` } @@ -69,7 +69,7 @@ func NewFlexTransferReqBuilder() *FlexTransferReqBuilder { return &FlexTransferReqBuilder{obj: NewFlexTransferReqWithDefaults()} } -// Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits +// Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits func (builder *FlexTransferReqBuilder) SetClientOid(value string) *FlexTransferReqBuilder { builder.obj.ClientOid = value return builder @@ -81,49 +81,49 @@ func (builder *FlexTransferReqBuilder) SetCurrency(value string) *FlexTransferRe return builder } -// Transfer amount, the amount is a positive integer multiple of the currency precision. +// Transfer amount: The amount is a positive integer multiple of the currency precision. func (builder *FlexTransferReqBuilder) SetAmount(value string) *FlexTransferReqBuilder { builder.obj.Amount = value return builder } -// Transfer out UserId, This is required when transferring sub-account to master-account. It is optional for internal transfers. +// Transfer out UserId: This is required when transferring from sub-account to master-account. It is optional for internal transfers. func (builder *FlexTransferReqBuilder) SetFromUserId(value string) *FlexTransferReqBuilder { builder.obj.FromUserId = &value return builder } -// Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 +// Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 func (builder *FlexTransferReqBuilder) SetFromAccountType(value string) *FlexTransferReqBuilder { builder.obj.FromAccountType = value return builder } -// Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT +// Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT func (builder *FlexTransferReqBuilder) SetFromAccountTag(value string) *FlexTransferReqBuilder { builder.obj.FromAccountTag = &value return builder } -// Transfer type:INTERNAL(Transfer within account)、PARENT_TO_SUB(Transfer from master-account to sub-account),SUB_TO_PARENT(Transfer from sub-account to master-account) +// Transfer type: INTERNAL (Transfer within account), PARENT_TO_SUB (Transfer from master-account to sub-account), SUB_TO_PARENT (Transfer from sub-account to master-account) func (builder *FlexTransferReqBuilder) SetType(value string) *FlexTransferReqBuilder { builder.obj.Type = value return builder } -// Transfer in UserId, This is required when transferring master-account to sub-account. It is optional for internal transfers. +// Transfer in UserId: This is required when transferring master-account to sub-account. It is optional for internal transfers. func (builder *FlexTransferReqBuilder) SetToUserId(value string) *FlexTransferReqBuilder { builder.obj.ToUserId = &value return builder } -// Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 +// Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 func (builder *FlexTransferReqBuilder) SetToAccountType(value string) *FlexTransferReqBuilder { builder.obj.ToAccountType = value return builder } -// Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT +// Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT func (builder *FlexTransferReqBuilder) SetToAccountTag(value string) *FlexTransferReqBuilder { builder.obj.ToAccountTag = &value return builder diff --git a/sdk/golang/pkg/generate/account/transfer/types_futures_account_transfer_in_req.go b/sdk/golang/pkg/generate/account/transfer/types_futures_account_transfer_in_req.go index b8e115f3..7ea02a23 100644 --- a/sdk/golang/pkg/generate/account/transfer/types_futures_account_transfer_in_req.go +++ b/sdk/golang/pkg/generate/account/transfer/types_futures_account_transfer_in_req.go @@ -4,11 +4,11 @@ package transfer // FuturesAccountTransferInReq struct for FuturesAccountTransferInReq type FuturesAccountTransferInReq struct { - // Currency, including XBT,USDT... + // Currency, including XBT, USDT... Currency string `json:"currency,omitempty"` - // Amount to be transfered in + // Amount to be transferred in Amount float32 `json:"amount,omitempty"` - // Payment account type, including MAIN,TRADE + // Payment account type, including MAIN, TRADE PayAccountType string `json:"payAccountType,omitempty"` } @@ -45,19 +45,19 @@ func NewFuturesAccountTransferInReqBuilder() *FuturesAccountTransferInReqBuilder return &FuturesAccountTransferInReqBuilder{obj: NewFuturesAccountTransferInReqWithDefaults()} } -// Currency, including XBT,USDT... +// Currency, including XBT, USDT... func (builder *FuturesAccountTransferInReqBuilder) SetCurrency(value string) *FuturesAccountTransferInReqBuilder { builder.obj.Currency = value return builder } -// Amount to be transfered in +// Amount to be transferred in func (builder *FuturesAccountTransferInReqBuilder) SetAmount(value float32) *FuturesAccountTransferInReqBuilder { builder.obj.Amount = value return builder } -// Payment account type, including MAIN,TRADE +// Payment account type, including MAIN, TRADE func (builder *FuturesAccountTransferInReqBuilder) SetPayAccountType(value string) *FuturesAccountTransferInReqBuilder { builder.obj.PayAccountType = value return builder diff --git a/sdk/golang/pkg/generate/account/transfer/types_futures_account_transfer_out_req.go b/sdk/golang/pkg/generate/account/transfer/types_futures_account_transfer_out_req.go index 57f3e4c1..4b500e80 100644 --- a/sdk/golang/pkg/generate/account/transfer/types_futures_account_transfer_out_req.go +++ b/sdk/golang/pkg/generate/account/transfer/types_futures_account_transfer_out_req.go @@ -4,11 +4,11 @@ package transfer // FuturesAccountTransferOutReq struct for FuturesAccountTransferOutReq type FuturesAccountTransferOutReq struct { - // Currency, including XBT,USDT... + // Currency, including XBT, USDT... Currency string `json:"currency,omitempty"` - // Amount to be transfered out, the maximum cannot exceed 1000000000 + // Amount to be transferred out; cannot exceed 1000000000 Amount float32 `json:"amount,omitempty"` - // Receive account type, including MAIN,TRADE + // Receive account type, including MAIN, TRADE RecAccountType string `json:"recAccountType,omitempty"` } @@ -45,19 +45,19 @@ func NewFuturesAccountTransferOutReqBuilder() *FuturesAccountTransferOutReqBuild return &FuturesAccountTransferOutReqBuilder{obj: NewFuturesAccountTransferOutReqWithDefaults()} } -// Currency, including XBT,USDT... +// Currency, including XBT, USDT... func (builder *FuturesAccountTransferOutReqBuilder) SetCurrency(value string) *FuturesAccountTransferOutReqBuilder { builder.obj.Currency = value return builder } -// Amount to be transfered out, the maximum cannot exceed 1000000000 +// Amount to be transferred out; cannot exceed 1000000000 func (builder *FuturesAccountTransferOutReqBuilder) SetAmount(value float32) *FuturesAccountTransferOutReqBuilder { builder.obj.Amount = value return builder } -// Receive account type, including MAIN,TRADE +// Receive account type, including MAIN, TRADE func (builder *FuturesAccountTransferOutReqBuilder) SetRecAccountType(value string) *FuturesAccountTransferOutReqBuilder { builder.obj.RecAccountType = value return builder diff --git a/sdk/golang/pkg/generate/account/transfer/types_futures_account_transfer_out_resp.go b/sdk/golang/pkg/generate/account/transfer/types_futures_account_transfer_out_resp.go index 85fc1ca1..d233e060 100644 --- a/sdk/golang/pkg/generate/account/transfer/types_futures_account_transfer_out_resp.go +++ b/sdk/golang/pkg/generate/account/transfer/types_futures_account_transfer_out_resp.go @@ -32,7 +32,7 @@ type FuturesAccountTransferOutResp struct { Status string `json:"status,omitempty"` // Currency Currency string `json:"currency,omitempty"` - // Transfer amout + // Transfer amount Amount string `json:"amount,omitempty"` // Transfer fee Fee string `json:"fee,omitempty"` diff --git a/sdk/golang/pkg/generate/account/transfer/types_get_futures_account_transfer_out_ledger_items.go b/sdk/golang/pkg/generate/account/transfer/types_get_futures_account_transfer_out_ledger_items.go index 0f73d876..c5497ce8 100644 --- a/sdk/golang/pkg/generate/account/transfer/types_get_futures_account_transfer_out_ledger_items.go +++ b/sdk/golang/pkg/generate/account/transfer/types_get_futures_account_transfer_out_ledger_items.go @@ -16,7 +16,7 @@ type GetFuturesAccountTransferOutLedgerItems struct { Status *string `json:"status,omitempty"` // Transaction amount Amount *string `json:"amount,omitempty"` - // Reason caused the failure + // Reason for the failure Reason *string `json:"reason,omitempty"` // Offset Offset *int64 `json:"offset,omitempty"` diff --git a/sdk/golang/pkg/generate/account/transfer/types_get_futures_account_transfer_out_ledger_req.go b/sdk/golang/pkg/generate/account/transfer/types_get_futures_account_transfer_out_ledger_req.go index 3ab5201e..169d9d1a 100644 --- a/sdk/golang/pkg/generate/account/transfer/types_get_futures_account_transfer_out_ledger_req.go +++ b/sdk/golang/pkg/generate/account/transfer/types_get_futures_account_transfer_out_ledger_req.go @@ -10,13 +10,13 @@ type GetFuturesAccountTransferOutLedgerReq struct { Type *string `json:"type,omitempty" url:"type,omitempty"` // Status List PROCESSING, SUCCESS, FAILURE Tag []string `json:"tag,omitempty" url:"tag,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` - // Current request page, The default currentPage is 1 + // Current request page. The default currentPage is 1 CurrentPage *int64 `json:"currentPage,omitempty" url:"currentPage,omitempty"` - // pageSize, The default pageSize is 50 + // pageSize; the default pageSize is 50 PageSize *int64 `json:"pageSize,omitempty" url:"pageSize,omitempty"` } @@ -80,25 +80,25 @@ func (builder *GetFuturesAccountTransferOutLedgerReqBuilder) SetTag(value []stri return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetFuturesAccountTransferOutLedgerReqBuilder) SetStartAt(value int64) *GetFuturesAccountTransferOutLedgerReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetFuturesAccountTransferOutLedgerReqBuilder) SetEndAt(value int64) *GetFuturesAccountTransferOutLedgerReqBuilder { builder.obj.EndAt = &value return builder } -// Current request page, The default currentPage is 1 +// Current request page. The default currentPage is 1 func (builder *GetFuturesAccountTransferOutLedgerReqBuilder) SetCurrentPage(value int64) *GetFuturesAccountTransferOutLedgerReqBuilder { builder.obj.CurrentPage = &value return builder } -// pageSize, The default pageSize is 50 +// pageSize; the default pageSize is 50 func (builder *GetFuturesAccountTransferOutLedgerReqBuilder) SetPageSize(value int64) *GetFuturesAccountTransferOutLedgerReqBuilder { builder.obj.PageSize = &value return builder diff --git a/sdk/golang/pkg/generate/account/transfer/types_get_futures_account_transfer_out_ledger_resp.go b/sdk/golang/pkg/generate/account/transfer/types_get_futures_account_transfer_out_ledger_resp.go index 87bbbcdd..8837dd95 100644 --- a/sdk/golang/pkg/generate/account/transfer/types_get_futures_account_transfer_out_ledger_resp.go +++ b/sdk/golang/pkg/generate/account/transfer/types_get_futures_account_transfer_out_ledger_resp.go @@ -16,7 +16,7 @@ type GetFuturesAccountTransferOutLedgerResp struct { PageSize int32 `json:"pageSize,omitempty"` // total number TotalNum int32 `json:"totalNum,omitempty"` - // total page + // total pages TotalPage int32 `json:"totalPage,omitempty"` Items []GetFuturesAccountTransferOutLedgerItems `json:"items,omitempty"` } diff --git a/sdk/golang/pkg/generate/account/transfer/types_get_transfer_quotas_req.go b/sdk/golang/pkg/generate/account/transfer/types_get_transfer_quotas_req.go index 5fc79cae..4269d6ae 100644 --- a/sdk/golang/pkg/generate/account/transfer/types_get_transfer_quotas_req.go +++ b/sdk/golang/pkg/generate/account/transfer/types_get_transfer_quotas_req.go @@ -6,9 +6,9 @@ package transfer type GetTransferQuotasReq struct { // currency Currency *string `json:"currency,omitempty" url:"currency,omitempty"` - // The account type:MAIN、TRADE、MARGIN、ISOLATED + // The account type:MAIN, TRADE, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 Type *string `json:"type,omitempty" url:"type,omitempty"` - // Trading pair, required when the account type is ISOLATED; other types are not passed, e.g.: BTC-USDT + // Trading pair required when the account type is ISOLATED; other types do not pass, e.g.: BTC-USDT Tag *string `json:"tag,omitempty" url:"tag,omitempty"` } @@ -52,13 +52,13 @@ func (builder *GetTransferQuotasReqBuilder) SetCurrency(value string) *GetTransf return builder } -// The account type:MAIN、TRADE、MARGIN、ISOLATED +// The account type:MAIN, TRADE, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 func (builder *GetTransferQuotasReqBuilder) SetType(value string) *GetTransferQuotasReqBuilder { builder.obj.Type = &value return builder } -// Trading pair, required when the account type is ISOLATED; other types are not passed, e.g.: BTC-USDT +// Trading pair required when the account type is ISOLATED; other types do not pass, e.g.: BTC-USDT func (builder *GetTransferQuotasReqBuilder) SetTag(value string) *GetTransferQuotasReqBuilder { builder.obj.Tag = &value return builder diff --git a/sdk/golang/pkg/generate/account/transfer/types_inner_transfer_req.go b/sdk/golang/pkg/generate/account/transfer/types_inner_transfer_req.go index 49840476..69ec0070 100644 --- a/sdk/golang/pkg/generate/account/transfer/types_inner_transfer_req.go +++ b/sdk/golang/pkg/generate/account/transfer/types_inner_transfer_req.go @@ -4,11 +4,11 @@ package transfer // InnerTransferReq struct for InnerTransferReq type InnerTransferReq struct { - // Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + // Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits ClientOid string `json:"clientOid,omitempty"` // currency Currency string `json:"currency,omitempty"` - // Transfer amount, the amount is a positive integer multiple of the currency precision. + // Transfer amount: The amount is a positive integer multiple of the currency precision. Amount string `json:"amount,omitempty"` // Receiving Account Type: main, trade, margin, isolated, margin_v2, isolated_v2, contract To string `json:"to,omitempty"` @@ -59,7 +59,7 @@ func NewInnerTransferReqBuilder() *InnerTransferReqBuilder { return &InnerTransferReqBuilder{obj: NewInnerTransferReqWithDefaults()} } -// Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits +// Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits func (builder *InnerTransferReqBuilder) SetClientOid(value string) *InnerTransferReqBuilder { builder.obj.ClientOid = value return builder @@ -71,7 +71,7 @@ func (builder *InnerTransferReqBuilder) SetCurrency(value string) *InnerTransfer return builder } -// Transfer amount, the amount is a positive integer multiple of the currency precision. +// Transfer amount: The amount is a positive integer multiple of the currency precision. func (builder *InnerTransferReqBuilder) SetAmount(value string) *InnerTransferReqBuilder { builder.obj.Amount = value return builder diff --git a/sdk/golang/pkg/generate/account/transfer/types_sub_account_transfer_req.go b/sdk/golang/pkg/generate/account/transfer/types_sub_account_transfer_req.go index c59673b7..26c151c3 100644 --- a/sdk/golang/pkg/generate/account/transfer/types_sub_account_transfer_req.go +++ b/sdk/golang/pkg/generate/account/transfer/types_sub_account_transfer_req.go @@ -4,25 +4,29 @@ package transfer // SubAccountTransferReq struct for SubAccountTransferReq type SubAccountTransferReq struct { - // Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + // Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits ClientOid string `json:"clientOid,omitempty"` // currency Currency string `json:"currency,omitempty"` - // Transfer amount, the amount is a positive integer multiple of the currency precision. + // Transfer amount: The amount is a positive integer multiple of the currency precision. Amount string `json:"amount,omitempty"` - // OUT — the master user to sub user IN — the sub user to the master user. + // OUT — the master user to sub user IN — the sub user to the master user Direction string `json:"direction,omitempty"` - // Account type:MAIN、TRADE、CONTRACT、MARGIN + // Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED AccountType *string `json:"accountType,omitempty"` - // Sub Account type:MAIN、TRADE、CONTRACT、MARGIN + // Sub-account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED SubAccountType *string `json:"subAccountType,omitempty"` // the user ID of a sub-account. SubUserId *string `json:"subUserId,omitempty"` + // Need to be defined if accountType=ISOLATED. + Tag *string `json:"tag,omitempty"` + // Need to be defined if subAccountType=ISOLATED. + SubTag string `json:"subTag,omitempty"` } // NewSubAccountTransferReq instantiates a new SubAccountTransferReq object // This constructor will assign default values to properties that have it defined -func NewSubAccountTransferReq(clientOid string, currency string, amount string, direction string) *SubAccountTransferReq { +func NewSubAccountTransferReq(clientOid string, currency string, amount string, direction string, subTag string) *SubAccountTransferReq { this := SubAccountTransferReq{} this.ClientOid = clientOid this.Currency = currency @@ -32,6 +36,7 @@ func NewSubAccountTransferReq(clientOid string, currency string, amount string, this.AccountType = &accountType var subAccountType string = "MAIN" this.SubAccountType = &subAccountType + this.SubTag = subTag return &this } @@ -55,6 +60,8 @@ func (o *SubAccountTransferReq) ToMap() map[string]interface{} { toSerialize["accountType"] = o.AccountType toSerialize["subAccountType"] = o.SubAccountType toSerialize["subUserId"] = o.SubUserId + toSerialize["tag"] = o.Tag + toSerialize["subTag"] = o.SubTag return toSerialize } @@ -66,7 +73,7 @@ func NewSubAccountTransferReqBuilder() *SubAccountTransferReqBuilder { return &SubAccountTransferReqBuilder{obj: NewSubAccountTransferReqWithDefaults()} } -// Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits +// Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits func (builder *SubAccountTransferReqBuilder) SetClientOid(value string) *SubAccountTransferReqBuilder { builder.obj.ClientOid = value return builder @@ -78,25 +85,25 @@ func (builder *SubAccountTransferReqBuilder) SetCurrency(value string) *SubAccou return builder } -// Transfer amount, the amount is a positive integer multiple of the currency precision. +// Transfer amount: The amount is a positive integer multiple of the currency precision. func (builder *SubAccountTransferReqBuilder) SetAmount(value string) *SubAccountTransferReqBuilder { builder.obj.Amount = value return builder } -// OUT — the master user to sub user IN — the sub user to the master user. +// OUT — the master user to sub user IN — the sub user to the master user func (builder *SubAccountTransferReqBuilder) SetDirection(value string) *SubAccountTransferReqBuilder { builder.obj.Direction = value return builder } -// Account type:MAIN、TRADE、CONTRACT、MARGIN +// Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED func (builder *SubAccountTransferReqBuilder) SetAccountType(value string) *SubAccountTransferReqBuilder { builder.obj.AccountType = &value return builder } -// Sub Account type:MAIN、TRADE、CONTRACT、MARGIN +// Sub-account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED func (builder *SubAccountTransferReqBuilder) SetSubAccountType(value string) *SubAccountTransferReqBuilder { builder.obj.SubAccountType = &value return builder @@ -108,6 +115,18 @@ func (builder *SubAccountTransferReqBuilder) SetSubUserId(value string) *SubAcco return builder } +// Need to be defined if accountType=ISOLATED. +func (builder *SubAccountTransferReqBuilder) SetTag(value string) *SubAccountTransferReqBuilder { + builder.obj.Tag = &value + return builder +} + +// Need to be defined if subAccountType=ISOLATED. +func (builder *SubAccountTransferReqBuilder) SetSubTag(value string) *SubAccountTransferReqBuilder { + builder.obj.SubTag = value + return builder +} + func (builder *SubAccountTransferReqBuilder) Build() *SubAccountTransferReq { return builder.obj } diff --git a/sdk/golang/pkg/generate/account/withdrawal/api_withdrawal.go b/sdk/golang/pkg/generate/account/withdrawal/api_withdrawal.go index bfaa142f..1048f952 100644 --- a/sdk/golang/pkg/generate/account/withdrawal/api_withdrawal.go +++ b/sdk/golang/pkg/generate/account/withdrawal/api_withdrawal.go @@ -10,88 +10,88 @@ import ( type WithdrawalAPI interface { // GetWithdrawalQuotas Get Withdrawal Quotas - // Description: This interface can obtain the withdrawal quotas information of this currency. + // Description: This interface can obtain the withdrawal quota information of this currency. // Documentation: https://www.kucoin.com/docs-new/api-3470143 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ GetWithdrawalQuotas(req *GetWithdrawalQuotasReq, ctx context.Context) (*GetWithdrawalQuotasResp, error) - // WithdrawalV3 Withdraw(V3) - // Description: Use this interface to withdraw the specified currency + // WithdrawalV3 Withdraw (V3) + // Description: Use this interface to withdraw the specified currency. // Documentation: https://www.kucoin.com/docs-new/api-3470146 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | WITHDRAWAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 5 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | WITHDRAWAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+------------+ WithdrawalV3(req *WithdrawalV3Req, ctx context.Context) (*WithdrawalV3Resp, error) // CancelWithdrawal Cancel Withdrawal - // Description: This interface can cancel the withdrawal, Only withdrawals requests of PROCESSING status could be canceled. + // Description: This interface can cancel the withdrawal. Only withdrawal requests with PROCESSING status can be canceled. // Documentation: https://www.kucoin.com/docs-new/api-3470144 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | WITHDRAWAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | WITHDRAWAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ CancelWithdrawal(req *CancelWithdrawalReq, ctx context.Context) (*CancelWithdrawalResp, error) // GetWithdrawalHistory Get Withdrawal History - // Description: Request via this endpoint to get deposit list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. + // Description: Request a withdrawal list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. // Documentation: https://www.kucoin.com/docs-new/api-3470145 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ GetWithdrawalHistory(req *GetWithdrawalHistoryReq, ctx context.Context) (*GetWithdrawalHistoryResp, error) // GetWithdrawalHistoryOld Get Withdrawal History - Old - // Description: Request via this endpoint to get deposit list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. + // Description: Request a deposit list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. // Documentation: https://www.kucoin.com/docs-new/api-3470308 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 20 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ // Deprecated GetWithdrawalHistoryOld(req *GetWithdrawalHistoryOldReq, ctx context.Context) (*GetWithdrawalHistoryOldResp, error) // WithdrawalV1 Withdraw - V1 - // Description: Use this interface to withdraw the specified currency + // Description: Use this interface to withdraw the specified currency. // Documentation: https://www.kucoin.com/docs-new/api-3470310 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | WITHDRAWAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 5 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | WITHDRAWAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+------------+ // Deprecated WithdrawalV1(req *WithdrawalV1Req, ctx context.Context) (*WithdrawalV1Resp, error) } diff --git a/sdk/golang/pkg/generate/account/withdrawal/api_withdrawal.template b/sdk/golang/pkg/generate/account/withdrawal/api_withdrawal.template index 8e9c457d..a7be2edc 100644 --- a/sdk/golang/pkg/generate/account/withdrawal/api_withdrawal.template +++ b/sdk/golang/pkg/generate/account/withdrawal/api_withdrawal.template @@ -26,7 +26,7 @@ func TestWithdrawalGetWithdrawalQuotasReq(t *testing.T) { func TestWithdrawalWithdrawalV3Req(t *testing.T) { // WithdrawalV3 - // Withdraw(V3) + // Withdraw (V3) // /api/v3/withdrawals builder := withdrawal.NewWithdrawalV3ReqBuilder() diff --git a/sdk/golang/pkg/generate/account/withdrawal/api_withdrawal_test.go b/sdk/golang/pkg/generate/account/withdrawal/api_withdrawal_test.go index e6c3ea2d..281dbb9d 100644 --- a/sdk/golang/pkg/generate/account/withdrawal/api_withdrawal_test.go +++ b/sdk/golang/pkg/generate/account/withdrawal/api_withdrawal_test.go @@ -37,7 +37,7 @@ func TestWithdrawalGetWithdrawalQuotasRespModel(t *testing.T) { func TestWithdrawalWithdrawalV3ReqModel(t *testing.T) { // WithdrawalV3 - // Withdraw(V3) + // Withdraw (V3) // /api/v3/withdrawals data := "{\"currency\": \"USDT\", \"toAddress\": \"TKFRQXSDcY****GmLrjJggwX8\", \"amount\": 3, \"withdrawType\": \"ADDRESS\", \"chain\": \"trx\", \"isInner\": true, \"remark\": \"this is Remark\"}" @@ -49,7 +49,7 @@ func TestWithdrawalWithdrawalV3ReqModel(t *testing.T) { func TestWithdrawalWithdrawalV3RespModel(t *testing.T) { // WithdrawalV3 - // Withdraw(V3) + // Withdraw (V3) // /api/v3/withdrawals data := "{\"code\":\"200000\",\"data\":{\"withdrawalId\":\"670deec84d64da0007d7c946\"}}" diff --git a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_items.go b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_items.go index d2ec0fd3..c20b3984 100644 --- a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_items.go +++ b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_items.go @@ -4,13 +4,13 @@ package withdrawal // GetWithdrawalHistoryItems struct for GetWithdrawalHistoryItems type GetWithdrawalHistoryItems struct { - // Unique id + // Unique ID Id *string `json:"id,omitempty"` // Currency Currency *string `json:"currency,omitempty"` // The id of currency Chain *string `json:"chain,omitempty"` - // Status + // Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE Status *string `json:"status,omitempty"` // Deposit address Address *string `json:"address,omitempty"` @@ -24,11 +24,11 @@ type GetWithdrawalHistoryItems struct { Fee *string `json:"fee,omitempty"` // Wallet Txid WalletTxId *string `json:"walletTxId,omitempty"` - // Creation time of the database record + // Database record creation time CreatedAt *int64 `json:"createdAt,omitempty"` // Update time of the database record UpdatedAt *int64 `json:"updatedAt,omitempty"` - // remark + // Remark Remark *string `json:"remark,omitempty"` } diff --git a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_old_items.go b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_old_items.go index 429addd1..7ed5dfa8 100644 --- a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_old_items.go +++ b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_old_items.go @@ -6,7 +6,7 @@ package withdrawal type GetWithdrawalHistoryOldItems struct { // Currency Currency *string `json:"currency,omitempty"` - // Creation time of the database record + // Database record creation time CreateAt *int32 `json:"createAt,omitempty"` // Withdrawal amount Amount *string `json:"amount,omitempty"` diff --git a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_old_req.go b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_old_req.go index 402d69c5..8e7ac72b 100644 --- a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_old_req.go +++ b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_old_req.go @@ -8,9 +8,9 @@ type GetWithdrawalHistoryOldReq struct { Currency *string `json:"currency,omitempty" url:"currency,omitempty"` // Status. Available value: PROCESSING, SUCCESS, and FAILURE Status *string `json:"status,omitempty" url:"status,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` // Current request page. CurrentPage *int32 `json:"currentPage,omitempty" url:"currentPage,omitempty"` @@ -71,13 +71,13 @@ func (builder *GetWithdrawalHistoryOldReqBuilder) SetStatus(value string) *GetWi return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetWithdrawalHistoryOldReqBuilder) SetStartAt(value int64) *GetWithdrawalHistoryOldReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetWithdrawalHistoryOldReqBuilder) SetEndAt(value int64) *GetWithdrawalHistoryOldReqBuilder { builder.obj.EndAt = &value return builder diff --git a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_old_resp.go b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_old_resp.go index e3a48f4b..8e1ed4bb 100644 --- a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_old_resp.go +++ b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_old_resp.go @@ -16,7 +16,7 @@ type GetWithdrawalHistoryOldResp struct { PageSize int32 `json:"pageSize,omitempty"` // total number TotalNum int32 `json:"totalNum,omitempty"` - // total page + // total pages TotalPage int32 `json:"totalPage,omitempty"` Items []GetWithdrawalHistoryOldItems `json:"items,omitempty"` } diff --git a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_req.go b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_req.go index 79df189b..48c67bf1 100644 --- a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_req.go +++ b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_req.go @@ -6,11 +6,11 @@ package withdrawal type GetWithdrawalHistoryReq struct { // currency Currency *string `json:"currency,omitempty" url:"currency,omitempty"` - // Status. Available value: PROCESSING, WALLET_PROCESSING, SUCCESS, and FAILURE + // Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE Status *string `json:"status,omitempty" url:"status,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` // Current request page. CurrentPage *int32 `json:"currentPage,omitempty" url:"currentPage,omitempty"` @@ -65,19 +65,19 @@ func (builder *GetWithdrawalHistoryReqBuilder) SetCurrency(value string) *GetWit return builder } -// Status. Available value: PROCESSING, WALLET_PROCESSING, SUCCESS, and FAILURE +// Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE func (builder *GetWithdrawalHistoryReqBuilder) SetStatus(value string) *GetWithdrawalHistoryReqBuilder { builder.obj.Status = &value return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetWithdrawalHistoryReqBuilder) SetStartAt(value int64) *GetWithdrawalHistoryReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetWithdrawalHistoryReqBuilder) SetEndAt(value int64) *GetWithdrawalHistoryReqBuilder { builder.obj.EndAt = &value return builder diff --git a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_resp.go b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_resp.go index 7e60172e..6adf9e55 100644 --- a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_resp.go +++ b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_history_resp.go @@ -16,7 +16,7 @@ type GetWithdrawalHistoryResp struct { PageSize int32 `json:"pageSize,omitempty"` // total number TotalNum int32 `json:"totalNum,omitempty"` - // total page + // total pages TotalPage int32 `json:"totalPage,omitempty"` Items []GetWithdrawalHistoryItems `json:"items,omitempty"` } diff --git a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_quotas_req.go b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_quotas_req.go index 3dd973e0..db2e8eb9 100644 --- a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_quotas_req.go +++ b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_quotas_req.go @@ -6,7 +6,7 @@ package withdrawal type GetWithdrawalQuotasReq struct { // currency Currency *string `json:"currency,omitempty" url:"currency,omitempty"` - // The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + // The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. Chain *string `json:"chain,omitempty" url:"chain,omitempty"` } @@ -49,7 +49,7 @@ func (builder *GetWithdrawalQuotasReqBuilder) SetCurrency(value string) *GetWith return builder } -// The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. +// The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. func (builder *GetWithdrawalQuotasReqBuilder) SetChain(value string) *GetWithdrawalQuotasReqBuilder { builder.obj.Chain = &value return builder diff --git a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_quotas_resp.go b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_quotas_resp.go index 581888e0..56db23cc 100644 --- a/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_quotas_resp.go +++ b/sdk/golang/pkg/generate/account/withdrawal/types_get_withdrawal_quotas_resp.go @@ -13,11 +13,11 @@ type GetWithdrawalQuotasResp struct { Currency string `json:"currency,omitempty"` LimitBTCAmount string `json:"limitBTCAmount,omitempty"` UsedBTCAmount string `json:"usedBTCAmount,omitempty"` - // withdrawal limit currency + // Withdrawal limit currency QuotaCurrency string `json:"quotaCurrency,omitempty"` - // The intraday available withdrawal amount(withdrawal limit currency) + // The intraday available withdrawal amount (withdrawal limit currency) LimitQuotaCurrencyAmount string `json:"limitQuotaCurrencyAmount,omitempty"` - // The intraday cumulative withdrawal amount(withdrawal limit currency) + // The intraday cumulative withdrawal amount (withdrawal limit currency) UsedQuotaCurrencyAmount string `json:"usedQuotaCurrencyAmount,omitempty"` // Remaining amount available to withdraw the current day RemainAmount string `json:"remainAmount,omitempty"` @@ -29,13 +29,13 @@ type GetWithdrawalQuotasResp struct { InnerWithdrawMinFee string `json:"innerWithdrawMinFee,omitempty"` // Minimum withdrawal amount WithdrawMinSize string `json:"withdrawMinSize,omitempty"` - // Is the withdraw function enabled or not + // Is the withdraw function enabled? IsWithdrawEnabled bool `json:"isWithdrawEnabled,omitempty"` // Floating point precision. Precision int32 `json:"precision,omitempty"` // The chainName of currency Chain string `json:"chain,omitempty"` - // Reasons for restriction, Usually empty + // Reasons for restriction. Usually empty. Reason string `json:"reason,omitempty"` // Total locked amount (including the amount locked into USDT for each currency) LockedAmount string `json:"lockedAmount,omitempty"` diff --git a/sdk/golang/pkg/generate/account/withdrawal/types_withdrawal_v1_req.go b/sdk/golang/pkg/generate/account/withdrawal/types_withdrawal_v1_req.go index ea7e5f33..01018daa 100644 --- a/sdk/golang/pkg/generate/account/withdrawal/types_withdrawal_v1_req.go +++ b/sdk/golang/pkg/generate/account/withdrawal/types_withdrawal_v1_req.go @@ -6,19 +6,19 @@ package withdrawal type WithdrawalV1Req struct { // currency Currency string `json:"currency,omitempty"` - // The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. + // The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. Chain *string `json:"chain,omitempty"` // Withdrawal address Address string `json:"address,omitempty"` // Withdrawal amount, a positive number which is a multiple of the amount precision Amount int64 `json:"amount,omitempty"` - // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. Memo *string `json:"memo,omitempty"` - // Internal withdrawal or not. Default : false + // Internal withdrawal or not. Default: False IsInner *bool `json:"isInner,omitempty"` - // remark + // Remark Remark *string `json:"remark,omitempty"` - // Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. + // Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. FeeDeductType *string `json:"feeDeductType,omitempty"` } @@ -74,7 +74,7 @@ func (builder *WithdrawalV1ReqBuilder) SetCurrency(value string) *WithdrawalV1Re return builder } -// The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. +// The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. func (builder *WithdrawalV1ReqBuilder) SetChain(value string) *WithdrawalV1ReqBuilder { builder.obj.Chain = &value return builder @@ -92,25 +92,25 @@ func (builder *WithdrawalV1ReqBuilder) SetAmount(value int64) *WithdrawalV1ReqBu return builder } -// Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. +// Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. func (builder *WithdrawalV1ReqBuilder) SetMemo(value string) *WithdrawalV1ReqBuilder { builder.obj.Memo = &value return builder } -// Internal withdrawal or not. Default : false +// Internal withdrawal or not. Default: False func (builder *WithdrawalV1ReqBuilder) SetIsInner(value bool) *WithdrawalV1ReqBuilder { builder.obj.IsInner = &value return builder } -// remark +// Remark func (builder *WithdrawalV1ReqBuilder) SetRemark(value string) *WithdrawalV1ReqBuilder { builder.obj.Remark = &value return builder } -// Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. +// Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. func (builder *WithdrawalV1ReqBuilder) SetFeeDeductType(value string) *WithdrawalV1ReqBuilder { builder.obj.FeeDeductType = &value return builder diff --git a/sdk/golang/pkg/generate/account/withdrawal/types_withdrawal_v3_req.go b/sdk/golang/pkg/generate/account/withdrawal/types_withdrawal_v3_req.go index bf572f34..bb13040e 100644 --- a/sdk/golang/pkg/generate/account/withdrawal/types_withdrawal_v3_req.go +++ b/sdk/golang/pkg/generate/account/withdrawal/types_withdrawal_v3_req.go @@ -6,21 +6,21 @@ package withdrawal type WithdrawalV3Req struct { // currency Currency string `json:"currency,omitempty"` - // The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. + // The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. Chain *string `json:"chain,omitempty"` // Withdrawal amount, a positive number which is a multiple of the amount precision Amount int64 `json:"amount,omitempty"` - // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. Memo *string `json:"memo,omitempty"` - // Internal withdrawal or not. Default : false + // Internal withdrawal or not. Default: False IsInner *bool `json:"isInner,omitempty"` - // remark + // Remark Remark *string `json:"remark,omitempty"` - // Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. + // Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. FeeDeductType *string `json:"feeDeductType,omitempty"` // Withdrawal address ToAddress string `json:"toAddress,omitempty"` - // Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will have rate limited: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) + // Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will be rate limits: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) WithdrawType string `json:"withdrawType,omitempty"` } @@ -78,7 +78,7 @@ func (builder *WithdrawalV3ReqBuilder) SetCurrency(value string) *WithdrawalV3Re return builder } -// The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. +// The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. func (builder *WithdrawalV3ReqBuilder) SetChain(value string) *WithdrawalV3ReqBuilder { builder.obj.Chain = &value return builder @@ -90,25 +90,25 @@ func (builder *WithdrawalV3ReqBuilder) SetAmount(value int64) *WithdrawalV3ReqBu return builder } -// Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. +// Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. func (builder *WithdrawalV3ReqBuilder) SetMemo(value string) *WithdrawalV3ReqBuilder { builder.obj.Memo = &value return builder } -// Internal withdrawal or not. Default : false +// Internal withdrawal or not. Default: False func (builder *WithdrawalV3ReqBuilder) SetIsInner(value bool) *WithdrawalV3ReqBuilder { builder.obj.IsInner = &value return builder } -// remark +// Remark func (builder *WithdrawalV3ReqBuilder) SetRemark(value string) *WithdrawalV3ReqBuilder { builder.obj.Remark = &value return builder } -// Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. +// Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. func (builder *WithdrawalV3ReqBuilder) SetFeeDeductType(value string) *WithdrawalV3ReqBuilder { builder.obj.FeeDeductType = &value return builder @@ -120,7 +120,7 @@ func (builder *WithdrawalV3ReqBuilder) SetToAddress(value string) *WithdrawalV3R return builder } -// Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will have rate limited: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) +// Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will be rate limits: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) func (builder *WithdrawalV3ReqBuilder) SetWithdrawType(value string) *WithdrawalV3ReqBuilder { builder.obj.WithdrawType = value return builder diff --git a/sdk/golang/pkg/generate/affiliate/affiliate/api_affiliate.go b/sdk/golang/pkg/generate/affiliate/affiliate/api_affiliate.go index dd28a6bf..a4c4aba5 100644 --- a/sdk/golang/pkg/generate/affiliate/affiliate/api_affiliate.go +++ b/sdk/golang/pkg/generate/affiliate/affiliate/api_affiliate.go @@ -10,17 +10,17 @@ import ( type AffiliateAPI interface { // GetAccount Get Account - // Description: This endpoint allows getting affiliate user rebate information. + // Description: Affiliate user rebate information can be obtained at this endpoint. // Documentation: https://www.kucoin.com/docs-new/api-3470279 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 30 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 30 | + // +-----------------------+------------+ GetAccount(ctx context.Context) (*GetAccountResp, error) } diff --git a/sdk/golang/pkg/generate/affiliate/affiliate/types_get_account_margins.go b/sdk/golang/pkg/generate/affiliate/affiliate/types_get_account_margins.go index eb74d59d..d2a1f51e 100644 --- a/sdk/golang/pkg/generate/affiliate/affiliate/types_get_account_margins.go +++ b/sdk/golang/pkg/generate/affiliate/affiliate/types_get_account_margins.go @@ -8,7 +8,7 @@ type GetAccountMargins struct { MarginCcy string `json:"marginCcy,omitempty"` // Maintenance Quantity (Calculated with Margin Coefficient) MarginQty string `json:"marginQty,omitempty"` - // Margin Coefficient return real time margin discount rate to USDT + // Margin Coefficient return real-time margin discount rate to USDT MarginFactor string `json:"marginFactor,omitempty"` } diff --git a/sdk/golang/pkg/generate/broker/apibroker/api_api_broker.go b/sdk/golang/pkg/generate/broker/apibroker/api_api_broker.go index c03e81df..7b04bd54 100644 --- a/sdk/golang/pkg/generate/broker/apibroker/api_api_broker.go +++ b/sdk/golang/pkg/generate/broker/apibroker/api_api_broker.go @@ -10,17 +10,17 @@ import ( type APIBrokerAPI interface { // GetRebase Get Broker Rebate - // Description: This interface supports downloading Broker rebate orders + // Description: This interface supports the downloading of Broker rebate orders. // Documentation: https://www.kucoin.com/docs-new/api-3470280 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 3 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+------------+ GetRebase(req *GetRebaseReq, ctx context.Context) (*GetRebaseResp, error) } diff --git a/sdk/golang/pkg/generate/broker/apibroker/types_get_rebase_req.go b/sdk/golang/pkg/generate/broker/apibroker/types_get_rebase_req.go index 9acc4cdd..6ce9b7cd 100644 --- a/sdk/golang/pkg/generate/broker/apibroker/types_get_rebase_req.go +++ b/sdk/golang/pkg/generate/broker/apibroker/types_get_rebase_req.go @@ -8,7 +8,7 @@ type GetRebaseReq struct { Begin *string `json:"begin,omitempty" url:"begin,omitempty"` // End time, for example: 20241010 (query data with a maximum interval of 6 months) End *string `json:"end,omitempty" url:"end,omitempty"` - // Transaction type, 1: spot 2: futures + // Transaction type: 1, spot; 2, futures TradeType *string `json:"tradeType,omitempty" url:"tradeType,omitempty"` } @@ -54,7 +54,7 @@ func (builder *GetRebaseReqBuilder) SetEnd(value string) *GetRebaseReqBuilder { return builder } -// Transaction type, 1: spot 2: futures +// Transaction type: 1, spot; 2, futures func (builder *GetRebaseReqBuilder) SetTradeType(value string) *GetRebaseReqBuilder { builder.obj.TradeType = &value return builder diff --git a/sdk/golang/pkg/generate/broker/ndbroker/api_nd_broker.go b/sdk/golang/pkg/generate/broker/ndbroker/api_nd_broker.go index c41c2d91..8daf0540 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/api_nd_broker.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/api_nd_broker.go @@ -10,185 +10,185 @@ import ( type NDBrokerAPI interface { // GetBrokerInfo Get Broker Info - // Description: This endpoint supports querying the basic information of the current Broker + // Description: This endpoint supports querying the basic information of the current Broker. // Documentation: https://www.kucoin.com/docs-new/api-3470282 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | BROKER | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | BROKER | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | BROKER | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | BROKER | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetBrokerInfo(req *GetBrokerInfoReq, ctx context.Context) (*GetBrokerInfoResp, error) - // AddSubAccount Add SubAccount - // Description: This endpoint supports Broker users to create sub-accounts + // AddSubAccount Add sub-account + // Description: This endpoint supports Broker users creating sub-accounts. // Documentation: https://www.kucoin.com/docs-new/api-3470290 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | BROKER | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | BROKER | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | BROKER | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | BROKER | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ AddSubAccount(req *AddSubAccountReq, ctx context.Context) (*AddSubAccountResp, error) - // GetSubAccount Get SubAccount - // Description: This interface supports querying sub-accounts created by Broker + // GetSubAccount Get sub-account + // Description: This interface supports querying sub-accounts created by Broker. // Documentation: https://www.kucoin.com/docs-new/api-3470283 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | BROKER | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | BROKER | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | BROKER | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | BROKER | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetSubAccount(req *GetSubAccountReq, ctx context.Context) (*GetSubAccountResp, error) - // AddSubAccountApi Add SubAccount API - // Description: This interface supports the creation of Broker sub-account APIKEY + // AddSubAccountApi Add sub-account API + // Description: This interface supports the creation of Broker sub-account APIKEY. // Documentation: https://www.kucoin.com/docs-new/api-3470291 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | BROKER | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | BROKER | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | BROKER | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | BROKER | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ AddSubAccountApi(req *AddSubAccountApiReq, ctx context.Context) (*AddSubAccountApiResp, error) - // GetSubAccountAPI Get SubAccount API - // Description: This interface supports querying the Broker’s sub-account APIKEY + // GetSubAccountAPI Get sub-account API + // Description: This interface supports querying the Broker’s sub-account APIKEY. // Documentation: https://www.kucoin.com/docs-new/api-3470284 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | BROKER | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | BROKER | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | BROKER | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | BROKER | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetSubAccountAPI(req *GetSubAccountAPIReq, ctx context.Context) (*GetSubAccountAPIResp, error) - // ModifySubAccountApi Modify SubAccount API - // Description: This interface supports modify the Broker’s sub-account APIKEY + // ModifySubAccountApi Modify sub-account API + // Description: This interface supports modifying the Broker’s sub-account APIKEY. // Documentation: https://www.kucoin.com/docs-new/api-3470292 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | BROKER | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | BROKER | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | BROKER | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | BROKER | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ ModifySubAccountApi(req *ModifySubAccountApiReq, ctx context.Context) (*ModifySubAccountApiResp, error) - // DeleteSubAccountAPI Delete SubAccount API - // Description: This interface supports deleting Broker’s sub-account APIKEY + // DeleteSubAccountAPI Delete sub-account API + // Description: This interface supports deleting Broker’s sub-account APIKEY. // Documentation: https://www.kucoin.com/docs-new/api-3470289 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | BROKER | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | BROKER | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | BROKER | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | BROKER | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ DeleteSubAccountAPI(req *DeleteSubAccountAPIReq, ctx context.Context) (*DeleteSubAccountAPIResp, error) // Transfer Transfer - // Description: This endpoint supports fund transfer between Broker account and Broker sub-accounts. Please be aware that withdrawal from sub-account is not directly supported. Broker has to transfer funds from broker sub-account to broker account to initiate the withdrawals. + // Description: This endpoint supports fund transfer between Broker accounts and Broker sub-accounts. Please be aware that withdrawal from sub-accounts is not directly supported. Broker has to transfer funds from broker sub-account to broker account to initiate the withdrawals. // Documentation: https://www.kucoin.com/docs-new/api-3470293 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | BROKER | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | BROKER | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | BROKER | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | BROKER | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ Transfer(req *TransferReq, ctx context.Context) (*TransferResp, error) // GetTransferHistory Get Transfer History - // Description: This endpoint supports querying transfer records of the broker itself and its created sub-accounts. + // Description: This endpoint supports querying the transfer records of the broker itself and its created sub-accounts. // Documentation: https://www.kucoin.com/docs-new/api-3470286 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | BROKER | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | BROKER | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | BROKER | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | BROKER | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ GetTransferHistory(req *GetTransferHistoryReq, ctx context.Context) (*GetTransferHistoryResp, error) // GetDepositList Get Deposit List - // Description: This endpoint can obtain the deposit records of each sub-account under the ND Broker. + // Description: The deposit records of each sub-account under the ND broker can be obtained at this endpoint. // Documentation: https://www.kucoin.com/docs-new/api-3470285 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | BROKER | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | BROKER | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | BROKER | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | BROKER | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ GetDepositList(req *GetDepositListReq, ctx context.Context) (*GetDepositListResp, error) // GetDepositDetail Get Deposit Detail - // Description: This endpoint supports querying the deposit record of sub-accounts created by a Broker (excluding main account of nd broker) + // Description: This endpoint supports querying the deposit record of sub-accounts created by a Broker (excluding main account of ND broker). // Documentation: https://www.kucoin.com/docs-new/api-3470288 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | BROKER | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | BROKER | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | BROKER | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | BROKER | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ GetDepositDetail(req *GetDepositDetailReq, ctx context.Context) (*GetDepositDetailResp, error) // GetWithdrawDetail Get Withdraw Detail - // Description: This endpoint supports querying the withdrawal records of sub-accounts created by a Broker (excluding main account of nd broker). + // Description: This endpoint supports querying the withdrawal records of sub-accounts created by a Broker (excluding main account of ND broker). // Documentation: https://www.kucoin.com/docs-new/api-3470287 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | BROKER | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | BROKER | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | BROKER | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | BROKER | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ GetWithdrawDetail(req *GetWithdrawDetailReq, ctx context.Context) (*GetWithdrawDetailResp, error) // GetRebase Get Broker Rebate - // Description: This interface supports downloading Broker rebate orders + // Description: This interface supports the downloading of Broker rebate orders. // Documentation: https://www.kucoin.com/docs-new/api-3470281 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | BROKER | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | BROKER | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | BROKER | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | BROKER | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ GetRebase(req *GetRebaseReq, ctx context.Context) (*GetRebaseResp, error) } diff --git a/sdk/golang/pkg/generate/broker/ndbroker/api_nd_broker.template b/sdk/golang/pkg/generate/broker/ndbroker/api_nd_broker.template index 022234d3..bb5ac27b 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/api_nd_broker.template +++ b/sdk/golang/pkg/generate/broker/ndbroker/api_nd_broker.template @@ -26,7 +26,7 @@ func TestNDBrokerGetBrokerInfoReq(t *testing.T) { func TestNDBrokerAddSubAccountReq(t *testing.T) { // AddSubAccount - // Add SubAccount + // Add sub-account // /api/v1/broker/nd/account builder := ndbroker.NewAddSubAccountReqBuilder() @@ -49,7 +49,7 @@ func TestNDBrokerAddSubAccountReq(t *testing.T) { func TestNDBrokerGetSubAccountReq(t *testing.T) { // GetSubAccount - // Get SubAccount + // Get sub-account // /api/v1/broker/nd/account builder := ndbroker.NewGetSubAccountReqBuilder() @@ -72,7 +72,7 @@ func TestNDBrokerGetSubAccountReq(t *testing.T) { func TestNDBrokerAddSubAccountApiReq(t *testing.T) { // AddSubAccountApi - // Add SubAccount API + // Add sub-account API // /api/v1/broker/nd/account/apikey builder := ndbroker.NewAddSubAccountApiReqBuilder() @@ -95,7 +95,7 @@ func TestNDBrokerAddSubAccountApiReq(t *testing.T) { func TestNDBrokerGetSubAccountAPIReq(t *testing.T) { // GetSubAccountAPI - // Get SubAccount API + // Get sub-account API // /api/v1/broker/nd/account/apikey builder := ndbroker.NewGetSubAccountAPIReqBuilder() @@ -118,7 +118,7 @@ func TestNDBrokerGetSubAccountAPIReq(t *testing.T) { func TestNDBrokerModifySubAccountApiReq(t *testing.T) { // ModifySubAccountApi - // Modify SubAccount API + // Modify sub-account API // /api/v1/broker/nd/account/update-apikey builder := ndbroker.NewModifySubAccountApiReqBuilder() @@ -141,7 +141,7 @@ func TestNDBrokerModifySubAccountApiReq(t *testing.T) { func TestNDBrokerDeleteSubAccountAPIReq(t *testing.T) { // DeleteSubAccountAPI - // Delete SubAccount API + // Delete sub-account API // /api/v1/broker/nd/account/apikey builder := ndbroker.NewDeleteSubAccountAPIReqBuilder() diff --git a/sdk/golang/pkg/generate/broker/ndbroker/api_nd_broker_test.go b/sdk/golang/pkg/generate/broker/ndbroker/api_nd_broker_test.go index 5c574a55..f783b4fe 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/api_nd_broker_test.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/api_nd_broker_test.go @@ -37,7 +37,7 @@ func TestNDBrokerGetBrokerInfoRespModel(t *testing.T) { func TestNDBrokerAddSubAccountReqModel(t *testing.T) { // AddSubAccount - // Add SubAccount + // Add sub-account // /api/v1/broker/nd/account data := "{\"accountName\": \"Account1\"}" @@ -49,7 +49,7 @@ func TestNDBrokerAddSubAccountReqModel(t *testing.T) { func TestNDBrokerAddSubAccountRespModel(t *testing.T) { // AddSubAccount - // Add SubAccount + // Add sub-account // /api/v1/broker/nd/account data := "{\n \"code\": \"200000\",\n \"data\": {\n \"accountName\": \"Account15\",\n \"uid\": \"226383154\",\n \"createdAt\": 1729819381908,\n \"level\": 0\n }\n}" @@ -65,7 +65,7 @@ func TestNDBrokerAddSubAccountRespModel(t *testing.T) { func TestNDBrokerGetSubAccountReqModel(t *testing.T) { // GetSubAccount - // Get SubAccount + // Get sub-account // /api/v1/broker/nd/account data := "{\"uid\": \"226383154\", \"currentPage\": 1, \"pageSize\": 20}" @@ -77,7 +77,7 @@ func TestNDBrokerGetSubAccountReqModel(t *testing.T) { func TestNDBrokerGetSubAccountRespModel(t *testing.T) { // GetSubAccount - // Get SubAccount + // Get sub-account // /api/v1/broker/nd/account data := "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 20,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"accountName\": \"Account15\",\n \"uid\": \"226383154\",\n \"createdAt\": 1729819382000,\n \"level\": 0\n }\n ]\n }\n}" @@ -93,7 +93,7 @@ func TestNDBrokerGetSubAccountRespModel(t *testing.T) { func TestNDBrokerAddSubAccountApiReqModel(t *testing.T) { // AddSubAccountApi - // Add SubAccount API + // Add sub-account API // /api/v1/broker/nd/account/apikey data := "{\"uid\": \"226383154\", \"passphrase\": \"11223344\", \"ipWhitelist\": [\"127.0.0.1\", \"123.123.123.123\"], \"permissions\": [\"general\", \"spot\"], \"label\": \"This is remarks\"}" @@ -105,7 +105,7 @@ func TestNDBrokerAddSubAccountApiReqModel(t *testing.T) { func TestNDBrokerAddSubAccountApiRespModel(t *testing.T) { // AddSubAccountApi - // Add SubAccount API + // Add sub-account API // /api/v1/broker/nd/account/apikey data := "{\n \"code\": \"200000\",\n \"data\": {\n \"uid\": \"226383154\",\n \"label\": \"This is remarks\",\n \"apiKey\": \"671afb36cee20f00015cfaf1\",\n \"secretKey\": \"d694df2******5bae05b96\",\n \"apiVersion\": 3,\n \"permissions\": [\n \"General\",\n \"Spot\"\n ],\n \"ipWhitelist\": [\n \"127.0.0.1\",\n \"123.123.123.123\"\n ],\n \"createdAt\": 1729821494000\n }\n}" @@ -121,7 +121,7 @@ func TestNDBrokerAddSubAccountApiRespModel(t *testing.T) { func TestNDBrokerGetSubAccountAPIReqModel(t *testing.T) { // GetSubAccountAPI - // Get SubAccount API + // Get sub-account API // /api/v1/broker/nd/account/apikey data := "{\"uid\": \"226383154\", \"apiKey\": \"671afb36cee20f00015cfaf1\"}" @@ -133,7 +133,7 @@ func TestNDBrokerGetSubAccountAPIReqModel(t *testing.T) { func TestNDBrokerGetSubAccountAPIRespModel(t *testing.T) { // GetSubAccountAPI - // Get SubAccount API + // Get sub-account API // /api/v1/broker/nd/account/apikey data := "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"uid\": \"226383154\",\n \"label\": \"This is remarks\",\n \"apiKey\": \"671afb36cee20f00015cfaf1\",\n \"apiVersion\": 3,\n \"permissions\": [\n \"General\",\n \"Spot\"\n ],\n \"ipWhitelist\": [\n \"127.**.1\",\n \"203.**.154\"\n ],\n \"createdAt\": 1729821494000\n }\n ]\n}" @@ -149,7 +149,7 @@ func TestNDBrokerGetSubAccountAPIRespModel(t *testing.T) { func TestNDBrokerModifySubAccountApiReqModel(t *testing.T) { // ModifySubAccountApi - // Modify SubAccount API + // Modify sub-account API // /api/v1/broker/nd/account/update-apikey data := "{\"uid\": \"226383154\", \"apiKey\": \"671afb36cee20f00015cfaf1\", \"ipWhitelist\": [\"127.0.0.1\", \"123.123.123.123\"], \"permissions\": [\"general\", \"spot\"], \"label\": \"This is remarks\"}" @@ -161,7 +161,7 @@ func TestNDBrokerModifySubAccountApiReqModel(t *testing.T) { func TestNDBrokerModifySubAccountApiRespModel(t *testing.T) { // ModifySubAccountApi - // Modify SubAccount API + // Modify sub-account API // /api/v1/broker/nd/account/update-apikey data := "{\n \"code\": \"200000\",\n \"data\": {\n \"uid\": \"226383154\",\n \"label\": \"This is remarks\",\n \"apiKey\": \"671afb36cee20f00015cfaf1\",\n \"apiVersion\": 3,\n \"permissions\": [\n \"General\",\n \"Spot\"\n ],\n \"ipWhitelist\": [\n \"127.**.1\",\n \"123.**.123\"\n ],\n \"createdAt\": 1729821494000\n }\n}" @@ -177,7 +177,7 @@ func TestNDBrokerModifySubAccountApiRespModel(t *testing.T) { func TestNDBrokerDeleteSubAccountAPIReqModel(t *testing.T) { // DeleteSubAccountAPI - // Delete SubAccount API + // Delete sub-account API // /api/v1/broker/nd/account/apikey data := "{\"uid\": \"226383154\", \"apiKey\": \"671afb36cee20f00015cfaf1\"}" @@ -189,7 +189,7 @@ func TestNDBrokerDeleteSubAccountAPIReqModel(t *testing.T) { func TestNDBrokerDeleteSubAccountAPIRespModel(t *testing.T) { // DeleteSubAccountAPI - // Delete SubAccount API + // Delete sub-account API // /api/v1/broker/nd/account/apikey data := "{\n \"code\": \"200000\",\n \"data\": true\n}" diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_api_req.go b/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_api_req.go index 85bdad3f..f290778b 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_api_req.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_api_req.go @@ -4,13 +4,13 @@ package ndbroker // AddSubAccountApiReq struct for AddSubAccountApiReq type AddSubAccountApiReq struct { - // Subaccount UID + // Sub-account UID Uid string `json:"uid,omitempty"` // API passphrase Passphrase string `json:"passphrase,omitempty"` // IP whitelist list, supports up to 20 IPs IpWhitelist []string `json:"ipWhitelist,omitempty"` - // Permission group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) + // Permission group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). Permissions []string `json:"permissions,omitempty"` // apikey remarks (length 4~32) Label string `json:"label,omitempty"` @@ -53,7 +53,7 @@ func NewAddSubAccountApiReqBuilder() *AddSubAccountApiReqBuilder { return &AddSubAccountApiReqBuilder{obj: NewAddSubAccountApiReqWithDefaults()} } -// Subaccount UID +// Sub-account UID func (builder *AddSubAccountApiReqBuilder) SetUid(value string) *AddSubAccountApiReqBuilder { builder.obj.Uid = value return builder @@ -71,7 +71,7 @@ func (builder *AddSubAccountApiReqBuilder) SetIpWhitelist(value []string) *AddSu return builder } -// Permission group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) +// Permission group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). func (builder *AddSubAccountApiReqBuilder) SetPermissions(value []string) *AddSubAccountApiReqBuilder { builder.obj.Permissions = value return builder diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_api_resp.go b/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_api_resp.go index db7c5cb8..4acdd4cb 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_api_resp.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_api_resp.go @@ -10,7 +10,7 @@ import ( type AddSubAccountApiResp struct { // common response CommonResponse *types.RestResponse - // Sub-Account UID + // Sub-account UID Uid string `json:"uid,omitempty"` // apikey remarks Label string `json:"label,omitempty"` @@ -24,7 +24,7 @@ type AddSubAccountApiResp struct { Permissions []string `json:"permissions,omitempty"` // IP whitelist list IpWhitelist []string `json:"ipWhitelist,omitempty"` - // Creation time, unix timestamp (milliseconds) + // Creation time, Unix timestamp (milliseconds) CreatedAt int64 `json:"createdAt,omitempty"` } diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_req.go b/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_req.go index e0624a89..4aa9a983 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_req.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_req.go @@ -4,7 +4,7 @@ package ndbroker // AddSubAccountReq struct for AddSubAccountReq type AddSubAccountReq struct { - // Sub Account Name, Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication. + // Sub-account Name. Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication. AccountName string `json:"accountName,omitempty"` } @@ -37,7 +37,7 @@ func NewAddSubAccountReqBuilder() *AddSubAccountReqBuilder { return &AddSubAccountReqBuilder{obj: NewAddSubAccountReqWithDefaults()} } -// Sub Account Name, Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication. +// Sub-account Name. Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication. func (builder *AddSubAccountReqBuilder) SetAccountName(value string) *AddSubAccountReqBuilder { builder.obj.AccountName = value return builder diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_resp.go b/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_resp.go index 88868ff4..d687401c 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_resp.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_add_sub_account_resp.go @@ -10,13 +10,13 @@ import ( type AddSubAccountResp struct { // common response CommonResponse *types.RestResponse - // Sub-Account name + // Sub-account name AccountName string `json:"accountName,omitempty"` - // Sub-Account UID + // Sub-account UID Uid string `json:"uid,omitempty"` - // Creation time, unix timestamp (milliseconds) + // Creation time, Unix timestamp (milliseconds) CreatedAt int64 `json:"createdAt,omitempty"` - // Subaccount VIP level + // Sub-account VIP level Level int32 `json:"level,omitempty"` } diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_get_broker_info_req.go b/sdk/golang/pkg/generate/broker/ndbroker/types_get_broker_info_req.go index a1d9a2b8..941dbc92 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_get_broker_info_req.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_get_broker_info_req.go @@ -8,7 +8,7 @@ type GetBrokerInfoReq struct { Begin *string `json:"begin,omitempty" url:"begin,omitempty"` // End time, for example: 20230210 (query data with a maximum interval of 6 months) End *string `json:"end,omitempty" url:"end,omitempty"` - // Transaction type, 1: spot 2: futures + // Transaction type: 1, spot; 2: futures TradeType *string `json:"tradeType,omitempty" url:"tradeType,omitempty"` } @@ -54,7 +54,7 @@ func (builder *GetBrokerInfoReqBuilder) SetEnd(value string) *GetBrokerInfoReqBu return builder } -// Transaction type, 1: spot 2: futures +// Transaction type: 1, spot; 2: futures func (builder *GetBrokerInfoReqBuilder) SetTradeType(value string) *GetBrokerInfoReqBuilder { builder.obj.TradeType = &value return builder diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_get_broker_info_resp.go b/sdk/golang/pkg/generate/broker/ndbroker/types_get_broker_info_resp.go index e7aca955..a63144b1 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_get_broker_info_resp.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_get_broker_info_resp.go @@ -12,7 +12,7 @@ type GetBrokerInfoResp struct { CommonResponse *types.RestResponse // Number of sub-accounts created AccountSize int32 `json:"accountSize,omitempty"` - // The maximum number of sub-accounts allowed to be created, null means no limit + // The maximum number of sub-accounts allowed to be created; null means no limit MaxAccountSize int32 `json:"maxAccountSize,omitempty"` // Broker level Level int32 `json:"level,omitempty"` diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_get_deposit_detail_resp.go b/sdk/golang/pkg/generate/broker/ndbroker/types_get_deposit_detail_resp.go index 3171561f..c02daa82 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_get_deposit_detail_resp.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_get_deposit_detail_resp.go @@ -10,7 +10,7 @@ import ( type GetDepositDetailResp struct { // common response CommonResponse *types.RestResponse - // chain id of currency + // Chain ID of currency Chain string `json:"chain,omitempty"` // Hash Hash string `json:"hash,omitempty"` diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_get_deposit_list_data.go b/sdk/golang/pkg/generate/broker/ndbroker/types_get_deposit_list_data.go index ac69d22c..5a6ae6a2 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_get_deposit_list_data.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_get_deposit_list_data.go @@ -10,7 +10,7 @@ type GetDepositListData struct { Hash string `json:"hash,omitempty"` // Deposit address Address string `json:"address,omitempty"` - // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + // Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. Memo string `json:"memo,omitempty"` // Deposit amount Amount string `json:"amount,omitempty"` @@ -24,11 +24,11 @@ type GetDepositListData struct { WalletTxId string `json:"walletTxId,omitempty"` // Status. Available value: PROCESSING, SUCCESS, FAILURE Status string `json:"status,omitempty"` - // remark + // Remark Remark string `json:"remark,omitempty"` - // chain name of currency + // Chain name of currency Chain string `json:"chain,omitempty"` - // Creation time of the database record + // Database record creation time CreatedAt int64 `json:"createdAt,omitempty"` // Update time of the database record UpdatedAt int64 `json:"updatedAt,omitempty"` diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_get_deposit_list_req.go b/sdk/golang/pkg/generate/broker/ndbroker/types_get_deposit_list_req.go index 7d2c8050..f12a0ac4 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_get_deposit_list_req.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_get_deposit_list_req.go @@ -10,9 +10,9 @@ type GetDepositListReq struct { Status *string `json:"status,omitempty" url:"status,omitempty"` // hash Hash *string `json:"hash,omitempty" url:"hash,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartTimestamp *int64 `json:"startTimestamp,omitempty" url:"startTimestamp,omitempty"` - // End time (milisecond),Default sorting in descending order + // End time (milliseconds); default sorting in descending order EndTimestamp *int64 `json:"endTimestamp,omitempty" url:"endTimestamp,omitempty"` // Maximum number of returned items, maximum 1000, default 1000 Limit *int32 `json:"limit,omitempty" url:"limit,omitempty"` @@ -73,13 +73,13 @@ func (builder *GetDepositListReqBuilder) SetHash(value string) *GetDepositListRe return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetDepositListReqBuilder) SetStartTimestamp(value int64) *GetDepositListReqBuilder { builder.obj.StartTimestamp = &value return builder } -// End time (milisecond),Default sorting in descending order +// End time (milliseconds); default sorting in descending order func (builder *GetDepositListReqBuilder) SetEndTimestamp(value int64) *GetDepositListReqBuilder { builder.obj.EndTimestamp = &value return builder diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_get_rebase_req.go b/sdk/golang/pkg/generate/broker/ndbroker/types_get_rebase_req.go index 65acf2c8..4c20db83 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_get_rebase_req.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_get_rebase_req.go @@ -8,7 +8,7 @@ type GetRebaseReq struct { Begin *string `json:"begin,omitempty" url:"begin,omitempty"` // End time, for example: 20241010 (query data with a maximum interval of 6 months) End *string `json:"end,omitempty" url:"end,omitempty"` - // Transaction type, 1: spot 2: futures + // Transaction type: 1, spot; 2, futures TradeType *string `json:"tradeType,omitempty" url:"tradeType,omitempty"` } @@ -54,7 +54,7 @@ func (builder *GetRebaseReqBuilder) SetEnd(value string) *GetRebaseReqBuilder { return builder } -// Transaction type, 1: spot 2: futures +// Transaction type: 1, spot; 2, futures func (builder *GetRebaseReqBuilder) SetTradeType(value string) *GetRebaseReqBuilder { builder.obj.TradeType = &value return builder diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_get_sub_account_api_data.go b/sdk/golang/pkg/generate/broker/ndbroker/types_get_sub_account_api_data.go index a011f94a..15e73883 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_get_sub_account_api_data.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_get_sub_account_api_data.go @@ -4,7 +4,7 @@ package ndbroker // GetSubAccountAPIData struct for GetSubAccountAPIData type GetSubAccountAPIData struct { - // Sub-Account UID + // Sub-account UID Uid string `json:"uid,omitempty"` // apikey remarks Label string `json:"label,omitempty"` @@ -16,7 +16,7 @@ type GetSubAccountAPIData struct { Permissions []string `json:"permissions,omitempty"` // IP whitelist list IpWhitelist []string `json:"ipWhitelist,omitempty"` - // Creation time, unix timestamp (milliseconds) + // Creation time, Unix timestamp (milliseconds) CreatedAt int64 `json:"createdAt,omitempty"` } diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_get_sub_account_items.go b/sdk/golang/pkg/generate/broker/ndbroker/types_get_sub_account_items.go index 62f46087..9b8a40d9 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_get_sub_account_items.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_get_sub_account_items.go @@ -8,7 +8,7 @@ type GetSubAccountItems struct { AccountName string `json:"accountName,omitempty"` // Sub-account UID Uid string `json:"uid,omitempty"` - // Creation time, unix timestamp (milliseconds) + // Creation time, Unix timestamp (milliseconds) CreatedAt int64 `json:"createdAt,omitempty"` // Sub-account VIP level Level int32 `json:"level,omitempty"` diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_get_sub_account_resp.go b/sdk/golang/pkg/generate/broker/ndbroker/types_get_sub_account_resp.go index 9fe4b3b7..6733e823 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_get_sub_account_resp.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_get_sub_account_resp.go @@ -16,7 +16,7 @@ type GetSubAccountResp struct { PageSize int32 `json:"pageSize,omitempty"` // Total Number TotalNum int32 `json:"totalNum,omitempty"` - // Total Page + // Total Pages TotalPage int32 `json:"totalPage,omitempty"` Items []GetSubAccountItems `json:"items,omitempty"` } diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_get_transfer_history_resp.go b/sdk/golang/pkg/generate/broker/ndbroker/types_get_transfer_history_resp.go index 732cf244..3fc811b9 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_get_transfer_history_resp.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_get_transfer_history_resp.go @@ -18,15 +18,15 @@ type GetTransferHistoryResp struct { Amount string `json:"amount,omitempty"` // UID of the user transferring out FromUid int32 `json:"fromUid,omitempty"` - // From Account Type:Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED + // From Account Type: Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED FromAccountType string `json:"fromAccountType,omitempty"` - // Trading pair, required if the account type is ISOLATED, e.g., BTC-USDT + // Trading pair (required if the account type is ISOLATED), e.g., BTC-USDT FromAccountTag string `json:"fromAccountTag,omitempty"` // UID of the user transferring in ToUid int32 `json:"toUid,omitempty"` - // Account Type:Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED + // Account Type: Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED ToAccountType string `json:"toAccountType,omitempty"` - // To Trading pair, required if the account type is ISOLATED, e.g., BTC-USDT + // To Trading pair (required if the account type is ISOLATED), e.g., BTC-USDT ToAccountTag string `json:"toAccountTag,omitempty"` // Status: PROCESSING (processing), SUCCESS (successful), FAILURE (failed) Status string `json:"status,omitempty"` diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_get_withdraw_detail_resp.go b/sdk/golang/pkg/generate/broker/ndbroker/types_get_withdraw_detail_resp.go index 898d7339..05e1e5ef 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_get_withdraw_detail_resp.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_get_withdraw_detail_resp.go @@ -12,7 +12,7 @@ type GetWithdrawDetailResp struct { CommonResponse *types.RestResponse // Withdrawal ID Id string `json:"id,omitempty"` - // chain id of currency + // Chain ID of currency Chain string `json:"chain,omitempty"` // Wallet Transaction ID WalletTxId string `json:"walletTxId,omitempty"` diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_modify_sub_account_api_req.go b/sdk/golang/pkg/generate/broker/ndbroker/types_modify_sub_account_api_req.go index eec23e65..c0b91005 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_modify_sub_account_api_req.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_modify_sub_account_api_req.go @@ -4,15 +4,15 @@ package ndbroker // ModifySubAccountApiReq struct for ModifySubAccountApiReq type ModifySubAccountApiReq struct { - // Subaccount UID + // Sub-account UID Uid string `json:"uid,omitempty"` // IP whitelist list, supports up to 20 IPs IpWhitelist []string `json:"ipWhitelist,omitempty"` - // [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) + // [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). Permissions []string `json:"permissions,omitempty"` // apikey remarks (length 4~32) Label string `json:"label,omitempty"` - // Subaccount apiKey + // Sub-account apiKey ApiKey string `json:"apiKey,omitempty"` } @@ -53,7 +53,7 @@ func NewModifySubAccountApiReqBuilder() *ModifySubAccountApiReqBuilder { return &ModifySubAccountApiReqBuilder{obj: NewModifySubAccountApiReqWithDefaults()} } -// Subaccount UID +// Sub-account UID func (builder *ModifySubAccountApiReqBuilder) SetUid(value string) *ModifySubAccountApiReqBuilder { builder.obj.Uid = value return builder @@ -65,7 +65,7 @@ func (builder *ModifySubAccountApiReqBuilder) SetIpWhitelist(value []string) *Mo return builder } -// [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) +// [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). func (builder *ModifySubAccountApiReqBuilder) SetPermissions(value []string) *ModifySubAccountApiReqBuilder { builder.obj.Permissions = value return builder @@ -77,7 +77,7 @@ func (builder *ModifySubAccountApiReqBuilder) SetLabel(value string) *ModifySubA return builder } -// Subaccount apiKey +// Sub-account apiKey func (builder *ModifySubAccountApiReqBuilder) SetApiKey(value string) *ModifySubAccountApiReqBuilder { builder.obj.ApiKey = value return builder diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_modify_sub_account_api_resp.go b/sdk/golang/pkg/generate/broker/ndbroker/types_modify_sub_account_api_resp.go index e5c396d5..63b5564f 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_modify_sub_account_api_resp.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_modify_sub_account_api_resp.go @@ -10,7 +10,7 @@ import ( type ModifySubAccountApiResp struct { // common response CommonResponse *types.RestResponse - // Sub-Account UID + // Sub-account UID Uid string `json:"uid,omitempty"` // apikey remarks Label string `json:"label,omitempty"` @@ -22,7 +22,7 @@ type ModifySubAccountApiResp struct { Permissions []string `json:"permissions,omitempty"` // IP whitelist list IpWhitelist []string `json:"ipWhitelist,omitempty"` - // Creation time, unix timestamp (milliseconds) + // Creation time, Unix timestamp (milliseconds) CreatedAt int64 `json:"createdAt,omitempty"` } diff --git a/sdk/golang/pkg/generate/broker/ndbroker/types_transfer_req.go b/sdk/golang/pkg/generate/broker/ndbroker/types_transfer_req.go index 472087d9..b6950ad1 100644 --- a/sdk/golang/pkg/generate/broker/ndbroker/types_transfer_req.go +++ b/sdk/golang/pkg/generate/broker/ndbroker/types_transfer_req.go @@ -12,11 +12,11 @@ type TransferReq struct { Direction string `json:"direction,omitempty"` // Broker account types: MAIN (Funding account), TRADE (Spot trading account) AccountType string `json:"accountType,omitempty"` - // Broker subaccount uid, must be the Broker subaccount created by the current Broker user. + // Broker sub-account UID, must be the Broker sub-account created by the current Broker user. SpecialUid string `json:"specialUid,omitempty"` // Broker sub-account types: MAIN (Funding account), TRADE (Spot trading account) SpecialAccountType string `json:"specialAccountType,omitempty"` - // Client Order Id, The unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. + // Client Order ID, the unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. ClientOid string `json:"clientOid,omitempty"` } @@ -85,7 +85,7 @@ func (builder *TransferReqBuilder) SetAccountType(value string) *TransferReqBuil return builder } -// Broker subaccount uid, must be the Broker subaccount created by the current Broker user. +// Broker sub-account UID, must be the Broker sub-account created by the current Broker user. func (builder *TransferReqBuilder) SetSpecialUid(value string) *TransferReqBuilder { builder.obj.SpecialUid = value return builder @@ -97,7 +97,7 @@ func (builder *TransferReqBuilder) SetSpecialAccountType(value string) *Transfer return builder } -// Client Order Id, The unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. +// Client Order ID, the unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. func (builder *TransferReqBuilder) SetClientOid(value string) *TransferReqBuilder { builder.obj.ClientOid = value return builder diff --git a/sdk/golang/pkg/generate/copytrading/futures/api_futures.go b/sdk/golang/pkg/generate/copytrading/futures/api_futures.go index a75ebbd8..206bbf7c 100644 --- a/sdk/golang/pkg/generate/copytrading/futures/api_futures.go +++ b/sdk/golang/pkg/generate/copytrading/futures/api_futures.go @@ -12,155 +12,155 @@ type FuturesAPI interface { // AddOrder Add Order // Description: Place 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. // Documentation: https://www.kucoin.com/docs-new/api-3470363 - // +---------------------+------------------+ - // | Extra API Info | Value | - // +---------------------+------------------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | LEADTRADEFUTURES | - // | API-RATE-LIMIT-POOL | COPYTRADING | - // | API-RATE-LIMIT | 2 | - // +---------------------+------------------+ + // +-----------------------+------------------+ + // | Extra API Info | Value | + // +-----------------------+------------------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | LEADTRADEFUTURES | + // | API-RATE-LIMIT-POOL | COPYTRADING | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+------------------+ AddOrder(req *AddOrderReq, ctx context.Context) (*AddOrderResp, error) // AddOrderTest Add Order Test - // Description: Place order to the futures trading system just for validation + // Description: Place order the futures trading system just for validation // Documentation: https://www.kucoin.com/docs-new/api-3470618 - // +---------------------+-------------+ - // | Extra API Info | Value | - // +---------------------+-------------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | COPYTRADING | - // | API-RATE-LIMIT | 2 | - // +---------------------+-------------+ + // +-----------------------+------------------+ + // | Extra API Info | Value | + // +-----------------------+------------------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | LEADTRADEFUTURES | + // | API-RATE-LIMIT-POOL | COPYTRADING | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+------------------+ AddOrderTest(req *AddOrderTestReq, ctx context.Context) (*AddOrderTestResp, error) // AddTPSLOrder Add Take Profit And Stop Loss Order // 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. // Documentation: https://www.kucoin.com/docs-new/api-3470619 - // +---------------------+-------------+ - // | Extra API Info | Value | - // +---------------------+-------------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | COPYTRADING | - // | API-RATE-LIMIT | 2 | - // +---------------------+-------------+ + // +-----------------------+------------------+ + // | Extra API Info | Value | + // +-----------------------+------------------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | LEADTRADEFUTURES | + // | API-RATE-LIMIT-POOL | COPYTRADING | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+------------------+ AddTPSLOrder(req *AddTPSLOrderReq, ctx context.Context) (*AddTPSLOrderResp, error) // CancelOrderById Cancel Order By OrderId - // Description: Cancel order by system generated orderId. + // Description: Cancel order by system-generated orderId. // Documentation: https://www.kucoin.com/docs-new/api-3470620 - // +---------------------+-------------+ - // | Extra API Info | Value | - // +---------------------+-------------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | COPYTRADING | - // | API-RATE-LIMIT | 1 | - // +---------------------+-------------+ + // +-----------------------+------------------+ + // | Extra API Info | Value | + // +-----------------------+------------------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | LEADTRADEFUTURES | + // | API-RATE-LIMIT-POOL | COPYTRADING | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+------------------+ CancelOrderById(req *CancelOrderByIdReq, ctx context.Context) (*CancelOrderByIdResp, error) // CancelOrderByClientOid Cancel Order By ClientOid - // Description: Cancel order by client defined orderId. + // Description: Cancel order by client-defined orderId. // Documentation: https://www.kucoin.com/docs-new/api-3470621 - // +---------------------+-------------+ - // | Extra API Info | Value | - // +---------------------+-------------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | COPYTRADING | - // | API-RATE-LIMIT | 1 | - // +---------------------+-------------+ + // +-----------------------+------------------+ + // | Extra API Info | Value | + // +-----------------------+------------------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | LEADTRADEFUTURES | + // | API-RATE-LIMIT-POOL | COPYTRADING | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+------------------+ CancelOrderByClientOid(req *CancelOrderByClientOidReq, ctx context.Context) (*CancelOrderByClientOidResp, error) // GetMaxOpenSize Get Max Open Size // Description: Get Maximum Open Position Size. // Documentation: https://www.kucoin.com/docs-new/api-3470612 - // +---------------------+-------------+ - // | Extra API Info | Value | - // +---------------------+-------------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | COPYTRADING | - // | API-RATE-LIMIT | 2 | - // +---------------------+-------------+ + // +-----------------------+------------------+ + // | Extra API Info | Value | + // +-----------------------+------------------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | LEADTRADEFUTURES | + // | API-RATE-LIMIT-POOL | COPYTRADING | + // | API-RATE-LIMIT-WEIGHT | 4 | + // +-----------------------+------------------+ GetMaxOpenSize(req *GetMaxOpenSizeReq, ctx context.Context) (*GetMaxOpenSizeResp, error) // GetMaxWithdrawMargin Get Max Withdraw Margin // Description: This interface can query the maximum amount of margin that the current position supports withdrawal. // Documentation: https://www.kucoin.com/docs-new/api-3470616 - // +---------------------+-------------+ - // | Extra API Info | Value | - // +---------------------+-------------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | COPYTRADING | - // | API-RATE-LIMIT | 10 | - // +---------------------+-------------+ + // +-----------------------+------------------+ + // | Extra API Info | Value | + // +-----------------------+------------------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | LEADTRADEFUTURES | + // | API-RATE-LIMIT-POOL | COPYTRADING | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+------------------+ GetMaxWithdrawMargin(req *GetMaxWithdrawMarginReq, ctx context.Context) (*GetMaxWithdrawMarginResp, error) // AddIsolatedMargin Add Isolated Margin // Description: Add Isolated Margin Manually. // Documentation: https://www.kucoin.com/docs-new/api-3470614 - // +---------------------+-------------+ - // | Extra API Info | Value | - // +---------------------+-------------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | COPYTRADING | - // | API-RATE-LIMIT | 4 | - // +---------------------+-------------+ + // +-----------------------+------------------+ + // | Extra API Info | Value | + // +-----------------------+------------------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | LEADTRADEFUTURES | + // | API-RATE-LIMIT-POOL | COPYTRADING | + // | API-RATE-LIMIT-WEIGHT | 4 | + // +-----------------------+------------------+ AddIsolatedMargin(req *AddIsolatedMarginReq, ctx context.Context) (*AddIsolatedMarginResp, error) // RemoveIsolatedMargin Remove Isolated Margin // Description: Remove Isolated Margin Manually. // Documentation: https://www.kucoin.com/docs-new/api-3470615 - // +---------------------+-------------+ - // | Extra API Info | Value | - // +---------------------+-------------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | COPYTRADING | - // | API-RATE-LIMIT | 10 | - // +---------------------+-------------+ + // +-----------------------+------------------+ + // | Extra API Info | Value | + // +-----------------------+------------------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | LEADTRADEFUTURES | + // | API-RATE-LIMIT-POOL | COPYTRADING | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+------------------+ RemoveIsolatedMargin(req *RemoveIsolatedMarginReq, ctx context.Context) (*RemoveIsolatedMarginResp, error) // ModifyIsolatedMarginRiskLimt Modify Isolated Margin Risk Limit - // Description: This interface can be used to obtain information about risk limit level of a specific contract(Only valid for isolated Margin). + // Description: This interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin). // Documentation: https://www.kucoin.com/docs-new/api-3470613 - // +---------------------+-------------+ - // | Extra API Info | Value | - // +---------------------+-------------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | COPYTRADING | - // | API-RATE-LIMIT | 4 | - // +---------------------+-------------+ + // +-----------------------+------------------+ + // | Extra API Info | Value | + // +-----------------------+------------------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | LEADTRADEFUTURES | + // | API-RATE-LIMIT-POOL | COPYTRADING | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+------------------+ ModifyIsolatedMarginRiskLimt(req *ModifyIsolatedMarginRiskLimtReq, ctx context.Context) (*ModifyIsolatedMarginRiskLimtResp, error) // ModifyAutoDepositStatus Modify Isolated Margin Auto-Deposit Status // Description: This endpoint is only applicable to isolated margin and is no longer recommended. It is recommended to use cross margin instead. // Documentation: https://www.kucoin.com/docs-new/api-3470617 - // +---------------------+-------------+ - // | Extra API Info | Value | - // +---------------------+-------------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | COPYTRADING | - // | API-RATE-LIMIT | 4 | - // +---------------------+-------------+ + // +-----------------------+------------------+ + // | Extra API Info | Value | + // +-----------------------+------------------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | LEADTRADEFUTURES | + // | API-RATE-LIMIT-POOL | COPYTRADING | + // | API-RATE-LIMIT-WEIGHT | 4 | + // +-----------------------+------------------+ ModifyAutoDepositStatus(req *ModifyAutoDepositStatusReq, ctx context.Context) (*ModifyAutoDepositStatusResp, error) } diff --git a/sdk/golang/pkg/generate/copytrading/futures/api_futures.template b/sdk/golang/pkg/generate/copytrading/futures/api_futures.template index 7d3e6d64..781c870d 100644 --- a/sdk/golang/pkg/generate/copytrading/futures/api_futures.template +++ b/sdk/golang/pkg/generate/copytrading/futures/api_futures.template @@ -7,7 +7,7 @@ func TestFuturesAddOrderReq(t *testing.T) { // /api/v1/copy-trade/futures/orders builder := futures.NewAddOrderReqBuilder() - builder.SetClientOid(?).SetSide(?).SetSymbol(?).SetLeverage(?).SetType(?).SetRemark(?).SetStop(?).SetStopPriceType(?).SetStopPrice(?).SetReduceOnly(?).SetCloseOrder(?).SetForceHold(?).SetMarginMode(?).SetPrice(?).SetSize(?).SetTimeInForce(?).SetPostOnly(?).SetHidden(?).SetIceberg(?).SetVisibleSize(?) + builder.SetClientOid(?).SetSide(?).SetSymbol(?).SetLeverage(?).SetType(?).SetStop(?).SetStopPriceType(?).SetStopPrice(?).SetReduceOnly(?).SetCloseOrder(?).SetMarginMode(?).SetPrice(?).SetSize(?).SetTimeInForce(?).SetPostOnly(?).SetHidden(?).SetIceberg(?).SetVisibleSize(?) req := builder.Build() resp, err := futuresApi.AddOrder(req, context.TODO()) @@ -30,7 +30,7 @@ func TestFuturesAddOrderTestReq(t *testing.T) { // /api/v1/copy-trade/futures/orders/test builder := futures.NewAddOrderTestReqBuilder() - builder.SetClientOid(?).SetSide(?).SetSymbol(?).SetLeverage(?).SetType(?).SetRemark(?).SetStop(?).SetStopPriceType(?).SetStopPrice(?).SetReduceOnly(?).SetCloseOrder(?).SetForceHold(?).SetMarginMode(?).SetPrice(?).SetSize(?).SetTimeInForce(?).SetPostOnly(?).SetHidden(?).SetIceberg(?).SetVisibleSize(?) + builder.SetClientOid(?).SetSide(?).SetSymbol(?).SetLeverage(?).SetType(?).SetStop(?).SetStopPriceType(?).SetStopPrice(?).SetReduceOnly(?).SetCloseOrder(?).SetMarginMode(?).SetPrice(?).SetSize(?).SetTimeInForce(?).SetPostOnly(?).SetHidden(?).SetIceberg(?).SetVisibleSize(?) req := builder.Build() resp, err := futuresApi.AddOrderTest(req, context.TODO()) @@ -53,7 +53,7 @@ func TestFuturesAddTPSLOrderReq(t *testing.T) { // /api/v1/copy-trade/futures/st-orders builder := futures.NewAddTPSLOrderReqBuilder() - builder.SetClientOid(?).SetSide(?).SetSymbol(?).SetLeverage(?).SetType(?).SetRemark(?).SetStopPriceType(?).SetReduceOnly(?).SetCloseOrder(?).SetForceHold(?).SetMarginMode(?).SetPrice(?).SetSize(?).SetTimeInForce(?).SetPostOnly(?).SetHidden(?).SetIceberg(?).SetVisibleSize(?).SetTriggerStopUpPrice(?).SetTriggerStopDownPrice(?) + builder.SetClientOid(?).SetSide(?).SetSymbol(?).SetLeverage(?).SetType(?).SetStopPriceType(?).SetReduceOnly(?).SetCloseOrder(?).SetMarginMode(?).SetPrice(?).SetSize(?).SetTimeInForce(?).SetPostOnly(?).SetHidden(?).SetIceberg(?).SetVisibleSize(?).SetTriggerStopUpPrice(?).SetTriggerStopDownPrice(?) req := builder.Build() resp, err := futuresApi.AddTPSLOrder(req, context.TODO()) diff --git a/sdk/golang/pkg/generate/copytrading/futures/api_futures_test.go b/sdk/golang/pkg/generate/copytrading/futures/api_futures_test.go index 7ef84f3d..181da75b 100644 --- a/sdk/golang/pkg/generate/copytrading/futures/api_futures_test.go +++ b/sdk/golang/pkg/generate/copytrading/futures/api_futures_test.go @@ -152,7 +152,7 @@ func TestFuturesGetMaxOpenSizeReqModel(t *testing.T) { // Get Max Open Size // /api/v1/copy-trade/futures/get-max-open-size - data := "{\"symbol\": \"XBTUSDTM\", \"price\": \"example_string_default_value\", \"leverage\": 123456}" + data := "{\"symbol\": \"XBTUSDTM\", \"price\": 123456.0, \"leverage\": 123456}" req := &GetMaxOpenSizeReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() @@ -164,7 +164,7 @@ func TestFuturesGetMaxOpenSizeRespModel(t *testing.T) { // Get Max Open Size // /api/v1/copy-trade/futures/get-max-open-size - data := "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"XBTUSDTM\",\n \"maxBuyOpenSize\": \"8\",\n \"maxSellOpenSize\": \"5\"\n }\n}" + data := "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"XBTUSDTM\",\n \"maxBuyOpenSize\": \"1000000\",\n \"maxSellOpenSize\": \"51\"\n }\n}" commonResp := &types.RestResponse{} err := json.Unmarshal([]byte(data), commonResp) assert.Nil(t, err) @@ -236,7 +236,7 @@ func TestFuturesRemoveIsolatedMarginReqModel(t *testing.T) { // Remove Isolated Margin // /api/v1/copy-trade/futures/position/margin/withdraw-margin - data := "{\"symbol\": \"XBTUSDTM\", \"withdrawAmount\": \"0.0000001\"}" + data := "{\"symbol\": \"XBTUSDTM\", \"withdrawAmount\": 1e-07}" req := &RemoveIsolatedMarginReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() diff --git a/sdk/golang/pkg/generate/copytrading/futures/types_add_order_req.go b/sdk/golang/pkg/generate/copytrading/futures/types_add_order_req.go index 001671cf..5a378022 100644 --- a/sdk/golang/pkg/generate/copytrading/futures/types_add_order_req.go +++ b/sdk/golang/pkg/generate/copytrading/futures/types_add_order_req.go @@ -14,11 +14,9 @@ type AddOrderReq struct { Leverage *int32 `json:"leverage,omitempty"` // specify if the order is an 'limit' order or 'market' order Type string `json:"type,omitempty"` - // remark for the order, length cannot exceed 100 utf8 characters - Remark *string `json:"remark,omitempty"` // Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. Stop *string `json:"stop,omitempty"` - // Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. + // Either 'TP' or 'MP', Need to be defined if stop is specified. StopPriceType *string `json:"stopPriceType,omitempty"` // Need to be defined if stop is specified. StopPrice *string `json:"stopPrice,omitempty"` @@ -26,9 +24,7 @@ type AddOrderReq struct { ReduceOnly *bool `json:"reduceOnly,omitempty"` // 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. CloseOrder *bool `json:"closeOrder,omitempty"` - // 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. - ForceHold *bool `json:"forceHold,omitempty"` - // Margin mode: ISOLATED, CROSS, default: ISOLATED + // Margin mode: ISOLATED, default: ISOLATED MarginMode *string `json:"marginMode,omitempty"` // Required for type is 'limit' order, indicating the operating price Price *string `json:"price,omitempty"` @@ -42,7 +38,7 @@ type AddOrderReq struct { Hidden *bool `json:"hidden,omitempty"` // 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. Iceberg *bool `json:"iceberg,omitempty"` - // 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. + // 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. VisibleSize *string `json:"visibleSize,omitempty"` } @@ -58,8 +54,6 @@ func NewAddOrderReq(clientOid string, side string, symbol string, Type_ string, this.ReduceOnly = &reduceOnly var closeOrder bool = false this.CloseOrder = &closeOrder - var forceHold bool = false - this.ForceHold = &forceHold var marginMode string = "ISOLATED" this.MarginMode = &marginMode this.Size = size @@ -84,8 +78,6 @@ func NewAddOrderReqWithDefaults() *AddOrderReq { this.ReduceOnly = &reduceOnly var closeOrder bool = false this.CloseOrder = &closeOrder - var forceHold bool = false - this.ForceHold = &forceHold var marginMode string = "ISOLATED" this.MarginMode = &marginMode var timeInForce string = "GTC" @@ -106,13 +98,11 @@ func (o *AddOrderReq) ToMap() map[string]interface{} { toSerialize["symbol"] = o.Symbol toSerialize["leverage"] = o.Leverage toSerialize["type"] = o.Type - toSerialize["remark"] = o.Remark toSerialize["stop"] = o.Stop toSerialize["stopPriceType"] = o.StopPriceType toSerialize["stopPrice"] = o.StopPrice toSerialize["reduceOnly"] = o.ReduceOnly toSerialize["closeOrder"] = o.CloseOrder - toSerialize["forceHold"] = o.ForceHold toSerialize["marginMode"] = o.MarginMode toSerialize["price"] = o.Price toSerialize["size"] = o.Size @@ -162,19 +152,13 @@ func (builder *AddOrderReqBuilder) SetType(value string) *AddOrderReqBuilder { return builder } -// remark for the order, length cannot exceed 100 utf8 characters -func (builder *AddOrderReqBuilder) SetRemark(value string) *AddOrderReqBuilder { - builder.obj.Remark = &value - return builder -} - // Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. func (builder *AddOrderReqBuilder) SetStop(value string) *AddOrderReqBuilder { builder.obj.Stop = &value return builder } -// Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. +// Either 'TP' or 'MP', Need to be defined if stop is specified. func (builder *AddOrderReqBuilder) SetStopPriceType(value string) *AddOrderReqBuilder { builder.obj.StopPriceType = &value return builder @@ -198,13 +182,7 @@ func (builder *AddOrderReqBuilder) SetCloseOrder(value bool) *AddOrderReqBuilder return builder } -// 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. -func (builder *AddOrderReqBuilder) SetForceHold(value bool) *AddOrderReqBuilder { - builder.obj.ForceHold = &value - return builder -} - -// Margin mode: ISOLATED, CROSS, default: ISOLATED +// Margin mode: ISOLATED, default: ISOLATED func (builder *AddOrderReqBuilder) SetMarginMode(value string) *AddOrderReqBuilder { builder.obj.MarginMode = &value return builder @@ -246,7 +224,7 @@ func (builder *AddOrderReqBuilder) SetIceberg(value bool) *AddOrderReqBuilder { return builder } -// 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. +// 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. func (builder *AddOrderReqBuilder) SetVisibleSize(value string) *AddOrderReqBuilder { builder.obj.VisibleSize = &value return builder diff --git a/sdk/golang/pkg/generate/copytrading/futures/types_add_order_test_req.go b/sdk/golang/pkg/generate/copytrading/futures/types_add_order_test_req.go index b26a7ee8..e5f99544 100644 --- a/sdk/golang/pkg/generate/copytrading/futures/types_add_order_test_req.go +++ b/sdk/golang/pkg/generate/copytrading/futures/types_add_order_test_req.go @@ -4,45 +4,41 @@ package futures // AddOrderTestReq struct for AddOrderTestReq type AddOrderTestReq struct { - // 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(-) + // 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 (-). ClientOid string `json:"clientOid,omitempty"` - // specify if the order is to 'buy' or 'sell' + // Specify if the order is to 'buy' or 'sell'. Side string `json:"side,omitempty"` - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` // Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. Leverage int32 `json:"leverage,omitempty"` - // specify if the order is an 'limit' order or 'market' order + // Specify if the order is a 'limit' order or 'market' order Type string `json:"type,omitempty"` - // remark for the order, length cannot exceed 100 utf8 characters - Remark *string `json:"remark,omitempty"` - // Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. + // Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. Stop *string `json:"stop,omitempty"` - // Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. + // Either 'TP' or 'MP' need to be defined if stop is specified. StopPriceType *string `json:"stopPriceType,omitempty"` - // Need to be defined if stop is specified. + // Needs to be defined if stop is specified. StopPrice *string `json:"stopPrice,omitempty"` // 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. ReduceOnly *bool `json:"reduceOnly,omitempty"` // 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. CloseOrder *bool `json:"closeOrder,omitempty"` - // 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. - ForceHold *bool `json:"forceHold,omitempty"` - // Margin mode: ISOLATED, CROSS, default: ISOLATED + // Margin mode: ISOLATED, default: ISOLATED MarginMode *string `json:"marginMode,omitempty"` // Required for type is 'limit' order, indicating the operating price Price *string `json:"price,omitempty"` - // Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. + // Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. Size int32 `json:"size,omitempty"` // 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 TimeInForce *string `json:"timeInForce,omitempty"` - // 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. + // Optional for type is 'limit' order, post only flag, invalid when timeInForce is IOC. When postOnly is true, not allowed to 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 fees, the order will be fully rejected. PostOnly *bool `json:"postOnly,omitempty"` - // Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. + // Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. Hidden *bool `json:"hidden,omitempty"` - // 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. + // Optional for type is 'limit' order, Only visible portion of the order is displayed in the order book. When iceberg is chose, choosing postOnly is not allowed. Iceberg *bool `json:"iceberg,omitempty"` - // 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. + // 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. VisibleSize *string `json:"visibleSize,omitempty"` } @@ -59,8 +55,6 @@ func NewAddOrderTestReq(clientOid string, side string, symbol string, leverage i this.ReduceOnly = &reduceOnly var closeOrder bool = false this.CloseOrder = &closeOrder - var forceHold bool = false - this.ForceHold = &forceHold var marginMode string = "ISOLATED" this.MarginMode = &marginMode this.Size = size @@ -85,8 +79,6 @@ func NewAddOrderTestReqWithDefaults() *AddOrderTestReq { this.ReduceOnly = &reduceOnly var closeOrder bool = false this.CloseOrder = &closeOrder - var forceHold bool = false - this.ForceHold = &forceHold var marginMode string = "ISOLATED" this.MarginMode = &marginMode var timeInForce string = "GTC" @@ -107,13 +99,11 @@ func (o *AddOrderTestReq) ToMap() map[string]interface{} { toSerialize["symbol"] = o.Symbol toSerialize["leverage"] = o.Leverage toSerialize["type"] = o.Type - toSerialize["remark"] = o.Remark toSerialize["stop"] = o.Stop toSerialize["stopPriceType"] = o.StopPriceType toSerialize["stopPrice"] = o.StopPrice toSerialize["reduceOnly"] = o.ReduceOnly toSerialize["closeOrder"] = o.CloseOrder - toSerialize["forceHold"] = o.ForceHold toSerialize["marginMode"] = o.MarginMode toSerialize["price"] = o.Price toSerialize["size"] = o.Size @@ -133,19 +123,19 @@ func NewAddOrderTestReqBuilder() *AddOrderTestReqBuilder { return &AddOrderTestReqBuilder{obj: NewAddOrderTestReqWithDefaults()} } -// 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(-) +// 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 (-). func (builder *AddOrderTestReqBuilder) SetClientOid(value string) *AddOrderTestReqBuilder { builder.obj.ClientOid = value return builder } -// specify if the order is to 'buy' or 'sell' +// Specify if the order is to 'buy' or 'sell'. func (builder *AddOrderTestReqBuilder) SetSide(value string) *AddOrderTestReqBuilder { builder.obj.Side = value return builder } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *AddOrderTestReqBuilder) SetSymbol(value string) *AddOrderTestReqBuilder { builder.obj.Symbol = value return builder @@ -157,31 +147,25 @@ func (builder *AddOrderTestReqBuilder) SetLeverage(value int32) *AddOrderTestReq return builder } -// specify if the order is an 'limit' order or 'market' order +// Specify if the order is a 'limit' order or 'market' order func (builder *AddOrderTestReqBuilder) SetType(value string) *AddOrderTestReqBuilder { builder.obj.Type = value return builder } -// remark for the order, length cannot exceed 100 utf8 characters -func (builder *AddOrderTestReqBuilder) SetRemark(value string) *AddOrderTestReqBuilder { - builder.obj.Remark = &value - return builder -} - -// Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. +// Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. func (builder *AddOrderTestReqBuilder) SetStop(value string) *AddOrderTestReqBuilder { builder.obj.Stop = &value return builder } -// Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. +// Either 'TP' or 'MP' need to be defined if stop is specified. func (builder *AddOrderTestReqBuilder) SetStopPriceType(value string) *AddOrderTestReqBuilder { builder.obj.StopPriceType = &value return builder } -// Need to be defined if stop is specified. +// Needs to be defined if stop is specified. func (builder *AddOrderTestReqBuilder) SetStopPrice(value string) *AddOrderTestReqBuilder { builder.obj.StopPrice = &value return builder @@ -199,13 +183,7 @@ func (builder *AddOrderTestReqBuilder) SetCloseOrder(value bool) *AddOrderTestRe return builder } -// 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. -func (builder *AddOrderTestReqBuilder) SetForceHold(value bool) *AddOrderTestReqBuilder { - builder.obj.ForceHold = &value - return builder -} - -// Margin mode: ISOLATED, CROSS, default: ISOLATED +// Margin mode: ISOLATED, default: ISOLATED func (builder *AddOrderTestReqBuilder) SetMarginMode(value string) *AddOrderTestReqBuilder { builder.obj.MarginMode = &value return builder @@ -217,7 +195,7 @@ func (builder *AddOrderTestReqBuilder) SetPrice(value string) *AddOrderTestReqBu return builder } -// Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. +// Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. func (builder *AddOrderTestReqBuilder) SetSize(value int32) *AddOrderTestReqBuilder { builder.obj.Size = value return builder @@ -229,25 +207,25 @@ func (builder *AddOrderTestReqBuilder) SetTimeInForce(value string) *AddOrderTes return builder } -// 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. +// Optional for type is 'limit' order, post only flag, invalid when timeInForce is IOC. When postOnly is true, not allowed to 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 fees, the order will be fully rejected. func (builder *AddOrderTestReqBuilder) SetPostOnly(value bool) *AddOrderTestReqBuilder { builder.obj.PostOnly = &value return builder } -// Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. +// Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. func (builder *AddOrderTestReqBuilder) SetHidden(value bool) *AddOrderTestReqBuilder { builder.obj.Hidden = &value return builder } -// 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. +// Optional for type is 'limit' order, Only visible portion of the order is displayed in the order book. When iceberg is chose, choosing postOnly is not allowed. func (builder *AddOrderTestReqBuilder) SetIceberg(value bool) *AddOrderTestReqBuilder { builder.obj.Iceberg = &value return builder } -// 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. +// 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. func (builder *AddOrderTestReqBuilder) SetVisibleSize(value string) *AddOrderTestReqBuilder { builder.obj.VisibleSize = &value return builder diff --git a/sdk/golang/pkg/generate/copytrading/futures/types_add_order_test_resp.go b/sdk/golang/pkg/generate/copytrading/futures/types_add_order_test_resp.go index fa77f5dd..2bae03f2 100644 --- a/sdk/golang/pkg/generate/copytrading/futures/types_add_order_test_resp.go +++ b/sdk/golang/pkg/generate/copytrading/futures/types_add_order_test_resp.go @@ -10,7 +10,7 @@ import ( type AddOrderTestResp struct { // common response CommonResponse *types.RestResponse - // The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + // The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. OrderId string `json:"orderId,omitempty"` // The user self-defined order id. ClientOid string `json:"clientOid,omitempty"` diff --git a/sdk/golang/pkg/generate/copytrading/futures/types_add_tpsl_order_req.go b/sdk/golang/pkg/generate/copytrading/futures/types_add_tpsl_order_req.go index b6733543..524263d2 100644 --- a/sdk/golang/pkg/generate/copytrading/futures/types_add_tpsl_order_req.go +++ b/sdk/golang/pkg/generate/copytrading/futures/types_add_tpsl_order_req.go @@ -4,41 +4,37 @@ package futures // AddTPSLOrderReq struct for AddTPSLOrderReq type AddTPSLOrderReq struct { - // 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(-) + // 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 (-). ClientOid string `json:"clientOid,omitempty"` - // specify if the order is to 'buy' or 'sell' + // Specify if the order is to 'buy' or 'sell'. Side string `json:"side,omitempty"` - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` // Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. Leverage int32 `json:"leverage,omitempty"` - // specify if the order is an 'limit' order or 'market' order + // Specify if the order is a 'limit' order or 'market' order Type string `json:"type,omitempty"` - // remark for the order, length cannot exceed 100 utf8 characters - Remark *string `json:"remark,omitempty"` - // Either 'TP', 'IP' or 'MP' + // Either 'TP' or 'MP' StopPriceType *string `json:"stopPriceType,omitempty"` // 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. ReduceOnly *bool `json:"reduceOnly,omitempty"` // 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. CloseOrder *bool `json:"closeOrder,omitempty"` - // 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. - ForceHold *bool `json:"forceHold,omitempty"` - // Margin mode: ISOLATED, CROSS, default: ISOLATED + // Margin mode: ISOLATED, default: ISOLATED MarginMode *string `json:"marginMode,omitempty"` // Required for type is 'limit' order, indicating the operating price Price *string `json:"price,omitempty"` - // Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. + // Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. Size int32 `json:"size,omitempty"` // 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 TimeInForce *string `json:"timeInForce,omitempty"` - // 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. + // 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. PostOnly *bool `json:"postOnly,omitempty"` - // Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. + // Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. Hidden *bool `json:"hidden,omitempty"` - // 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. + // 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. Iceberg *bool `json:"iceberg,omitempty"` - // 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. + // 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. VisibleSize *string `json:"visibleSize,omitempty"` // Take profit price TriggerStopUpPrice *string `json:"triggerStopUpPrice,omitempty"` @@ -59,8 +55,6 @@ func NewAddTPSLOrderReq(clientOid string, side string, symbol string, leverage i this.ReduceOnly = &reduceOnly var closeOrder bool = false this.CloseOrder = &closeOrder - var forceHold bool = false - this.ForceHold = &forceHold var marginMode string = "ISOLATED" this.MarginMode = &marginMode this.Size = size @@ -85,8 +79,6 @@ func NewAddTPSLOrderReqWithDefaults() *AddTPSLOrderReq { this.ReduceOnly = &reduceOnly var closeOrder bool = false this.CloseOrder = &closeOrder - var forceHold bool = false - this.ForceHold = &forceHold var marginMode string = "ISOLATED" this.MarginMode = &marginMode var timeInForce string = "GTC" @@ -107,11 +99,9 @@ func (o *AddTPSLOrderReq) ToMap() map[string]interface{} { toSerialize["symbol"] = o.Symbol toSerialize["leverage"] = o.Leverage toSerialize["type"] = o.Type - toSerialize["remark"] = o.Remark toSerialize["stopPriceType"] = o.StopPriceType toSerialize["reduceOnly"] = o.ReduceOnly toSerialize["closeOrder"] = o.CloseOrder - toSerialize["forceHold"] = o.ForceHold toSerialize["marginMode"] = o.MarginMode toSerialize["price"] = o.Price toSerialize["size"] = o.Size @@ -133,19 +123,19 @@ func NewAddTPSLOrderReqBuilder() *AddTPSLOrderReqBuilder { return &AddTPSLOrderReqBuilder{obj: NewAddTPSLOrderReqWithDefaults()} } -// 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(-) +// 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 (-). func (builder *AddTPSLOrderReqBuilder) SetClientOid(value string) *AddTPSLOrderReqBuilder { builder.obj.ClientOid = value return builder } -// specify if the order is to 'buy' or 'sell' +// Specify if the order is to 'buy' or 'sell'. func (builder *AddTPSLOrderReqBuilder) SetSide(value string) *AddTPSLOrderReqBuilder { builder.obj.Side = value return builder } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *AddTPSLOrderReqBuilder) SetSymbol(value string) *AddTPSLOrderReqBuilder { builder.obj.Symbol = value return builder @@ -157,19 +147,13 @@ func (builder *AddTPSLOrderReqBuilder) SetLeverage(value int32) *AddTPSLOrderReq return builder } -// specify if the order is an 'limit' order or 'market' order +// Specify if the order is a 'limit' order or 'market' order func (builder *AddTPSLOrderReqBuilder) SetType(value string) *AddTPSLOrderReqBuilder { builder.obj.Type = value return builder } -// remark for the order, length cannot exceed 100 utf8 characters -func (builder *AddTPSLOrderReqBuilder) SetRemark(value string) *AddTPSLOrderReqBuilder { - builder.obj.Remark = &value - return builder -} - -// Either 'TP', 'IP' or 'MP' +// Either 'TP' or 'MP' func (builder *AddTPSLOrderReqBuilder) SetStopPriceType(value string) *AddTPSLOrderReqBuilder { builder.obj.StopPriceType = &value return builder @@ -187,13 +171,7 @@ func (builder *AddTPSLOrderReqBuilder) SetCloseOrder(value bool) *AddTPSLOrderRe return builder } -// 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. -func (builder *AddTPSLOrderReqBuilder) SetForceHold(value bool) *AddTPSLOrderReqBuilder { - builder.obj.ForceHold = &value - return builder -} - -// Margin mode: ISOLATED, CROSS, default: ISOLATED +// Margin mode: ISOLATED, default: ISOLATED func (builder *AddTPSLOrderReqBuilder) SetMarginMode(value string) *AddTPSLOrderReqBuilder { builder.obj.MarginMode = &value return builder @@ -205,7 +183,7 @@ func (builder *AddTPSLOrderReqBuilder) SetPrice(value string) *AddTPSLOrderReqBu return builder } -// Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. +// Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. func (builder *AddTPSLOrderReqBuilder) SetSize(value int32) *AddTPSLOrderReqBuilder { builder.obj.Size = value return builder @@ -217,25 +195,25 @@ func (builder *AddTPSLOrderReqBuilder) SetTimeInForce(value string) *AddTPSLOrde return builder } -// 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. +// 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. func (builder *AddTPSLOrderReqBuilder) SetPostOnly(value bool) *AddTPSLOrderReqBuilder { builder.obj.PostOnly = &value return builder } -// Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. +// Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. func (builder *AddTPSLOrderReqBuilder) SetHidden(value bool) *AddTPSLOrderReqBuilder { builder.obj.Hidden = &value return builder } -// 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. +// 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. func (builder *AddTPSLOrderReqBuilder) SetIceberg(value bool) *AddTPSLOrderReqBuilder { builder.obj.Iceberg = &value return builder } -// 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. +// 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. func (builder *AddTPSLOrderReqBuilder) SetVisibleSize(value string) *AddTPSLOrderReqBuilder { builder.obj.VisibleSize = &value return builder diff --git a/sdk/golang/pkg/generate/copytrading/futures/types_add_tpsl_order_resp.go b/sdk/golang/pkg/generate/copytrading/futures/types_add_tpsl_order_resp.go index 72594f92..022a93da 100644 --- a/sdk/golang/pkg/generate/copytrading/futures/types_add_tpsl_order_resp.go +++ b/sdk/golang/pkg/generate/copytrading/futures/types_add_tpsl_order_resp.go @@ -10,9 +10,9 @@ import ( type AddTPSLOrderResp struct { // common response CommonResponse *types.RestResponse - // The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + // The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. OrderId string `json:"orderId,omitempty"` - // The user self-defined order id. + // The user self-defined order ID. ClientOid string `json:"clientOid,omitempty"` } diff --git a/sdk/golang/pkg/generate/copytrading/futures/types_cancel_order_by_client_oid_req.go b/sdk/golang/pkg/generate/copytrading/futures/types_cancel_order_by_client_oid_req.go index 172da43f..f27269dd 100644 --- a/sdk/golang/pkg/generate/copytrading/futures/types_cancel_order_by_client_oid_req.go +++ b/sdk/golang/pkg/generate/copytrading/futures/types_cancel_order_by_client_oid_req.go @@ -4,9 +4,9 @@ package futures // CancelOrderByClientOidReq struct for CancelOrderByClientOidReq type CancelOrderByClientOidReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` - // The user self-defined order id. + // The user self-defined order ID. ClientOid *string `json:"clientOid,omitempty" url:"clientOid,omitempty"` } @@ -39,13 +39,13 @@ func NewCancelOrderByClientOidReqBuilder() *CancelOrderByClientOidReqBuilder { return &CancelOrderByClientOidReqBuilder{obj: NewCancelOrderByClientOidReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *CancelOrderByClientOidReqBuilder) SetSymbol(value string) *CancelOrderByClientOidReqBuilder { builder.obj.Symbol = &value return builder } -// The user self-defined order id. +// The user self-defined order ID. func (builder *CancelOrderByClientOidReqBuilder) SetClientOid(value string) *CancelOrderByClientOidReqBuilder { builder.obj.ClientOid = &value return builder diff --git a/sdk/golang/pkg/generate/copytrading/futures/types_cancel_order_by_id_req.go b/sdk/golang/pkg/generate/copytrading/futures/types_cancel_order_by_id_req.go index 6e9c6a56..87407000 100644 --- a/sdk/golang/pkg/generate/copytrading/futures/types_cancel_order_by_id_req.go +++ b/sdk/golang/pkg/generate/copytrading/futures/types_cancel_order_by_id_req.go @@ -4,7 +4,7 @@ package futures // CancelOrderByIdReq struct for CancelOrderByIdReq type CancelOrderByIdReq struct { - // Order id + // Order ID OrderId *string `json:"orderId,omitempty" url:"orderId,omitempty"` } @@ -36,7 +36,7 @@ func NewCancelOrderByIdReqBuilder() *CancelOrderByIdReqBuilder { return &CancelOrderByIdReqBuilder{obj: NewCancelOrderByIdReqWithDefaults()} } -// Order id +// Order ID func (builder *CancelOrderByIdReqBuilder) SetOrderId(value string) *CancelOrderByIdReqBuilder { builder.obj.OrderId = &value return builder diff --git a/sdk/golang/pkg/generate/copytrading/futures/types_get_max_open_size_req.go b/sdk/golang/pkg/generate/copytrading/futures/types_get_max_open_size_req.go index 5587a44d..8c2f581c 100644 --- a/sdk/golang/pkg/generate/copytrading/futures/types_get_max_open_size_req.go +++ b/sdk/golang/pkg/generate/copytrading/futures/types_get_max_open_size_req.go @@ -4,10 +4,10 @@ package futures // GetMaxOpenSizeReq struct for GetMaxOpenSizeReq type GetMaxOpenSizeReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` - // Order price - Price *string `json:"price,omitempty" url:"price,omitempty"` + // Order Price + Price *float32 `json:"price,omitempty" url:"price,omitempty"` // Leverage Leverage *int32 `json:"leverage,omitempty" url:"leverage,omitempty"` } @@ -42,14 +42,14 @@ func NewGetMaxOpenSizeReqBuilder() *GetMaxOpenSizeReqBuilder { return &GetMaxOpenSizeReqBuilder{obj: NewGetMaxOpenSizeReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetMaxOpenSizeReqBuilder) SetSymbol(value string) *GetMaxOpenSizeReqBuilder { builder.obj.Symbol = &value return builder } -// Order price -func (builder *GetMaxOpenSizeReqBuilder) SetPrice(value string) *GetMaxOpenSizeReqBuilder { +// Order Price +func (builder *GetMaxOpenSizeReqBuilder) SetPrice(value float32) *GetMaxOpenSizeReqBuilder { builder.obj.Price = &value return builder } diff --git a/sdk/golang/pkg/generate/copytrading/futures/types_get_max_open_size_resp.go b/sdk/golang/pkg/generate/copytrading/futures/types_get_max_open_size_resp.go index 80992d49..1c2eb1f2 100644 --- a/sdk/golang/pkg/generate/copytrading/futures/types_get_max_open_size_resp.go +++ b/sdk/golang/pkg/generate/copytrading/futures/types_get_max_open_size_resp.go @@ -10,7 +10,7 @@ import ( type GetMaxOpenSizeResp struct { // common response CommonResponse *types.RestResponse - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` // Maximum buy size MaxBuyOpenSize string `json:"maxBuyOpenSize,omitempty"` diff --git a/sdk/golang/pkg/generate/copytrading/futures/types_modify_isolated_margin_risk_limt_req.go b/sdk/golang/pkg/generate/copytrading/futures/types_modify_isolated_margin_risk_limt_req.go index be44ced4..27881a23 100644 --- a/sdk/golang/pkg/generate/copytrading/futures/types_modify_isolated_margin_risk_limt_req.go +++ b/sdk/golang/pkg/generate/copytrading/futures/types_modify_isolated_margin_risk_limt_req.go @@ -4,9 +4,9 @@ package futures // ModifyIsolatedMarginRiskLimtReq struct for ModifyIsolatedMarginRiskLimtReq type ModifyIsolatedMarginRiskLimtReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` - // level + // Level Level int32 `json:"level,omitempty"` } @@ -41,13 +41,13 @@ func NewModifyIsolatedMarginRiskLimtReqBuilder() *ModifyIsolatedMarginRiskLimtRe return &ModifyIsolatedMarginRiskLimtReqBuilder{obj: NewModifyIsolatedMarginRiskLimtReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *ModifyIsolatedMarginRiskLimtReqBuilder) SetSymbol(value string) *ModifyIsolatedMarginRiskLimtReqBuilder { builder.obj.Symbol = value return builder } -// level +// Level func (builder *ModifyIsolatedMarginRiskLimtReqBuilder) SetLevel(value int32) *ModifyIsolatedMarginRiskLimtReqBuilder { builder.obj.Level = value return builder diff --git a/sdk/golang/pkg/generate/copytrading/futures/types_modify_isolated_margin_risk_limt_resp.go b/sdk/golang/pkg/generate/copytrading/futures/types_modify_isolated_margin_risk_limt_resp.go index 14d57f30..6de7a1fc 100644 --- a/sdk/golang/pkg/generate/copytrading/futures/types_modify_isolated_margin_risk_limt_resp.go +++ b/sdk/golang/pkg/generate/copytrading/futures/types_modify_isolated_margin_risk_limt_resp.go @@ -11,7 +11,7 @@ import ( type ModifyIsolatedMarginRiskLimtResp struct { // common response CommonResponse *types.RestResponse - // To adjust the level will cancel the open order, the response can only indicate whether the submit of the adjustment request is successful or not. + // Adjusting the level will result in the cancellation of any open orders. The response will indicate only whether the adjustment request was successfully submitted. Data bool `json:"data,omitempty"` } diff --git a/sdk/golang/pkg/generate/copytrading/futures/types_remove_isolated_margin_req.go b/sdk/golang/pkg/generate/copytrading/futures/types_remove_isolated_margin_req.go index cdd77c36..c482bbe2 100644 --- a/sdk/golang/pkg/generate/copytrading/futures/types_remove_isolated_margin_req.go +++ b/sdk/golang/pkg/generate/copytrading/futures/types_remove_isolated_margin_req.go @@ -7,12 +7,12 @@ type RemoveIsolatedMarginReq struct { // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` // 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 - WithdrawAmount string `json:"withdrawAmount,omitempty"` + WithdrawAmount float32 `json:"withdrawAmount,omitempty"` } // NewRemoveIsolatedMarginReq instantiates a new RemoveIsolatedMarginReq object // This constructor will assign default values to properties that have it defined -func NewRemoveIsolatedMarginReq(symbol string, withdrawAmount string) *RemoveIsolatedMarginReq { +func NewRemoveIsolatedMarginReq(symbol string, withdrawAmount float32) *RemoveIsolatedMarginReq { this := RemoveIsolatedMarginReq{} this.Symbol = symbol this.WithdrawAmount = withdrawAmount @@ -48,7 +48,7 @@ func (builder *RemoveIsolatedMarginReqBuilder) SetSymbol(value string) *RemoveIs } // 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 -func (builder *RemoveIsolatedMarginReqBuilder) SetWithdrawAmount(value string) *RemoveIsolatedMarginReqBuilder { +func (builder *RemoveIsolatedMarginReqBuilder) SetWithdrawAmount(value float32) *RemoveIsolatedMarginReqBuilder { builder.obj.WithdrawAmount = value return builder } diff --git a/sdk/golang/pkg/generate/earn/earn/api_earn.go b/sdk/golang/pkg/generate/earn/earn/api_earn.go index 66099db6..5b7944c6 100644 --- a/sdk/golang/pkg/generate/earn/earn/api_earn.go +++ b/sdk/golang/pkg/generate/earn/earn/api_earn.go @@ -9,131 +9,131 @@ import ( type EarnAPI interface { - // Purchase purchase - // Description: This endpoint allows subscribing earn product + // Purchase Purchase + // Description: This endpoint allows you to subscribe Earn products. // Documentation: https://www.kucoin.com/docs-new/api-3470268 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | EARN | - // | API-RATE-LIMIT-POOL | EARN | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | EARN | + // | API-RATE-LIMIT-POOL | EARN | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ Purchase(req *PurchaseReq, ctx context.Context) (*PurchaseResp, error) // GetRedeemPreview Get Redeem Preview - // Description: This endpoint allows subscribing earn products + // Description: This endpoint allows you to subscribe Earn products. // Documentation: https://www.kucoin.com/docs-new/api-3470269 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | EARN | - // | API-RATE-LIMIT-POOL | EARN | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | EARN | + // | API-RATE-LIMIT-POOL | EARN | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetRedeemPreview(req *GetRedeemPreviewReq, ctx context.Context) (*GetRedeemPreviewResp, error) // Redeem Redeem - // Description: This endpoint allows initiating redemption by holding ID. If the current holding is fully redeemed or in the process of being redeemed, it indicates that the holding does not exist. + // Description: This endpoint allows you to redeem Earn products by using holding ID. If the current holding is fully redeemed or in the process of being redeemed, it means that the holding does not exist. // Documentation: https://www.kucoin.com/docs-new/api-3470270 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | EARN | - // | API-RATE-LIMIT-POOL | EARN | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | EARN | + // | API-RATE-LIMIT-POOL | EARN | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ Redeem(req *RedeemReq, ctx context.Context) (*RedeemResp, error) // GetSavingsProducts Get Savings Products - // Description: This endpoint can get available savings products. If no products are available, an empty list is returned. + // Description: Available savings products can be obtained at this endpoint. If no products are available, an empty list is returned. // Documentation: https://www.kucoin.com/docs-new/api-3470271 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | EARN | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | EARN | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetSavingsProducts(req *GetSavingsProductsReq, ctx context.Context) (*GetSavingsProductsResp, error) // GetPromotionProducts Get Promotion Products - // Description: This endpoint can get available limited-time promotion products. If no products are available, an empty list is returned. + // Description: Available limited-duration products can be obtained at this endpoint. If no products are available, an empty list is returned. // Documentation: https://www.kucoin.com/docs-new/api-3470272 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | EARN | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | EARN | + // | API-RATE-LIMIT-WEIGHT | NULL | + // +-----------------------+---------+ GetPromotionProducts(req *GetPromotionProductsReq, ctx context.Context) (*GetPromotionProductsResp, error) - // GetAccountHolding Get Account Holding - // Description: This endpoint can get current holding assets information. If no current holding assets are available, an empty list is returned. - // Documentation: https://www.kucoin.com/docs-new/api-3470273 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | EARN | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ - GetAccountHolding(req *GetAccountHoldingReq, ctx context.Context) (*GetAccountHoldingResp, error) - // GetStakingProducts Get Staking Products - // Description: This endpoint can get available staking products. If no products are available, an empty list is returned. + // Description: Available staking products can be obtained at this endpoint. If no products are available, an empty list is returned. // Documentation: https://www.kucoin.com/docs-new/api-3470274 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | EARN | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | EARN | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetStakingProducts(req *GetStakingProductsReq, ctx context.Context) (*GetStakingProductsResp, error) // GetKcsStakingProducts Get KCS Staking Products - // Description: This endpoint can get available KCS staking products. If no products are available, an empty list is returned. + // Description: Available KCS staking products can be obtained at this endpoint. If no products are available, an empty list is returned. // Documentation: https://www.kucoin.com/docs-new/api-3470275 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | EARN | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | EARN | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetKcsStakingProducts(req *GetKcsStakingProductsReq, ctx context.Context) (*GetKcsStakingProductsResp, error) // GetETHStakingProducts Get ETH Staking Products - // Description: This endpoint can get available ETH staking products. If no products are available, an empty list is returned. + // Description: Available ETH staking products can be obtained at this endpoint. If no products are available, an empty list is returned. // Documentation: https://www.kucoin.com/docs-new/api-3470276 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | EARN | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | EARN | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetETHStakingProducts(req *GetETHStakingProductsReq, ctx context.Context) (*GetETHStakingProductsResp, error) + + // GetAccountHolding Get Account Holding + // Description: Information on currently held assets can be obtained at this endpoint. If no assets are currently held, an empty list is returned. + // Documentation: https://www.kucoin.com/docs-new/api-3470273 + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | EARN | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ + GetAccountHolding(req *GetAccountHoldingReq, ctx context.Context) (*GetAccountHoldingResp, error) } type EarnAPIImpl struct { @@ -174,12 +174,6 @@ func (impl *EarnAPIImpl) GetPromotionProducts(req *GetPromotionProductsReq, ctx return resp, err } -func (impl *EarnAPIImpl) GetAccountHolding(req *GetAccountHoldingReq, ctx context.Context) (*GetAccountHoldingResp, error) { - resp := &GetAccountHoldingResp{} - err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/earn/hold-assets", req, resp, false) - return resp, err -} - func (impl *EarnAPIImpl) GetStakingProducts(req *GetStakingProductsReq, ctx context.Context) (*GetStakingProductsResp, error) { resp := &GetStakingProductsResp{} err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/earn/staking/products", req, resp, false) @@ -197,3 +191,9 @@ func (impl *EarnAPIImpl) GetETHStakingProducts(req *GetETHStakingProductsReq, ct err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/earn/eth-staking/products", req, resp, false) return resp, err } + +func (impl *EarnAPIImpl) GetAccountHolding(req *GetAccountHoldingReq, ctx context.Context) (*GetAccountHoldingResp, error) { + resp := &GetAccountHoldingResp{} + err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/earn/hold-assets", req, resp, false) + return resp, err +} diff --git a/sdk/golang/pkg/generate/earn/earn/api_earn.template b/sdk/golang/pkg/generate/earn/earn/api_earn.template index 6713b77d..795bba35 100644 --- a/sdk/golang/pkg/generate/earn/earn/api_earn.template +++ b/sdk/golang/pkg/generate/earn/earn/api_earn.template @@ -3,7 +3,7 @@ func TestEarnPurchaseReq(t *testing.T) { // Purchase - // purchase + // Purchase // /api/v1/earn/orders builder := earn.NewPurchaseReqBuilder() @@ -116,29 +116,6 @@ func TestEarnGetPromotionProductsReq(t *testing.T) { } -func TestEarnGetAccountHoldingReq(t *testing.T) { - // GetAccountHolding - // Get Account Holding - // /api/v1/earn/hold-assets - - builder := earn.NewGetAccountHoldingReqBuilder() - builder.SetCurrency(?).SetProductId(?).SetProductCategory(?).SetCurrentPage(?).SetPageSize(?) - req := builder.Build() - - resp, err := earnApi.GetAccountHolding(req, context.TODO()) - if err != nil { - panic(err) - } - data, err := json.Marshal(resp.ToMap()) - if err != nil { - panic(err) - } - fmt.Println("code:", resp.CommonResponse.Code) - fmt.Println("message:", resp.CommonResponse.Message) - fmt.Println("data:", string(data)) -} - - func TestEarnGetStakingProductsReq(t *testing.T) { // GetStakingProducts // Get Staking Products @@ -207,3 +184,26 @@ func TestEarnGetETHStakingProductsReq(t *testing.T) { fmt.Println("data:", string(data)) } + +func TestEarnGetAccountHoldingReq(t *testing.T) { + // GetAccountHolding + // Get Account Holding + // /api/v1/earn/hold-assets + + builder := earn.NewGetAccountHoldingReqBuilder() + builder.SetCurrency(?).SetProductId(?).SetProductCategory(?).SetCurrentPage(?).SetPageSize(?) + req := builder.Build() + + resp, err := earnApi.GetAccountHolding(req, context.TODO()) + if err != nil { + panic(err) + } + data, err := json.Marshal(resp.ToMap()) + if err != nil { + panic(err) + } + fmt.Println("code:", resp.CommonResponse.Code) + fmt.Println("message:", resp.CommonResponse.Message) + fmt.Println("data:", string(data)) +} + diff --git a/sdk/golang/pkg/generate/earn/earn/api_earn_test.go b/sdk/golang/pkg/generate/earn/earn/api_earn_test.go index 9a01fa65..a183bca8 100644 --- a/sdk/golang/pkg/generate/earn/earn/api_earn_test.go +++ b/sdk/golang/pkg/generate/earn/earn/api_earn_test.go @@ -9,7 +9,7 @@ import ( func TestEarnPurchaseReqModel(t *testing.T) { // Purchase - // purchase + // Purchase // /api/v1/earn/orders data := "{\"productId\": \"2611\", \"amount\": \"1\", \"accountType\": \"TRADE\"}" @@ -21,7 +21,7 @@ func TestEarnPurchaseReqModel(t *testing.T) { func TestEarnPurchaseRespModel(t *testing.T) { // Purchase - // purchase + // Purchase // /api/v1/earn/orders data := "{\n \"code\": \"200000\",\n \"data\": {\n \"orderId\": \"2767291\",\n \"orderTxId\": \"6603694\"\n }\n}" @@ -147,34 +147,6 @@ func TestEarnGetPromotionProductsRespModel(t *testing.T) { assert.Nil(t, err) } -func TestEarnGetAccountHoldingReqModel(t *testing.T) { - // GetAccountHolding - // Get Account Holding - // /api/v1/earn/hold-assets - - data := "{\"currency\": \"KCS\", \"productId\": \"example_string_default_value\", \"productCategory\": \"DEMAND\", \"currentPage\": 1, \"pageSize\": 10}" - req := &GetAccountHoldingReq{} - err := json.Unmarshal([]byte(data), req) - req.ToMap() - assert.Nil(t, err) -} - -func TestEarnGetAccountHoldingRespModel(t *testing.T) { - // GetAccountHolding - // Get Account Holding - // /api/v1/earn/hold-assets - - data := "{\n \"code\": \"200000\",\n \"data\": {\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"currentPage\": 1,\n \"pageSize\": 15,\n \"items\": [\n {\n \"orderId\": \"2767291\",\n \"productId\": \"2611\",\n \"productCategory\": \"KCS_STAKING\",\n \"productType\": \"DEMAND\",\n \"currency\": \"KCS\",\n \"incomeCurrency\": \"KCS\",\n \"returnRate\": \"0.03471727\",\n \"holdAmount\": \"1\",\n \"redeemedAmount\": \"0\",\n \"redeemingAmount\": \"1\",\n \"lockStartTime\": 1701252000000,\n \"lockEndTime\": null,\n \"purchaseTime\": 1729257513000,\n \"redeemPeriod\": 3,\n \"status\": \"REDEEMING\",\n \"earlyRedeemSupported\": 0\n }\n ]\n }\n}" - commonResp := &types.RestResponse{} - err := json.Unmarshal([]byte(data), commonResp) - assert.Nil(t, err) - assert.NotNil(t, commonResp.Data) - resp := &GetAccountHoldingResp{} - err = json.Unmarshal([]byte(commonResp.Data), resp) - resp.ToMap() - assert.Nil(t, err) -} - func TestEarnGetStakingProductsReqModel(t *testing.T) { // GetStakingProducts // Get Staking Products @@ -258,3 +230,31 @@ func TestEarnGetETHStakingProductsRespModel(t *testing.T) { resp.ToMap() assert.Nil(t, err) } + +func TestEarnGetAccountHoldingReqModel(t *testing.T) { + // GetAccountHolding + // Get Account Holding + // /api/v1/earn/hold-assets + + data := "{\"currency\": \"KCS\", \"productId\": \"example_string_default_value\", \"productCategory\": \"DEMAND\", \"currentPage\": 1, \"pageSize\": 10}" + req := &GetAccountHoldingReq{} + err := json.Unmarshal([]byte(data), req) + req.ToMap() + assert.Nil(t, err) +} + +func TestEarnGetAccountHoldingRespModel(t *testing.T) { + // GetAccountHolding + // Get Account Holding + // /api/v1/earn/hold-assets + + data := "{\n \"code\": \"200000\",\n \"data\": {\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"currentPage\": 1,\n \"pageSize\": 15,\n \"items\": [\n {\n \"orderId\": \"2767291\",\n \"productId\": \"2611\",\n \"productCategory\": \"KCS_STAKING\",\n \"productType\": \"DEMAND\",\n \"currency\": \"KCS\",\n \"incomeCurrency\": \"KCS\",\n \"returnRate\": \"0.03471727\",\n \"holdAmount\": \"1\",\n \"redeemedAmount\": \"0\",\n \"redeemingAmount\": \"1\",\n \"lockStartTime\": 1701252000000,\n \"lockEndTime\": null,\n \"purchaseTime\": 1729257513000,\n \"redeemPeriod\": 3,\n \"status\": \"REDEEMING\",\n \"earlyRedeemSupported\": 0\n }\n ]\n }\n}" + commonResp := &types.RestResponse{} + err := json.Unmarshal([]byte(data), commonResp) + assert.Nil(t, err) + assert.NotNil(t, commonResp.Data) + resp := &GetAccountHoldingResp{} + err = json.Unmarshal([]byte(commonResp.Data), resp) + resp.ToMap() + assert.Nil(t, err) +} diff --git a/sdk/golang/pkg/generate/earn/earn/types_get_account_holding_resp.go b/sdk/golang/pkg/generate/earn/earn/types_get_account_holding_resp.go index 928fd2d0..33c53673 100644 --- a/sdk/golang/pkg/generate/earn/earn/types_get_account_holding_resp.go +++ b/sdk/golang/pkg/generate/earn/earn/types_get_account_holding_resp.go @@ -17,7 +17,7 @@ type GetAccountHoldingResp struct { CurrentPage int32 `json:"currentPage,omitempty"` // page size PageSize int32 `json:"pageSize,omitempty"` - // total page + // total pages TotalPage int32 `json:"totalPage,omitempty"` } diff --git a/sdk/golang/pkg/generate/earn/earn/types_get_eth_staking_products_data.go b/sdk/golang/pkg/generate/earn/earn/types_get_eth_staking_products_data.go index 63633679..acaccacb 100644 --- a/sdk/golang/pkg/generate/earn/earn/types_get_eth_staking_products_data.go +++ b/sdk/golang/pkg/generate/earn/earn/types_get_eth_staking_products_data.go @@ -18,13 +18,13 @@ type GetETHStakingProductsData struct { IncomeCurrency string `json:"incomeCurrency,omitempty"` // Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return ReturnRate string `json:"returnRate,omitempty"` - // Min user subscribe amount + // Min. user subscribe amount UserLowerLimit string `json:"userLowerLimit,omitempty"` - // Max user subscribe amount + // Max. user subscription amount UserUpperLimit string `json:"userUpperLimit,omitempty"` - // Products total subscribe amount + // Products total subscription amount ProductUpperLimit string `json:"productUpperLimit,omitempty"` - // Products remain subscribe amount + // Remaining product subscription amount ProductRemainAmount string `json:"productRemainAmount,omitempty"` // Redemption waiting period (days) RedeemPeriod int32 `json:"redeemPeriod,omitempty"` @@ -40,15 +40,15 @@ type GetETHStakingProductsData struct { LockStartTime *int64 `json:"lockStartTime,omitempty"` // Product maturity time, in milliseconds LockEndTime *int64 `json:"lockEndTime,omitempty"` - // Most recent interest date(millisecond) + // Most recent interest date (milliseconds) InterestDate int64 `json:"interestDate,omitempty"` - // Whether the product is exclusive for new users: 0 (no), 1 (yes) + // Whether the product is exclusive to new users: 0 (no), 1 (yes) NewUserOnly int32 `json:"newUserOnly,omitempty"` // Whether the fixed product supports early redemption: 0 (no), 1 (yes) EarlyRedeemSupported int32 `json:"earlyRedeemSupported,omitempty"` // Product duration (days) Duration int32 `json:"duration,omitempty"` - // Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) + // Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) Status string `json:"status,omitempty"` } diff --git a/sdk/golang/pkg/generate/earn/earn/types_get_kcs_staking_products_data.go b/sdk/golang/pkg/generate/earn/earn/types_get_kcs_staking_products_data.go index bf20ec55..a73f22fd 100644 --- a/sdk/golang/pkg/generate/earn/earn/types_get_kcs_staking_products_data.go +++ b/sdk/golang/pkg/generate/earn/earn/types_get_kcs_staking_products_data.go @@ -14,11 +14,11 @@ type GetKcsStakingProductsData struct { Type string `json:"type,omitempty"` // Maximum precision supported Precision int32 `json:"precision,omitempty"` - // Products total subscribe amount + // Products total subscription amount ProductUpperLimit string `json:"productUpperLimit,omitempty"` - // Max user subscribe amount + // Max. user subscription amount UserUpperLimit string `json:"userUpperLimit,omitempty"` - // Min user subscribe amount + // Min. user subscribe amount UserLowerLimit string `json:"userLowerLimit,omitempty"` // Redemption waiting period (days) RedeemPeriod int32 `json:"redeemPeriod,omitempty"` @@ -36,19 +36,19 @@ type GetKcsStakingProductsData struct { IncomeCurrency string `json:"incomeCurrency,omitempty"` // Whether the fixed product supports early redemption: 0 (no), 1 (yes) EarlyRedeemSupported int32 `json:"earlyRedeemSupported,omitempty"` - // Products remain subscribe amount + // Remaining product subscription amount ProductRemainAmount string `json:"productRemainAmount,omitempty"` - // Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) + // Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) Status string `json:"status,omitempty"` // Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) RedeemType string `json:"redeemType,omitempty"` // Income release type: DAILY (daily release), AFTER (release after product ends) IncomeReleaseType string `json:"incomeReleaseType,omitempty"` - // Most recent interest date(millisecond) + // Most recent interest date (milliseconds) InterestDate int64 `json:"interestDate,omitempty"` // Product duration (days) Duration int32 `json:"duration,omitempty"` - // Whether the product is exclusive for new users: 0 (no), 1 (yes) + // Whether the product is exclusive to new users: 0 (no), 1 (yes) NewUserOnly int32 `json:"newUserOnly,omitempty"` } diff --git a/sdk/golang/pkg/generate/earn/earn/types_get_promotion_products_data.go b/sdk/golang/pkg/generate/earn/earn/types_get_promotion_products_data.go index e3053565..7001ae6b 100644 --- a/sdk/golang/pkg/generate/earn/earn/types_get_promotion_products_data.go +++ b/sdk/golang/pkg/generate/earn/earn/types_get_promotion_products_data.go @@ -14,17 +14,17 @@ type GetPromotionProductsData struct { Type string `json:"type,omitempty"` // Maximum precision supported Precision int32 `json:"precision,omitempty"` - // Products total subscribe amount + // Products total subscription amount ProductUpperLimit string `json:"productUpperLimit,omitempty"` - // Max user subscribe amount + // Max. user subscription amount UserUpperLimit string `json:"userUpperLimit,omitempty"` - // Min user subscribe amount + // Min. user subscribe amount UserLowerLimit string `json:"userLowerLimit,omitempty"` // Redemption waiting period (days) RedeemPeriod int32 `json:"redeemPeriod,omitempty"` // Product earliest interest start time, in milliseconds LockStartTime int64 `json:"lockStartTime,omitempty"` - // Product earliest interest end time, in milliseconds + // Earliest interest end time of product, in milliseconds LockEndTime int64 `json:"lockEndTime,omitempty"` // Subscription start time, in milliseconds ApplyStartTime int64 `json:"applyStartTime,omitempty"` @@ -36,19 +36,19 @@ type GetPromotionProductsData struct { IncomeCurrency string `json:"incomeCurrency,omitempty"` // Whether the fixed product supports early redemption: 0 (no), 1 (yes) EarlyRedeemSupported int32 `json:"earlyRedeemSupported,omitempty"` - // Products remain subscribe amount + // Remaining product subscription amount ProductRemainAmount string `json:"productRemainAmount,omitempty"` - // Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) + // Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) Status string `json:"status,omitempty"` // Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) RedeemType string `json:"redeemType,omitempty"` // Income release type: DAILY (daily release), AFTER (release after product ends) IncomeReleaseType string `json:"incomeReleaseType,omitempty"` - // Most recent interest date(millisecond) + // Most recent interest date (milliseconds) InterestDate int64 `json:"interestDate,omitempty"` // Product duration (days) Duration int32 `json:"duration,omitempty"` - // Whether the product is exclusive for new users: 0 (no), 1 (yes) + // Whether the product is exclusive to new users: 0 (no), 1 (yes) NewUserOnly int32 `json:"newUserOnly,omitempty"` } diff --git a/sdk/golang/pkg/generate/earn/earn/types_get_savings_products_data.go b/sdk/golang/pkg/generate/earn/earn/types_get_savings_products_data.go index 9aa04dee..54404bb8 100644 --- a/sdk/golang/pkg/generate/earn/earn/types_get_savings_products_data.go +++ b/sdk/golang/pkg/generate/earn/earn/types_get_savings_products_data.go @@ -14,11 +14,11 @@ type GetSavingsProductsData struct { Type string `json:"type,omitempty"` // Maximum precision supported Precision int32 `json:"precision,omitempty"` - // Products total subscribe amount + // Products total subscription amount ProductUpperLimit string `json:"productUpperLimit,omitempty"` - // Max user subscribe amount + // Max. user subscription amount UserUpperLimit string `json:"userUpperLimit,omitempty"` - // Min user subscribe amount + // Min. user subscribe amount UserLowerLimit string `json:"userLowerLimit,omitempty"` // Redemption waiting period (days) RedeemPeriod int32 `json:"redeemPeriod,omitempty"` @@ -36,19 +36,19 @@ type GetSavingsProductsData struct { IncomeCurrency string `json:"incomeCurrency,omitempty"` // Whether the fixed product supports early redemption: 0 (no), 1 (yes) EarlyRedeemSupported int32 `json:"earlyRedeemSupported,omitempty"` - // Products remain subscribe amount + // Remaining product subscription amount ProductRemainAmount string `json:"productRemainAmount,omitempty"` - // Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) + // Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) Status string `json:"status,omitempty"` // Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) RedeemType string `json:"redeemType,omitempty"` // Income release type: DAILY (daily release), AFTER (release after product ends) IncomeReleaseType string `json:"incomeReleaseType,omitempty"` - // Most recent interest date(millisecond) + // Most recent interest date (milliseconds) InterestDate int64 `json:"interestDate,omitempty"` // Product duration (days) Duration int32 `json:"duration,omitempty"` - // Whether the product is exclusive for new users: 0 (no), 1 (yes) + // Whether the product is exclusive to new users: 0 (no), 1 (yes) NewUserOnly int32 `json:"newUserOnly,omitempty"` } diff --git a/sdk/golang/pkg/generate/earn/earn/types_get_staking_products_data.go b/sdk/golang/pkg/generate/earn/earn/types_get_staking_products_data.go index f66bf742..fa15a6b6 100644 --- a/sdk/golang/pkg/generate/earn/earn/types_get_staking_products_data.go +++ b/sdk/golang/pkg/generate/earn/earn/types_get_staking_products_data.go @@ -14,11 +14,11 @@ type GetStakingProductsData struct { Type string `json:"type,omitempty"` // Maximum precision supported Precision int32 `json:"precision,omitempty"` - // Products total subscribe amount + // Products total subscription amount ProductUpperLimit string `json:"productUpperLimit,omitempty"` - // Max user subscribe amount + // Max. user subscription amount UserUpperLimit string `json:"userUpperLimit,omitempty"` - // Min user subscribe amount + // Min. user subscription amount UserLowerLimit string `json:"userLowerLimit,omitempty"` // Redemption waiting period (days) RedeemPeriod int32 `json:"redeemPeriod,omitempty"` @@ -36,19 +36,19 @@ type GetStakingProductsData struct { IncomeCurrency string `json:"incomeCurrency,omitempty"` // Whether the fixed product supports early redemption: 0 (no), 1 (yes) EarlyRedeemSupported int32 `json:"earlyRedeemSupported,omitempty"` - // Products remain subscribe amount + // Remaining product subscription amount ProductRemainAmount string `json:"productRemainAmount,omitempty"` - // Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) + // Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest accrual in progress) Status string `json:"status,omitempty"` // Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) RedeemType string `json:"redeemType,omitempty"` // Income release type: DAILY (daily release), AFTER (release after product ends) IncomeReleaseType string `json:"incomeReleaseType,omitempty"` - // Most recent interest date(millisecond) + // Most recent interest date (milliseconds) InterestDate int64 `json:"interestDate,omitempty"` // Product duration (days) Duration int32 `json:"duration,omitempty"` - // Whether the product is exclusive for new users: 0 (no), 1 (yes) + // Whether the product is exclusive to new users: 0 (no), 1 (yes) NewUserOnly int32 `json:"newUserOnly,omitempty"` } diff --git a/sdk/golang/pkg/generate/earn/earn/types_purchase_req.go b/sdk/golang/pkg/generate/earn/earn/types_purchase_req.go index d4f89401..8453f719 100644 --- a/sdk/golang/pkg/generate/earn/earn/types_purchase_req.go +++ b/sdk/golang/pkg/generate/earn/earn/types_purchase_req.go @@ -4,7 +4,7 @@ package earn // PurchaseReq struct for PurchaseReq type PurchaseReq struct { - // Product Id + // Product ID ProductId string `json:"productId,omitempty"` // Subscription amount Amount string `json:"amount,omitempty"` @@ -45,7 +45,7 @@ func NewPurchaseReqBuilder() *PurchaseReqBuilder { return &PurchaseReqBuilder{obj: NewPurchaseReqWithDefaults()} } -// Product Id +// Product ID func (builder *PurchaseReqBuilder) SetProductId(value string) *PurchaseReqBuilder { builder.obj.ProductId = value return builder diff --git a/sdk/golang/pkg/generate/futures/fundingfees/api_funding_fees.go b/sdk/golang/pkg/generate/futures/fundingfees/api_funding_fees.go index 1f7b09a1..faba5d7d 100644 --- a/sdk/golang/pkg/generate/futures/fundingfees/api_funding_fees.go +++ b/sdk/golang/pkg/generate/futures/fundingfees/api_funding_fees.go @@ -9,46 +9,46 @@ import ( type FundingFeesAPI interface { - // GetCurrentFundingRate Get Current Funding Rate - // Description: get Current Funding Rate + // GetCurrentFundingRate Get Current Funding Rate. + // Description: Get Current Funding Rate. // Documentation: https://www.kucoin.com/docs-new/api-3470265 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetCurrentFundingRate(req *GetCurrentFundingRateReq, ctx context.Context) (*GetCurrentFundingRateResp, error) // GetPublicFundingHistory Get Public Funding History - // Description: Query the funding rate at each settlement time point within a certain time range of the corresponding contract + // Description: Query the funding rate at each settlement time point within a certain time range of the corresponding contract. // Documentation: https://www.kucoin.com/docs-new/api-3470266 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetPublicFundingHistory(req *GetPublicFundingHistoryReq, ctx context.Context) (*GetPublicFundingHistoryResp, error) // GetPrivateFundingHistory Get Private Funding History // Description: Submit request to get the funding history. // Documentation: https://www.kucoin.com/docs-new/api-3470267 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetPrivateFundingHistory(req *GetPrivateFundingHistoryReq, ctx context.Context) (*GetPrivateFundingHistoryResp, error) } diff --git a/sdk/golang/pkg/generate/futures/fundingfees/api_funding_fees.template b/sdk/golang/pkg/generate/futures/fundingfees/api_funding_fees.template index c109713e..9f048fba 100644 --- a/sdk/golang/pkg/generate/futures/fundingfees/api_funding_fees.template +++ b/sdk/golang/pkg/generate/futures/fundingfees/api_funding_fees.template @@ -3,7 +3,7 @@ func TestFundingFeesGetCurrentFundingRateReq(t *testing.T) { // GetCurrentFundingRate - // Get Current Funding Rate + // Get Current Funding Rate. // /api/v1/funding-rate/{symbol}/current builder := fundingfees.NewGetCurrentFundingRateReqBuilder() @@ -53,7 +53,7 @@ func TestFundingFeesGetPrivateFundingHistoryReq(t *testing.T) { // /api/v1/funding-history builder := fundingfees.NewGetPrivateFundingHistoryReqBuilder() - builder.SetSymbol(?).SetFrom(?).SetTo(?).SetReverse(?).SetOffset(?).SetForward(?).SetMaxCount(?) + builder.SetSymbol(?).SetStartAt(?).SetEndAt(?).SetReverse(?).SetOffset(?).SetForward(?).SetMaxCount(?) req := builder.Build() resp, err := fundingfeesApi.GetPrivateFundingHistory(req, context.TODO()) diff --git a/sdk/golang/pkg/generate/futures/fundingfees/api_funding_fees_test.go b/sdk/golang/pkg/generate/futures/fundingfees/api_funding_fees_test.go index bf89e668..9ff3ff07 100644 --- a/sdk/golang/pkg/generate/futures/fundingfees/api_funding_fees_test.go +++ b/sdk/golang/pkg/generate/futures/fundingfees/api_funding_fees_test.go @@ -9,7 +9,7 @@ import ( func TestFundingFeesGetCurrentFundingRateReqModel(t *testing.T) { // GetCurrentFundingRate - // Get Current Funding Rate + // Get Current Funding Rate. // /api/v1/funding-rate/{symbol}/current data := "{\"symbol\": \"XBTUSDTM\"}" @@ -21,7 +21,7 @@ func TestFundingFeesGetCurrentFundingRateReqModel(t *testing.T) { func TestFundingFeesGetCurrentFundingRateRespModel(t *testing.T) { // GetCurrentFundingRate - // Get Current Funding Rate + // Get Current Funding Rate. // /api/v1/funding-rate/{symbol}/current data := "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \".XBTUSDTMFPI8H\",\n \"granularity\": 28800000,\n \"timePoint\": 1731441600000,\n \"value\": 6.41E-4,\n \"predictedValue\": 5.2E-5,\n \"fundingRateCap\": 0.003,\n \"fundingRateFloor\": -0.003\n }\n}" @@ -68,7 +68,7 @@ func TestFundingFeesGetPrivateFundingHistoryReqModel(t *testing.T) { // Get Private Funding History // /api/v1/funding-history - data := "{\"symbol\": \"XBTUSDTM\", \"from\": 1700310700000, \"to\": 1702310700000, \"reverse\": true, \"offset\": 123456, \"forward\": true, \"maxCount\": 123456}" + data := "{\"symbol\": \"XBTUSDTM\", \"startAt\": 1700310700000, \"endAt\": 1702310700000, \"reverse\": true, \"offset\": 123456, \"forward\": true, \"maxCount\": 123456}" req := &GetPrivateFundingHistoryReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() diff --git a/sdk/golang/pkg/generate/futures/fundingfees/types_get_current_funding_rate_req.go b/sdk/golang/pkg/generate/futures/fundingfees/types_get_current_funding_rate_req.go index 980f38a9..bfb3d6a4 100644 --- a/sdk/golang/pkg/generate/futures/fundingfees/types_get_current_funding_rate_req.go +++ b/sdk/golang/pkg/generate/futures/fundingfees/types_get_current_funding_rate_req.go @@ -4,7 +4,7 @@ package fundingfees // GetCurrentFundingRateReq struct for GetCurrentFundingRateReq type GetCurrentFundingRateReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" path:"symbol" url:"-"` } @@ -36,7 +36,7 @@ func NewGetCurrentFundingRateReqBuilder() *GetCurrentFundingRateReqBuilder { return &GetCurrentFundingRateReqBuilder{obj: NewGetCurrentFundingRateReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetCurrentFundingRateReqBuilder) SetSymbol(value string) *GetCurrentFundingRateReqBuilder { builder.obj.Symbol = &value return builder diff --git a/sdk/golang/pkg/generate/futures/fundingfees/types_get_current_funding_rate_resp.go b/sdk/golang/pkg/generate/futures/fundingfees/types_get_current_funding_rate_resp.go index 2701084b..ec5f9924 100644 --- a/sdk/golang/pkg/generate/futures/fundingfees/types_get_current_funding_rate_resp.go +++ b/sdk/golang/pkg/generate/futures/fundingfees/types_get_current_funding_rate_resp.go @@ -12,9 +12,9 @@ type GetCurrentFundingRateResp struct { CommonResponse *types.RestResponse // Funding Rate Symbol Symbol string `json:"symbol,omitempty"` - // Granularity (milisecond) + // Granularity (milliseconds) Granularity int32 `json:"granularity,omitempty"` - // The funding rate settlement time point of the previous cycle (milisecond) + // The funding rate settlement time point of the previous cycle (milliseconds) TimePoint int64 `json:"timePoint,omitempty"` // Current cycle funding rate Value float32 `json:"value,omitempty"` diff --git a/sdk/golang/pkg/generate/futures/fundingfees/types_get_private_funding_history_data_list.go b/sdk/golang/pkg/generate/futures/fundingfees/types_get_private_funding_history_data_list.go index a86ed0ba..4a4b46ff 100644 --- a/sdk/golang/pkg/generate/futures/fundingfees/types_get_private_funding_history_data_list.go +++ b/sdk/golang/pkg/generate/futures/fundingfees/types_get_private_funding_history_data_list.go @@ -4,11 +4,11 @@ package fundingfees // GetPrivateFundingHistoryDataList struct for GetPrivateFundingHistoryDataList type GetPrivateFundingHistoryDataList struct { - // id + // ID Id int64 `json:"id,omitempty"` - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` - // Time point (milisecond) + // Time point (milliseconds) TimePoint int64 `json:"timePoint,omitempty"` // Funding rate FundingRate float32 `json:"fundingRate,omitempty"` @@ -18,11 +18,11 @@ type GetPrivateFundingHistoryDataList struct { PositionQty int32 `json:"positionQty,omitempty"` // Position value at settlement period PositionCost float32 `json:"positionCost,omitempty"` - // Settled funding fees. A positive number means that the user received the funding fee, and vice versa. + // Settled funding fees A positive number means that the user received the funding fee, and vice versa. Funding float32 `json:"funding,omitempty"` - // settlement currency + // Settlement currency SettleCurrency string `json:"settleCurrency,omitempty"` - // context + // Context Context string `json:"context,omitempty"` // Margin mode: ISOLATED (isolated), CROSS (cross margin). MarginMode string `json:"marginMode,omitempty"` diff --git a/sdk/golang/pkg/generate/futures/fundingfees/types_get_private_funding_history_req.go b/sdk/golang/pkg/generate/futures/fundingfees/types_get_private_funding_history_req.go index 1e8e9401..77fcad0e 100644 --- a/sdk/golang/pkg/generate/futures/fundingfees/types_get_private_funding_history_req.go +++ b/sdk/golang/pkg/generate/futures/fundingfees/types_get_private_funding_history_req.go @@ -4,19 +4,19 @@ package fundingfees // GetPrivateFundingHistoryReq struct for GetPrivateFundingHistoryReq type GetPrivateFundingHistoryReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` - // Begin time (milisecond) - From *int64 `json:"from,omitempty" url:"from,omitempty"` - // End time (milisecond) - To *int64 `json:"to,omitempty" url:"to,omitempty"` - // 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 + // Begin time (milliseconds) + StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` + // End time (milliseconds) + EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` + // 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. Reverse *bool `json:"reverse,omitempty" url:"reverse,omitempty"` // 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. Offset *int32 `json:"offset,omitempty" url:"offset,omitempty"` - // 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 + // 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. Forward *bool `json:"forward,omitempty" url:"forward,omitempty"` - // Max record count. The default record count is 10 + // Max. record count. The default record count is 10 MaxCount *int32 `json:"maxCount,omitempty" url:"maxCount,omitempty"` } @@ -37,8 +37,8 @@ func NewGetPrivateFundingHistoryReqWithDefaults() *GetPrivateFundingHistoryReq { func (o *GetPrivateFundingHistoryReq) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} toSerialize["symbol"] = o.Symbol - toSerialize["from"] = o.From - toSerialize["to"] = o.To + toSerialize["startAt"] = o.StartAt + toSerialize["endAt"] = o.EndAt toSerialize["reverse"] = o.Reverse toSerialize["offset"] = o.Offset toSerialize["forward"] = o.Forward @@ -54,25 +54,25 @@ func NewGetPrivateFundingHistoryReqBuilder() *GetPrivateFundingHistoryReqBuilder return &GetPrivateFundingHistoryReqBuilder{obj: NewGetPrivateFundingHistoryReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetPrivateFundingHistoryReqBuilder) SetSymbol(value string) *GetPrivateFundingHistoryReqBuilder { builder.obj.Symbol = &value return builder } -// Begin time (milisecond) -func (builder *GetPrivateFundingHistoryReqBuilder) SetFrom(value int64) *GetPrivateFundingHistoryReqBuilder { - builder.obj.From = &value +// Begin time (milliseconds) +func (builder *GetPrivateFundingHistoryReqBuilder) SetStartAt(value int64) *GetPrivateFundingHistoryReqBuilder { + builder.obj.StartAt = &value return builder } -// End time (milisecond) -func (builder *GetPrivateFundingHistoryReqBuilder) SetTo(value int64) *GetPrivateFundingHistoryReqBuilder { - builder.obj.To = &value +// End time (milliseconds) +func (builder *GetPrivateFundingHistoryReqBuilder) SetEndAt(value int64) *GetPrivateFundingHistoryReqBuilder { + builder.obj.EndAt = &value return builder } -// 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 +// 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. func (builder *GetPrivateFundingHistoryReqBuilder) SetReverse(value bool) *GetPrivateFundingHistoryReqBuilder { builder.obj.Reverse = &value return builder @@ -84,13 +84,13 @@ func (builder *GetPrivateFundingHistoryReqBuilder) SetOffset(value int32) *GetPr return builder } -// 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 +// 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. func (builder *GetPrivateFundingHistoryReqBuilder) SetForward(value bool) *GetPrivateFundingHistoryReqBuilder { builder.obj.Forward = &value return builder } -// Max record count. The default record count is 10 +// Max. record count. The default record count is 10 func (builder *GetPrivateFundingHistoryReqBuilder) SetMaxCount(value int32) *GetPrivateFundingHistoryReqBuilder { builder.obj.MaxCount = &value return builder diff --git a/sdk/golang/pkg/generate/futures/fundingfees/types_get_public_funding_history_data.go b/sdk/golang/pkg/generate/futures/fundingfees/types_get_public_funding_history_data.go index 4deba88b..89dba8f6 100644 --- a/sdk/golang/pkg/generate/futures/fundingfees/types_get_public_funding_history_data.go +++ b/sdk/golang/pkg/generate/futures/fundingfees/types_get_public_funding_history_data.go @@ -4,11 +4,11 @@ package fundingfees // GetPublicFundingHistoryData struct for GetPublicFundingHistoryData type GetPublicFundingHistoryData struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` // Funding rate FundingRate float32 `json:"fundingRate,omitempty"` - // Time point (milisecond) + // Time point (milliseconds) Timepoint int64 `json:"timepoint,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/fundingfees/types_get_public_funding_history_req.go b/sdk/golang/pkg/generate/futures/fundingfees/types_get_public_funding_history_req.go index 68eb7be3..811e500b 100644 --- a/sdk/golang/pkg/generate/futures/fundingfees/types_get_public_funding_history_req.go +++ b/sdk/golang/pkg/generate/futures/fundingfees/types_get_public_funding_history_req.go @@ -4,11 +4,11 @@ package fundingfees // GetPublicFundingHistoryReq struct for GetPublicFundingHistoryReq type GetPublicFundingHistoryReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` - // Begin time (milisecond) + // Begin time (milliseconds) From *int64 `json:"from,omitempty" url:"from,omitempty"` - // End time (milisecond) + // End time (milliseconds) To *int64 `json:"to,omitempty" url:"to,omitempty"` } @@ -42,19 +42,19 @@ func NewGetPublicFundingHistoryReqBuilder() *GetPublicFundingHistoryReqBuilder { return &GetPublicFundingHistoryReqBuilder{obj: NewGetPublicFundingHistoryReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetPublicFundingHistoryReqBuilder) SetSymbol(value string) *GetPublicFundingHistoryReqBuilder { builder.obj.Symbol = &value return builder } -// Begin time (milisecond) +// Begin time (milliseconds) func (builder *GetPublicFundingHistoryReqBuilder) SetFrom(value int64) *GetPublicFundingHistoryReqBuilder { builder.obj.From = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetPublicFundingHistoryReqBuilder) SetTo(value int64) *GetPublicFundingHistoryReqBuilder { builder.obj.To = &value return builder diff --git a/sdk/golang/pkg/generate/futures/futuresprivate/api_futures_private.go b/sdk/golang/pkg/generate/futures/futuresprivate/api_futures_private.go index 6f515325..23c59eb1 100644 --- a/sdk/golang/pkg/generate/futures/futuresprivate/api_futures_private.go +++ b/sdk/golang/pkg/generate/futures/futuresprivate/api_futures_private.go @@ -10,42 +10,42 @@ type FuturesPrivateWS interface { // AllOrder All Order change pushes. // Push order changes for all symbol - // push frequency: realtime + // push frequency: real-time AllOrder(callback AllOrderEventCallback) (id string, err error) // AllPosition All symbol position change events push - // Subscribe this topic to get the realtime push of position change event of all symbol - // push frequency: realtime + // Subscribe to this topic to get real-time pushes on all symbols’ position change events + // push frequency: real-time AllPosition(callback AllPositionEventCallback) (id string, err error) // Balance the balance change push - // Subscribe this topic to get the realtime push of balance change - // push frequency: realtime + // Subscribe to this topic to get real-time balance change pushes + // push frequency: real-time Balance(callback BalanceEventCallback) (id string, err error) // CrossLeverage the leverage change push - // Subscribe this topic to get the realtime push of leverage change of contracts that are in cross margin mode - // push frequency: realtime + // Subscribe to this topic to get real-time pushes on leverage changes of contracts that are in cross margin mode + // push frequency: real-time CrossLeverage(callback CrossLeverageEventCallback) (id string, err error) // MarginMode the margin mode change - // Subscribe this topic to get the realtime push of margin mode change event of a symbol - // push frequency: realtime + // Subscribe to this topic to get real-time pushes on symbols’ margin mode change events + // push frequency: real-time MarginMode(callback MarginModeEventCallback) (id string, err error) // Order Order change pushes. // Push order changes for the specified symbol - // push frequency: realtime + // push frequency: real-time Order(symbol string, callback OrderEventCallback) (id string, err error) // Position the position change events push - // Subscribe this topic to get the realtime push of position change event of a symbol - // push frequency: realtime + // Subscribe this topic to get real-time pushes on symbols’ position change events + // push frequency: real-time Position(symbol string, callback PositionEventCallback) (id string, err error) // StopOrders stop order change pushes. - // Subscribe this topic to get the realtime push of stop order changes. - // push frequency: realtime + // Subscribe to this topic to get real-time pushes on stop order changes. + // push frequency: real-time StopOrders(callback StopOrdersEventCallback) (id string, err error) // Unsubscribe from topics diff --git a/sdk/golang/pkg/generate/futures/futuresprivate/types_all_order_event.go b/sdk/golang/pkg/generate/futures/futuresprivate/types_all_order_event.go index 5ccc00bf..329c8afd 100644 --- a/sdk/golang/pkg/generate/futures/futuresprivate/types_all_order_event.go +++ b/sdk/golang/pkg/generate/futures/futuresprivate/types_all_order_event.go @@ -11,7 +11,7 @@ import ( type AllOrderEvent struct { // common response CommonResponse *types.WsMessage - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) Symbol string `json:"symbol,omitempty"` // User-specified order type OrderType *string `json:"orderType,omitempty"` @@ -25,11 +25,11 @@ type AllOrderEvent struct { MarginMode string `json:"marginMode,omitempty"` // Order Type Type string `json:"type,omitempty"` - // Order time(Nanosecond) + // Order time (nanoseconds) OrderTime int64 `json:"orderTime,omitempty"` // User-specified order size Size string `json:"size,omitempty"` - // Cumulative number of filled + // Cumulative number filled FilledSize string `json:"filledSize,omitempty"` // Price Price string `json:"price,omitempty"` @@ -37,21 +37,21 @@ type AllOrderEvent struct { RemainSize string `json:"remainSize,omitempty"` // Order Status Status string `json:"status,omitempty"` - // Push time(Nanosecond) + // Push time (nanoseconds) Ts int64 `json:"ts,omitempty"` // Actual transaction order type, If the counterparty order is an [Hidden/Iceberg Order](https://www.kucoin.com/docs-new/doc-338146), even if it is a maker order, this param will be displayed as taker. For actual trading fee, please refer to the **feeType** Liquidity *string `json:"liquidity,omitempty"` // Actual Fee Type FeeType *string `json:"feeType,omitempty"` - // Match Price(when the type is \"match\") + // Match Price (when the type is \"match\") MatchPrice *string `json:"matchPrice,omitempty"` // Match Size (when the type is \"match\") MatchSize *string `json:"matchSize,omitempty"` - // Trade id, it is generated by Matching engine. + // Trade ID: Generated by Matching engine. TradeId *string `json:"tradeId,omitempty"` // The size before order update OldSize *string `json:"oldSize,omitempty"` - // Client Order Id,The ClientOid field is a unique ID created by the user + // Client Order ID: The ClientOid field is a unique ID created by the user ClientOid *string `json:"clientOid,omitempty"` // normal order or liquid order TradeType string `json:"tradeType,omitempty"` diff --git a/sdk/golang/pkg/generate/futures/futuresprivate/types_all_position_event.go b/sdk/golang/pkg/generate/futures/futuresprivate/types_all_position_event.go index 0b68ec0d..80fae92d 100644 --- a/sdk/golang/pkg/generate/futures/futuresprivate/types_all_position_event.go +++ b/sdk/golang/pkg/generate/futures/futuresprivate/types_all_position_event.go @@ -11,7 +11,7 @@ import ( type AllPositionEvent struct { // common response CommonResponse *types.WsMessage - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) Symbol string `json:"symbol,omitempty"` // Whether it is cross margin. CrossMode bool `json:"crossMode,omitempty"` @@ -21,17 +21,17 @@ type AllPositionEvent struct { OpeningTimestamp int64 `json:"openingTimestamp,omitempty"` // Current timestamp CurrentTimestamp int64 `json:"currentTimestamp,omitempty"` - // Current postion quantity + // Current position quantity CurrentQty int32 `json:"currentQty,omitempty"` - // Current postion value + // Current position value CurrentCost float32 `json:"currentCost,omitempty"` // Current commission CurrentComm float32 `json:"currentComm,omitempty"` - // Unrealised value + // Unrealized value UnrealisedCost float32 `json:"unrealisedCost,omitempty"` - // Accumulated realised gross profit value + // Accumulated realized gross profit value RealisedGrossCost float32 `json:"realisedGrossCost,omitempty"` - // Current realised position value + // Current realized position value RealisedCost float32 `json:"realisedCost,omitempty"` // Opened position or not IsOpen bool `json:"isOpen,omitempty"` @@ -45,11 +45,11 @@ type AllPositionEvent struct { PosInit float32 `json:"posInit,omitempty"` // Bankruptcy cost Cross = mark value * imr; Isolated = position margin (accumulation of initial margin, additional margin, generated funding fees, etc.) PosMargin float32 `json:"posMargin,omitempty"` - // Accumulated realised gross profit value + // Accumulated realized gross profit value RealisedGrossPnl float32 `json:"realisedGrossPnl,omitempty"` - // Realised profit and loss + // Realized profit and loss RealisedPnl float32 `json:"realisedPnl,omitempty"` - // Unrealised profit and loss + // Unrealized profit and loss UnrealisedPnl float32 `json:"unrealisedPnl,omitempty"` // Profit-loss ratio of the position UnrealisedPnlPcnt float32 `json:"unrealisedPnlPcnt,omitempty"` @@ -57,13 +57,13 @@ type AllPositionEvent struct { UnrealisedRoePcnt float32 `json:"unrealisedRoePcnt,omitempty"` // Average entry price AvgEntryPrice float32 `json:"avgEntryPrice,omitempty"` - // Liquidation price For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. + // Liquidation price: For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. LiquidationPrice float32 `json:"liquidationPrice,omitempty"` - // Bankruptcy price For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. + // Bankruptcy price: For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. BankruptPrice float32 `json:"bankruptPrice,omitempty"` // Currency used to clear and settle the trades SettleCurrency string `json:"settleCurrency,omitempty"` - // Margin Mode: CROSS,ISOLATED + // Margin Mode: CROSS, ISOLATED MarginMode string `json:"marginMode,omitempty"` // Position Side PositionSide string `json:"positionSide,omitempty"` @@ -77,7 +77,7 @@ type AllPositionEvent struct { RiskLimit *int32 `json:"riskLimit,omitempty"` // Leverage of the order **Only applicable to Isolated Margin** RealLeverage *float32 `json:"realLeverage,omitempty"` - // added margin **Only applicable to Isolated Margin** + // Added margin **Only applicable to Isolated Margin** PosCross *float32 `json:"posCross,omitempty"` // Bankruptcy cost **Only applicable to Isolated Margin** PosComm *float32 `json:"posComm,omitempty"` @@ -97,7 +97,7 @@ type AllPositionEvent struct { FundingRate *float32 `json:"fundingRate,omitempty"` // Funding fees FundingFee *float32 `json:"fundingFee,omitempty"` - // Funding Fee Settlement Time (nanosecond) + // Funding Fee Settlement Time (nanoseconds) Ts *int64 `json:"ts,omitempty"` // Adjustment isolated margin risk limit level successful or not Success *bool `json:"success,omitempty"` diff --git a/sdk/golang/pkg/generate/futures/futuresprivate/types_order_event.go b/sdk/golang/pkg/generate/futures/futuresprivate/types_order_event.go index a7aea56b..946dec2a 100644 --- a/sdk/golang/pkg/generate/futures/futuresprivate/types_order_event.go +++ b/sdk/golang/pkg/generate/futures/futuresprivate/types_order_event.go @@ -11,7 +11,7 @@ import ( type OrderEvent struct { // common response CommonResponse *types.WsMessage - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) Symbol string `json:"symbol,omitempty"` // User-specified order type OrderType *string `json:"orderType,omitempty"` @@ -25,11 +25,11 @@ type OrderEvent struct { MarginMode string `json:"marginMode,omitempty"` // Order Type Type string `json:"type,omitempty"` - // Order time(Nanosecond) + // Order time (nanoseconds) OrderTime int64 `json:"orderTime,omitempty"` // User-specified order size Size string `json:"size,omitempty"` - // Cumulative number of filled + // Cumulative number filled FilledSize string `json:"filledSize,omitempty"` // Price Price string `json:"price,omitempty"` @@ -37,21 +37,21 @@ type OrderEvent struct { RemainSize string `json:"remainSize,omitempty"` // Order Status Status string `json:"status,omitempty"` - // Push time(Nanosecond) + // Push time (nanoseconds) Ts int64 `json:"ts,omitempty"` // Actual transaction order type, If the counterparty order is an [Hidden/Iceberg Order](https://www.kucoin.com/docs-new/doc-338146), even if it is a maker order, this param will be displayed as taker. For actual trading fee, please refer to the **feeType** Liquidity *string `json:"liquidity,omitempty"` // Actual Fee Type FeeType *string `json:"feeType,omitempty"` - // Match Price(when the type is \"match\") + // Match Price (when the type is \"match\") MatchPrice *string `json:"matchPrice,omitempty"` // Match Size (when the type is \"match\") MatchSize *string `json:"matchSize,omitempty"` - // Trade id, it is generated by Matching engine. + // Trade ID: Generated by Matching engine. TradeId *string `json:"tradeId,omitempty"` // The size before order update OldSize *string `json:"oldSize,omitempty"` - // Client Order Id,The ClientOid field is a unique ID created by the user + // Client Order ID: The ClientOid field is a unique ID created by the user ClientOid *string `json:"clientOid,omitempty"` // normal order or liquid order TradeType string `json:"tradeType,omitempty"` diff --git a/sdk/golang/pkg/generate/futures/futuresprivate/types_position_event.go b/sdk/golang/pkg/generate/futures/futuresprivate/types_position_event.go index e6dff424..f180abbc 100644 --- a/sdk/golang/pkg/generate/futures/futuresprivate/types_position_event.go +++ b/sdk/golang/pkg/generate/futures/futuresprivate/types_position_event.go @@ -11,7 +11,7 @@ import ( type PositionEvent struct { // common response CommonResponse *types.WsMessage - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) Symbol string `json:"symbol,omitempty"` // Whether it is cross margin. CrossMode bool `json:"crossMode,omitempty"` @@ -21,17 +21,17 @@ type PositionEvent struct { OpeningTimestamp int64 `json:"openingTimestamp,omitempty"` // Current timestamp CurrentTimestamp int64 `json:"currentTimestamp,omitempty"` - // Current postion quantity + // Current position quantity CurrentQty int32 `json:"currentQty,omitempty"` - // Current postion value + // Current position value CurrentCost float32 `json:"currentCost,omitempty"` // Current commission CurrentComm float32 `json:"currentComm,omitempty"` - // Unrealised value + // Unrealized value UnrealisedCost float32 `json:"unrealisedCost,omitempty"` - // Accumulated realised gross profit value + // Accumulated realized gross profit value RealisedGrossCost float32 `json:"realisedGrossCost,omitempty"` - // Current realised position value + // Current realized position value RealisedCost float32 `json:"realisedCost,omitempty"` // Opened position or not IsOpen bool `json:"isOpen,omitempty"` @@ -45,11 +45,11 @@ type PositionEvent struct { PosInit float32 `json:"posInit,omitempty"` // Bankruptcy cost Cross = mark value * imr; Isolated = position margin (accumulation of initial margin, additional margin, generated funding fees, etc.) PosMargin float32 `json:"posMargin,omitempty"` - // Accumulated realised gross profit value + // Accumulated realized gross profit value RealisedGrossPnl float32 `json:"realisedGrossPnl,omitempty"` - // Realised profit and loss + // Realized profit and loss RealisedPnl float32 `json:"realisedPnl,omitempty"` - // Unrealised profit and loss + // Unrealized profit and loss UnrealisedPnl float32 `json:"unrealisedPnl,omitempty"` // Profit-loss ratio of the position UnrealisedPnlPcnt float32 `json:"unrealisedPnlPcnt,omitempty"` @@ -57,13 +57,13 @@ type PositionEvent struct { UnrealisedRoePcnt float32 `json:"unrealisedRoePcnt,omitempty"` // Average entry price AvgEntryPrice float32 `json:"avgEntryPrice,omitempty"` - // Liquidation price For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. + // Liquidation price: For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. LiquidationPrice float32 `json:"liquidationPrice,omitempty"` - // Bankruptcy price For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. + // Bankruptcy price: For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. BankruptPrice float32 `json:"bankruptPrice,omitempty"` // Currency used to clear and settle the trades SettleCurrency string `json:"settleCurrency,omitempty"` - // Margin Mode: CROSS,ISOLATED + // Margin Mode: CROSS, ISOLATED MarginMode string `json:"marginMode,omitempty"` // Position Side PositionSide string `json:"positionSide,omitempty"` @@ -77,7 +77,7 @@ type PositionEvent struct { RiskLimit *int32 `json:"riskLimit,omitempty"` // Leverage of the order **Only applicable to Isolated Margin** RealLeverage *float32 `json:"realLeverage,omitempty"` - // added margin **Only applicable to Isolated Margin** + // Added margin **Only applicable to Isolated Margin** PosCross *float32 `json:"posCross,omitempty"` // Bankruptcy cost **Only applicable to Isolated Margin** PosComm *float32 `json:"posComm,omitempty"` @@ -97,7 +97,7 @@ type PositionEvent struct { FundingRate *float32 `json:"fundingRate,omitempty"` // Funding fees FundingFee *float32 `json:"fundingFee,omitempty"` - // Funding Fee Settlement Time (nanosecond) + // Funding Fee Settlement Time (nanoseconds) Ts *int64 `json:"ts,omitempty"` // Adjustment isolated margin risk limit level successful or not Success *bool `json:"success,omitempty"` diff --git a/sdk/golang/pkg/generate/futures/futuresprivate/types_stop_orders_event.go b/sdk/golang/pkg/generate/futures/futuresprivate/types_stop_orders_event.go index 20a1a0bc..aee8043c 100644 --- a/sdk/golang/pkg/generate/futures/futuresprivate/types_stop_orders_event.go +++ b/sdk/golang/pkg/generate/futures/futuresprivate/types_stop_orders_event.go @@ -16,7 +16,7 @@ type StopOrdersEvent struct { MarginMode string `json:"marginMode,omitempty"` // The unique order id generated by the trading system OrderId string `json:"orderId,omitempty"` - // Order price + // Order Price OrderPrice string `json:"orderPrice,omitempty"` // User-specified order type OrderType string `json:"orderType,omitempty"` @@ -29,7 +29,7 @@ type StopOrdersEvent struct { // Stop Price StopPrice string `json:"stopPrice,omitempty"` StopPriceType string `json:"stopPriceType,omitempty"` - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) Symbol string `json:"symbol,omitempty"` Ts int64 `json:"ts,omitempty"` // Order Type diff --git a/sdk/golang/pkg/generate/futures/futurespublic/api_futures_public.go b/sdk/golang/pkg/generate/futures/futurespublic/api_futures_public.go index 713244d4..8fd4ed5f 100644 --- a/sdk/golang/pkg/generate/futures/futurespublic/api_futures_public.go +++ b/sdk/golang/pkg/generate/futures/futurespublic/api_futures_public.go @@ -16,7 +16,7 @@ type FuturesPublicWS interface { // Execution Match execution data. // For each order executed, the system will send you the match messages in the format as following. - // push frequency: realtime + // push frequency: real-time Execution(symbol string, callback ExecutionEventCallback) (id string, err error) // Instrument instrument @@ -30,8 +30,8 @@ type FuturesPublicWS interface { Klines(symbol string, type_ string, callback KlinesEventCallback) (id string, err error) // OrderbookIncrement Orderbook - Increment - // The system will return the increment change orderbook data(All depth), If there is no change in the market, data will not be pushed - // push frequency: realtime + // The system will return the increment change orderbook data (all depth). If there is no change in the market, data will not be pushed. + // push frequency: real-time OrderbookIncrement(symbol string, callback OrderbookIncrementEventCallback) (id string, err error) // OrderbookLevel50 Orderbook - Level50 @@ -40,23 +40,23 @@ type FuturesPublicWS interface { OrderbookLevel50(symbol string, callback OrderbookLevel50EventCallback) (id string, err error) // OrderbookLevel5 Orderbook - Level5 - // The system will return the 5 best ask/bid orders data, If there is no change in the market, data will not be pushed + // The system will return the 5 best ask/bid orders data. If there is no change in the market, data will not be pushed // push frequency: 100ms OrderbookLevel5(symbol string, callback OrderbookLevel5EventCallback) (id string, err error) // SymbolSnapshot Symbol Snapshot - // Get symbol's snapshot. + // Get symbol snapshot. // push frequency: 5000ms SymbolSnapshot(symbol string, callback SymbolSnapshotEventCallback) (id string, err error) // TickerV1 Get Ticker(not recommended) - // Subscribe this topic to get the realtime push of BBO changes.It is not recommended to use this topic any more. For real-time ticker information, please subscribe /contractMarket/tickerV2:{symbol}. - // push frequency: realtime + // Subscribe to this topic to get real-time pushes on BBO changes. It is not recommended to use this topic any more. For real-time ticker information, please subscribe /contractMarket/tickerV2:{symbol}. + // push frequency: real-time TickerV1(symbol string, callback TickerV1EventCallback) (id string, err error) // TickerV2 Get Ticker V2 - // Subscribe this topic to get the realtime push of BBO changes. After subscription, when there are changes in the order book(Not necessarily ask1/bid1 changes), the system will push the real-time ticker symbol information to you. - // push frequency: realtime + // Subscribe to this topic to get real-time pushes of BBO changes. After subscription, when there are changes in the order book (not necessarily ask1/bid1 changes), the system will push the real-time ticker symbol information to you. + // push frequency: real-time TickerV2(symbol string, callback TickerV2EventCallback) (id string, err error) // Unsubscribe from topics diff --git a/sdk/golang/pkg/generate/futures/futurespublic/types_instrument_event.go b/sdk/golang/pkg/generate/futures/futurespublic/types_instrument_event.go index f5877e95..c6c3c809 100644 --- a/sdk/golang/pkg/generate/futures/futurespublic/types_instrument_event.go +++ b/sdk/golang/pkg/generate/futures/futurespublic/types_instrument_event.go @@ -11,7 +11,7 @@ import ( type InstrumentEvent struct { // common response CommonResponse *types.WsMessage - // Granularity (predicted funding rate: 1-min granularity: 60000; Funding rate: 8-hours granularity: 28800000. ) + // Granularity (predicted funding rate: 1-min granularity: 60000; Funding rate: 8-hours granularity: 28800000.) Granularity int32 `json:"granularity,omitempty"` FundingRate *float32 `json:"fundingRate,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` diff --git a/sdk/golang/pkg/generate/futures/market/api_market.go b/sdk/golang/pkg/generate/futures/market/api_market.go index bb31708f..109f30a1 100644 --- a/sdk/golang/pkg/generate/futures/market/api_market.go +++ b/sdk/golang/pkg/generate/futures/market/api_market.go @@ -10,241 +10,241 @@ import ( type MarketAPI interface { // GetSymbol Get Symbol - // 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. + // 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. // Documentation: https://www.kucoin.com/docs-new/api-3470221 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ GetSymbol(req *GetSymbolReq, ctx context.Context) (*GetSymbolResp, error) // GetAllSymbols Get All Symbols - // 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. + // 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. // Documentation: https://www.kucoin.com/docs-new/api-3470220 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ GetAllSymbols(ctx context.Context) (*GetAllSymbolsResp, error) // GetTicker Get Ticker - // 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. + // 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. // Documentation: https://www.kucoin.com/docs-new/api-3470222 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetTicker(req *GetTickerReq, ctx context.Context) (*GetTickerResp, error) // GetAllTickers Get All Tickers - // 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. + // 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. // Documentation: https://www.kucoin.com/docs-new/api-3470223 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetAllTickers(ctx context.Context) (*GetAllTickersResp, error) // GetFullOrderBook Get Full OrderBook - // 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 up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook. + // 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. // Documentation: https://www.kucoin.com/docs-new/api-3470224 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ GetFullOrderBook(req *GetFullOrderBookReq, ctx context.Context) (*GetFullOrderBookResp, error) // GetPartOrderBook Get Part OrderBook - // Description: Query for part orderbook depth data. (aggregated by price) You are recommended to request via this endpoint as the system reponse would be faster and cosume less traffic. + // 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. // Documentation: https://www.kucoin.com/docs-new/api-3470225 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetPartOrderBook(req *GetPartOrderBookReq, ctx context.Context) (*GetPartOrderBookResp, error) // GetTradeHistory Get Trade History - // Description: Request via this endpoint to get the trade history of the specified symbol, the returned quantity is the last 100 transaction records. + // Description: Request the trade history of the specified symbol via this endpoint. The returned quantity is the last 100 transaction records. // Documentation: https://www.kucoin.com/docs-new/api-3470232 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetTradeHistory(req *GetTradeHistoryReq, ctx context.Context) (*GetTradeHistoryResp, error) // GetKlines Get Klines - // Description: Get the Kline of the symbol. Data are returned in grouped buckets based on requested type. For each query, the system would return at most 500 pieces of data. To obtain more data, please page the data by time. + // 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. // Documentation: https://www.kucoin.com/docs-new/api-3470234 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ GetKlines(req *GetKlinesReq, ctx context.Context) (*GetKlinesResp, error) // GetMarkPrice Get Mark Price - // Description: Get current mark price + // Description: Get the current mark price (Update snapshots once per second, real-time query). // Documentation: https://www.kucoin.com/docs-new/api-3470233 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ GetMarkPrice(req *GetMarkPriceReq, ctx context.Context) (*GetMarkPriceResp, error) // GetSpotIndexPrice Get Spot Index Price - // Description: Get Spot Index Price + // Description: Get Spot Index Price (Update snapshots once per second, and there is a 5s cache when querying). // Documentation: https://www.kucoin.com/docs-new/api-3470231 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetSpotIndexPrice(req *GetSpotIndexPriceReq, ctx context.Context) (*GetSpotIndexPriceResp, error) // GetInterestRateIndex Get Interest Rate Index - // Description: Get interest rate Index. + // Description: Get interest rate Index (real-time query). // Documentation: https://www.kucoin.com/docs-new/api-3470226 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetInterestRateIndex(req *GetInterestRateIndexReq, ctx context.Context) (*GetInterestRateIndexResp, error) // GetPremiumIndex Get Premium Index - // Description: Submit request to get premium index. + // Description: Submit request to get premium index (Update snapshots once per second, real-time query). // Documentation: https://www.kucoin.com/docs-new/api-3470227 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ GetPremiumIndex(req *GetPremiumIndexReq, ctx context.Context) (*GetPremiumIndexResp, error) - // Get24hrStats Get 24hr Stats + // Get24hrStats Get 24hr stats // Description: Get the statistics of the platform futures trading volume in the last 24 hours. // Documentation: https://www.kucoin.com/docs-new/api-3470228 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ Get24hrStats(ctx context.Context) (*Get24hrStatsResp, error) // GetServerTime Get Server Time // Description: Get the API server time. This is the Unix timestamp. // Documentation: https://www.kucoin.com/docs-new/api-3470229 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetServerTime(ctx context.Context) (*GetServerTimeResp, error) // GetServiceStatus Get Service Status // Description: Get the service status. // Documentation: https://www.kucoin.com/docs-new/api-3470230 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 4 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 4 | + // +-----------------------+---------+ GetServiceStatus(ctx context.Context) (*GetServiceStatusResp, error) // GetPublicToken Get Public Token - Futures - // 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 + // 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 // Documentation: https://www.kucoin.com/docs-new/api-3470297 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ GetPublicToken(ctx context.Context) (*GetPublicTokenResp, error) // GetPrivateToken Get Private Token - Futures - // 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 + // 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 // Documentation: https://www.kucoin.com/docs-new/api-3470296 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ GetPrivateToken(ctx context.Context) (*GetPrivateTokenResp, error) } diff --git a/sdk/golang/pkg/generate/futures/market/api_market.template b/sdk/golang/pkg/generate/futures/market/api_market.template index c0581c56..ab232155 100644 --- a/sdk/golang/pkg/generate/futures/market/api_market.template +++ b/sdk/golang/pkg/generate/futures/market/api_market.template @@ -116,7 +116,7 @@ func TestMarketGetPartOrderBookReq(t *testing.T) { // /api/v1/level2/depth{size} builder := market.NewGetPartOrderBookReqBuilder() - builder.SetSymbol(?).SetSize(?) + builder.SetSize(?).SetSymbol(?) req := builder.Build() resp, err := marketApi.GetPartOrderBook(req, context.TODO()) @@ -273,7 +273,7 @@ func TestMarketGetPremiumIndexReq(t *testing.T) { func TestMarketGet24hrStatsReq(t *testing.T) { // Get24hrStats - // Get 24hr Stats + // Get 24hr stats // /api/v1/trade-statistics diff --git a/sdk/golang/pkg/generate/futures/market/api_market_test.go b/sdk/golang/pkg/generate/futures/market/api_market_test.go index 68cfef8c..9af6388d 100644 --- a/sdk/golang/pkg/generate/futures/market/api_market_test.go +++ b/sdk/golang/pkg/generate/futures/market/api_market_test.go @@ -24,7 +24,7 @@ func TestMarketGetSymbolRespModel(t *testing.T) { // Get Symbol // /api/v1/contracts/{symbol} - data := "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"XBTUSDM\",\n \"rootSymbol\": \"XBT\",\n \"type\": \"FFWCSX\",\n \"firstOpenDate\": 1552638575000,\n \"expireDate\": null,\n \"settleDate\": null,\n \"baseCurrency\": \"XBT\",\n \"quoteCurrency\": \"USD\",\n \"settleCurrency\": \"XBT\",\n \"maxOrderQty\": 10000000,\n \"maxPrice\": 1000000.0,\n \"lotSize\": 1,\n \"tickSize\": 0.1,\n \"indexPriceTickSize\": 0.1,\n \"multiplier\": -1.0,\n \"initialMargin\": 0.014,\n \"maintainMargin\": 0.007,\n \"maxRiskLimit\": 1,\n \"minRiskLimit\": 1,\n \"riskStep\": 0,\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\": false,\n \"isInverse\": true,\n \"markMethod\": \"FairPrice\",\n \"fairMethod\": \"FundingRate\",\n \"fundingBaseSymbol\": \".XBTINT8H\",\n \"fundingQuoteSymbol\": \".USDINT8H\",\n \"fundingRateSymbol\": \".XBTUSDMFPI8H\",\n \"indexSymbol\": \".BXBT\",\n \"settlementSymbol\": null,\n \"status\": \"Open\",\n \"fundingFeeRate\": 1.75E-4,\n \"predictedFundingFeeRate\": 1.76E-4,\n \"fundingRateGranularity\": 28800000,\n \"openInterest\": \"61725904\",\n \"turnoverOf24h\": 209.56303473,\n \"volumeOf24h\": 1.4354731E7,\n \"markPrice\": 68336.7,\n \"indexPrice\": 68335.29,\n \"lastTradePrice\": 68349.3,\n \"nextFundingRateTime\": 17402942,\n \"maxLeverage\": 75,\n \"sourceExchanges\": [\n \"kraken\",\n \"bitstamp\",\n \"crypto\"\n ],\n \"premiumsSymbol1M\": \".XBTUSDMPI\",\n \"premiumsSymbol8H\": \".XBTUSDMPI8H\",\n \"fundingBaseSymbol1M\": \".XBTINT\",\n \"fundingQuoteSymbol1M\": \".USDINT\",\n \"lowPrice\": 67436.7,\n \"highPrice\": 69471.8,\n \"priceChgPct\": 0.0097,\n \"priceChg\": 658.7,\n \"k\": 2645000.0,\n \"m\": 1640000.0,\n \"f\": 1.3,\n \"mmrLimit\": 0.3,\n \"mmrLevConstant\": 75.0,\n \"supportCross\": true\n }\n}" + data := "{\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}" commonResp := &types.RestResponse{} err := json.Unmarshal([]byte(data), commonResp) assert.Nil(t, err) @@ -47,7 +47,7 @@ func TestMarketGetAllSymbolsRespModel(t *testing.T) { // Get All Symbols // /api/v1/contracts/active - data := "{\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.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\": 1.53E-4,\n \"predictedFundingFeeRate\": 8.0E-5,\n \"fundingRateGranularity\": 28800000,\n \"openInterest\": \"6384957\",\n \"turnoverOf24h\": 5.788402220999069E8,\n \"volumeOf24h\": 8274.432,\n \"markPrice\": 69732.33,\n \"indexPrice\": 69732.32,\n \"lastTradePrice\": 69732,\n \"nextFundingRateTime\": 21265941,\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\": 68817.5,\n \"highPrice\": 71615.8,\n \"priceChgPct\": 6.0E-4,\n \"priceChg\": 48.0,\n \"k\": 490.0,\n \"m\": 300.0,\n \"f\": 1.3,\n \"mmrLimit\": 0.3,\n \"mmrLevConstant\": 125.0,\n \"supportCross\": true\n }\n ]\n}" + data := "{\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}" commonResp := &types.RestResponse{} err := json.Unmarshal([]byte(data), commonResp) assert.Nil(t, err) @@ -142,7 +142,7 @@ func TestMarketGetPartOrderBookReqModel(t *testing.T) { // Get Part OrderBook // /api/v1/level2/depth{size} - data := "{\"symbol\": \"XBTUSDM\", \"size\": \"20\"}" + data := "{\"size\": \"20\", \"symbol\": \"XBTUSDM\"}" req := &GetPartOrderBookReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() @@ -335,14 +335,14 @@ func TestMarketGetPremiumIndexRespModel(t *testing.T) { func TestMarketGet24hrStatsReqModel(t *testing.T) { // Get24hrStats - // Get 24hr Stats + // Get 24hr stats // /api/v1/trade-statistics } func TestMarketGet24hrStatsRespModel(t *testing.T) { // Get24hrStats - // Get 24hr Stats + // Get 24hr stats // /api/v1/trade-statistics data := "{\"code\":\"200000\",\"data\":{\"turnoverOf24h\":1.1155733413273683E9}}" diff --git a/sdk/golang/pkg/generate/futures/market/types_get_all_symbols_data.go b/sdk/golang/pkg/generate/futures/market/types_get_all_symbols_data.go index 383b7d95..91e54747 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_all_symbols_data.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_all_symbols_data.go @@ -8,13 +8,13 @@ type GetAllSymbolsData struct { Symbol string `json:"symbol,omitempty"` // Contract group RootSymbol string `json:"rootSymbol,omitempty"` - // Type of the contract + // Type of contract Type string `json:"type,omitempty"` - // First Open Date(millisecond) + // First Open Date (milliseconds) FirstOpenDate int64 `json:"firstOpenDate,omitempty"` - // Expiration date(millisecond). Null means it will never expire + // Expiration date (milliseconds) Null means it will never expire ExpireDate *int64 `json:"expireDate,omitempty"` - // Settlement date(millisecond). Null indicates that automatic settlement is not supported + // Settlement date (milliseconds) Null indicates that automatic settlement is not supported SettleDate *int64 `json:"settleDate,omitempty"` // Base currency BaseCurrency string `json:"baseCurrency,omitempty"` @@ -62,9 +62,9 @@ type GetAllSymbolsData struct { IsInverse bool `json:"isInverse,omitempty"` // Marking method MarkMethod string `json:"markMethod,omitempty"` - // Fair price marking method, The Futures contract is null + // Fair price marking method; the Futures contract is null FairMethod string `json:"fairMethod,omitempty"` - // Ticker symbol of the based currency + // Ticker symbol of the base currency FundingBaseSymbol string `json:"fundingBaseSymbol,omitempty"` // Ticker symbol of the quote currency FundingQuoteSymbol string `json:"fundingQuoteSymbol,omitempty"` @@ -72,7 +72,7 @@ type GetAllSymbolsData struct { FundingRateSymbol string `json:"fundingRateSymbol,omitempty"` // Index symbol IndexSymbol string `json:"indexSymbol,omitempty"` - // Settlement Symbol + // Settlement symbol SettlementSymbol string `json:"settlementSymbol,omitempty"` // Contract status Status string `json:"status,omitempty"` @@ -80,9 +80,9 @@ type GetAllSymbolsData struct { FundingFeeRate float32 `json:"fundingFeeRate,omitempty"` // Predicted funding fee rate PredictedFundingFeeRate float32 `json:"predictedFundingFeeRate,omitempty"` - // Funding interval(millisecond) + // Funding interval (milliseconds) FundingRateGranularity int32 `json:"fundingRateGranularity,omitempty"` - // Open interest + // Open interest (unit: lots) OpenInterest string `json:"openInterest,omitempty"` // 24-hour turnover TurnoverOf24h float32 `json:"turnoverOf24h,omitempty"` @@ -94,25 +94,25 @@ type GetAllSymbolsData struct { IndexPrice float32 `json:"indexPrice,omitempty"` // Last trade price LastTradePrice float32 `json:"lastTradePrice,omitempty"` - // Next funding rate time(millisecond) + // Next funding rate time (milliseconds) NextFundingRateTime int32 `json:"nextFundingRateTime,omitempty"` // Maximum leverage MaxLeverage int32 `json:"maxLeverage,omitempty"` // The contract index price source exchange SourceExchanges []string `json:"sourceExchanges,omitempty"` - // Premium index symbol(1 minute) + // Premium index symbol (1 minute) PremiumsSymbol1M string `json:"premiumsSymbol1M,omitempty"` - // Premium index symbol(8 hours) + // Premium index symbol (8 hours) PremiumsSymbol8H string `json:"premiumsSymbol8H,omitempty"` - // Base currency interest rate symbol(1 minute) + // Base currency interest rate symbol (1 minute) FundingBaseSymbol1M string `json:"fundingBaseSymbol1M,omitempty"` - // Quote currency interest rate symbol(1 minute) + // Quote currency interest rate symbol (1 minute) FundingQuoteSymbol1M string `json:"fundingQuoteSymbol1M,omitempty"` // 24-hour lowest price LowPrice float32 `json:"lowPrice,omitempty"` // 24-hour highest price HighPrice float32 `json:"highPrice,omitempty"` - // 24-hour price change% + // 24-hour % price change PriceChgPct float32 `json:"priceChgPct,omitempty"` // 24-hour price change PriceChg float32 `json:"priceChg,omitempty"` @@ -123,11 +123,15 @@ type GetAllSymbolsData struct { MmrLevConstant float32 `json:"mmrLevConstant,omitempty"` // Whether support Cross Margin SupportCross bool `json:"supportCross,omitempty"` + // The current maximum buying price allowed + BuyLimit float32 `json:"buyLimit,omitempty"` + // The current minimum selling price allowed + SellLimit float32 `json:"sellLimit,omitempty"` } // NewGetAllSymbolsData instantiates a new GetAllSymbolsData object // This constructor will assign default values to properties that have it defined -func NewGetAllSymbolsData(symbol string, rootSymbol string, Type_ string, firstOpenDate int64, baseCurrency string, quoteCurrency string, settleCurrency string, maxOrderQty int32, maxPrice float32, lotSize int32, tickSize float32, indexPriceTickSize float32, multiplier float32, initialMargin float32, maintainMargin float32, maxRiskLimit int32, minRiskLimit int32, riskStep int32, makerFeeRate float32, takerFeeRate float32, takerFixFee float32, makerFixFee float32, settlementFee float32, isDeleverage bool, isQuanto bool, isInverse bool, markMethod string, fairMethod string, fundingBaseSymbol string, fundingQuoteSymbol string, fundingRateSymbol string, indexSymbol string, settlementSymbol string, status string, fundingFeeRate float32, predictedFundingFeeRate float32, fundingRateGranularity int32, openInterest string, turnoverOf24h float32, volumeOf24h float32, markPrice float32, indexPrice float32, lastTradePrice float32, nextFundingRateTime int32, maxLeverage int32, sourceExchanges []string, premiumsSymbol1M string, premiumsSymbol8H string, fundingBaseSymbol1M string, fundingQuoteSymbol1M string, lowPrice float32, highPrice float32, priceChgPct float32, priceChg float32, k float32, m float32, f float32, mmrLimit float32, mmrLevConstant float32, supportCross bool) *GetAllSymbolsData { +func NewGetAllSymbolsData(symbol string, rootSymbol string, Type_ string, firstOpenDate int64, baseCurrency string, quoteCurrency string, settleCurrency string, maxOrderQty int32, maxPrice float32, lotSize int32, tickSize float32, indexPriceTickSize float32, multiplier float32, initialMargin float32, maintainMargin float32, maxRiskLimit int32, minRiskLimit int32, riskStep int32, makerFeeRate float32, takerFeeRate float32, takerFixFee float32, makerFixFee float32, settlementFee float32, isDeleverage bool, isQuanto bool, isInverse bool, markMethod string, fairMethod string, fundingBaseSymbol string, fundingQuoteSymbol string, fundingRateSymbol string, indexSymbol string, settlementSymbol string, status string, fundingFeeRate float32, predictedFundingFeeRate float32, fundingRateGranularity int32, openInterest string, turnoverOf24h float32, volumeOf24h float32, markPrice float32, indexPrice float32, lastTradePrice float32, nextFundingRateTime int32, maxLeverage int32, sourceExchanges []string, premiumsSymbol1M string, premiumsSymbol8H string, fundingBaseSymbol1M string, fundingQuoteSymbol1M string, lowPrice float32, highPrice float32, priceChgPct float32, priceChg float32, k float32, m float32, f float32, mmrLimit float32, mmrLevConstant float32, supportCross bool, buyLimit float32, sellLimit float32) *GetAllSymbolsData { this := GetAllSymbolsData{} this.Symbol = symbol this.RootSymbol = rootSymbol @@ -189,6 +193,8 @@ func NewGetAllSymbolsData(symbol string, rootSymbol string, Type_ string, firstO this.MmrLimit = mmrLimit this.MmrLevConstant = mmrLevConstant this.SupportCross = supportCross + this.BuyLimit = buyLimit + this.SellLimit = sellLimit return &this } @@ -263,5 +269,7 @@ func (o *GetAllSymbolsData) ToMap() map[string]interface{} { toSerialize["mmrLimit"] = o.MmrLimit toSerialize["mmrLevConstant"] = o.MmrLevConstant toSerialize["supportCross"] = o.SupportCross + toSerialize["buyLimit"] = o.BuyLimit + toSerialize["sellLimit"] = o.SellLimit return toSerialize } diff --git a/sdk/golang/pkg/generate/futures/market/types_get_all_symbols_resp.go b/sdk/golang/pkg/generate/futures/market/types_get_all_symbols_resp.go index 2ed67df5..9d169b96 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_all_symbols_resp.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_all_symbols_resp.go @@ -11,7 +11,7 @@ import ( type GetAllSymbolsResp struct { // common response CommonResponse *types.RestResponse - // the list of all contracts + // List of all contracts Data []GetAllSymbolsData `json:"data,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/market/types_get_all_tickers_data.go b/sdk/golang/pkg/generate/futures/market/types_get_all_tickers_data.go index 99582596..83191652 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_all_tickers_data.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_all_tickers_data.go @@ -4,13 +4,13 @@ package market // GetAllTickersData struct for GetAllTickersData type GetAllTickersData struct { - // Sequence number, used to judge whether the messages pushed by Websocket is continuous. + // Sequence number, used to judge whether the messages pushed by Websocket are continuous. Sequence int64 `json:"sequence,omitempty"` // Symbol Symbol string `json:"symbol,omitempty"` // Trade direction Side string `json:"side,omitempty"` - // 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. + // 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. Size int32 `json:"size,omitempty"` // Transaction ID TradeId string `json:"tradeId,omitempty"` @@ -24,7 +24,7 @@ type GetAllTickersData struct { BestAskPrice string `json:"bestAskPrice,omitempty"` // Best ask size BestAskSize int32 `json:"bestAskSize,omitempty"` - // Filled time(nanosecond) + // Filled time (nanoseconds) Ts int64 `json:"ts,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/market/types_get_full_order_book_req.go b/sdk/golang/pkg/generate/futures/market/types_get_full_order_book_req.go index 8168794e..b2765708 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_full_order_book_req.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_full_order_book_req.go @@ -4,7 +4,7 @@ package market // GetFullOrderBookReq struct for GetFullOrderBookReq type GetFullOrderBookReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` } @@ -36,7 +36,7 @@ func NewGetFullOrderBookReqBuilder() *GetFullOrderBookReqBuilder { return &GetFullOrderBookReqBuilder{obj: NewGetFullOrderBookReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetFullOrderBookReqBuilder) SetSymbol(value string) *GetFullOrderBookReqBuilder { builder.obj.Symbol = &value return builder diff --git a/sdk/golang/pkg/generate/futures/market/types_get_full_order_book_resp.go b/sdk/golang/pkg/generate/futures/market/types_get_full_order_book_resp.go index fbf33053..f51144c4 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_full_order_book_resp.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_full_order_book_resp.go @@ -12,13 +12,13 @@ type GetFullOrderBookResp struct { CommonResponse *types.RestResponse // Sequence number Sequence int64 `json:"sequence,omitempty"` - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` // bids, from high to low Bids [][]float32 `json:"bids,omitempty"` // asks, from low to high Asks [][]float32 `json:"asks,omitempty"` - // Timestamp(nanosecond) + // Timestamp (nanoseconds) Ts int64 `json:"ts,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/market/types_get_interest_rate_index_data_list.go b/sdk/golang/pkg/generate/futures/market/types_get_interest_rate_index_data_list.go index c3fbb480..9c5af176 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_interest_rate_index_data_list.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_interest_rate_index_data_list.go @@ -4,11 +4,11 @@ package market // GetInterestRateIndexDataList struct for GetInterestRateIndexDataList type GetInterestRateIndexDataList struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` - // Granularity (milisecond) + // Granularity (milliseconds) Granularity int32 `json:"granularity,omitempty"` - // Timestamp(milisecond) + // Timestamp (milliseconds) TimePoint int64 `json:"timePoint,omitempty"` // Interest rate value Value float32 `json:"value,omitempty"` diff --git a/sdk/golang/pkg/generate/futures/market/types_get_interest_rate_index_req.go b/sdk/golang/pkg/generate/futures/market/types_get_interest_rate_index_req.go index bf70033b..6978b09d 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_interest_rate_index_req.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_interest_rate_index_req.go @@ -4,19 +4,19 @@ package market // GetInterestRateIndexReq struct for GetInterestRateIndexReq type GetInterestRateIndexReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` - // This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + // This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. Reverse *bool `json:"reverse,omitempty" url:"reverse,omitempty"` // 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. Offset *int64 `json:"offset,omitempty" url:"offset,omitempty"` - // 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 + // 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. Forward *bool `json:"forward,omitempty" url:"forward,omitempty"` - // Max record count. The default record count is 10, The maximum length cannot exceed 100 + // Max. record count. The default record count is 10; the maximum length cannot exceed 100 MaxCount *int64 `json:"maxCount,omitempty" url:"maxCount,omitempty"` } @@ -66,25 +66,25 @@ func NewGetInterestRateIndexReqBuilder() *GetInterestRateIndexReqBuilder { return &GetInterestRateIndexReqBuilder{obj: NewGetInterestRateIndexReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetInterestRateIndexReqBuilder) SetSymbol(value string) *GetInterestRateIndexReqBuilder { builder.obj.Symbol = &value return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetInterestRateIndexReqBuilder) SetStartAt(value int64) *GetInterestRateIndexReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetInterestRateIndexReqBuilder) SetEndAt(value int64) *GetInterestRateIndexReqBuilder { builder.obj.EndAt = &value return builder } -// This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. +// This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. func (builder *GetInterestRateIndexReqBuilder) SetReverse(value bool) *GetInterestRateIndexReqBuilder { builder.obj.Reverse = &value return builder @@ -96,13 +96,13 @@ func (builder *GetInterestRateIndexReqBuilder) SetOffset(value int64) *GetIntere return builder } -// 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 +// 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. func (builder *GetInterestRateIndexReqBuilder) SetForward(value bool) *GetInterestRateIndexReqBuilder { builder.obj.Forward = &value return builder } -// Max record count. The default record count is 10, The maximum length cannot exceed 100 +// Max. record count. The default record count is 10; the maximum length cannot exceed 100 func (builder *GetInterestRateIndexReqBuilder) SetMaxCount(value int64) *GetInterestRateIndexReqBuilder { builder.obj.MaxCount = &value return builder diff --git a/sdk/golang/pkg/generate/futures/market/types_get_klines_req.go b/sdk/golang/pkg/generate/futures/market/types_get_klines_req.go index 98704220..a9e04d8a 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_klines_req.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_klines_req.go @@ -4,13 +4,13 @@ package market // GetKlinesReq struct for GetKlinesReq type GetKlinesReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` - // Type of candlestick patterns(minute) + // Type of candlestick patterns (minutes) Granularity *int64 `json:"granularity,omitempty" url:"granularity,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) From *int64 `json:"from,omitempty" url:"from,omitempty"` - // End time (milisecond) + // End time (milliseconds) To *int64 `json:"to,omitempty" url:"to,omitempty"` } @@ -45,25 +45,25 @@ func NewGetKlinesReqBuilder() *GetKlinesReqBuilder { return &GetKlinesReqBuilder{obj: NewGetKlinesReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetKlinesReqBuilder) SetSymbol(value string) *GetKlinesReqBuilder { builder.obj.Symbol = &value return builder } -// Type of candlestick patterns(minute) +// Type of candlestick patterns (minutes) func (builder *GetKlinesReqBuilder) SetGranularity(value int64) *GetKlinesReqBuilder { builder.obj.Granularity = &value return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetKlinesReqBuilder) SetFrom(value int64) *GetKlinesReqBuilder { builder.obj.From = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetKlinesReqBuilder) SetTo(value int64) *GetKlinesReqBuilder { builder.obj.To = &value return builder diff --git a/sdk/golang/pkg/generate/futures/market/types_get_mark_price_req.go b/sdk/golang/pkg/generate/futures/market/types_get_mark_price_req.go index 43240b8f..39deb4af 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_mark_price_req.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_mark_price_req.go @@ -4,7 +4,7 @@ package market // GetMarkPriceReq struct for GetMarkPriceReq type GetMarkPriceReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" path:"symbol" url:"-"` } @@ -36,7 +36,7 @@ func NewGetMarkPriceReqBuilder() *GetMarkPriceReqBuilder { return &GetMarkPriceReqBuilder{obj: NewGetMarkPriceReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetMarkPriceReqBuilder) SetSymbol(value string) *GetMarkPriceReqBuilder { builder.obj.Symbol = &value return builder diff --git a/sdk/golang/pkg/generate/futures/market/types_get_mark_price_resp.go b/sdk/golang/pkg/generate/futures/market/types_get_mark_price_resp.go index 3e9dee8c..c89d8ed0 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_mark_price_resp.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_mark_price_resp.go @@ -10,11 +10,11 @@ import ( type GetMarkPriceResp struct { // common response CommonResponse *types.RestResponse - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` - // Granularity (milisecond) + // Granularity (milliseconds) Granularity int32 `json:"granularity,omitempty"` - // Time point (milisecond) + // Time point (milliseconds) TimePoint int64 `json:"timePoint,omitempty"` // Mark price Value float32 `json:"value,omitempty"` diff --git a/sdk/golang/pkg/generate/futures/market/types_get_part_order_book_req.go b/sdk/golang/pkg/generate/futures/market/types_get_part_order_book_req.go index e97dac87..61a831c7 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_part_order_book_req.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_part_order_book_req.go @@ -4,10 +4,10 @@ package market // GetPartOrderBookReq struct for GetPartOrderBookReq type GetPartOrderBookReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` // Get the depth layer, optional value: 20, 100 Size *string `json:"size,omitempty" path:"size" url:"-"` + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` } // NewGetPartOrderBookReq instantiates a new GetPartOrderBookReq object @@ -26,8 +26,8 @@ func NewGetPartOrderBookReqWithDefaults() *GetPartOrderBookReq { func (o *GetPartOrderBookReq) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} - toSerialize["symbol"] = o.Symbol toSerialize["size"] = o.Size + toSerialize["symbol"] = o.Symbol return toSerialize } @@ -39,18 +39,18 @@ func NewGetPartOrderBookReqBuilder() *GetPartOrderBookReqBuilder { return &GetPartOrderBookReqBuilder{obj: NewGetPartOrderBookReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) -func (builder *GetPartOrderBookReqBuilder) SetSymbol(value string) *GetPartOrderBookReqBuilder { - builder.obj.Symbol = &value - return builder -} - // Get the depth layer, optional value: 20, 100 func (builder *GetPartOrderBookReqBuilder) SetSize(value string) *GetPartOrderBookReqBuilder { builder.obj.Size = &value return builder } +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +func (builder *GetPartOrderBookReqBuilder) SetSymbol(value string) *GetPartOrderBookReqBuilder { + builder.obj.Symbol = &value + return builder +} + func (builder *GetPartOrderBookReqBuilder) Build() *GetPartOrderBookReq { return builder.obj } diff --git a/sdk/golang/pkg/generate/futures/market/types_get_part_order_book_resp.go b/sdk/golang/pkg/generate/futures/market/types_get_part_order_book_resp.go index 5627c5f5..ef15b128 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_part_order_book_resp.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_part_order_book_resp.go @@ -12,13 +12,13 @@ type GetPartOrderBookResp struct { CommonResponse *types.RestResponse // Sequence number Sequence int64 `json:"sequence,omitempty"` - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` // bids, from high to low Bids [][]float32 `json:"bids,omitempty"` // asks, from low to high Asks [][]float32 `json:"asks,omitempty"` - // Timestamp(nanosecond) + // Timestamp (nanoseconds) Ts int64 `json:"ts,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/market/types_get_premium_index_data_list.go b/sdk/golang/pkg/generate/futures/market/types_get_premium_index_data_list.go index b1bfee73..b6c1159a 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_premium_index_data_list.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_premium_index_data_list.go @@ -4,11 +4,11 @@ package market // GetPremiumIndexDataList struct for GetPremiumIndexDataList type GetPremiumIndexDataList struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` - // Granularity(milisecond) + // Granularity (milliseconds) Granularity int32 `json:"granularity,omitempty"` - // Timestamp(milisecond) + // Timestamp (milliseconds) TimePoint int64 `json:"timePoint,omitempty"` // Premium index Value float32 `json:"value,omitempty"` diff --git a/sdk/golang/pkg/generate/futures/market/types_get_premium_index_req.go b/sdk/golang/pkg/generate/futures/market/types_get_premium_index_req.go index 54a38c91..03f7cfea 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_premium_index_req.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_premium_index_req.go @@ -4,19 +4,19 @@ package market // GetPremiumIndexReq struct for GetPremiumIndexReq type GetPremiumIndexReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` - // This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + // This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. Reverse *bool `json:"reverse,omitempty" url:"reverse,omitempty"` // 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. Offset *int64 `json:"offset,omitempty" url:"offset,omitempty"` - // 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 + // 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. Forward *bool `json:"forward,omitempty" url:"forward,omitempty"` - // Max record count. The default record count is 10, The maximum length cannot exceed 100 + // Max. record count. The default record count is 10; the maximum length cannot exceed 100 MaxCount *int64 `json:"maxCount,omitempty" url:"maxCount,omitempty"` } @@ -66,25 +66,25 @@ func NewGetPremiumIndexReqBuilder() *GetPremiumIndexReqBuilder { return &GetPremiumIndexReqBuilder{obj: NewGetPremiumIndexReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetPremiumIndexReqBuilder) SetSymbol(value string) *GetPremiumIndexReqBuilder { builder.obj.Symbol = &value return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetPremiumIndexReqBuilder) SetStartAt(value int64) *GetPremiumIndexReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetPremiumIndexReqBuilder) SetEndAt(value int64) *GetPremiumIndexReqBuilder { builder.obj.EndAt = &value return builder } -// This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. +// This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. func (builder *GetPremiumIndexReqBuilder) SetReverse(value bool) *GetPremiumIndexReqBuilder { builder.obj.Reverse = &value return builder @@ -96,13 +96,13 @@ func (builder *GetPremiumIndexReqBuilder) SetOffset(value int64) *GetPremiumInde return builder } -// 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 +// 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. func (builder *GetPremiumIndexReqBuilder) SetForward(value bool) *GetPremiumIndexReqBuilder { builder.obj.Forward = &value return builder } -// Max record count. The default record count is 10, The maximum length cannot exceed 100 +// Max. record count. The default record count is 10; the maximum length cannot exceed 100 func (builder *GetPremiumIndexReqBuilder) SetMaxCount(value int64) *GetPremiumIndexReqBuilder { builder.obj.MaxCount = &value return builder diff --git a/sdk/golang/pkg/generate/futures/market/types_get_private_token_instance_servers.go b/sdk/golang/pkg/generate/futures/market/types_get_private_token_instance_servers.go index be474fe3..a87df7d0 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_private_token_instance_servers.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_private_token_instance_servers.go @@ -4,15 +4,15 @@ package market // GetPrivateTokenInstanceServers struct for GetPrivateTokenInstanceServers type GetPrivateTokenInstanceServers struct { - // Websocket domain URL, It is recommended to use a dynamic URL as the URL may change + // Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. Endpoint string `json:"endpoint,omitempty"` // Whether to encrypt. Currently only supports wss, not ws Encrypt bool `json:"encrypt,omitempty"` // Network Protocol Protocol string `json:"protocol,omitempty"` - // Recommended ping interval(millisecond) + // Recommended ping interval (milliseconds) PingInterval int32 `json:"pingInterval,omitempty"` - // Heartbeat timeout(millisecond) + // Heartbeat timeout (milliseconds) PingTimeout int32 `json:"pingTimeout,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/market/types_get_private_token_resp.go b/sdk/golang/pkg/generate/futures/market/types_get_private_token_resp.go index 4333c90e..0a9ff6a7 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_private_token_resp.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_private_token_resp.go @@ -10,7 +10,7 @@ import ( type GetPrivateTokenResp struct { // common response CommonResponse *types.RestResponse - // The token required to establish a websocket connection + // The token required to establish a Websocket connection Token string `json:"token,omitempty"` InstanceServers []GetPrivateTokenInstanceServers `json:"instanceServers,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/market/types_get_public_token_instance_servers.go b/sdk/golang/pkg/generate/futures/market/types_get_public_token_instance_servers.go index 2984ce3f..f0fc72ce 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_public_token_instance_servers.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_public_token_instance_servers.go @@ -4,15 +4,15 @@ package market // GetPublicTokenInstanceServers struct for GetPublicTokenInstanceServers type GetPublicTokenInstanceServers struct { - // Websocket domain URL, It is recommended to use a dynamic URL as the URL may change + // Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. Endpoint string `json:"endpoint,omitempty"` // Whether to encrypt. Currently only supports wss, not ws Encrypt bool `json:"encrypt,omitempty"` // Network Protocol Protocol string `json:"protocol,omitempty"` - // Recommended ping interval(millisecond) + // Recommended ping interval (milliseconds) PingInterval int32 `json:"pingInterval,omitempty"` - // Heartbeat timeout(millisecond) + // Heartbeat timeout (milliseconds) PingTimeout int32 `json:"pingTimeout,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/market/types_get_public_token_resp.go b/sdk/golang/pkg/generate/futures/market/types_get_public_token_resp.go index 0c6ee7c7..29c8b3e0 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_public_token_resp.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_public_token_resp.go @@ -10,7 +10,7 @@ import ( type GetPublicTokenResp struct { // common response CommonResponse *types.RestResponse - // The token required to establish a websocket connection + // The token required to establish a Websocket connection Token string `json:"token,omitempty"` InstanceServers []GetPublicTokenInstanceServers `json:"instanceServers,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/market/types_get_server_time_resp.go b/sdk/golang/pkg/generate/futures/market/types_get_server_time_resp.go index 453b7a66..710b4820 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_server_time_resp.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_server_time_resp.go @@ -11,7 +11,7 @@ import ( type GetServerTimeResp struct { // common response CommonResponse *types.RestResponse - // ServerTime(millisecond) + // ServerTime (milliseconds) Data int64 `json:"data,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/market/types_get_service_status_resp.go b/sdk/golang/pkg/generate/futures/market/types_get_service_status_resp.go index add794d0..f2ac868d 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_service_status_resp.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_service_status_resp.go @@ -11,7 +11,7 @@ type GetServiceStatusResp struct { // common response CommonResponse *types.RestResponse Msg string `json:"msg,omitempty"` - // Status of service: open:normal transaction, close:Stop Trading/Maintenance, cancelonly:can only cancel the order but not place order + // Status of service: open: normal transaction; close: Stop Trading/Maintenance; cancelonly: can only cancel the order but not place order Status string `json:"status,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/market/types_get_spot_index_price_data_list.go b/sdk/golang/pkg/generate/futures/market/types_get_spot_index_price_data_list.go index 1a10e605..9147a783 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_spot_index_price_data_list.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_spot_index_price_data_list.go @@ -4,11 +4,11 @@ package market // GetSpotIndexPriceDataList struct for GetSpotIndexPriceDataList type GetSpotIndexPriceDataList struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` - // Granularity (milisecond) + // Granularity (milliseconds) Granularity int32 `json:"granularity,omitempty"` - // Timestamp (milisecond) + // Timestamp (milliseconds) TimePoint int64 `json:"timePoint,omitempty"` // Index Value Value float32 `json:"value,omitempty"` diff --git a/sdk/golang/pkg/generate/futures/market/types_get_spot_index_price_req.go b/sdk/golang/pkg/generate/futures/market/types_get_spot_index_price_req.go index 5a6d4395..c367378b 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_spot_index_price_req.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_spot_index_price_req.go @@ -4,19 +4,19 @@ package market // GetSpotIndexPriceReq struct for GetSpotIndexPriceReq type GetSpotIndexPriceReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` - // This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + // This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. Reverse *bool `json:"reverse,omitempty" url:"reverse,omitempty"` // 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. Offset *int64 `json:"offset,omitempty" url:"offset,omitempty"` - // 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 + // 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. Forward *bool `json:"forward,omitempty" url:"forward,omitempty"` - // Max record count. The default record count is 10, The maximum length cannot exceed 100 + // Max. record count. The default record count is 10; the maximum length cannot exceed 100 MaxCount *int64 `json:"maxCount,omitempty" url:"maxCount,omitempty"` } @@ -66,25 +66,25 @@ func NewGetSpotIndexPriceReqBuilder() *GetSpotIndexPriceReqBuilder { return &GetSpotIndexPriceReqBuilder{obj: NewGetSpotIndexPriceReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetSpotIndexPriceReqBuilder) SetSymbol(value string) *GetSpotIndexPriceReqBuilder { builder.obj.Symbol = &value return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetSpotIndexPriceReqBuilder) SetStartAt(value int64) *GetSpotIndexPriceReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetSpotIndexPriceReqBuilder) SetEndAt(value int64) *GetSpotIndexPriceReqBuilder { builder.obj.EndAt = &value return builder } -// This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. +// This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. func (builder *GetSpotIndexPriceReqBuilder) SetReverse(value bool) *GetSpotIndexPriceReqBuilder { builder.obj.Reverse = &value return builder @@ -96,13 +96,13 @@ func (builder *GetSpotIndexPriceReqBuilder) SetOffset(value int64) *GetSpotIndex return builder } -// 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 +// 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. func (builder *GetSpotIndexPriceReqBuilder) SetForward(value bool) *GetSpotIndexPriceReqBuilder { builder.obj.Forward = &value return builder } -// Max record count. The default record count is 10, The maximum length cannot exceed 100 +// Max. record count. The default record count is 10; the maximum length cannot exceed 100 func (builder *GetSpotIndexPriceReqBuilder) SetMaxCount(value int64) *GetSpotIndexPriceReqBuilder { builder.obj.MaxCount = &value return builder diff --git a/sdk/golang/pkg/generate/futures/market/types_get_symbol_resp.go b/sdk/golang/pkg/generate/futures/market/types_get_symbol_resp.go index 5f925902..75427fab 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_symbol_resp.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_symbol_resp.go @@ -14,13 +14,13 @@ type GetSymbolResp struct { Symbol string `json:"symbol,omitempty"` // Contract group RootSymbol string `json:"rootSymbol,omitempty"` - // Type of the contract + // Type of contract Type string `json:"type,omitempty"` - // First Open Date(millisecond) + // First Open Date (milliseconds) FirstOpenDate int64 `json:"firstOpenDate,omitempty"` - // Expiration date(millisecond). Null means it will never expire + // Expiration date (milliseconds) Null means it will never expire ExpireDate int64 `json:"expireDate,omitempty"` - // Settlement date(millisecond). Null indicates that automatic settlement is not supported + // Settlement date (milliseconds) Null indicates that automatic settlement is not supported SettleDate int64 `json:"settleDate,omitempty"` // Base currency BaseCurrency string `json:"baseCurrency,omitempty"` @@ -68,9 +68,9 @@ type GetSymbolResp struct { IsInverse bool `json:"isInverse,omitempty"` // Marking method MarkMethod string `json:"markMethod,omitempty"` - // Fair price marking method, The Futures contract is null + // Fair price marking method; the Futures contract is null FairMethod string `json:"fairMethod,omitempty"` - // Ticker symbol of the based currency + // Ticker symbol of the base currency FundingBaseSymbol string `json:"fundingBaseSymbol,omitempty"` // Ticker symbol of the quote currency FundingQuoteSymbol string `json:"fundingQuoteSymbol,omitempty"` @@ -78,7 +78,7 @@ type GetSymbolResp struct { FundingRateSymbol string `json:"fundingRateSymbol,omitempty"` // Index symbol IndexSymbol string `json:"indexSymbol,omitempty"` - // Settlement Symbol + // Settlement symbol SettlementSymbol string `json:"settlementSymbol,omitempty"` // Contract status Status string `json:"status,omitempty"` @@ -86,9 +86,9 @@ type GetSymbolResp struct { FundingFeeRate float32 `json:"fundingFeeRate,omitempty"` // Predicted funding fee rate PredictedFundingFeeRate float32 `json:"predictedFundingFeeRate,omitempty"` - // Funding interval(millisecond) + // Funding interval (milliseconds) FundingRateGranularity int32 `json:"fundingRateGranularity,omitempty"` - // Open interest + // Open interest (unit: lots) OpenInterest string `json:"openInterest,omitempty"` // 24-hour turnover TurnoverOf24h float32 `json:"turnoverOf24h,omitempty"` @@ -100,25 +100,25 @@ type GetSymbolResp struct { IndexPrice float32 `json:"indexPrice,omitempty"` // Last trade price LastTradePrice float32 `json:"lastTradePrice,omitempty"` - // Next funding rate time(millisecond) + // Next funding rate time (milliseconds) NextFundingRateTime int32 `json:"nextFundingRateTime,omitempty"` // Maximum leverage MaxLeverage int32 `json:"maxLeverage,omitempty"` // The contract index price source exchange SourceExchanges []string `json:"sourceExchanges,omitempty"` - // Premium index symbol(1 minute) + // Premium index symbol (1 minute) PremiumsSymbol1M string `json:"premiumsSymbol1M,omitempty"` - // Premium index symbol(8 hours) + // Premium index symbol (8 hours) PremiumsSymbol8H string `json:"premiumsSymbol8H,omitempty"` - // Base currency interest rate symbol(1 minute) + // Base currency interest rate symbol (1 minute) FundingBaseSymbol1M string `json:"fundingBaseSymbol1M,omitempty"` - // Quote currency interest rate symbol(1 minute) + // Quote currency interest rate symbol (1 minute) FundingQuoteSymbol1M string `json:"fundingQuoteSymbol1M,omitempty"` // 24-hour lowest price LowPrice float32 `json:"lowPrice,omitempty"` // 24-hour highest price HighPrice float32 `json:"highPrice,omitempty"` - // 24-hour price change% + // 24-hour % price change PriceChgPct float32 `json:"priceChgPct,omitempty"` // 24-hour price change PriceChg float32 `json:"priceChg,omitempty"` @@ -129,11 +129,15 @@ type GetSymbolResp struct { MmrLevConstant float32 `json:"mmrLevConstant,omitempty"` // Whether support Cross Margin SupportCross bool `json:"supportCross,omitempty"` + // The current maximum buying price allowed + BuyLimit float32 `json:"buyLimit,omitempty"` + // The current minimum selling price allowed + SellLimit float32 `json:"sellLimit,omitempty"` } // NewGetSymbolResp instantiates a new GetSymbolResp object // This constructor will assign default values to properties that have it defined -func NewGetSymbolResp(symbol string, rootSymbol string, Type_ string, firstOpenDate int64, expireDate int64, settleDate int64, baseCurrency string, quoteCurrency string, settleCurrency string, maxOrderQty int32, maxPrice float32, lotSize int32, tickSize float32, indexPriceTickSize float32, multiplier float32, initialMargin float32, maintainMargin float32, maxRiskLimit int32, minRiskLimit int32, riskStep int32, makerFeeRate float32, takerFeeRate float32, takerFixFee float32, makerFixFee float32, settlementFee float32, isDeleverage bool, isQuanto bool, isInverse bool, markMethod string, fairMethod string, fundingBaseSymbol string, fundingQuoteSymbol string, fundingRateSymbol string, indexSymbol string, settlementSymbol string, status string, fundingFeeRate float32, predictedFundingFeeRate float32, fundingRateGranularity int32, openInterest string, turnoverOf24h float32, volumeOf24h float32, markPrice float32, indexPrice float32, lastTradePrice float32, nextFundingRateTime int32, maxLeverage int32, sourceExchanges []string, premiumsSymbol1M string, premiumsSymbol8H string, fundingBaseSymbol1M string, fundingQuoteSymbol1M string, lowPrice float32, highPrice float32, priceChgPct float32, priceChg float32, k float32, m float32, f float32, mmrLimit float32, mmrLevConstant float32, supportCross bool) *GetSymbolResp { +func NewGetSymbolResp(symbol string, rootSymbol string, Type_ string, firstOpenDate int64, expireDate int64, settleDate int64, baseCurrency string, quoteCurrency string, settleCurrency string, maxOrderQty int32, maxPrice float32, lotSize int32, tickSize float32, indexPriceTickSize float32, multiplier float32, initialMargin float32, maintainMargin float32, maxRiskLimit int32, minRiskLimit int32, riskStep int32, makerFeeRate float32, takerFeeRate float32, takerFixFee float32, makerFixFee float32, settlementFee float32, isDeleverage bool, isQuanto bool, isInverse bool, markMethod string, fairMethod string, fundingBaseSymbol string, fundingQuoteSymbol string, fundingRateSymbol string, indexSymbol string, settlementSymbol string, status string, fundingFeeRate float32, predictedFundingFeeRate float32, fundingRateGranularity int32, openInterest string, turnoverOf24h float32, volumeOf24h float32, markPrice float32, indexPrice float32, lastTradePrice float32, nextFundingRateTime int32, maxLeverage int32, sourceExchanges []string, premiumsSymbol1M string, premiumsSymbol8H string, fundingBaseSymbol1M string, fundingQuoteSymbol1M string, lowPrice float32, highPrice float32, priceChgPct float32, priceChg float32, k float32, m float32, f float32, mmrLimit float32, mmrLevConstant float32, supportCross bool, buyLimit float32, sellLimit float32) *GetSymbolResp { this := GetSymbolResp{} this.Symbol = symbol this.RootSymbol = rootSymbol @@ -197,6 +201,8 @@ func NewGetSymbolResp(symbol string, rootSymbol string, Type_ string, firstOpenD this.MmrLimit = mmrLimit this.MmrLevConstant = mmrLevConstant this.SupportCross = supportCross + this.BuyLimit = buyLimit + this.SellLimit = sellLimit return &this } @@ -271,6 +277,8 @@ func (o *GetSymbolResp) ToMap() map[string]interface{} { toSerialize["mmrLimit"] = o.MmrLimit toSerialize["mmrLevConstant"] = o.MmrLevConstant toSerialize["supportCross"] = o.SupportCross + toSerialize["buyLimit"] = o.BuyLimit + toSerialize["sellLimit"] = o.SellLimit return toSerialize } diff --git a/sdk/golang/pkg/generate/futures/market/types_get_ticker_req.go b/sdk/golang/pkg/generate/futures/market/types_get_ticker_req.go index 0975ccb3..877eb4e2 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_ticker_req.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_ticker_req.go @@ -4,7 +4,7 @@ package market // GetTickerReq struct for GetTickerReq type GetTickerReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` } @@ -36,7 +36,7 @@ func NewGetTickerReqBuilder() *GetTickerReqBuilder { return &GetTickerReqBuilder{obj: NewGetTickerReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetTickerReqBuilder) SetSymbol(value string) *GetTickerReqBuilder { builder.obj.Symbol = &value return builder diff --git a/sdk/golang/pkg/generate/futures/market/types_get_ticker_resp.go b/sdk/golang/pkg/generate/futures/market/types_get_ticker_resp.go index 4d773052..a49a31e2 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_ticker_resp.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_ticker_resp.go @@ -10,11 +10,11 @@ import ( type GetTickerResp struct { // common response CommonResponse *types.RestResponse - // Sequence number, used to judge whether the messages pushed by Websocket is continuous. + // Sequence number, used to judge whether the messages pushed by Websocket are continuous. Sequence int64 `json:"sequence,omitempty"` - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` - // 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. + // 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. Side string `json:"side,omitempty"` // Filled quantity Size int32 `json:"size,omitempty"` @@ -30,7 +30,7 @@ type GetTickerResp struct { BestAskPrice string `json:"bestAskPrice,omitempty"` // Best ask size BestAskSize int32 `json:"bestAskSize,omitempty"` - // Filled time(nanosecond) + // Filled time (nanoseconds) Ts int64 `json:"ts,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/market/types_get_trade_history_data.go b/sdk/golang/pkg/generate/futures/market/types_get_trade_history_data.go index fea5273d..fb8d120b 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_trade_history_data.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_trade_history_data.go @@ -14,13 +14,13 @@ type GetTradeHistoryData struct { MakerOrderId string `json:"makerOrderId,omitempty"` // Taker order ID TakerOrderId string `json:"takerOrderId,omitempty"` - // Filled timestamp(nanosecond) + // Filled timestamp (nanosecond) Ts int64 `json:"ts,omitempty"` // Filled amount Size int32 `json:"size,omitempty"` // Filled price Price string `json:"price,omitempty"` - // 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. + // 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. Side string `json:"side,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/market/types_get_trade_history_req.go b/sdk/golang/pkg/generate/futures/market/types_get_trade_history_req.go index e2c1fb29..2e74a372 100644 --- a/sdk/golang/pkg/generate/futures/market/types_get_trade_history_req.go +++ b/sdk/golang/pkg/generate/futures/market/types_get_trade_history_req.go @@ -4,7 +4,7 @@ package market // GetTradeHistoryReq struct for GetTradeHistoryReq type GetTradeHistoryReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` } @@ -36,7 +36,7 @@ func NewGetTradeHistoryReqBuilder() *GetTradeHistoryReqBuilder { return &GetTradeHistoryReqBuilder{obj: NewGetTradeHistoryReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetTradeHistoryReqBuilder) SetSymbol(value string) *GetTradeHistoryReqBuilder { builder.obj.Symbol = &value return builder diff --git a/sdk/golang/pkg/generate/futures/order/api_order.go b/sdk/golang/pkg/generate/futures/order/api_order.go index c603eb23..42da76de 100644 --- a/sdk/golang/pkg/generate/futures/order/api_order.go +++ b/sdk/golang/pkg/generate/futures/order/api_order.go @@ -10,255 +10,255 @@ import ( type OrderAPI interface { // AddOrder Add Order - // Description: Place 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. + // 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. // Documentation: https://www.kucoin.com/docs-new/api-3470235 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ AddOrder(req *AddOrderReq, ctx context.Context) (*AddOrderResp, error) // AddOrderTest Add Order Test // Description: Place order to the futures trading system just for validation // Documentation: https://www.kucoin.com/docs-new/api-3470238 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ AddOrderTest(req *AddOrderTestReq, ctx context.Context) (*AddOrderTestResp, error) // BatchAddOrders Batch Add Orders // 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. // Documentation: https://www.kucoin.com/docs-new/api-3470236 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 20 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+---------+ BatchAddOrders(req *BatchAddOrdersReq, ctx context.Context) (*BatchAddOrdersResp, error) // AddTPSLOrder Add Take Profit And Stop Loss Order // 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. // Documentation: https://www.kucoin.com/docs-new/api-3470237 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ AddTPSLOrder(req *AddTPSLOrderReq, ctx context.Context) (*AddTPSLOrderResp, error) // CancelOrderById Cancel Order By OrderId // Description: Cancel order by system generated orderId. // Documentation: https://www.kucoin.com/docs-new/api-3470239 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ CancelOrderById(req *CancelOrderByIdReq, ctx context.Context) (*CancelOrderByIdResp, error) // CancelOrderByClientOid Cancel Order By ClientOid // Description: Cancel order by client defined orderId. // Documentation: https://www.kucoin.com/docs-new/api-3470240 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ CancelOrderByClientOid(req *CancelOrderByClientOidReq, ctx context.Context) (*CancelOrderByClientOidResp, error) // BatchCancelOrders Batch Cancel Orders // Description: Cancel a bach of orders by client defined orderId or system generated orderId // Documentation: https://www.kucoin.com/docs-new/api-3470241 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 20 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+---------+ BatchCancelOrders(req *BatchCancelOrdersReq, ctx context.Context) (*BatchCancelOrdersResp, error) // CancelAllOrdersV3 Cancel All Orders // Description: Cancel all open orders (excluding stop orders). The response is a list of orderIDs of the canceled orders. // Documentation: https://www.kucoin.com/docs-new/api-3470242 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ CancelAllOrdersV3(req *CancelAllOrdersV3Req, ctx context.Context) (*CancelAllOrdersV3Resp, error) // CancelAllStopOrders Cancel All Stop orders // 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'. // Documentation: https://www.kucoin.com/docs-new/api-3470243 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 15 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 15 | + // +-----------------------+---------+ CancelAllStopOrders(req *CancelAllStopOrdersReq, ctx context.Context) (*CancelAllStopOrdersResp, error) // GetOrderByOrderId Get Order By OrderId // Description: Get a single order by order id (including a stop order). // Documentation: https://www.kucoin.com/docs-new/api-3470245 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetOrderByOrderId(req *GetOrderByOrderIdReq, ctx context.Context) (*GetOrderByOrderIdResp, error) // GetOrderByClientOid Get Order By ClientOid - // Description: Get a single order by client order id (including a stop order). + // Description: Get a single order by client order ID (including a stop order). // Documentation: https://www.kucoin.com/docs-new/api-3470352 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetOrderByClientOid(req *GetOrderByClientOidReq, ctx context.Context) (*GetOrderByClientOidResp, error) // GetOrderList Get Order List // Description: List your current orders. // Documentation: https://www.kucoin.com/docs-new/api-3470244 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetOrderList(req *GetOrderListReq, ctx context.Context) (*GetOrderListResp, error) // GetRecentClosedOrders Get Recent Closed Orders // 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. // Documentation: https://www.kucoin.com/docs-new/api-3470246 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetRecentClosedOrders(req *GetRecentClosedOrdersReq, ctx context.Context) (*GetRecentClosedOrdersResp, error) // GetStopOrderList Get Stop Order List // Description: Get the un-triggered stop orders list. Stop orders that have been triggered can be queried through the general order interface // Documentation: https://www.kucoin.com/docs-new/api-3470247 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 6 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 6 | + // +-----------------------+---------+ GetStopOrderList(req *GetStopOrderListReq, ctx context.Context) (*GetStopOrderListResp, error) // GetOpenOrderValue Get Open Order Value - // Description: You can query this endpoint to get the the total number and value of the all your active orders. + // Description: You can query this endpoint to get the total number and value of all your active orders. // Documentation: https://www.kucoin.com/docs-new/api-3470250 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ GetOpenOrderValue(req *GetOpenOrderValueReq, ctx context.Context) (*GetOpenOrderValueResp, error) // GetRecentTradeHistory Get Recent Trade History - // Description: Get a list of recent 1000 fills in the last 24 hours. If you need to get your recent traded order history with low latency, you may query this endpoint. + // 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. // Documentation: https://www.kucoin.com/docs-new/api-3470249 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | NULL | + // +-----------------------+---------+ GetRecentTradeHistory(req *GetRecentTradeHistoryReq, ctx context.Context) (*GetRecentTradeHistoryResp, error) // GetTradeHistory Get Trade History // 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. // Documentation: https://www.kucoin.com/docs-new/api-3470248 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetTradeHistory(req *GetTradeHistoryReq, ctx context.Context) (*GetTradeHistoryResp, error) // CancelAllOrdersV1 Cancel All Orders - V1 // Description: Cancel all open orders (excluding stop orders). The response is a list of orderIDs of the canceled orders. // Documentation: https://www.kucoin.com/docs-new/api-3470362 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 200 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 200 | + // +-----------------------+---------+ // Deprecated CancelAllOrdersV1(req *CancelAllOrdersV1Req, ctx context.Context) (*CancelAllOrdersV1Resp, error) } diff --git a/sdk/golang/pkg/generate/futures/order/api_order_test.go b/sdk/golang/pkg/generate/futures/order/api_order_test.go index 17d5e6ac..5be575a2 100644 --- a/sdk/golang/pkg/generate/futures/order/api_order_test.go +++ b/sdk/golang/pkg/generate/futures/order/api_order_test.go @@ -320,7 +320,7 @@ func TestOrderGetOrderListReqModel(t *testing.T) { // Get Order List // /api/v1/orders - data := "{\"status\": \"done\", \"symbol\": \"example_string_default_value\", \"side\": \"buy\", \"type\": \"limit\", \"startAt\": 123456, \"endAt\": 123456, \"currentPage\": 123456, \"pageSize\": 123456}" + data := "{\"status\": \"done\", \"symbol\": \"example_string_default_value\", \"side\": \"buy\", \"type\": \"limit\", \"startAt\": 123456, \"endAt\": 123456, \"currentPage\": 1, \"pageSize\": 50}" req := &GetOrderListReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() @@ -472,7 +472,7 @@ func TestOrderGetTradeHistoryRespModel(t *testing.T) { // Get Trade History // /api/v1/fills - data := "{\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\": \"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 \"settleCurrency\": \"USDT\",\n \"fee\": \"0.04045854\",\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 \"settleCurrency\": \"USDT\",\n \"fee\": \"0.040467\",\n \"orderType\": \"market\",\n \"displayType\": \"market\",\n \"tradeType\": \"trade\",\n \"subTradeType\": null,\n \"tradeTime\": 1729155587944000000,\n \"createdAt\": 1729155588104\n }\n ]\n }\n}" + data := "{\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}" commonResp := &types.RestResponse{} err := json.Unmarshal([]byte(data), commonResp) assert.Nil(t, err) diff --git a/sdk/golang/pkg/generate/futures/order/types_add_order_req.go b/sdk/golang/pkg/generate/futures/order/types_add_order_req.go index ffc72e1b..7a4e325b 100644 --- a/sdk/golang/pkg/generate/futures/order/types_add_order_req.go +++ b/sdk/golang/pkg/generate/futures/order/types_add_order_req.go @@ -4,51 +4,51 @@ package order // AddOrderReq struct for AddOrderReq type AddOrderReq struct { - // 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(-) + // 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 (-). ClientOid string `json:"clientOid,omitempty"` - // specify if the order is to 'buy' or 'sell' + // Specify if the order is to 'buy' or 'sell'. Side string `json:"side,omitempty"` - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` // Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. Leverage int32 `json:"leverage,omitempty"` - // specify if the order is an 'limit' order or 'market' order + // Specify if the order is a 'limit' order or 'market' order Type *string `json:"type,omitempty"` - // remark for the order, length cannot exceed 100 utf8 characters + // Remark for the order: Length cannot exceed 100 utf8 characters Remark *string `json:"remark,omitempty"` - // Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. + // Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. Stop *string `json:"stop,omitempty"` // Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. StopPriceType *string `json:"stopPriceType,omitempty"` - // Need to be defined if stop is specified. + // Needs to be defined if stop is specified. StopPrice *string `json:"stopPrice,omitempty"` // 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. ReduceOnly *bool `json:"reduceOnly,omitempty"` // 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. CloseOrder *bool `json:"closeOrder,omitempty"` - // 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. + // 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. ForceHold *bool `json:"forceHold,omitempty"` - // [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. + // [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported. Stp *string `json:"stp,omitempty"` // Margin mode: ISOLATED, CROSS, default: ISOLATED MarginMode *string `json:"marginMode,omitempty"` // Required for type is 'limit' order, indicating the operating price Price *string `json:"price,omitempty"` - // **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. + // **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. Size *int32 `json:"size,omitempty"` // 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 TimeInForce *string `json:"timeInForce,omitempty"` - // 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. + // 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. PostOnly *bool `json:"postOnly,omitempty"` - // Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. + // Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. Hidden *bool `json:"hidden,omitempty"` - // 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. + // 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. Iceberg *bool `json:"iceberg,omitempty"` - // 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. + // 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. VisibleSize *string `json:"visibleSize,omitempty"` - // **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 + // **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. Qty *string `json:"qty,omitempty"` - // **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 + // **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. ValueQty *string `json:"valueQty,omitempty"` } @@ -142,19 +142,19 @@ func NewAddOrderReqBuilder() *AddOrderReqBuilder { return &AddOrderReqBuilder{obj: NewAddOrderReqWithDefaults()} } -// 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(-) +// 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 (-). func (builder *AddOrderReqBuilder) SetClientOid(value string) *AddOrderReqBuilder { builder.obj.ClientOid = value return builder } -// specify if the order is to 'buy' or 'sell' +// Specify if the order is to 'buy' or 'sell'. func (builder *AddOrderReqBuilder) SetSide(value string) *AddOrderReqBuilder { builder.obj.Side = value return builder } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *AddOrderReqBuilder) SetSymbol(value string) *AddOrderReqBuilder { builder.obj.Symbol = value return builder @@ -166,19 +166,19 @@ func (builder *AddOrderReqBuilder) SetLeverage(value int32) *AddOrderReqBuilder return builder } -// specify if the order is an 'limit' order or 'market' order +// Specify if the order is a 'limit' order or 'market' order func (builder *AddOrderReqBuilder) SetType(value string) *AddOrderReqBuilder { builder.obj.Type = &value return builder } -// remark for the order, length cannot exceed 100 utf8 characters +// Remark for the order: Length cannot exceed 100 utf8 characters func (builder *AddOrderReqBuilder) SetRemark(value string) *AddOrderReqBuilder { builder.obj.Remark = &value return builder } -// Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. +// Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. func (builder *AddOrderReqBuilder) SetStop(value string) *AddOrderReqBuilder { builder.obj.Stop = &value return builder @@ -190,7 +190,7 @@ func (builder *AddOrderReqBuilder) SetStopPriceType(value string) *AddOrderReqBu return builder } -// Need to be defined if stop is specified. +// Needs to be defined if stop is specified. func (builder *AddOrderReqBuilder) SetStopPrice(value string) *AddOrderReqBuilder { builder.obj.StopPrice = &value return builder @@ -208,13 +208,13 @@ func (builder *AddOrderReqBuilder) SetCloseOrder(value bool) *AddOrderReqBuilder return builder } -// 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. +// 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. func (builder *AddOrderReqBuilder) SetForceHold(value bool) *AddOrderReqBuilder { builder.obj.ForceHold = &value return builder } -// [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. +// [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported. func (builder *AddOrderReqBuilder) SetStp(value string) *AddOrderReqBuilder { builder.obj.Stp = &value return builder @@ -232,7 +232,7 @@ func (builder *AddOrderReqBuilder) SetPrice(value string) *AddOrderReqBuilder { return builder } -// **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. +// **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. func (builder *AddOrderReqBuilder) SetSize(value int32) *AddOrderReqBuilder { builder.obj.Size = &value return builder @@ -244,37 +244,37 @@ func (builder *AddOrderReqBuilder) SetTimeInForce(value string) *AddOrderReqBuil return builder } -// 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. +// 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. func (builder *AddOrderReqBuilder) SetPostOnly(value bool) *AddOrderReqBuilder { builder.obj.PostOnly = &value return builder } -// Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. +// Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. func (builder *AddOrderReqBuilder) SetHidden(value bool) *AddOrderReqBuilder { builder.obj.Hidden = &value return builder } -// 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. +// 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. func (builder *AddOrderReqBuilder) SetIceberg(value bool) *AddOrderReqBuilder { builder.obj.Iceberg = &value return builder } -// 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. +// 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. func (builder *AddOrderReqBuilder) SetVisibleSize(value string) *AddOrderReqBuilder { builder.obj.VisibleSize = &value return builder } -// **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 +// **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. func (builder *AddOrderReqBuilder) SetQty(value string) *AddOrderReqBuilder { builder.obj.Qty = &value return builder } -// **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 +// **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. func (builder *AddOrderReqBuilder) SetValueQty(value string) *AddOrderReqBuilder { builder.obj.ValueQty = &value return builder diff --git a/sdk/golang/pkg/generate/futures/order/types_add_order_resp.go b/sdk/golang/pkg/generate/futures/order/types_add_order_resp.go index 78a8ccb3..f12cbd85 100644 --- a/sdk/golang/pkg/generate/futures/order/types_add_order_resp.go +++ b/sdk/golang/pkg/generate/futures/order/types_add_order_resp.go @@ -10,9 +10,9 @@ import ( type AddOrderResp struct { // common response CommonResponse *types.RestResponse - // The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + // The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. OrderId string `json:"orderId,omitempty"` - // The user self-defined order id. + // The user self-defined order ID. ClientOid string `json:"clientOid,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/order/types_add_order_test_req.go b/sdk/golang/pkg/generate/futures/order/types_add_order_test_req.go index 1189f584..ac618a11 100644 --- a/sdk/golang/pkg/generate/futures/order/types_add_order_test_req.go +++ b/sdk/golang/pkg/generate/futures/order/types_add_order_test_req.go @@ -44,7 +44,7 @@ type AddOrderTestReq struct { Hidden *bool `json:"hidden,omitempty"` // 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. Iceberg *bool `json:"iceberg,omitempty"` - // 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. + // 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. VisibleSize *string `json:"visibleSize,omitempty"` // **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 Qty *string `json:"qty,omitempty"` @@ -261,7 +261,7 @@ func (builder *AddOrderTestReqBuilder) SetIceberg(value bool) *AddOrderTestReqBu return builder } -// 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. +// 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. func (builder *AddOrderTestReqBuilder) SetVisibleSize(value string) *AddOrderTestReqBuilder { builder.obj.VisibleSize = &value return builder diff --git a/sdk/golang/pkg/generate/futures/order/types_add_tpsl_order_req.go b/sdk/golang/pkg/generate/futures/order/types_add_tpsl_order_req.go index b5a6c6c6..3de7f84a 100644 --- a/sdk/golang/pkg/generate/futures/order/types_add_tpsl_order_req.go +++ b/sdk/golang/pkg/generate/futures/order/types_add_tpsl_order_req.go @@ -40,7 +40,7 @@ type AddTPSLOrderReq struct { Hidden *bool `json:"hidden,omitempty"` // 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. Iceberg *bool `json:"iceberg,omitempty"` - // 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. + // 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. VisibleSize *string `json:"visibleSize,omitempty"` // Take profit price TriggerStopUpPrice *string `json:"triggerStopUpPrice,omitempty"` @@ -249,7 +249,7 @@ func (builder *AddTPSLOrderReqBuilder) SetIceberg(value bool) *AddTPSLOrderReqBu return builder } -// 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. +// 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. func (builder *AddTPSLOrderReqBuilder) SetVisibleSize(value string) *AddTPSLOrderReqBuilder { builder.obj.VisibleSize = &value return builder diff --git a/sdk/golang/pkg/generate/futures/order/types_batch_add_orders_item.go b/sdk/golang/pkg/generate/futures/order/types_batch_add_orders_item.go index 65ae2133..2dbfacaf 100644 --- a/sdk/golang/pkg/generate/futures/order/types_batch_add_orders_item.go +++ b/sdk/golang/pkg/generate/futures/order/types_batch_add_orders_item.go @@ -13,7 +13,7 @@ type BatchAddOrdersItem struct { // Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. Leverage int32 `json:"leverage,omitempty"` // specify if the order is an 'limit' order or 'market' order - Type string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` // remark for the order, length cannot exceed 100 utf8 characters Remark *string `json:"remark,omitempty"` // Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. @@ -54,13 +54,14 @@ type BatchAddOrdersItem struct { // NewBatchAddOrdersItem instantiates a new BatchAddOrdersItem object // This constructor will assign default values to properties that have it defined -func NewBatchAddOrdersItem(clientOid string, side string, symbol string, leverage int32, Type_ string) *BatchAddOrdersItem { +func NewBatchAddOrdersItem(clientOid string, side string, symbol string, leverage int32) *BatchAddOrdersItem { this := BatchAddOrdersItem{} this.ClientOid = clientOid this.Side = side this.Symbol = symbol this.Leverage = leverage - this.Type = Type_ + var Type_ string = "limit" + this.Type = &Type_ var reduceOnly bool = false this.ReduceOnly = &reduceOnly var closeOrder bool = false @@ -85,7 +86,7 @@ func NewBatchAddOrdersItem(clientOid string, side string, symbol string, leverag func NewBatchAddOrdersItemWithDefaults() *BatchAddOrdersItem { this := BatchAddOrdersItem{} var Type_ string = "limit" - this.Type = Type_ + this.Type = &Type_ var reduceOnly bool = false this.ReduceOnly = &reduceOnly var closeOrder bool = false @@ -167,7 +168,7 @@ func (builder *BatchAddOrdersItemBuilder) SetLeverage(value int32) *BatchAddOrde // specify if the order is an 'limit' order or 'market' order func (builder *BatchAddOrdersItemBuilder) SetType(value string) *BatchAddOrdersItemBuilder { - builder.obj.Type = value + builder.obj.Type = &value return builder } diff --git a/sdk/golang/pkg/generate/futures/order/types_cancel_all_orders_v1_req.go b/sdk/golang/pkg/generate/futures/order/types_cancel_all_orders_v1_req.go index a6ae6a47..2794b11f 100644 --- a/sdk/golang/pkg/generate/futures/order/types_cancel_all_orders_v1_req.go +++ b/sdk/golang/pkg/generate/futures/order/types_cancel_all_orders_v1_req.go @@ -4,7 +4,7 @@ package order // CancelAllOrdersV1Req struct for CancelAllOrdersV1Req type CancelAllOrdersV1Req struct { - // 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) + // 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) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` } @@ -36,7 +36,7 @@ func NewCancelAllOrdersV1ReqBuilder() *CancelAllOrdersV1ReqBuilder { return &CancelAllOrdersV1ReqBuilder{obj: NewCancelAllOrdersV1ReqWithDefaults()} } -// 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) +// 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) func (builder *CancelAllOrdersV1ReqBuilder) SetSymbol(value string) *CancelAllOrdersV1ReqBuilder { builder.obj.Symbol = &value return builder diff --git a/sdk/golang/pkg/generate/futures/order/types_cancel_all_orders_v1_resp.go b/sdk/golang/pkg/generate/futures/order/types_cancel_all_orders_v1_resp.go index 9c2344fe..20c425d6 100644 --- a/sdk/golang/pkg/generate/futures/order/types_cancel_all_orders_v1_resp.go +++ b/sdk/golang/pkg/generate/futures/order/types_cancel_all_orders_v1_resp.go @@ -10,7 +10,7 @@ import ( type CancelAllOrdersV1Resp struct { // common response CommonResponse *types.RestResponse - // Unique ID of the cancelled order + // Unique ID of the canceled order CancelledOrderIds []string `json:"cancelledOrderIds,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/order/types_get_open_order_value_req.go b/sdk/golang/pkg/generate/futures/order/types_get_open_order_value_req.go index 1445b1e3..84810992 100644 --- a/sdk/golang/pkg/generate/futures/order/types_get_open_order_value_req.go +++ b/sdk/golang/pkg/generate/futures/order/types_get_open_order_value_req.go @@ -4,7 +4,7 @@ package order // GetOpenOrderValueReq struct for GetOpenOrderValueReq type GetOpenOrderValueReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` } @@ -36,7 +36,7 @@ func NewGetOpenOrderValueReqBuilder() *GetOpenOrderValueReqBuilder { return &GetOpenOrderValueReqBuilder{obj: NewGetOpenOrderValueReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetOpenOrderValueReqBuilder) SetSymbol(value string) *GetOpenOrderValueReqBuilder { builder.obj.Symbol = &value return builder diff --git a/sdk/golang/pkg/generate/futures/order/types_get_open_order_value_resp.go b/sdk/golang/pkg/generate/futures/order/types_get_open_order_value_resp.go index dd9447d5..50f26ded 100644 --- a/sdk/golang/pkg/generate/futures/order/types_get_open_order_value_resp.go +++ b/sdk/golang/pkg/generate/futures/order/types_get_open_order_value_resp.go @@ -10,15 +10,15 @@ import ( type GetOpenOrderValueResp struct { // common response CommonResponse *types.RestResponse - // Total number of the unexecuted buy orders + // Total number of unexecuted buy orders OpenOrderBuySize int32 `json:"openOrderBuySize,omitempty"` - // Total number of the unexecuted sell orders + // Total number of unexecuted sell orders OpenOrderSellSize int32 `json:"openOrderSellSize,omitempty"` - // Value of all the unexecuted buy orders + // Value of all unexecuted buy orders OpenOrderBuyCost string `json:"openOrderBuyCost,omitempty"` - // Value of all the unexecuted sell orders + // Value of all unexecuted sell orders OpenOrderSellCost string `json:"openOrderSellCost,omitempty"` - // settlement currency + // Settlement currency SettleCurrency string `json:"settleCurrency,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/order/types_get_order_by_client_oid_req.go b/sdk/golang/pkg/generate/futures/order/types_get_order_by_client_oid_req.go index e6778438..77542e9c 100644 --- a/sdk/golang/pkg/generate/futures/order/types_get_order_by_client_oid_req.go +++ b/sdk/golang/pkg/generate/futures/order/types_get_order_by_client_oid_req.go @@ -4,7 +4,7 @@ package order // GetOrderByClientOidReq struct for GetOrderByClientOidReq type GetOrderByClientOidReq struct { - // The user self-defined order id. + // The user self-defined order ID. ClientOid *string `json:"clientOid,omitempty" url:"clientOid,omitempty"` } @@ -36,7 +36,7 @@ func NewGetOrderByClientOidReqBuilder() *GetOrderByClientOidReqBuilder { return &GetOrderByClientOidReqBuilder{obj: NewGetOrderByClientOidReqWithDefaults()} } -// The user self-defined order id. +// The user self-defined order ID. func (builder *GetOrderByClientOidReqBuilder) SetClientOid(value string) *GetOrderByClientOidReqBuilder { builder.obj.ClientOid = &value return builder diff --git a/sdk/golang/pkg/generate/futures/order/types_get_order_by_client_oid_resp.go b/sdk/golang/pkg/generate/futures/order/types_get_order_by_client_oid_resp.go index 6fff8a62..754e3303 100644 --- a/sdk/golang/pkg/generate/futures/order/types_get_order_by_client_oid_resp.go +++ b/sdk/golang/pkg/generate/futures/order/types_get_order_by_client_oid_resp.go @@ -12,13 +12,13 @@ type GetOrderByClientOidResp struct { CommonResponse *types.RestResponse // Order ID Id string `json:"id,omitempty"` - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` // Order type, market order or limit order Type string `json:"type,omitempty"` // Transaction side Side string `json:"side,omitempty"` - // Order price + // Order Price Price string `json:"price,omitempty"` // Order quantity Size int32 `json:"size,omitempty"` @@ -28,7 +28,7 @@ type GetOrderByClientOidResp struct { DealValue string `json:"dealValue,omitempty"` // Executed quantity DealSize int32 `json:"dealSize,omitempty"` - // [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. + // [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported. Stp string `json:"stp,omitempty"` // Stop order type (stop limit or stop market) Stop string `json:"stop,omitempty"` @@ -48,35 +48,35 @@ type GetOrderByClientOidResp struct { Iceberg bool `json:"iceberg,omitempty"` // Leverage of the order Leverage string `json:"leverage,omitempty"` - // A mark to forcely hold the funds for an order + // A mark to force-hold the funds for an order ForceHold bool `json:"forceHold,omitempty"` // A mark to close the position CloseOrder bool `json:"closeOrder,omitempty"` // Visible size of the iceberg order VisibleSize int32 `json:"visibleSize,omitempty"` - // Unique order id created by users to identify their orders + // Unique order ID created by users to identify their orders ClientOid string `json:"clientOid,omitempty"` // Remark Remark string `json:"remark,omitempty"` - // tag order source + // Tag order source Tags string `json:"tags,omitempty"` // Mark of the active orders IsActive bool `json:"isActive,omitempty"` // Mark of the canceled orders CancelExist bool `json:"cancelExist,omitempty"` - // Time the order created + // Order creation time CreatedAt int64 `json:"createdAt,omitempty"` - // last update time + // Last update time UpdatedAt int64 `json:"updatedAt,omitempty"` // Order Endtime EndAt int64 `json:"endAt,omitempty"` - // Order create time in nanosecond + // Order creation time in nanoseconds OrderTime int64 `json:"orderTime,omitempty"` - // settlement currency + // Settlement currency SettleCurrency string `json:"settleCurrency,omitempty"` // Margin mode: ISOLATED (isolated), CROSS (cross margin). MarginMode string `json:"marginMode,omitempty"` - // 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 + // 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 AvgDealPrice string `json:"avgDealPrice,omitempty"` // Value of the executed orders FilledSize int32 `json:"filledSize,omitempty"` diff --git a/sdk/golang/pkg/generate/futures/order/types_get_order_list_req.go b/sdk/golang/pkg/generate/futures/order/types_get_order_list_req.go index 3aa4776c..8e8e9a89 100644 --- a/sdk/golang/pkg/generate/futures/order/types_get_order_list_req.go +++ b/sdk/golang/pkg/generate/futures/order/types_get_order_list_req.go @@ -10,7 +10,7 @@ type GetOrderListReq struct { Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` // buy or sell Side *string `json:"side,omitempty" url:"side,omitempty"` - // limit, market, limit_stop or market_stop + // Order Type Type *string `json:"type,omitempty" url:"type,omitempty"` // Start time (milisecond) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` @@ -26,6 +26,10 @@ type GetOrderListReq struct { // This constructor will assign default values to properties that have it defined func NewGetOrderListReq() *GetOrderListReq { this := GetOrderListReq{} + var currentPage int32 = 1 + this.CurrentPage = ¤tPage + var pageSize int32 = 50 + this.PageSize = &pageSize return &this } @@ -33,6 +37,10 @@ func NewGetOrderListReq() *GetOrderListReq { // This constructor will only assign default values to properties that have it defined, func NewGetOrderListReqWithDefaults() *GetOrderListReq { this := GetOrderListReq{} + var currentPage int32 = 1 + this.CurrentPage = ¤tPage + var pageSize int32 = 50 + this.PageSize = &pageSize return &this } @@ -75,7 +83,7 @@ func (builder *GetOrderListReqBuilder) SetSide(value string) *GetOrderListReqBui return builder } -// limit, market, limit_stop or market_stop +// Order Type func (builder *GetOrderListReqBuilder) SetType(value string) *GetOrderListReqBuilder { builder.obj.Type = &value return builder diff --git a/sdk/golang/pkg/generate/futures/order/types_get_recent_trade_history_data.go b/sdk/golang/pkg/generate/futures/order/types_get_recent_trade_history_data.go index 829486cf..1c7ed4ec 100644 --- a/sdk/golang/pkg/generate/futures/order/types_get_recent_trade_history_data.go +++ b/sdk/golang/pkg/generate/futures/order/types_get_recent_trade_history_data.go @@ -4,7 +4,7 @@ package order // GetRecentTradeHistoryData struct for GetRecentTradeHistoryData type GetRecentTradeHistoryData struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` // Trade ID TradeId string `json:"tradeId,omitempty"` @@ -12,7 +12,7 @@ type GetRecentTradeHistoryData struct { OrderId string `json:"orderId,omitempty"` // Transaction side Side string `json:"side,omitempty"` - // Liquidity- taker or maker + // Liquidity-taker or -maker Liquidity string `json:"liquidity,omitempty"` // Whether to force processing as a taker ForceTaker bool `json:"forceTaker,omitempty"` @@ -30,11 +30,11 @@ type GetRecentTradeHistoryData struct { Stop string `json:"stop,omitempty"` // Fee Rate FeeRate string `json:"feeRate,omitempty"` - // Fixed fees(Deprecated field, no actual use of the value field) + // Fixed fees (Deprecated field, no actual use of the value field) FixFee string `json:"fixFee,omitempty"` // Charging currency FeeCurrency string `json:"feeCurrency,omitempty"` - // trade time in nanosecond + // Trade time in nanoseconds TradeTime int64 `json:"tradeTime,omitempty"` // Deprecated field, no actual use of the value field SubTradeType string `json:"subTradeType,omitempty"` @@ -50,7 +50,7 @@ type GetRecentTradeHistoryData struct { OrderType string `json:"orderType,omitempty"` // Trade type (trade, liquid, cancel, adl or settlement) TradeType string `json:"tradeType,omitempty"` - // Time the order created + // Order creation time CreatedAt int64 `json:"createdAt,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/order/types_get_recent_trade_history_req.go b/sdk/golang/pkg/generate/futures/order/types_get_recent_trade_history_req.go index 9e390199..86f637a2 100644 --- a/sdk/golang/pkg/generate/futures/order/types_get_recent_trade_history_req.go +++ b/sdk/golang/pkg/generate/futures/order/types_get_recent_trade_history_req.go @@ -4,7 +4,7 @@ package order // GetRecentTradeHistoryReq struct for GetRecentTradeHistoryReq type GetRecentTradeHistoryReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` } @@ -36,7 +36,7 @@ func NewGetRecentTradeHistoryReqBuilder() *GetRecentTradeHistoryReqBuilder { return &GetRecentTradeHistoryReqBuilder{obj: NewGetRecentTradeHistoryReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetRecentTradeHistoryReqBuilder) SetSymbol(value string) *GetRecentTradeHistoryReqBuilder { builder.obj.Symbol = &value return builder diff --git a/sdk/golang/pkg/generate/futures/order/types_get_trade_history_items.go b/sdk/golang/pkg/generate/futures/order/types_get_trade_history_items.go index c5c1f349..7444dd23 100644 --- a/sdk/golang/pkg/generate/futures/order/types_get_trade_history_items.go +++ b/sdk/golang/pkg/generate/futures/order/types_get_trade_history_items.go @@ -4,7 +4,7 @@ package order // GetTradeHistoryItems struct for GetTradeHistoryItems type GetTradeHistoryItems struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` // Trade ID TradeId string `json:"tradeId,omitempty"` @@ -12,7 +12,7 @@ type GetTradeHistoryItems struct { OrderId string `json:"orderId,omitempty"` // Transaction side Side string `json:"side,omitempty"` - // Liquidity- taker or maker + // Liquidity-taker or -maker Liquidity string `json:"liquidity,omitempty"` // Whether to force processing as a taker ForceTaker bool `json:"forceTaker,omitempty"` @@ -30,32 +30,37 @@ type GetTradeHistoryItems struct { Stop string `json:"stop,omitempty"` // Fee Rate FeeRate string `json:"feeRate,omitempty"` - // Fixed fees(Deprecated field, no actual use of the value field) + // Fixed fees (Deprecated field, no actual use of the value field) FixFee string `json:"fixFee,omitempty"` // Charging currency FeeCurrency string `json:"feeCurrency,omitempty"` - // trade time in nanosecond + // Trade time in nanoseconds TradeTime int64 `json:"tradeTime,omitempty"` // Deprecated field, no actual use of the value field SubTradeType string `json:"subTradeType,omitempty"` // Margin mode: ISOLATED (isolated), CROSS (cross margin). MarginMode string `json:"marginMode,omitempty"` - // Settle Currency + // Settle currency SettleCurrency string `json:"settleCurrency,omitempty"` - // Order Type + // Order type DisplayType string `json:"displayType,omitempty"` - Fee string `json:"fee,omitempty"` + // Trading fee + Fee string `json:"fee,omitempty"` // Order type OrderType string `json:"orderType,omitempty"` // Trade type (trade, liquid, adl or settlement) TradeType string `json:"tradeType,omitempty"` - // Time the order created + // Order creation time CreatedAt int64 `json:"createdAt,omitempty"` + // Opening tax fee (Only KYC users in some regions have this parameter) + OpenFeeTaxPay string `json:"openFeeTaxPay,omitempty"` + // Close tax fee (Only KYC users in some regions have this parameter) + CloseFeeTaxPay string `json:"closeFeeTaxPay,omitempty"` } // NewGetTradeHistoryItems instantiates a new GetTradeHistoryItems object // This constructor will assign default values to properties that have it defined -func NewGetTradeHistoryItems(symbol string, tradeId string, orderId string, side string, liquidity string, forceTaker bool, price string, size int32, value string, openFeePay string, closeFeePay string, stop string, feeRate string, fixFee string, feeCurrency string, tradeTime int64, subTradeType string, marginMode string, settleCurrency string, displayType string, fee string, orderType string, tradeType string, createdAt int64) *GetTradeHistoryItems { +func NewGetTradeHistoryItems(symbol string, tradeId string, orderId string, side string, liquidity string, forceTaker bool, price string, size int32, value string, openFeePay string, closeFeePay string, stop string, feeRate string, fixFee string, feeCurrency string, tradeTime int64, subTradeType string, marginMode string, settleCurrency string, displayType string, fee string, orderType string, tradeType string, createdAt int64, openFeeTaxPay string, closeFeeTaxPay string) *GetTradeHistoryItems { this := GetTradeHistoryItems{} this.Symbol = symbol this.TradeId = tradeId @@ -81,6 +86,8 @@ func NewGetTradeHistoryItems(symbol string, tradeId string, orderId string, side this.OrderType = orderType this.TradeType = tradeType this.CreatedAt = createdAt + this.OpenFeeTaxPay = openFeeTaxPay + this.CloseFeeTaxPay = closeFeeTaxPay return &this } @@ -117,5 +124,7 @@ func (o *GetTradeHistoryItems) ToMap() map[string]interface{} { toSerialize["orderType"] = o.OrderType toSerialize["tradeType"] = o.TradeType toSerialize["createdAt"] = o.CreatedAt + toSerialize["openFeeTaxPay"] = o.OpenFeeTaxPay + toSerialize["closeFeeTaxPay"] = o.CloseFeeTaxPay return toSerialize } diff --git a/sdk/golang/pkg/generate/futures/order/types_get_trade_history_req.go b/sdk/golang/pkg/generate/futures/order/types_get_trade_history_req.go index 6090cad2..e77d08d6 100644 --- a/sdk/golang/pkg/generate/futures/order/types_get_trade_history_req.go +++ b/sdk/golang/pkg/generate/futures/order/types_get_trade_history_req.go @@ -4,23 +4,23 @@ package order // GetTradeHistoryReq struct for GetTradeHistoryReq type GetTradeHistoryReq struct { - // List fills for a specific order only (If you specify orderId, other parameters can be ignored) + // List fills for a specific order only (if you specify orderId, other parameters can be ignored) OrderId *string `json:"orderId,omitempty" url:"orderId,omitempty"` - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` // Order side Side *string `json:"side,omitempty" url:"side,omitempty"` // Order Type Type *string `json:"type,omitempty" url:"type,omitempty"` - // Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all type when empty + // Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all types when empty TradeTypes *string `json:"tradeTypes,omitempty" url:"tradeTypes,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` - // Current request page, The default currentPage is 1 + // Current request page. The default currentPage is 1 CurrentPage *int32 `json:"currentPage,omitempty" url:"currentPage,omitempty"` - // pageSize, The default pageSize is 50, The maximum cannot exceed 1000 + // pageSize, The default pageSize is 50; the maximum cannot exceed 1000 PageSize *int32 `json:"pageSize,omitempty" url:"pageSize,omitempty"` } @@ -68,13 +68,13 @@ func NewGetTradeHistoryReqBuilder() *GetTradeHistoryReqBuilder { return &GetTradeHistoryReqBuilder{obj: NewGetTradeHistoryReqWithDefaults()} } -// List fills for a specific order only (If you specify orderId, other parameters can be ignored) +// List fills for a specific order only (if you specify orderId, other parameters can be ignored) func (builder *GetTradeHistoryReqBuilder) SetOrderId(value string) *GetTradeHistoryReqBuilder { builder.obj.OrderId = &value return builder } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetTradeHistoryReqBuilder) SetSymbol(value string) *GetTradeHistoryReqBuilder { builder.obj.Symbol = &value return builder @@ -92,31 +92,31 @@ func (builder *GetTradeHistoryReqBuilder) SetType(value string) *GetTradeHistory return builder } -// Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all type when empty +// Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all types when empty func (builder *GetTradeHistoryReqBuilder) SetTradeTypes(value string) *GetTradeHistoryReqBuilder { builder.obj.TradeTypes = &value return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetTradeHistoryReqBuilder) SetStartAt(value int64) *GetTradeHistoryReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetTradeHistoryReqBuilder) SetEndAt(value int64) *GetTradeHistoryReqBuilder { builder.obj.EndAt = &value return builder } -// Current request page, The default currentPage is 1 +// Current request page. The default currentPage is 1 func (builder *GetTradeHistoryReqBuilder) SetCurrentPage(value int32) *GetTradeHistoryReqBuilder { builder.obj.CurrentPage = &value return builder } -// pageSize, The default pageSize is 50, The maximum cannot exceed 1000 +// pageSize, The default pageSize is 50; the maximum cannot exceed 1000 func (builder *GetTradeHistoryReqBuilder) SetPageSize(value int32) *GetTradeHistoryReqBuilder { builder.obj.PageSize = &value return builder diff --git a/sdk/golang/pkg/generate/futures/positions/api_positions.go b/sdk/golang/pkg/generate/futures/positions/api_positions.go index 799c371b..022323ea 100644 --- a/sdk/golang/pkg/generate/futures/positions/api_positions.go +++ b/sdk/golang/pkg/generate/futures/positions/api_positions.go @@ -12,197 +12,197 @@ type PositionsAPI interface { // GetMarginMode Get Margin Mode // Description: This interface can query the margin mode of the current symbol. // Documentation: https://www.kucoin.com/docs-new/api-3470259 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetMarginMode(req *GetMarginModeReq, ctx context.Context) (*GetMarginModeResp, error) // SwitchMarginMode Switch Margin Mode // Description: This interface can modify the margin mode of the current symbol. // Documentation: https://www.kucoin.com/docs-new/api-3470262 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ SwitchMarginMode(req *SwitchMarginModeReq, ctx context.Context) (*SwitchMarginModeResp, error) // GetMaxOpenSize Get Max Open Size // Description: Get Maximum Open Position Size. // Documentation: https://www.kucoin.com/docs-new/api-3470251 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetMaxOpenSize(req *GetMaxOpenSizeReq, ctx context.Context) (*GetMaxOpenSizeResp, error) // GetPositionDetails Get Position Details // Description: Get the position details of a specified position. // Documentation: https://www.kucoin.com/docs-new/api-3470252 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetPositionDetails(req *GetPositionDetailsReq, ctx context.Context) (*GetPositionDetailsResp, error) // GetPositionList Get Position List // Description: Get the position details of a specified position. // Documentation: https://www.kucoin.com/docs-new/api-3470253 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetPositionList(req *GetPositionListReq, ctx context.Context) (*GetPositionListResp, error) // GetPositionsHistory Get Positions History // Description: This interface can query position history information records. // Documentation: https://www.kucoin.com/docs-new/api-3470254 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetPositionsHistory(req *GetPositionsHistoryReq, ctx context.Context) (*GetPositionsHistoryResp, error) // GetMaxWithdrawMargin Get Max Withdraw Margin // Description: This interface can query the maximum amount of margin that the current position supports withdrawal. // Documentation: https://www.kucoin.com/docs-new/api-3470258 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ GetMaxWithdrawMargin(req *GetMaxWithdrawMarginReq, ctx context.Context) (*GetMaxWithdrawMarginResp, error) // GetCrossMarginLeverage Get Cross Margin Leverage // Description: This interface can query the current symbol’s cross-margin leverage multiple. // Documentation: https://www.kucoin.com/docs-new/api-3470260 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetCrossMarginLeverage(req *GetCrossMarginLeverageReq, ctx context.Context) (*GetCrossMarginLeverageResp, error) // ModifyMarginLeverage Modify Cross Margin Leverage // Description: This interface can modify the current symbol’s cross-margin leverage multiple. // Documentation: https://www.kucoin.com/docs-new/api-3470261 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ ModifyMarginLeverage(req *ModifyMarginLeverageReq, ctx context.Context) (*ModifyMarginLeverageResp, error) // AddIsolatedMargin Add Isolated Margin // Description: Add Isolated Margin Manually. // Documentation: https://www.kucoin.com/docs-new/api-3470257 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 4 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 4 | + // +-----------------------+---------+ AddIsolatedMargin(req *AddIsolatedMarginReq, ctx context.Context) (*AddIsolatedMarginResp, error) // RemoveIsolatedMargin Remove Isolated Margin // Description: Remove Isolated Margin Manually. // Documentation: https://www.kucoin.com/docs-new/api-3470256 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ RemoveIsolatedMargin(req *RemoveIsolatedMarginReq, ctx context.Context) (*RemoveIsolatedMarginResp, error) // GetIsolatedMarginRiskLimit Get Isolated Margin Risk Limit - // Description: This interface can be used to obtain information about risk limit level of a specific contract(Only valid for isolated Margin). + // Description: This interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin). // Documentation: https://www.kucoin.com/docs-new/api-3470263 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetIsolatedMarginRiskLimit(req *GetIsolatedMarginRiskLimitReq, ctx context.Context) (*GetIsolatedMarginRiskLimitResp, error) // ModifyIsolatedMarginRiskLimt Modify Isolated Margin Risk Limit - // Description: This interface can be used to obtain information about risk limit level of a specific contract(Only valid for isolated Margin). + // Description: This interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin). // Documentation: https://www.kucoin.com/docs-new/api-3470264 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ ModifyIsolatedMarginRiskLimt(req *ModifyIsolatedMarginRiskLimtReq, ctx context.Context) (*ModifyIsolatedMarginRiskLimtResp, error) // ModifyAutoDepositStatus Modify Isolated Margin Auto-Deposit Status // Description: This endpoint is only applicable to isolated margin and is no longer recommended. It is recommended to use cross margin instead. // Documentation: https://www.kucoin.com/docs-new/api-3470255 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | FUTURES | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | FUTURES | - // | API-RATE-LIMIT-POOL | FUTURES | - // | API-RATE-LIMIT | 4 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | FUTURES | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | FUTURES | + // | API-RATE-LIMIT-POOL | FUTURES | + // | API-RATE-LIMIT-WEIGHT | 4 | + // +-----------------------+---------+ // Deprecated ModifyAutoDepositStatus(req *ModifyAutoDepositStatusReq, ctx context.Context) (*ModifyAutoDepositStatusResp, error) } diff --git a/sdk/golang/pkg/generate/futures/positions/api_positions_test.go b/sdk/golang/pkg/generate/futures/positions/api_positions_test.go index 02b60200..353815a9 100644 --- a/sdk/golang/pkg/generate/futures/positions/api_positions_test.go +++ b/sdk/golang/pkg/generate/futures/positions/api_positions_test.go @@ -164,7 +164,7 @@ func TestPositionsGetPositionsHistoryRespModel(t *testing.T) { // Get Positions History // /api/v1/history-positions - data := "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 10,\n \"totalNum\": 3,\n \"totalPage\": 1,\n \"items\": [\n {\n \"closeId\": \"500000000027312193\",\n \"userId\": \"633559791e1cbc0001f319bc\",\n \"symbol\": \"XBTUSDTM\",\n \"settleCurrency\": \"USDT\",\n \"leverage\": \"0.0\",\n \"type\": \"CLOSE_SHORT\",\n \"pnl\": \"-3.79237944\",\n \"realisedGrossCost\": \"3.795\",\n \"withdrawPnl\": \"0.0\",\n \"tradeFee\": \"0.078657\",\n \"fundingFee\": \"0.08127756\",\n \"openTime\": 1727073653603,\n \"closeTime\": 1729155587945,\n \"openPrice\": \"63650.0\",\n \"closePrice\": \"67445.0\",\n \"marginMode\": \"ISOLATED\"\n },\n {\n \"closeId\": \"500000000026809668\",\n \"userId\": \"633559791e1cbc0001f319bc\",\n \"symbol\": \"SUIUSDTM\",\n \"settleCurrency\": \"USDT\",\n \"leverage\": \"0.0\",\n \"type\": \"LIQUID_SHORT\",\n \"pnl\": \"-1.10919296\",\n \"realisedGrossCost\": \"1.11297635\",\n \"withdrawPnl\": \"0.0\",\n \"tradeFee\": \"0.00200295\",\n \"fundingFee\": \"0.00578634\",\n \"openTime\": 1726473389296,\n \"closeTime\": 1728738683541,\n \"openPrice\": \"1.1072\",\n \"closePrice\": \"2.22017635\",\n \"marginMode\": \"ISOLATED\"\n },\n {\n \"closeId\": \"500000000026819355\",\n \"userId\": \"633559791e1cbc0001f319bc\",\n \"symbol\": \"XBTUSDTM\",\n \"settleCurrency\": \"USDT\",\n \"leverage\": \"0.0\",\n \"type\": \"LIQUID_SHORT\",\n \"pnl\": \"-5.941896296\",\n \"realisedGrossCost\": \"5.86937042\",\n \"withdrawPnl\": \"0.0\",\n \"tradeFee\": \"0.074020096\",\n \"fundingFee\": \"0.00149422\",\n \"openTime\": 1726490775358,\n \"closeTime\": 1727061049859,\n \"openPrice\": \"58679.6\",\n \"closePrice\": \"64548.97042\",\n \"marginMode\": \"ISOLATED\"\n }\n ]\n }\n}" + data := "{\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}" commonResp := &types.RestResponse{} err := json.Unmarshal([]byte(data), commonResp) assert.Nil(t, err) @@ -248,7 +248,7 @@ func TestPositionsModifyMarginLeverageRespModel(t *testing.T) { // Modify Cross Margin Leverage // /api/v2/changeCrossUserLeverage - data := "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"XBTUSDTM\",\n \"leverage\": \"3\"\n }\n}" + data := "{\n \"code\": \"200000\",\n \"data\": true\n}" commonResp := &types.RestResponse{} err := json.Unmarshal([]byte(data), commonResp) assert.Nil(t, err) diff --git a/sdk/golang/pkg/generate/futures/positions/types_get_isolated_margin_risk_limit_data.go b/sdk/golang/pkg/generate/futures/positions/types_get_isolated_margin_risk_limit_data.go index b40b7026..4a32d63e 100644 --- a/sdk/golang/pkg/generate/futures/positions/types_get_isolated_margin_risk_limit_data.go +++ b/sdk/golang/pkg/generate/futures/positions/types_get_isolated_margin_risk_limit_data.go @@ -4,15 +4,15 @@ package positions // GetIsolatedMarginRiskLimitData struct for GetIsolatedMarginRiskLimitData type GetIsolatedMarginRiskLimitData struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` - // level + // Level Level int32 `json:"level,omitempty"` - // Upper limit USDT(includes) + // Upper limit USDT (included) MaxRiskLimit int32 `json:"maxRiskLimit,omitempty"` // Lower limit USDT MinRiskLimit int32 `json:"minRiskLimit,omitempty"` - // Max leverage + // Max. leverage MaxLeverage int32 `json:"maxLeverage,omitempty"` // Initial margin rate InitialMargin float32 `json:"initialMargin,omitempty"` diff --git a/sdk/golang/pkg/generate/futures/positions/types_get_isolated_margin_risk_limit_req.go b/sdk/golang/pkg/generate/futures/positions/types_get_isolated_margin_risk_limit_req.go index cc9c7679..8812d90e 100644 --- a/sdk/golang/pkg/generate/futures/positions/types_get_isolated_margin_risk_limit_req.go +++ b/sdk/golang/pkg/generate/futures/positions/types_get_isolated_margin_risk_limit_req.go @@ -4,7 +4,7 @@ package positions // GetIsolatedMarginRiskLimitReq struct for GetIsolatedMarginRiskLimitReq type GetIsolatedMarginRiskLimitReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" path:"symbol" url:"-"` } @@ -36,7 +36,7 @@ func NewGetIsolatedMarginRiskLimitReqBuilder() *GetIsolatedMarginRiskLimitReqBui return &GetIsolatedMarginRiskLimitReqBuilder{obj: NewGetIsolatedMarginRiskLimitReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetIsolatedMarginRiskLimitReqBuilder) SetSymbol(value string) *GetIsolatedMarginRiskLimitReqBuilder { builder.obj.Symbol = &value return builder diff --git a/sdk/golang/pkg/generate/futures/positions/types_get_max_open_size_req.go b/sdk/golang/pkg/generate/futures/positions/types_get_max_open_size_req.go index b00abf73..3713167d 100644 --- a/sdk/golang/pkg/generate/futures/positions/types_get_max_open_size_req.go +++ b/sdk/golang/pkg/generate/futures/positions/types_get_max_open_size_req.go @@ -4,9 +4,9 @@ package positions // GetMaxOpenSizeReq struct for GetMaxOpenSizeReq type GetMaxOpenSizeReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` - // Order price + // Order Price Price *string `json:"price,omitempty" url:"price,omitempty"` // Leverage Leverage *int32 `json:"leverage,omitempty" url:"leverage,omitempty"` @@ -42,13 +42,13 @@ func NewGetMaxOpenSizeReqBuilder() *GetMaxOpenSizeReqBuilder { return &GetMaxOpenSizeReqBuilder{obj: NewGetMaxOpenSizeReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *GetMaxOpenSizeReqBuilder) SetSymbol(value string) *GetMaxOpenSizeReqBuilder { builder.obj.Symbol = &value return builder } -// Order price +// Order Price func (builder *GetMaxOpenSizeReqBuilder) SetPrice(value string) *GetMaxOpenSizeReqBuilder { builder.obj.Price = &value return builder diff --git a/sdk/golang/pkg/generate/futures/positions/types_get_max_open_size_resp.go b/sdk/golang/pkg/generate/futures/positions/types_get_max_open_size_resp.go index eed86724..79e72d4a 100644 --- a/sdk/golang/pkg/generate/futures/positions/types_get_max_open_size_resp.go +++ b/sdk/golang/pkg/generate/futures/positions/types_get_max_open_size_resp.go @@ -10,11 +10,11 @@ import ( type GetMaxOpenSizeResp struct { // common response CommonResponse *types.RestResponse - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` - // Maximum buy size + // Maximum buy size (unit: lot) MaxBuyOpenSize int32 `json:"maxBuyOpenSize,omitempty"` - // Maximum buy size + // Maximum buy size (unit: lot) MaxSellOpenSize int32 `json:"maxSellOpenSize,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/positions/types_get_positions_history_items.go b/sdk/golang/pkg/generate/futures/positions/types_get_positions_history_items.go index e583bf09..102eef17 100644 --- a/sdk/golang/pkg/generate/futures/positions/types_get_positions_history_items.go +++ b/sdk/golang/pkg/generate/futures/positions/types_get_positions_history_items.go @@ -35,12 +35,20 @@ type GetPositionsHistoryItems struct { // Closing price of the position ClosePrice string `json:"closePrice,omitempty"` // Margin Mode: CROSS,ISOLATED - MarginMode string `json:"marginMode,omitempty"` + MarginMode string `json:"marginMode,omitempty"` + RealisedGrossCostNew string `json:"realisedGrossCostNew,omitempty"` + // Tax + Tax string `json:"tax,omitempty"` + Roe *string `json:"roe,omitempty"` + LiquidAmount string `json:"liquidAmount,omitempty"` + LiquidPrice string `json:"liquidPrice,omitempty"` + // Position side + Side string `json:"side,omitempty"` } // NewGetPositionsHistoryItems instantiates a new GetPositionsHistoryItems object // This constructor will assign default values to properties that have it defined -func NewGetPositionsHistoryItems(closeId string, userId string, symbol string, settleCurrency string, leverage string, Type_ string, pnl string, realisedGrossCost string, withdrawPnl string, tradeFee string, fundingFee string, openTime int64, closeTime int64, openPrice string, closePrice string, marginMode string) *GetPositionsHistoryItems { +func NewGetPositionsHistoryItems(closeId string, userId string, symbol string, settleCurrency string, leverage string, Type_ string, pnl string, realisedGrossCost string, withdrawPnl string, tradeFee string, fundingFee string, openTime int64, closeTime int64, openPrice string, closePrice string, marginMode string, realisedGrossCostNew string, tax string, liquidAmount string, liquidPrice string, side string) *GetPositionsHistoryItems { this := GetPositionsHistoryItems{} this.CloseId = closeId this.UserId = userId @@ -58,6 +66,11 @@ func NewGetPositionsHistoryItems(closeId string, userId string, symbol string, s this.OpenPrice = openPrice this.ClosePrice = closePrice this.MarginMode = marginMode + this.RealisedGrossCostNew = realisedGrossCostNew + this.Tax = tax + this.LiquidAmount = liquidAmount + this.LiquidPrice = liquidPrice + this.Side = side return &this } @@ -86,5 +99,11 @@ func (o *GetPositionsHistoryItems) ToMap() map[string]interface{} { toSerialize["openPrice"] = o.OpenPrice toSerialize["closePrice"] = o.ClosePrice toSerialize["marginMode"] = o.MarginMode + toSerialize["realisedGrossCostNew"] = o.RealisedGrossCostNew + toSerialize["tax"] = o.Tax + toSerialize["roe"] = o.Roe + toSerialize["liquidAmount"] = o.LiquidAmount + toSerialize["liquidPrice"] = o.LiquidPrice + toSerialize["side"] = o.Side return toSerialize } diff --git a/sdk/golang/pkg/generate/futures/positions/types_modify_isolated_margin_risk_limt_req.go b/sdk/golang/pkg/generate/futures/positions/types_modify_isolated_margin_risk_limt_req.go index e3c20105..d90b41a8 100644 --- a/sdk/golang/pkg/generate/futures/positions/types_modify_isolated_margin_risk_limt_req.go +++ b/sdk/golang/pkg/generate/futures/positions/types_modify_isolated_margin_risk_limt_req.go @@ -4,9 +4,9 @@ package positions // ModifyIsolatedMarginRiskLimtReq struct for ModifyIsolatedMarginRiskLimtReq type ModifyIsolatedMarginRiskLimtReq struct { - // Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + // Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) Symbol string `json:"symbol,omitempty"` - // level + // Level Level int32 `json:"level,omitempty"` } @@ -41,13 +41,13 @@ func NewModifyIsolatedMarginRiskLimtReqBuilder() *ModifyIsolatedMarginRiskLimtRe return &ModifyIsolatedMarginRiskLimtReqBuilder{obj: NewModifyIsolatedMarginRiskLimtReqWithDefaults()} } -// Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) +// Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) func (builder *ModifyIsolatedMarginRiskLimtReqBuilder) SetSymbol(value string) *ModifyIsolatedMarginRiskLimtReqBuilder { builder.obj.Symbol = value return builder } -// level +// Level func (builder *ModifyIsolatedMarginRiskLimtReqBuilder) SetLevel(value int32) *ModifyIsolatedMarginRiskLimtReqBuilder { builder.obj.Level = value return builder diff --git a/sdk/golang/pkg/generate/futures/positions/types_modify_isolated_margin_risk_limt_resp.go b/sdk/golang/pkg/generate/futures/positions/types_modify_isolated_margin_risk_limt_resp.go index c679d347..9aa2eb05 100644 --- a/sdk/golang/pkg/generate/futures/positions/types_modify_isolated_margin_risk_limt_resp.go +++ b/sdk/golang/pkg/generate/futures/positions/types_modify_isolated_margin_risk_limt_resp.go @@ -11,7 +11,7 @@ import ( type ModifyIsolatedMarginRiskLimtResp struct { // common response CommonResponse *types.RestResponse - // To adjust the level will cancel the open order, the response can only indicate whether the submit of the adjustment request is successful or not. + // Adjusting the level will result in the cancellation of any open orders. The response will indicate only whether the adjustment request was successfully submitted. Data bool `json:"data,omitempty"` } diff --git a/sdk/golang/pkg/generate/futures/positions/types_modify_margin_leverage_resp.go b/sdk/golang/pkg/generate/futures/positions/types_modify_margin_leverage_resp.go index f9eb0ec7..700033ec 100644 --- a/sdk/golang/pkg/generate/futures/positions/types_modify_margin_leverage_resp.go +++ b/sdk/golang/pkg/generate/futures/positions/types_modify_margin_leverage_resp.go @@ -3,6 +3,7 @@ package positions import ( + "encoding/json" "github.com/Kucoin/kucoin-universal-sdk/sdk/golang/pkg/types" ) @@ -10,16 +11,14 @@ import ( type ModifyMarginLeverageResp struct { // common response CommonResponse *types.RestResponse - Symbol string `json:"symbol,omitempty"` - Leverage string `json:"leverage,omitempty"` + Data bool `json:"data,omitempty"` } // NewModifyMarginLeverageResp instantiates a new ModifyMarginLeverageResp object // This constructor will assign default values to properties that have it defined -func NewModifyMarginLeverageResp(symbol string, leverage string) *ModifyMarginLeverageResp { +func NewModifyMarginLeverageResp(data bool) *ModifyMarginLeverageResp { this := ModifyMarginLeverageResp{} - this.Symbol = symbol - this.Leverage = leverage + this.Data = data return &this } @@ -32,11 +31,15 @@ func NewModifyMarginLeverageRespWithDefaults() *ModifyMarginLeverageResp { func (o *ModifyMarginLeverageResp) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} - toSerialize["symbol"] = o.Symbol - toSerialize["leverage"] = o.Leverage + toSerialize["data"] = o.Data return toSerialize } +func (o *ModifyMarginLeverageResp) UnmarshalJSON(b []byte) error { + err := json.Unmarshal(b, &o.Data) + return err +} + func (o *ModifyMarginLeverageResp) SetCommonResponse(response *types.RestResponse) { o.CommonResponse = response } diff --git a/sdk/golang/pkg/generate/margin/credit/api_credit.go b/sdk/golang/pkg/generate/margin/credit/api_credit.go index 3ba78c7f..2b9cbf40 100644 --- a/sdk/golang/pkg/generate/margin/credit/api_credit.go +++ b/sdk/golang/pkg/generate/margin/credit/api_credit.go @@ -12,99 +12,99 @@ type CreditAPI interface { // GetLoanMarket Get Loan Market // Description: This API endpoint is used to get the information about the currencies available for lending. // Documentation: https://www.kucoin.com/docs-new/api-3470212 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ GetLoanMarket(req *GetLoanMarketReq, ctx context.Context) (*GetLoanMarketResp, error) // GetLoanMarketInterestRate Get Loan Market Interest Rate // Description: This API endpoint is used to get the interest rates of the margin lending market over the past 7 days. // Documentation: https://www.kucoin.com/docs-new/api-3470215 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 5 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+--------+ GetLoanMarketInterestRate(req *GetLoanMarketInterestRateReq, ctx context.Context) (*GetLoanMarketInterestRateResp, error) // Purchase Purchase // Description: Invest credit in the market and earn interest // Documentation: https://www.kucoin.com/docs-new/api-3470216 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 15 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 15 | + // +-----------------------+---------+ Purchase(req *PurchaseReq, ctx context.Context) (*PurchaseResp, error) // ModifyPurchase Modify Purchase - // Description: This API endpoint is used to update the interest rates of subscription orders, which will take effect at the beginning of the next hour.,Please ensure that the funds are in the main(funding) account + // Description: This API endpoint is used to update the interest rates of subscription orders, which will take effect at the beginning of the next hour. Please ensure that the funds are in the main (funding) account. // Documentation: https://www.kucoin.com/docs-new/api-3470217 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ ModifyPurchase(req *ModifyPurchaseReq, ctx context.Context) (*ModifyPurchaseResp, error) // GetPurchaseOrders Get Purchase Orders - // Description: This API endpoint provides pagination query for the purchase orders. + // Description: This API endpoint provides a pagination query for the purchase orders. // Documentation: https://www.kucoin.com/docs-new/api-3470213 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ GetPurchaseOrders(req *GetPurchaseOrdersReq, ctx context.Context) (*GetPurchaseOrdersResp, error) // Redeem Redeem - // Description: Redeem your loan order + // Description: Redeem your loan order. // Documentation: https://www.kucoin.com/docs-new/api-3470218 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 15 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 15 | + // +-----------------------+---------+ Redeem(req *RedeemReq, ctx context.Context) (*RedeemResp, error) // GetRedeemOrders Get Redeem Orders // Description: This API endpoint provides pagination query for the redeem orders. // Documentation: https://www.kucoin.com/docs-new/api-3470214 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ GetRedeemOrders(req *GetRedeemOrdersReq, ctx context.Context) (*GetRedeemOrdersResp, error) } diff --git a/sdk/golang/pkg/generate/margin/credit/api_credit.template b/sdk/golang/pkg/generate/margin/credit/api_credit.template index 361309dc..132b2580 100644 --- a/sdk/golang/pkg/generate/margin/credit/api_credit.template +++ b/sdk/golang/pkg/generate/margin/credit/api_credit.template @@ -99,7 +99,7 @@ func TestCreditGetPurchaseOrdersReq(t *testing.T) { // /api/v3/purchase/orders builder := credit.NewGetPurchaseOrdersReqBuilder() - builder.SetCurrency(?).SetStatus(?).SetPurchaseOrderNo(?).SetCurrentPage(?).SetPageSize(?) + builder.SetStatus(?).SetCurrency(?).SetPurchaseOrderNo(?).SetCurrentPage(?).SetPageSize(?) req := builder.Build() resp, err := creditApi.GetPurchaseOrders(req, context.TODO()) @@ -145,7 +145,7 @@ func TestCreditGetRedeemOrdersReq(t *testing.T) { // /api/v3/redeem/orders builder := credit.NewGetRedeemOrdersReqBuilder() - builder.SetCurrency(?).SetStatus(?).SetRedeemOrderNo(?).SetCurrentPage(?).SetPageSize(?) + builder.SetStatus(?).SetCurrency(?).SetRedeemOrderNo(?).SetCurrentPage(?).SetPageSize(?) req := builder.Build() resp, err := creditApi.GetRedeemOrders(req, context.TODO()) diff --git a/sdk/golang/pkg/generate/margin/credit/api_credit_test.go b/sdk/golang/pkg/generate/margin/credit/api_credit_test.go index 1ee2794a..2737a643 100644 --- a/sdk/golang/pkg/generate/margin/credit/api_credit_test.go +++ b/sdk/golang/pkg/generate/margin/credit/api_credit_test.go @@ -124,7 +124,7 @@ func TestCreditGetPurchaseOrdersReqModel(t *testing.T) { // Get Purchase Orders // /api/v3/purchase/orders - data := "{\"currency\": \"BTC\", \"status\": \"DONE\", \"purchaseOrderNo\": \"example_string_default_value\", \"currentPage\": 1, \"pageSize\": 50}" + data := "{\"status\": \"DONE\", \"currency\": \"BTC\", \"purchaseOrderNo\": \"example_string_default_value\", \"currentPage\": 1, \"pageSize\": 50}" req := &GetPurchaseOrdersReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() @@ -180,7 +180,7 @@ func TestCreditGetRedeemOrdersReqModel(t *testing.T) { // Get Redeem Orders // /api/v3/redeem/orders - data := "{\"currency\": \"BTC\", \"status\": \"DONE\", \"redeemOrderNo\": \"example_string_default_value\", \"currentPage\": 1, \"pageSize\": 50}" + data := "{\"status\": \"DONE\", \"currency\": \"BTC\", \"redeemOrderNo\": \"example_string_default_value\", \"currentPage\": 1, \"pageSize\": 50}" req := &GetRedeemOrdersReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() diff --git a/sdk/golang/pkg/generate/margin/credit/types_get_loan_market_data.go b/sdk/golang/pkg/generate/margin/credit/types_get_loan_market_data.go index 81a71e61..26d87553 100644 --- a/sdk/golang/pkg/generate/margin/credit/types_get_loan_market_data.go +++ b/sdk/golang/pkg/generate/margin/credit/types_get_loan_market_data.go @@ -24,7 +24,7 @@ type GetLoanMarketData struct { MaxPurchaseSize *string `json:"maxPurchaseSize,omitempty"` // Latest market lending rate MarketInterestRate *string `json:"marketInterestRate,omitempty"` - // Whether to allow automatic purchase: true: on, false: off + // Whether to allow automatic purchase: True: on; false: off AutoPurchaseEnable *bool `json:"autoPurchaseEnable,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/credit/types_get_purchase_orders_items.go b/sdk/golang/pkg/generate/margin/credit/types_get_purchase_orders_items.go index 33dc3d96..ff1573e1 100644 --- a/sdk/golang/pkg/generate/margin/credit/types_get_purchase_orders_items.go +++ b/sdk/golang/pkg/generate/margin/credit/types_get_purchase_orders_items.go @@ -6,7 +6,7 @@ package credit type GetPurchaseOrdersItems struct { // Currency Currency string `json:"currency,omitempty"` - // Purchase order id + // Purchase order ID PurchaseOrderNo string `json:"purchaseOrderNo,omitempty"` // Total purchase size PurchaseSize string `json:"purchaseSize,omitempty"` diff --git a/sdk/golang/pkg/generate/margin/credit/types_get_purchase_orders_req.go b/sdk/golang/pkg/generate/margin/credit/types_get_purchase_orders_req.go index f481166a..98adb2ea 100644 --- a/sdk/golang/pkg/generate/margin/credit/types_get_purchase_orders_req.go +++ b/sdk/golang/pkg/generate/margin/credit/types_get_purchase_orders_req.go @@ -4,15 +4,15 @@ package credit // GetPurchaseOrdersReq struct for GetPurchaseOrdersReq type GetPurchaseOrdersReq struct { - // currency - Currency *string `json:"currency,omitempty" url:"currency,omitempty"` // DONE-completed; PENDING-settling Status *string `json:"status,omitempty" url:"status,omitempty"` - // + // Currency + Currency *string `json:"currency,omitempty" url:"currency,omitempty"` + // Purchase order ID PurchaseOrderNo *string `json:"purchaseOrderNo,omitempty" url:"purchaseOrderNo,omitempty"` // Current page; default is 1 CurrentPage *int32 `json:"currentPage,omitempty" url:"currentPage,omitempty"` - // Page size; 1<=pageSize<=100; default is 50 + // Page size; 1<=pageSize<=50; default is 50 PageSize *int32 `json:"pageSize,omitempty" url:"pageSize,omitempty"` } @@ -40,8 +40,8 @@ func NewGetPurchaseOrdersReqWithDefaults() *GetPurchaseOrdersReq { func (o *GetPurchaseOrdersReq) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} - toSerialize["currency"] = o.Currency toSerialize["status"] = o.Status + toSerialize["currency"] = o.Currency toSerialize["purchaseOrderNo"] = o.PurchaseOrderNo toSerialize["currentPage"] = o.CurrentPage toSerialize["pageSize"] = o.PageSize @@ -56,18 +56,19 @@ func NewGetPurchaseOrdersReqBuilder() *GetPurchaseOrdersReqBuilder { return &GetPurchaseOrdersReqBuilder{obj: NewGetPurchaseOrdersReqWithDefaults()} } -// currency -func (builder *GetPurchaseOrdersReqBuilder) SetCurrency(value string) *GetPurchaseOrdersReqBuilder { - builder.obj.Currency = &value - return builder -} - // DONE-completed; PENDING-settling func (builder *GetPurchaseOrdersReqBuilder) SetStatus(value string) *GetPurchaseOrdersReqBuilder { builder.obj.Status = &value return builder } +// Currency +func (builder *GetPurchaseOrdersReqBuilder) SetCurrency(value string) *GetPurchaseOrdersReqBuilder { + builder.obj.Currency = &value + return builder +} + +// Purchase order ID func (builder *GetPurchaseOrdersReqBuilder) SetPurchaseOrderNo(value string) *GetPurchaseOrdersReqBuilder { builder.obj.PurchaseOrderNo = &value return builder @@ -79,7 +80,7 @@ func (builder *GetPurchaseOrdersReqBuilder) SetCurrentPage(value int32) *GetPurc return builder } -// Page size; 1<=pageSize<=100; default is 50 +// Page size; 1<=pageSize<=50; default is 50 func (builder *GetPurchaseOrdersReqBuilder) SetPageSize(value int32) *GetPurchaseOrdersReqBuilder { builder.obj.PageSize = &value return builder diff --git a/sdk/golang/pkg/generate/margin/credit/types_get_purchase_orders_resp.go b/sdk/golang/pkg/generate/margin/credit/types_get_purchase_orders_resp.go index 1c78dc3b..db36a579 100644 --- a/sdk/golang/pkg/generate/margin/credit/types_get_purchase_orders_resp.go +++ b/sdk/golang/pkg/generate/margin/credit/types_get_purchase_orders_resp.go @@ -16,7 +16,7 @@ type GetPurchaseOrdersResp struct { PageSize int32 `json:"pageSize,omitempty"` // Total Number TotalNum int32 `json:"totalNum,omitempty"` - // Total Page + // Total Pages TotalPage int32 `json:"totalPage,omitempty"` Items []GetPurchaseOrdersItems `json:"items,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/credit/types_get_redeem_orders_items.go b/sdk/golang/pkg/generate/margin/credit/types_get_redeem_orders_items.go index e992f742..03d98b13 100644 --- a/sdk/golang/pkg/generate/margin/credit/types_get_redeem_orders_items.go +++ b/sdk/golang/pkg/generate/margin/credit/types_get_redeem_orders_items.go @@ -6,9 +6,9 @@ package credit type GetRedeemOrdersItems struct { // Currency Currency string `json:"currency,omitempty"` - // Purchase order id + // Purchase order ID PurchaseOrderNo string `json:"purchaseOrderNo,omitempty"` - // Redeem order id + // Redeem order ID RedeemOrderNo string `json:"redeemOrderNo,omitempty"` // Redemption size RedeemSize string `json:"redeemSize,omitempty"` diff --git a/sdk/golang/pkg/generate/margin/credit/types_get_redeem_orders_req.go b/sdk/golang/pkg/generate/margin/credit/types_get_redeem_orders_req.go index 3139af26..9f819f6a 100644 --- a/sdk/golang/pkg/generate/margin/credit/types_get_redeem_orders_req.go +++ b/sdk/golang/pkg/generate/margin/credit/types_get_redeem_orders_req.go @@ -4,15 +4,15 @@ package credit // GetRedeemOrdersReq struct for GetRedeemOrdersReq type GetRedeemOrdersReq struct { - // currency - Currency *string `json:"currency,omitempty" url:"currency,omitempty"` // DONE-completed; PENDING-settling Status *string `json:"status,omitempty" url:"status,omitempty"` - // Redeem order id + // currency + Currency *string `json:"currency,omitempty" url:"currency,omitempty"` + // Redeem order ID RedeemOrderNo *string `json:"redeemOrderNo,omitempty" url:"redeemOrderNo,omitempty"` // Current page; default is 1 CurrentPage *int32 `json:"currentPage,omitempty" url:"currentPage,omitempty"` - // Page size; 1<=pageSize<=100; default is 50 + // Page size; 1<=pageSize<=50; default is 50 PageSize *int32 `json:"pageSize,omitempty" url:"pageSize,omitempty"` } @@ -40,8 +40,8 @@ func NewGetRedeemOrdersReqWithDefaults() *GetRedeemOrdersReq { func (o *GetRedeemOrdersReq) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} - toSerialize["currency"] = o.Currency toSerialize["status"] = o.Status + toSerialize["currency"] = o.Currency toSerialize["redeemOrderNo"] = o.RedeemOrderNo toSerialize["currentPage"] = o.CurrentPage toSerialize["pageSize"] = o.PageSize @@ -56,19 +56,19 @@ func NewGetRedeemOrdersReqBuilder() *GetRedeemOrdersReqBuilder { return &GetRedeemOrdersReqBuilder{obj: NewGetRedeemOrdersReqWithDefaults()} } -// currency -func (builder *GetRedeemOrdersReqBuilder) SetCurrency(value string) *GetRedeemOrdersReqBuilder { - builder.obj.Currency = &value - return builder -} - // DONE-completed; PENDING-settling func (builder *GetRedeemOrdersReqBuilder) SetStatus(value string) *GetRedeemOrdersReqBuilder { builder.obj.Status = &value return builder } -// Redeem order id +// currency +func (builder *GetRedeemOrdersReqBuilder) SetCurrency(value string) *GetRedeemOrdersReqBuilder { + builder.obj.Currency = &value + return builder +} + +// Redeem order ID func (builder *GetRedeemOrdersReqBuilder) SetRedeemOrderNo(value string) *GetRedeemOrdersReqBuilder { builder.obj.RedeemOrderNo = &value return builder @@ -80,7 +80,7 @@ func (builder *GetRedeemOrdersReqBuilder) SetCurrentPage(value int32) *GetRedeem return builder } -// Page size; 1<=pageSize<=100; default is 50 +// Page size; 1<=pageSize<=50; default is 50 func (builder *GetRedeemOrdersReqBuilder) SetPageSize(value int32) *GetRedeemOrdersReqBuilder { builder.obj.PageSize = &value return builder diff --git a/sdk/golang/pkg/generate/margin/credit/types_get_redeem_orders_resp.go b/sdk/golang/pkg/generate/margin/credit/types_get_redeem_orders_resp.go index c858d99c..79387a2f 100644 --- a/sdk/golang/pkg/generate/margin/credit/types_get_redeem_orders_resp.go +++ b/sdk/golang/pkg/generate/margin/credit/types_get_redeem_orders_resp.go @@ -16,7 +16,7 @@ type GetRedeemOrdersResp struct { PageSize int32 `json:"pageSize,omitempty"` // Total Number TotalNum int32 `json:"totalNum,omitempty"` - // Total Page + // Total Pages TotalPage int32 `json:"totalPage,omitempty"` Items []GetRedeemOrdersItems `json:"items,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/credit/types_modify_purchase_req.go b/sdk/golang/pkg/generate/margin/credit/types_modify_purchase_req.go index 480732a3..e6d05e4b 100644 --- a/sdk/golang/pkg/generate/margin/credit/types_modify_purchase_req.go +++ b/sdk/golang/pkg/generate/margin/credit/types_modify_purchase_req.go @@ -8,7 +8,7 @@ type ModifyPurchaseReq struct { Currency string `json:"currency,omitempty"` // Modified purchase interest rate InterestRate string `json:"interestRate,omitempty"` - // Purchase order id + // Purchase order ID PurchaseOrderNo string `json:"purchaseOrderNo,omitempty"` } @@ -57,7 +57,7 @@ func (builder *ModifyPurchaseReqBuilder) SetInterestRate(value string) *ModifyPu return builder } -// Purchase order id +// Purchase order ID func (builder *ModifyPurchaseReqBuilder) SetPurchaseOrderNo(value string) *ModifyPurchaseReqBuilder { builder.obj.PurchaseOrderNo = value return builder diff --git a/sdk/golang/pkg/generate/margin/credit/types_purchase_req.go b/sdk/golang/pkg/generate/margin/credit/types_purchase_req.go index 67496c84..3ce7a549 100644 --- a/sdk/golang/pkg/generate/margin/credit/types_purchase_req.go +++ b/sdk/golang/pkg/generate/margin/credit/types_purchase_req.go @@ -6,9 +6,9 @@ package credit type PurchaseReq struct { // Currency Currency string `json:"currency,omitempty"` - // purchase amount + // Purchase amount Size string `json:"size,omitempty"` - // purchase interest rate + // Purchase interest rate InterestRate string `json:"interestRate,omitempty"` } @@ -51,13 +51,13 @@ func (builder *PurchaseReqBuilder) SetCurrency(value string) *PurchaseReqBuilder return builder } -// purchase amount +// Purchase amount func (builder *PurchaseReqBuilder) SetSize(value string) *PurchaseReqBuilder { builder.obj.Size = value return builder } -// purchase interest rate +// Purchase interest rate func (builder *PurchaseReqBuilder) SetInterestRate(value string) *PurchaseReqBuilder { builder.obj.InterestRate = value return builder diff --git a/sdk/golang/pkg/generate/margin/credit/types_purchase_resp.go b/sdk/golang/pkg/generate/margin/credit/types_purchase_resp.go index d1823a63..9f5adb0a 100644 --- a/sdk/golang/pkg/generate/margin/credit/types_purchase_resp.go +++ b/sdk/golang/pkg/generate/margin/credit/types_purchase_resp.go @@ -10,7 +10,7 @@ import ( type PurchaseResp struct { // common response CommonResponse *types.RestResponse - // Purchase order id + // Purchase order ID OrderNo string `json:"orderNo,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/credit/types_redeem_req.go b/sdk/golang/pkg/generate/margin/credit/types_redeem_req.go index 8018e02a..2c052dd4 100644 --- a/sdk/golang/pkg/generate/margin/credit/types_redeem_req.go +++ b/sdk/golang/pkg/generate/margin/credit/types_redeem_req.go @@ -8,7 +8,7 @@ type RedeemReq struct { Currency string `json:"currency,omitempty"` // Redemption amount Size string `json:"size,omitempty"` - // Purchase order id + // Purchase order ID PurchaseOrderNo string `json:"purchaseOrderNo,omitempty"` } @@ -57,7 +57,7 @@ func (builder *RedeemReqBuilder) SetSize(value string) *RedeemReqBuilder { return builder } -// Purchase order id +// Purchase order ID func (builder *RedeemReqBuilder) SetPurchaseOrderNo(value string) *RedeemReqBuilder { builder.obj.PurchaseOrderNo = value return builder diff --git a/sdk/golang/pkg/generate/margin/credit/types_redeem_resp.go b/sdk/golang/pkg/generate/margin/credit/types_redeem_resp.go index dc300dca..a8807ea3 100644 --- a/sdk/golang/pkg/generate/margin/credit/types_redeem_resp.go +++ b/sdk/golang/pkg/generate/margin/credit/types_redeem_resp.go @@ -10,7 +10,7 @@ import ( type RedeemResp struct { // common response CommonResponse *types.RestResponse - // Redeem order id + // Redeem order ID OrderNo string `json:"orderNo,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/debit/api_debit.go b/sdk/golang/pkg/generate/margin/debit/api_debit.go index 08378908..600cd6e1 100644 --- a/sdk/golang/pkg/generate/margin/debit/api_debit.go +++ b/sdk/golang/pkg/generate/margin/debit/api_debit.go @@ -12,85 +12,85 @@ type DebitAPI interface { // Borrow Borrow // Description: This API endpoint is used to initiate an application for cross or isolated margin borrowing. // Documentation: https://www.kucoin.com/docs-new/api-3470206 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 15 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 15 | + // +-----------------------+---------+ Borrow(req *BorrowReq, ctx context.Context) (*BorrowResp, error) // GetBorrowHistory Get Borrow History - // Description: This API endpoint is used to get the borrowing orders for cross and isolated margin accounts + // Description: This API endpoint is used to get the borrowing orders for cross and isolated margin accounts. // Documentation: https://www.kucoin.com/docs-new/api-3470207 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 15 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 15 | + // +-----------------------+---------+ GetBorrowHistory(req *GetBorrowHistoryReq, ctx context.Context) (*GetBorrowHistoryResp, error) // Repay Repay // Description: This API endpoint is used to initiate an application for cross or isolated margin repayment. // Documentation: https://www.kucoin.com/docs-new/api-3470210 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ Repay(req *RepayReq, ctx context.Context) (*RepayResp, error) // GetRepayHistory Get Repay History - // Description: This API endpoint is used to get the borrowing orders for cross and isolated margin accounts + // Description: This API endpoint is used to get the borrowing orders for cross and isolated margin accounts. // Documentation: https://www.kucoin.com/docs-new/api-3470208 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 15 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 15 | + // +-----------------------+---------+ GetRepayHistory(req *GetRepayHistoryReq, ctx context.Context) (*GetRepayHistoryResp, error) - // GetInterestHistory Get Interest History - // Description: Request via this endpoint to get the interest records of the cross/isolated margin lending. + // GetInterestHistory Get Interest History. + // Description: Request the interest records of the cross/isolated margin lending via this endpoint. // Documentation: https://www.kucoin.com/docs-new/api-3470209 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 20 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+---------+ GetInterestHistory(req *GetInterestHistoryReq, ctx context.Context) (*GetInterestHistoryResp, error) // ModifyLeverage Modify Leverage // Description: This endpoint allows modifying the leverage multiplier for cross margin or isolated margin. // Documentation: https://www.kucoin.com/docs-new/api-3470211 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 8 | + // +-----------------------+---------+ ModifyLeverage(req *ModifyLeverageReq, ctx context.Context) (*ModifyLeverageResp, error) } diff --git a/sdk/golang/pkg/generate/margin/debit/api_debit.template b/sdk/golang/pkg/generate/margin/debit/api_debit.template index b0a83fe0..403caccc 100644 --- a/sdk/golang/pkg/generate/margin/debit/api_debit.template +++ b/sdk/golang/pkg/generate/margin/debit/api_debit.template @@ -95,7 +95,7 @@ func TestDebitGetRepayHistoryReq(t *testing.T) { func TestDebitGetInterestHistoryReq(t *testing.T) { // GetInterestHistory - // Get Interest History + // Get Interest History. // /api/v3/margin/interest builder := debit.NewGetInterestHistoryReqBuilder() diff --git a/sdk/golang/pkg/generate/margin/debit/api_debit_test.go b/sdk/golang/pkg/generate/margin/debit/api_debit_test.go index 2a9cff24..cbcfb324 100644 --- a/sdk/golang/pkg/generate/margin/debit/api_debit_test.go +++ b/sdk/golang/pkg/generate/margin/debit/api_debit_test.go @@ -121,7 +121,7 @@ func TestDebitGetRepayHistoryRespModel(t *testing.T) { func TestDebitGetInterestHistoryReqModel(t *testing.T) { // GetInterestHistory - // Get Interest History + // Get Interest History. // /api/v3/margin/interest data := "{\"currency\": \"BTC\", \"isIsolated\": true, \"symbol\": \"BTC-USDT\", \"startTime\": 123456, \"endTime\": 123456, \"currentPage\": 1, \"pageSize\": 50}" @@ -133,7 +133,7 @@ func TestDebitGetInterestHistoryReqModel(t *testing.T) { func TestDebitGetInterestHistoryRespModel(t *testing.T) { // GetInterestHistory - // Get Interest History + // Get Interest History. // /api/v3/margin/interest data := "{\"code\":\"200000\",\"data\":{\"timestamp\":1729665170701,\"currentPage\":1,\"pageSize\":50,\"totalNum\":3,\"totalPage\":1,\"items\":[{\"currency\":\"USDT\",\"dayRatio\":\"0.000296\",\"interestAmount\":\"0.00000001\",\"createdTime\":1729663213375},{\"currency\":\"USDT\",\"dayRatio\":\"0.000296\",\"interestAmount\":\"0.00000001\",\"createdTime\":1729659618802},{\"currency\":\"USDT\",\"dayRatio\":\"0.000296\",\"interestAmount\":\"0.00000001\",\"createdTime\":1729656028077}]}}" diff --git a/sdk/golang/pkg/generate/margin/debit/types_borrow_resp.go b/sdk/golang/pkg/generate/margin/debit/types_borrow_resp.go index 9c03f849..18642b97 100644 --- a/sdk/golang/pkg/generate/margin/debit/types_borrow_resp.go +++ b/sdk/golang/pkg/generate/margin/debit/types_borrow_resp.go @@ -10,7 +10,7 @@ import ( type BorrowResp struct { // common response CommonResponse *types.RestResponse - // Borrow Order Id + // Borrow Order ID OrderNo string `json:"orderNo,omitempty"` // Actual borrowed amount ActualSize string `json:"actualSize,omitempty"` diff --git a/sdk/golang/pkg/generate/margin/debit/types_get_borrow_history_items.go b/sdk/golang/pkg/generate/margin/debit/types_get_borrow_history_items.go index a9c2cc18..1b91e6df 100644 --- a/sdk/golang/pkg/generate/margin/debit/types_get_borrow_history_items.go +++ b/sdk/golang/pkg/generate/margin/debit/types_get_borrow_history_items.go @@ -4,7 +4,7 @@ package debit // GetBorrowHistoryItems struct for GetBorrowHistoryItems type GetBorrowHistoryItems struct { - // Borrow Order Id + // Borrow Order ID OrderNo string `json:"orderNo,omitempty"` // Isolated Margin symbol; empty for cross margin Symbol string `json:"symbol,omitempty"` @@ -16,7 +16,7 @@ type GetBorrowHistoryItems struct { ActualSize string `json:"actualSize,omitempty"` // PENDING: Processing, SUCCESS: Successful, FAILED: Failed Status string `json:"status,omitempty"` - // borrow time + // Borrow time CreatedTime int64 `json:"createdTime,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/debit/types_get_borrow_history_req.go b/sdk/golang/pkg/generate/margin/debit/types_get_borrow_history_req.go index 4fe5f10b..aa710a2f 100644 --- a/sdk/golang/pkg/generate/margin/debit/types_get_borrow_history_req.go +++ b/sdk/golang/pkg/generate/margin/debit/types_get_borrow_history_req.go @@ -10,7 +10,7 @@ type GetBorrowHistoryReq struct { IsIsolated *bool `json:"isIsolated,omitempty" url:"isIsolated,omitempty"` // symbol, mandatory for isolated margin account Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` - // Borrow Order Id + // Borrow Order ID OrderNo *string `json:"orderNo,omitempty" url:"orderNo,omitempty"` // The start and end times are not restricted. If the start time is empty or less than 1680278400000, the default value is set to 1680278400000 (April 1, 2023, 00:00:00) StartTime *int64 `json:"startTime,omitempty" url:"startTime,omitempty"` @@ -87,7 +87,7 @@ func (builder *GetBorrowHistoryReqBuilder) SetSymbol(value string) *GetBorrowHis return builder } -// Borrow Order Id +// Borrow Order ID func (builder *GetBorrowHistoryReqBuilder) SetOrderNo(value string) *GetBorrowHistoryReqBuilder { builder.obj.OrderNo = &value return builder diff --git a/sdk/golang/pkg/generate/margin/debit/types_get_borrow_history_resp.go b/sdk/golang/pkg/generate/margin/debit/types_get_borrow_history_resp.go index 0b33d6bf..afbada12 100644 --- a/sdk/golang/pkg/generate/margin/debit/types_get_borrow_history_resp.go +++ b/sdk/golang/pkg/generate/margin/debit/types_get_borrow_history_resp.go @@ -17,7 +17,7 @@ type GetBorrowHistoryResp struct { PageSize int32 `json:"pageSize,omitempty"` // total number TotalNum int32 `json:"totalNum,omitempty"` - // total page + // total pages TotalPage int32 `json:"totalPage,omitempty"` Items []GetBorrowHistoryItems `json:"items,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/debit/types_get_interest_history_resp.go b/sdk/golang/pkg/generate/margin/debit/types_get_interest_history_resp.go index c82ff7a4..3f2aa6e8 100644 --- a/sdk/golang/pkg/generate/margin/debit/types_get_interest_history_resp.go +++ b/sdk/golang/pkg/generate/margin/debit/types_get_interest_history_resp.go @@ -17,7 +17,7 @@ type GetInterestHistoryResp struct { PageSize int32 `json:"pageSize,omitempty"` // total number TotalNum int32 `json:"totalNum,omitempty"` - // total page + // total pages TotalPage int32 `json:"totalPage,omitempty"` Items []GetInterestHistoryItems `json:"items,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/debit/types_get_repay_history_items.go b/sdk/golang/pkg/generate/margin/debit/types_get_repay_history_items.go index f36a7e33..a4ed1e9a 100644 --- a/sdk/golang/pkg/generate/margin/debit/types_get_repay_history_items.go +++ b/sdk/golang/pkg/generate/margin/debit/types_get_repay_history_items.go @@ -4,7 +4,7 @@ package debit // GetRepayHistoryItems struct for GetRepayHistoryItems type GetRepayHistoryItems struct { - // Repay Order Id + // Repay order ID OrderNo string `json:"orderNo,omitempty"` // Isolated Margin symbol; empty for cross margin Symbol string `json:"symbol,omitempty"` diff --git a/sdk/golang/pkg/generate/margin/debit/types_get_repay_history_req.go b/sdk/golang/pkg/generate/margin/debit/types_get_repay_history_req.go index 382d0ca5..1d1bdea8 100644 --- a/sdk/golang/pkg/generate/margin/debit/types_get_repay_history_req.go +++ b/sdk/golang/pkg/generate/margin/debit/types_get_repay_history_req.go @@ -10,7 +10,7 @@ type GetRepayHistoryReq struct { IsIsolated *bool `json:"isIsolated,omitempty" url:"isIsolated,omitempty"` // symbol, mandatory for isolated margin account Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` - // Repay Order Id + // Repay order ID OrderNo *string `json:"orderNo,omitempty" url:"orderNo,omitempty"` // The start and end times are not restricted. If the start time is empty or less than 1680278400000, the default value is set to 1680278400000 (April 1, 2023, 00:00:00) StartTime *int64 `json:"startTime,omitempty" url:"startTime,omitempty"` @@ -87,7 +87,7 @@ func (builder *GetRepayHistoryReqBuilder) SetSymbol(value string) *GetRepayHisto return builder } -// Repay Order Id +// Repay order ID func (builder *GetRepayHistoryReqBuilder) SetOrderNo(value string) *GetRepayHistoryReqBuilder { builder.obj.OrderNo = &value return builder diff --git a/sdk/golang/pkg/generate/margin/debit/types_get_repay_history_resp.go b/sdk/golang/pkg/generate/margin/debit/types_get_repay_history_resp.go index 2fd5e03b..2f63bb97 100644 --- a/sdk/golang/pkg/generate/margin/debit/types_get_repay_history_resp.go +++ b/sdk/golang/pkg/generate/margin/debit/types_get_repay_history_resp.go @@ -17,7 +17,7 @@ type GetRepayHistoryResp struct { PageSize int32 `json:"pageSize,omitempty"` // total number TotalNum int32 `json:"totalNum,omitempty"` - // total page + // total pages TotalPage int32 `json:"totalPage,omitempty"` Items []GetRepayHistoryItems `json:"items,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/debit/types_repay_resp.go b/sdk/golang/pkg/generate/margin/debit/types_repay_resp.go index 1fb81791..5bb45c0d 100644 --- a/sdk/golang/pkg/generate/margin/debit/types_repay_resp.go +++ b/sdk/golang/pkg/generate/margin/debit/types_repay_resp.go @@ -11,7 +11,7 @@ type RepayResp struct { // common response CommonResponse *types.RestResponse Timestamp int64 `json:"timestamp,omitempty"` - // Repay Order Id + // Repay order ID OrderNo string `json:"orderNo,omitempty"` // Actual repay amount ActualSize string `json:"actualSize,omitempty"` diff --git a/sdk/golang/pkg/generate/margin/marginprivate/api_margin_private.go b/sdk/golang/pkg/generate/margin/marginprivate/api_margin_private.go index 71e07746..152385e1 100644 --- a/sdk/golang/pkg/generate/margin/marginprivate/api_margin_private.go +++ b/sdk/golang/pkg/generate/margin/marginprivate/api_margin_private.go @@ -9,12 +9,12 @@ import ( type MarginPrivateWS interface { // CrossMarginPosition Get Cross Margin Position change - // The system will push the change event when the position status changes, Or push the current debt message periodically when there is a liability. + // The system will push the change event when the position status changes, or push the current debt message periodically when there is a liability. // push frequency: once every 4s CrossMarginPosition(callback CrossMarginPositionEventCallback) (id string, err error) // IsolatedMarginPosition Get Isolated Margin Position change - // The system will push the change event when the position status changes, Or push the current debt message periodically when there is a liability. + // The system will push the change event when the position status changes, or push the current debt message periodically when there is a liability. // push frequency: real time IsolatedMarginPosition(symbol string, callback IsolatedMarginPositionEventCallback) (id string, err error) diff --git a/sdk/golang/pkg/generate/margin/marginprivate/types_cross_margin_position_event.go b/sdk/golang/pkg/generate/margin/marginprivate/types_cross_margin_position_event.go index fd4a3e03..1422ded3 100644 --- a/sdk/golang/pkg/generate/margin/marginprivate/types_cross_margin_position_event.go +++ b/sdk/golang/pkg/generate/margin/marginprivate/types_cross_margin_position_event.go @@ -13,7 +13,7 @@ type CrossMarginPositionEvent struct { CommonResponse *types.WsMessage // Debt ratio DebtRatio float32 `json:"debtRatio,omitempty"` - // Total asset in BTC (interest included) + // Total assets in BTC (interest included) TotalAsset float32 `json:"totalAsset,omitempty"` MarginCoefficientTotalAsset string `json:"marginCoefficientTotalAsset,omitempty"` // Total debt in BTC (interest included) diff --git a/sdk/golang/pkg/generate/margin/marginpublic/api_margin_public.go b/sdk/golang/pkg/generate/margin/marginpublic/api_margin_public.go index 214ae5ba..7dce109c 100644 --- a/sdk/golang/pkg/generate/margin/marginpublic/api_margin_public.go +++ b/sdk/golang/pkg/generate/margin/marginpublic/api_margin_public.go @@ -9,12 +9,12 @@ import ( type MarginPublicWS interface { // IndexPrice Index Price - // Subscribe to this topic to get the index price for the margin trading. The following ticker symbols are supported: List of currently supported symbol. + // Subscribe to this topic to get the index price for margin trading. The following ticker symbols are supported: List of currently supported symbols. // push frequency: once every 1s IndexPrice(symbol []string, callback IndexPriceEventCallback) (id string, err error) // MarkPrice Mark Price - // Subscribe to this topic to get the mark price for margin trading.The following ticker symbols are supported: List of currently supported symbol + // Subscribe to this topic to get the mark price for margin trading. The following ticker symbols are supported: List of currently supported symbols // push frequency: once every 1s MarkPrice(symbol []string, callback MarkPriceEventCallback) (id string, err error) diff --git a/sdk/golang/pkg/generate/margin/market/api_market.go b/sdk/golang/pkg/generate/margin/market/api_market.go index 74ab29e9..ae543480 100644 --- a/sdk/golang/pkg/generate/margin/market/api_market.go +++ b/sdk/golang/pkg/generate/margin/market/api_market.go @@ -12,85 +12,85 @@ type MarketAPI interface { // GetCrossMarginSymbols Get Symbols - Cross Margin // Description: This endpoint allows querying the configuration of cross margin symbol. // Documentation: https://www.kucoin.com/docs-new/api-3470189 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+--------+ GetCrossMarginSymbols(req *GetCrossMarginSymbolsReq, ctx context.Context) (*GetCrossMarginSymbolsResp, error) - // GetMarginConfig Get Margin Config - // Description: Request via this endpoint to get the configure info of the cross margin. - // Documentation: https://www.kucoin.com/docs-new/api-3470190 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 25 | - // +---------------------+--------+ - GetMarginConfig(ctx context.Context) (*GetMarginConfigResp, error) - // GetETFInfo Get ETF Info - // Description: This interface returns leveraged token information + // Description: This interface returns leveraged token information. // Documentation: https://www.kucoin.com/docs-new/api-3470191 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+--------+ GetETFInfo(req *GetETFInfoReq, ctx context.Context) (*GetETFInfoResp, error) - // GetMarkPriceList Get Mark Price List - // Description: This endpoint returns the current Mark price for all margin trading pairs. - // Documentation: https://www.kucoin.com/docs-new/api-3470192 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 10 | - // +---------------------+--------+ - GetMarkPriceList(ctx context.Context) (*GetMarkPriceListResp, error) - // GetMarkPriceDetail Get Mark Price Detail // Description: This endpoint returns the current Mark price for specified margin trading pairs. // Documentation: https://www.kucoin.com/docs-new/api-3470193 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 2 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+--------+ GetMarkPriceDetail(req *GetMarkPriceDetailReq, ctx context.Context) (*GetMarkPriceDetailResp, error) + // GetMarginConfig Get Margin Config + // Description: Request the configure info of the cross margin via this endpoint. + // Documentation: https://www.kucoin.com/docs-new/api-3470190 + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 25 | + // +-----------------------+--------+ + GetMarginConfig(ctx context.Context) (*GetMarginConfigResp, error) + + // GetMarkPriceList Get Mark Price List + // Description: This endpoint returns the current Mark price for all margin trading pairs. + // Documentation: https://www.kucoin.com/docs-new/api-3470192 + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+--------+ + GetMarkPriceList(ctx context.Context) (*GetMarkPriceListResp, error) + // GetIsolatedMarginSymbols Get Symbols - Isolated Margin // Description: This endpoint allows querying the configuration of isolated margin symbol. // Documentation: https://www.kucoin.com/docs-new/api-3470194 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+--------+ GetIsolatedMarginSymbols(ctx context.Context) (*GetIsolatedMarginSymbolsResp, error) } @@ -108,30 +108,30 @@ func (impl *MarketAPIImpl) GetCrossMarginSymbols(req *GetCrossMarginSymbolsReq, return resp, err } -func (impl *MarketAPIImpl) GetMarginConfig(ctx context.Context) (*GetMarginConfigResp, error) { - resp := &GetMarginConfigResp{} - err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/margin/config", nil, resp, false) - return resp, err -} - func (impl *MarketAPIImpl) GetETFInfo(req *GetETFInfoReq, ctx context.Context) (*GetETFInfoResp, error) { resp := &GetETFInfoResp{} err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v3/etf/info", req, resp, false) return resp, err } -func (impl *MarketAPIImpl) GetMarkPriceList(ctx context.Context) (*GetMarkPriceListResp, error) { - resp := &GetMarkPriceListResp{} - err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v3/mark-price/all-symbols", nil, resp, false) - return resp, err -} - func (impl *MarketAPIImpl) GetMarkPriceDetail(req *GetMarkPriceDetailReq, ctx context.Context) (*GetMarkPriceDetailResp, error) { resp := &GetMarkPriceDetailResp{} err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/mark-price/{symbol}/current", req, resp, false) return resp, err } +func (impl *MarketAPIImpl) GetMarginConfig(ctx context.Context) (*GetMarginConfigResp, error) { + resp := &GetMarginConfigResp{} + err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/margin/config", nil, resp, false) + return resp, err +} + +func (impl *MarketAPIImpl) GetMarkPriceList(ctx context.Context) (*GetMarkPriceListResp, error) { + resp := &GetMarkPriceListResp{} + err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v3/mark-price/all-symbols", nil, resp, false) + return resp, err +} + func (impl *MarketAPIImpl) GetIsolatedMarginSymbols(ctx context.Context) (*GetIsolatedMarginSymbolsResp, error) { resp := &GetIsolatedMarginSymbolsResp{} err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/isolated/symbols", nil, resp, false) diff --git a/sdk/golang/pkg/generate/margin/market/api_market.template b/sdk/golang/pkg/generate/margin/market/api_market.template index 0aa7a1d4..f99ce576 100644 --- a/sdk/golang/pkg/generate/margin/market/api_market.template +++ b/sdk/golang/pkg/generate/margin/market/api_market.template @@ -24,13 +24,16 @@ func TestMarketGetCrossMarginSymbolsReq(t *testing.T) { } -func TestMarketGetMarginConfigReq(t *testing.T) { - // GetMarginConfig - // Get Margin Config - // /api/v1/margin/config +func TestMarketGetETFInfoReq(t *testing.T) { + // GetETFInfo + // Get ETF Info + // /api/v3/etf/info + builder := market.NewGetETFInfoReqBuilder() + builder.SetCurrency(?) + req := builder.Build() - resp, err := marketApi.GetMarginConfig(context.TODO()) + resp, err := marketApi.GetETFInfo(req, context.TODO()) if err != nil { panic(err) } @@ -44,16 +47,16 @@ func TestMarketGetMarginConfigReq(t *testing.T) { } -func TestMarketGetETFInfoReq(t *testing.T) { - // GetETFInfo - // Get ETF Info - // /api/v3/etf/info +func TestMarketGetMarkPriceDetailReq(t *testing.T) { + // GetMarkPriceDetail + // Get Mark Price Detail + // /api/v1/mark-price/{symbol}/current - builder := market.NewGetETFInfoReqBuilder() - builder.SetCurrency(?) + builder := market.NewGetMarkPriceDetailReqBuilder() + builder.SetSymbol(?) req := builder.Build() - resp, err := marketApi.GetETFInfo(req, context.TODO()) + resp, err := marketApi.GetMarkPriceDetail(req, context.TODO()) if err != nil { panic(err) } @@ -67,13 +70,13 @@ func TestMarketGetETFInfoReq(t *testing.T) { } -func TestMarketGetMarkPriceListReq(t *testing.T) { - // GetMarkPriceList - // Get Mark Price List - // /api/v3/mark-price/all-symbols +func TestMarketGetMarginConfigReq(t *testing.T) { + // GetMarginConfig + // Get Margin Config + // /api/v1/margin/config - resp, err := marketApi.GetMarkPriceList(context.TODO()) + resp, err := marketApi.GetMarginConfig(context.TODO()) if err != nil { panic(err) } @@ -87,16 +90,13 @@ func TestMarketGetMarkPriceListReq(t *testing.T) { } -func TestMarketGetMarkPriceDetailReq(t *testing.T) { - // GetMarkPriceDetail - // Get Mark Price Detail - // /api/v1/mark-price/{symbol}/current +func TestMarketGetMarkPriceListReq(t *testing.T) { + // GetMarkPriceList + // Get Mark Price List + // /api/v3/mark-price/all-symbols - builder := market.NewGetMarkPriceDetailReqBuilder() - builder.SetSymbol(?) - req := builder.Build() - resp, err := marketApi.GetMarkPriceDetail(req, context.TODO()) + resp, err := marketApi.GetMarkPriceList(context.TODO()) if err != nil { panic(err) } diff --git a/sdk/golang/pkg/generate/margin/market/api_market_test.go b/sdk/golang/pkg/generate/margin/market/api_market_test.go index d08df5a0..b29f5f28 100644 --- a/sdk/golang/pkg/generate/margin/market/api_market_test.go +++ b/sdk/golang/pkg/generate/margin/market/api_market_test.go @@ -35,29 +35,6 @@ func TestMarketGetCrossMarginSymbolsRespModel(t *testing.T) { assert.Nil(t, err) } -func TestMarketGetMarginConfigReqModel(t *testing.T) { - // GetMarginConfig - // Get Margin Config - // /api/v1/margin/config - -} - -func TestMarketGetMarginConfigRespModel(t *testing.T) { - // GetMarginConfig - // Get Margin Config - // /api/v1/margin/config - - data := "{\n \"code\": \"200000\",\n \"data\": {\n \"maxLeverage\": 5,\n \"warningDebtRatio\": \"0.95\",\n \"liqDebtRatio\": \"0.97\",\n \"currencyList\": [\n \"VRA\",\n \"APT\",\n \"IOTX\",\n \"SHIB\",\n \"KDA\",\n \"BCHSV\",\n \"NEAR\",\n \"CLV\",\n \"AUDIO\",\n \"AIOZ\",\n \"FLOW\",\n \"WLD\",\n \"COMP\",\n \"MEME\",\n \"SLP\",\n \"STX\",\n \"ZRO\",\n \"QI\",\n \"PYTH\",\n \"RUNE\",\n \"DGB\",\n \"IOST\",\n \"SUI\",\n \"BCH\",\n \"CAKE\",\n \"DOT\",\n \"OMG\",\n \"POL\",\n \"GMT\",\n \"1INCH\",\n \"RSR\",\n \"NKN\",\n \"BTC\",\n \"AR\",\n \"ARB\",\n \"TON\",\n \"LISTA\",\n \"AVAX\",\n \"SEI\",\n \"FTM\",\n \"ERN\",\n \"BB\",\n \"BTT\",\n \"JTO\",\n \"ONE\",\n \"RLC\",\n \"ANKR\",\n \"SUSHI\",\n \"CATI\",\n \"ALGO\",\n \"PEPE2\",\n \"ATOM\",\n \"LPT\",\n \"BIGTIME\",\n \"CFX\",\n \"DYM\",\n \"VELO\",\n \"XPR\",\n \"SNX\",\n \"JUP\",\n \"MANA\",\n \"API3\",\n \"PYR\",\n \"ROSE\",\n \"GLMR\",\n \"SATS\",\n \"TIA\",\n \"GALAX\",\n \"SOL\",\n \"DAO\",\n \"FET\",\n \"ETC\",\n \"MKR\",\n \"WOO\",\n \"DODO\",\n \"OGN\",\n \"BNB\",\n \"ICP\",\n \"BLUR\",\n \"ETH\",\n \"ZEC\",\n \"NEO\",\n \"CELO\",\n \"REN\",\n \"MANTA\",\n \"LRC\",\n \"STRK\",\n \"ADA\",\n \"STORJ\",\n \"REQ\",\n \"TAO\",\n \"VET\",\n \"FITFI\",\n \"USDT\",\n \"DOGE\",\n \"HBAR\",\n \"SXP\",\n \"NEIROCTO\",\n \"CHR\",\n \"ORDI\",\n \"DASH\",\n \"PEPE\",\n \"ONDO\",\n \"ILV\",\n \"WAVES\",\n \"CHZ\",\n \"DOGS\",\n \"XRP\",\n \"CTSI\",\n \"JASMY\",\n \"FLOKI\",\n \"TRX\",\n \"KAVA\",\n \"SAND\",\n \"C98\",\n \"UMA\",\n \"NOT\",\n \"IMX\",\n \"WIF\",\n \"ENA\",\n \"EGLD\",\n \"BOME\",\n \"LTC\",\n \"USDC\",\n \"METIS\",\n \"WIN\",\n \"THETA\",\n \"FXS\",\n \"ENJ\",\n \"CRO\",\n \"AEVO\",\n \"INJ\",\n \"LTO\",\n \"CRV\",\n \"GRT\",\n \"DYDX\",\n \"FLUX\",\n \"ENS\",\n \"WAX\",\n \"MASK\",\n \"POND\",\n \"UNI\",\n \"AAVE\",\n \"LINA\",\n \"TLM\",\n \"BONK\",\n \"QNT\",\n \"LDO\",\n \"ALICE\",\n \"XLM\",\n \"LINK\",\n \"CKB\",\n \"LUNC\",\n \"YFI\",\n \"ETHW\",\n \"XTZ\",\n \"LUNA\",\n \"OP\",\n \"SUPER\",\n \"EIGEN\",\n \"KSM\",\n \"ELON\",\n \"EOS\",\n \"FIL\",\n \"ZETA\",\n \"SKL\",\n \"BAT\",\n \"APE\",\n \"HMSTR\",\n \"YGG\",\n \"MOVR\",\n \"PEOPLE\",\n \"KCS\",\n \"AXS\",\n \"ARPA\",\n \"ZIL\"\n ]\n }\n}" - commonResp := &types.RestResponse{} - err := json.Unmarshal([]byte(data), commonResp) - assert.Nil(t, err) - assert.NotNil(t, commonResp.Data) - resp := &GetMarginConfigResp{} - err = json.Unmarshal([]byte(commonResp.Data), resp) - resp.ToMap() - assert.Nil(t, err) -} - func TestMarketGetETFInfoReqModel(t *testing.T) { // GetETFInfo // Get ETF Info @@ -86,29 +63,6 @@ func TestMarketGetETFInfoRespModel(t *testing.T) { assert.Nil(t, err) } -func TestMarketGetMarkPriceListReqModel(t *testing.T) { - // GetMarkPriceList - // Get Mark Price List - // /api/v3/mark-price/all-symbols - -} - -func TestMarketGetMarkPriceListRespModel(t *testing.T) { - // GetMarkPriceList - // Get Mark Price List - // /api/v3/mark-price/all-symbols - - data := "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"USDT-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.504E-5\n },\n {\n \"symbol\": \"USDC-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.5049024E-5\n }\n ]\n}" - commonResp := &types.RestResponse{} - err := json.Unmarshal([]byte(data), commonResp) - assert.Nil(t, err) - assert.NotNil(t, commonResp.Data) - resp := &GetMarkPriceListResp{} - err = json.Unmarshal([]byte(commonResp.Data), resp) - resp.ToMap() - assert.Nil(t, err) -} - func TestMarketGetMarkPriceDetailReqModel(t *testing.T) { // GetMarkPriceDetail // Get Mark Price Detail @@ -137,6 +91,52 @@ func TestMarketGetMarkPriceDetailRespModel(t *testing.T) { assert.Nil(t, err) } +func TestMarketGetMarginConfigReqModel(t *testing.T) { + // GetMarginConfig + // Get Margin Config + // /api/v1/margin/config + +} + +func TestMarketGetMarginConfigRespModel(t *testing.T) { + // GetMarginConfig + // Get Margin Config + // /api/v1/margin/config + + data := "{\n \"code\": \"200000\",\n \"data\": {\n \"maxLeverage\": 5,\n \"warningDebtRatio\": \"0.95\",\n \"liqDebtRatio\": \"0.97\",\n \"currencyList\": [\n \"VRA\",\n \"APT\",\n \"IOTX\",\n \"SHIB\",\n \"KDA\",\n \"BCHSV\",\n \"NEAR\",\n \"CLV\",\n \"AUDIO\",\n \"AIOZ\",\n \"FLOW\",\n \"WLD\",\n \"COMP\",\n \"MEME\",\n \"SLP\",\n \"STX\",\n \"ZRO\",\n \"QI\",\n \"PYTH\",\n \"RUNE\",\n \"DGB\",\n \"IOST\",\n \"SUI\",\n \"BCH\",\n \"CAKE\",\n \"DOT\",\n \"OMG\",\n \"POL\",\n \"GMT\",\n \"1INCH\",\n \"RSR\",\n \"NKN\",\n \"BTC\",\n \"AR\",\n \"ARB\",\n \"TON\",\n \"LISTA\",\n \"AVAX\",\n \"SEI\",\n \"FTM\",\n \"ERN\",\n \"BB\",\n \"BTT\",\n \"JTO\",\n \"ONE\",\n \"RLC\",\n \"ANKR\",\n \"SUSHI\",\n \"CATI\",\n \"ALGO\",\n \"PEPE2\",\n \"ATOM\",\n \"LPT\",\n \"BIGTIME\",\n \"CFX\",\n \"DYM\",\n \"VELO\",\n \"XPR\",\n \"SNX\",\n \"JUP\",\n \"MANA\",\n \"API3\",\n \"PYR\",\n \"ROSE\",\n \"GLMR\",\n \"SATS\",\n \"TIA\",\n \"GALAX\",\n \"SOL\",\n \"DAO\",\n \"FET\",\n \"ETC\",\n \"MKR\",\n \"WOO\",\n \"DODO\",\n \"OGN\",\n \"BNB\",\n \"ICP\",\n \"BLUR\",\n \"ETH\",\n \"ZEC\",\n \"NEO\",\n \"CELO\",\n \"REN\",\n \"MANTA\",\n \"LRC\",\n \"STRK\",\n \"ADA\",\n \"STORJ\",\n \"REQ\",\n \"TAO\",\n \"VET\",\n \"FITFI\",\n \"USDT\",\n \"DOGE\",\n \"HBAR\",\n \"SXP\",\n \"NEIROCTO\",\n \"CHR\",\n \"ORDI\",\n \"DASH\",\n \"PEPE\",\n \"ONDO\",\n \"ILV\",\n \"WAVES\",\n \"CHZ\",\n \"DOGS\",\n \"XRP\",\n \"CTSI\",\n \"JASMY\",\n \"FLOKI\",\n \"TRX\",\n \"KAVA\",\n \"SAND\",\n \"C98\",\n \"UMA\",\n \"NOT\",\n \"IMX\",\n \"WIF\",\n \"ENA\",\n \"EGLD\",\n \"BOME\",\n \"LTC\",\n \"USDC\",\n \"METIS\",\n \"WIN\",\n \"THETA\",\n \"FXS\",\n \"ENJ\",\n \"CRO\",\n \"AEVO\",\n \"INJ\",\n \"LTO\",\n \"CRV\",\n \"GRT\",\n \"DYDX\",\n \"FLUX\",\n \"ENS\",\n \"WAX\",\n \"MASK\",\n \"POND\",\n \"UNI\",\n \"AAVE\",\n \"LINA\",\n \"TLM\",\n \"BONK\",\n \"QNT\",\n \"LDO\",\n \"ALICE\",\n \"XLM\",\n \"LINK\",\n \"CKB\",\n \"LUNC\",\n \"YFI\",\n \"ETHW\",\n \"XTZ\",\n \"LUNA\",\n \"OP\",\n \"SUPER\",\n \"EIGEN\",\n \"KSM\",\n \"ELON\",\n \"EOS\",\n \"FIL\",\n \"ZETA\",\n \"SKL\",\n \"BAT\",\n \"APE\",\n \"HMSTR\",\n \"YGG\",\n \"MOVR\",\n \"PEOPLE\",\n \"KCS\",\n \"AXS\",\n \"ARPA\",\n \"ZIL\"\n ]\n }\n}" + commonResp := &types.RestResponse{} + err := json.Unmarshal([]byte(data), commonResp) + assert.Nil(t, err) + assert.NotNil(t, commonResp.Data) + resp := &GetMarginConfigResp{} + err = json.Unmarshal([]byte(commonResp.Data), resp) + resp.ToMap() + assert.Nil(t, err) +} + +func TestMarketGetMarkPriceListReqModel(t *testing.T) { + // GetMarkPriceList + // Get Mark Price List + // /api/v3/mark-price/all-symbols + +} + +func TestMarketGetMarkPriceListRespModel(t *testing.T) { + // GetMarkPriceList + // Get Mark Price List + // /api/v3/mark-price/all-symbols + + data := "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"USDT-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.504E-5\n },\n {\n \"symbol\": \"USDC-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.5049024E-5\n }\n ]\n}" + commonResp := &types.RestResponse{} + err := json.Unmarshal([]byte(data), commonResp) + assert.Nil(t, err) + assert.NotNil(t, commonResp.Data) + resp := &GetMarkPriceListResp{} + err = json.Unmarshal([]byte(commonResp.Data), resp) + resp.ToMap() + assert.Nil(t, err) +} + func TestMarketGetIsolatedMarginSymbolsReqModel(t *testing.T) { // GetIsolatedMarginSymbols // Get Symbols - Isolated Margin diff --git a/sdk/golang/pkg/generate/margin/market/types_get_cross_margin_symbols_items.go b/sdk/golang/pkg/generate/margin/market/types_get_cross_margin_symbols_items.go index d64426ae..846c174b 100644 --- a/sdk/golang/pkg/generate/margin/market/types_get_cross_margin_symbols_items.go +++ b/sdk/golang/pkg/generate/margin/market/types_get_cross_margin_symbols_items.go @@ -6,19 +6,19 @@ package market type GetCrossMarginSymbolsItems struct { // symbol Symbol string `json:"symbol,omitempty"` - // symbol name + // Symbol name Name string `json:"name,omitempty"` - // Whether trading is enabled: true for enabled, false for disabled + // Whether trading is enabled: True for enabled; false for disabled EnableTrading bool `json:"enableTrading,omitempty"` // Trading market Market string `json:"market,omitempty"` - // Base currency,e.g. BTC. + // Base currency, e.g. BTC. BaseCurrency string `json:"baseCurrency,omitempty"` - // Quote currency,e.g. USDT. + // Quote currency, e.g. USDT. QuoteCurrency string `json:"quoteCurrency,omitempty"` // Quantity increment: The quantity for an order must be a positive integer multiple of this increment. Here, the size refers to the quantity of the base currency for the order. For example, for the ETH-USDT trading pair, if the baseIncrement is 0.0000001, the order quantity can be 1.0000001 but not 1.00000001. BaseIncrement string `json:"baseIncrement,omitempty"` - // The minimum order quantity requried to place an order. + // The minimum order quantity required to place an order. BaseMinSize string `json:"baseMinSize,omitempty"` // Quote increment: The funds for a market order must be a positive integer multiple of this increment. The funds refer to the quote currency amount. For example, for the ETH-USDT trading pair, if the quoteIncrement is 0.000001, the amount of USDT for the order can be 3000.000001 but not 3000.0000001. QuoteIncrement string `json:"quoteIncrement,omitempty"` @@ -28,13 +28,13 @@ type GetCrossMarginSymbolsItems struct { BaseMaxSize string `json:"baseMaxSize,omitempty"` // The maximum order funds required to place a market order. QuoteMaxSize string `json:"quoteMaxSize,omitempty"` - // Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. specifies the min order price as well as the price increment.This also applies to quote currency. + // Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. Specifies the min. order price as well as the price increment.This also applies to quote currency. PriceIncrement string `json:"priceIncrement,omitempty"` // The currency of charged fees. FeeCurrency string `json:"feeCurrency,omitempty"` - // Threshold for price portection + // Threshold for price protection PriceLimitRate string `json:"priceLimitRate,omitempty"` - // the minimum trading amounts + // The minimum trading amounts MinFunds string `json:"minFunds,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/market/types_get_etf_info_req.go b/sdk/golang/pkg/generate/margin/market/types_get_etf_info_req.go index 527080da..9a2b5ba5 100644 --- a/sdk/golang/pkg/generate/margin/market/types_get_etf_info_req.go +++ b/sdk/golang/pkg/generate/margin/market/types_get_etf_info_req.go @@ -4,7 +4,7 @@ package market // GetETFInfoReq struct for GetETFInfoReq type GetETFInfoReq struct { - // ETF Currency, if empty query all currencies + // ETF Currency: If empty, query all currencies Currency *string `json:"currency,omitempty" url:"currency,omitempty"` } @@ -36,7 +36,7 @@ func NewGetETFInfoReqBuilder() *GetETFInfoReqBuilder { return &GetETFInfoReqBuilder{obj: NewGetETFInfoReqWithDefaults()} } -// ETF Currency, if empty query all currencies +// ETF Currency: If empty, query all currencies func (builder *GetETFInfoReqBuilder) SetCurrency(value string) *GetETFInfoReqBuilder { builder.obj.Currency = &value return builder diff --git a/sdk/golang/pkg/generate/margin/market/types_get_isolated_margin_symbols_data.go b/sdk/golang/pkg/generate/margin/market/types_get_isolated_margin_symbols_data.go index 9196ffed..ce2199c1 100644 --- a/sdk/golang/pkg/generate/margin/market/types_get_isolated_margin_symbols_data.go +++ b/sdk/golang/pkg/generate/margin/market/types_get_isolated_margin_symbols_data.go @@ -6,13 +6,13 @@ package market type GetIsolatedMarginSymbolsData struct { // symbol Symbol string `json:"symbol,omitempty"` - // symbol name + // Symbol name SymbolName string `json:"symbolName,omitempty"` - // Base currency,e.g. BTC. + // Base currency, e.g. BTC. BaseCurrency string `json:"baseCurrency,omitempty"` - // Quote currency,e.g. USDT. + // Quote currency, e.g. USDT. QuoteCurrency string `json:"quoteCurrency,omitempty"` - // Max leverage of this symbol + // Max. leverage of this symbol MaxLeverage int32 `json:"maxLeverage,omitempty"` FlDebtRatio string `json:"flDebtRatio,omitempty"` TradeEnable bool `json:"tradeEnable,omitempty"` diff --git a/sdk/golang/pkg/generate/margin/market/types_get_margin_config_resp.go b/sdk/golang/pkg/generate/margin/market/types_get_margin_config_resp.go index ae89b3f6..803d8dfe 100644 --- a/sdk/golang/pkg/generate/margin/market/types_get_margin_config_resp.go +++ b/sdk/golang/pkg/generate/margin/market/types_get_margin_config_resp.go @@ -12,7 +12,7 @@ type GetMarginConfigResp struct { CommonResponse *types.RestResponse // Available currencies for margin trade CurrencyList []string `json:"currencyList,omitempty"` - // Max leverage available + // Max. leverage available MaxLeverage int32 `json:"maxLeverage,omitempty"` // The warning debt ratio of the forced liquidation WarningDebtRatio string `json:"warningDebtRatio,omitempty"` diff --git a/sdk/golang/pkg/generate/margin/order/api_order.go b/sdk/golang/pkg/generate/margin/order/api_order.go index ceebde7e..ebb30bda 100644 --- a/sdk/golang/pkg/generate/margin/order/api_order.go +++ b/sdk/golang/pkg/generate/margin/order/api_order.go @@ -10,186 +10,186 @@ import ( type OrderAPI interface { // AddOrder Add Order - // Description: Place order to the Cross-margin or Isolated-margin 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. + // Description: Place order in the Cross-margin or Isolated-margin 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. // Documentation: https://www.kucoin.com/docs-new/api-3470204 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ AddOrder(req *AddOrderReq, ctx context.Context) (*AddOrderResp, error) // AddOrderTest Add Order Test - // Description: Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. + // Description: Order test endpoint: This endpoint’s request and return parameters are identical to the order endpoint, and can be used to verify whether the signature is correct, among other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. // Documentation: https://www.kucoin.com/docs-new/api-3470205 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ AddOrderTest(req *AddOrderTestReq, ctx context.Context) (*AddOrderTestResp, error) // CancelOrderByOrderId Cancel Order By OrderId - // Description: This endpoint can be used to cancel a margin order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + // Description: This endpoint can be used to cancel a margin order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. // Documentation: https://www.kucoin.com/docs-new/api-3470195 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ CancelOrderByOrderId(req *CancelOrderByOrderIdReq, ctx context.Context) (*CancelOrderByOrderIdResp, error) // CancelOrderByClientOid Cancel Order By ClientOid - // Description: This endpoint can be used to cancel a margin order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + // Description: This endpoint can be used to cancel a margin order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. // Documentation: https://www.kucoin.com/docs-new/api-3470201 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ CancelOrderByClientOid(req *CancelOrderByClientOidReq, ctx context.Context) (*CancelOrderByClientOidResp, error) // CancelAllOrdersBySymbol Cancel All Orders By Symbol - // Description: This interface can cancel all open Margin orders by symbol This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + // Description: This interface can cancel all open Margin orders by symbol. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. // Documentation: https://www.kucoin.com/docs-new/api-3470197 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ CancelAllOrdersBySymbol(req *CancelAllOrdersBySymbolReq, ctx context.Context) (*CancelAllOrdersBySymbolResp, error) // GetSymbolsWithOpenOrder Get Symbols With Open Order - // Description: This interface can query all Margin symbol that has active orders + // Description: This interface can query all Margin symbols that have active orders. // Documentation: https://www.kucoin.com/docs-new/api-3470196 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | NULL | + // +-----------------------+---------+ GetSymbolsWithOpenOrder(req *GetSymbolsWithOpenOrderReq, ctx context.Context) (*GetSymbolsWithOpenOrderResp, error) // GetOpenOrders Get Open Orders - // Description: This interface is to obtain all Margin active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. + // Description: This interface is to obtain all Margin active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. // Documentation: https://www.kucoin.com/docs-new/api-3470198 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 4 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 4 | + // +-----------------------+---------+ GetOpenOrders(req *GetOpenOrdersReq, ctx context.Context) (*GetOpenOrdersResp, error) // GetClosedOrders Get Closed Orders - // Description: This interface is to obtain all Margin closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. + // Description: This interface is to obtain all Margin closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. // Documentation: https://www.kucoin.com/docs-new/api-3470199 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ GetClosedOrders(req *GetClosedOrdersReq, ctx context.Context) (*GetClosedOrdersResp, error) // GetTradeHistory Get Trade History // Description: This endpoint can be used to obtain a list of the latest Margin transaction details. The returned data is sorted in descending order according to the latest update time of the order. // Documentation: https://www.kucoin.com/docs-new/api-3470200 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetTradeHistory(req *GetTradeHistoryReq, ctx context.Context) (*GetTradeHistoryResp, error) // GetOrderByOrderId Get Order By OrderId - // Description: This endpoint can be used to obtain information for a single Margin order using the order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. + // Description: This endpoint can be used to obtain information for a single Margin order using the order ID. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. // Documentation: https://www.kucoin.com/docs-new/api-3470202 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetOrderByOrderId(req *GetOrderByOrderIdReq, ctx context.Context) (*GetOrderByOrderIdResp, error) // GetOrderByClientOid Get Order By ClientOid - // Description: This endpoint can be used to obtain information for a single Margin order using the client order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. + // Description: This endpoint can be used to obtain information for a single Margin order using the client order ID. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. // Documentation: https://www.kucoin.com/docs-new/api-3470203 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ GetOrderByClientOid(req *GetOrderByClientOidReq, ctx context.Context) (*GetOrderByClientOidResp, error) // AddOrderV1 Add Order - V1 - // Description: Place order to the Cross-margin or Isolated-margin 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. + // Description: Place order in the Cross-margin or Isolated-margin 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. // Documentation: https://www.kucoin.com/docs-new/api-3470312 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ // Deprecated AddOrderV1(req *AddOrderV1Req, ctx context.Context) (*AddOrderV1Resp, error) // AddOrderTestV1 Add Order Test - V1 - // Description: Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. + // Description: Order test endpoint: This endpoint’s request and return parameters are identical to the order endpoint, and can be used to verify whether the signature is correct, among other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. // Documentation: https://www.kucoin.com/docs-new/api-3470313 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | MARGIN | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | MARGIN | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ // Deprecated AddOrderTestV1(req *AddOrderTestV1Req, ctx context.Context) (*AddOrderTestV1Resp, error) } diff --git a/sdk/golang/pkg/generate/margin/order/api_order.template b/sdk/golang/pkg/generate/margin/order/api_order.template index e7d0da92..067a586a 100644 --- a/sdk/golang/pkg/generate/margin/order/api_order.template +++ b/sdk/golang/pkg/generate/margin/order/api_order.template @@ -214,7 +214,7 @@ func TestOrderGetOrderByOrderIdReq(t *testing.T) { // /api/v3/hf/margin/orders/{orderId} builder := order.NewGetOrderByOrderIdReqBuilder() - builder.SetSymbol(?).SetOrderId(?) + builder.SetOrderId(?).SetSymbol(?) req := builder.Build() resp, err := orderApi.GetOrderByOrderId(req, context.TODO()) @@ -237,7 +237,7 @@ func TestOrderGetOrderByClientOidReq(t *testing.T) { // /api/v3/hf/margin/orders/client-order/{clientOid} builder := order.NewGetOrderByClientOidReqBuilder() - builder.SetSymbol(?).SetClientOid(?) + builder.SetClientOid(?).SetSymbol(?) req := builder.Build() resp, err := orderApi.GetOrderByClientOid(req, context.TODO()) diff --git a/sdk/golang/pkg/generate/margin/order/api_order_test.go b/sdk/golang/pkg/generate/margin/order/api_order_test.go index 51e1856c..baebac6f 100644 --- a/sdk/golang/pkg/generate/margin/order/api_order_test.go +++ b/sdk/golang/pkg/generate/margin/order/api_order_test.go @@ -264,7 +264,7 @@ func TestOrderGetOrderByOrderIdReqModel(t *testing.T) { // Get Order By OrderId // /api/v3/hf/margin/orders/{orderId} - data := "{\"symbol\": \"BTC-USDT\", \"orderId\": \"671667306afcdb000723107f\"}" + data := "{\"orderId\": \"671667306afcdb000723107f\", \"symbol\": \"BTC-USDT\"}" req := &GetOrderByOrderIdReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() @@ -292,7 +292,7 @@ func TestOrderGetOrderByClientOidReqModel(t *testing.T) { // Get Order By ClientOid // /api/v3/hf/margin/orders/client-order/{clientOid} - data := "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e493fb\"}" + data := "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"symbol\": \"BTC-USDT\"}" req := &GetOrderByClientOidReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() diff --git a/sdk/golang/pkg/generate/margin/order/types_add_order_req.go b/sdk/golang/pkg/generate/margin/order/types_add_order_req.go index 02193b0d..749c3af0 100644 --- a/sdk/golang/pkg/generate/margin/order/types_add_order_req.go +++ b/sdk/golang/pkg/generate/margin/order/types_add_order_req.go @@ -4,19 +4,19 @@ package order // AddOrderReq struct for AddOrderReq type AddOrderReq struct { - // Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + // Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. ClientOid string `json:"clientOid,omitempty"` - // specify if the order is to 'buy' or 'sell' + // Specify if the order is to 'buy' or 'sell'. Side string `json:"side,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` - // specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + // Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. Type *string `json:"type,omitempty"` // [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC Stp *string `json:"stp,omitempty"` // Specify price for order When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. Price *string `json:"price,omitempty"` - // Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + // Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds Size *string `json:"size,omitempty"` // [Time in force](https://www.kucoin.com/docs-new/api-5176570) is a special strategy used during trading TimeInForce *string `json:"timeInForce,omitempty"` @@ -28,15 +28,15 @@ type AddOrderReq struct { Iceberg *bool `json:"iceberg,omitempty"` // Maximum visible quantity in iceberg orders VisibleSize *string `json:"visibleSize,omitempty"` - // Cancel after n seconds,the order timing strategy is GTT + // Cancel after n seconds, the order timing strategy is GTT CancelAfter *int64 `json:"cancelAfter,omitempty"` // When **type** is market, select one out of two: size or funds Funds *string `json:"funds,omitempty"` - // true - isolated margin ,false - cross margin. defult as false + // True - isolated margin; false - cross margin. Default is false IsIsolated *bool `json:"isIsolated,omitempty"` // When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. AutoBorrow *bool `json:"autoBorrow,omitempty"` - // AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + // AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. AutoRepay *bool `json:"autoRepay,omitempty"` } @@ -119,13 +119,13 @@ func NewAddOrderReqBuilder() *AddOrderReqBuilder { return &AddOrderReqBuilder{obj: NewAddOrderReqWithDefaults()} } -// Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. +// Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. func (builder *AddOrderReqBuilder) SetClientOid(value string) *AddOrderReqBuilder { builder.obj.ClientOid = value return builder } -// specify if the order is to 'buy' or 'sell' +// Specify if the order is to 'buy' or 'sell'. func (builder *AddOrderReqBuilder) SetSide(value string) *AddOrderReqBuilder { builder.obj.Side = value return builder @@ -137,7 +137,7 @@ func (builder *AddOrderReqBuilder) SetSymbol(value string) *AddOrderReqBuilder { return builder } -// specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. +// Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. func (builder *AddOrderReqBuilder) SetType(value string) *AddOrderReqBuilder { builder.obj.Type = &value return builder @@ -155,7 +155,7 @@ func (builder *AddOrderReqBuilder) SetPrice(value string) *AddOrderReqBuilder { return builder } -// Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds +// Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds func (builder *AddOrderReqBuilder) SetSize(value string) *AddOrderReqBuilder { builder.obj.Size = &value return builder @@ -191,7 +191,7 @@ func (builder *AddOrderReqBuilder) SetVisibleSize(value string) *AddOrderReqBuil return builder } -// Cancel after n seconds,the order timing strategy is GTT +// Cancel after n seconds, the order timing strategy is GTT func (builder *AddOrderReqBuilder) SetCancelAfter(value int64) *AddOrderReqBuilder { builder.obj.CancelAfter = &value return builder @@ -203,7 +203,7 @@ func (builder *AddOrderReqBuilder) SetFunds(value string) *AddOrderReqBuilder { return builder } -// true - isolated margin ,false - cross margin. defult as false +// True - isolated margin; false - cross margin. Default is false func (builder *AddOrderReqBuilder) SetIsIsolated(value bool) *AddOrderReqBuilder { builder.obj.IsIsolated = &value return builder @@ -215,7 +215,7 @@ func (builder *AddOrderReqBuilder) SetAutoBorrow(value bool) *AddOrderReqBuilder return builder } -// AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. +// AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. func (builder *AddOrderReqBuilder) SetAutoRepay(value bool) *AddOrderReqBuilder { builder.obj.AutoRepay = &value return builder diff --git a/sdk/golang/pkg/generate/margin/order/types_add_order_resp.go b/sdk/golang/pkg/generate/margin/order/types_add_order_resp.go index bd9860e3..11fd453b 100644 --- a/sdk/golang/pkg/generate/margin/order/types_add_order_resp.go +++ b/sdk/golang/pkg/generate/margin/order/types_add_order_resp.go @@ -10,13 +10,13 @@ import ( type AddOrderResp struct { // common response CommonResponse *types.RestResponse - // The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + // The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. OrderId string `json:"orderId,omitempty"` - // Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow. + // Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow. LoanApplyId string `json:"loanApplyId,omitempty"` // Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. BorrowSize string `json:"borrowSize,omitempty"` - // The user self-defined order id. + // The user self-defined order ID. ClientOid string `json:"clientOid,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/order/types_add_order_test_req.go b/sdk/golang/pkg/generate/margin/order/types_add_order_test_req.go index c00777a7..8fca7898 100644 --- a/sdk/golang/pkg/generate/margin/order/types_add_order_test_req.go +++ b/sdk/golang/pkg/generate/margin/order/types_add_order_test_req.go @@ -4,19 +4,19 @@ package order // AddOrderTestReq struct for AddOrderTestReq type AddOrderTestReq struct { - // Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + // Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. ClientOid string `json:"clientOid,omitempty"` - // specify if the order is to 'buy' or 'sell' + // Specify if the order is to 'buy' or 'sell'. Side string `json:"side,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` - // specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + // Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. Type *string `json:"type,omitempty"` // [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC Stp *string `json:"stp,omitempty"` // Specify price for order When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. Price *string `json:"price,omitempty"` - // Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + // Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds Size *string `json:"size,omitempty"` // [Time in force](https://www.kucoin.com/docs-new/api-5176570) is a special strategy used during trading TimeInForce *string `json:"timeInForce,omitempty"` @@ -28,15 +28,15 @@ type AddOrderTestReq struct { Iceberg *bool `json:"iceberg,omitempty"` // Maximum visible quantity in iceberg orders VisibleSize *string `json:"visibleSize,omitempty"` - // Cancel after n seconds,the order timing strategy is GTT + // Cancel after n seconds, the order timing strategy is GTT CancelAfter *int64 `json:"cancelAfter,omitempty"` // When **type** is market, select one out of two: size or funds Funds *string `json:"funds,omitempty"` - // true - isolated margin ,false - cross margin. defult as false + // True - isolated margin; false - cross margin. Default is false IsIsolated *bool `json:"isIsolated,omitempty"` // When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. AutoBorrow *bool `json:"autoBorrow,omitempty"` - // AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + // AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. AutoRepay *bool `json:"autoRepay,omitempty"` } @@ -119,13 +119,13 @@ func NewAddOrderTestReqBuilder() *AddOrderTestReqBuilder { return &AddOrderTestReqBuilder{obj: NewAddOrderTestReqWithDefaults()} } -// Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. +// Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. func (builder *AddOrderTestReqBuilder) SetClientOid(value string) *AddOrderTestReqBuilder { builder.obj.ClientOid = value return builder } -// specify if the order is to 'buy' or 'sell' +// Specify if the order is to 'buy' or 'sell'. func (builder *AddOrderTestReqBuilder) SetSide(value string) *AddOrderTestReqBuilder { builder.obj.Side = value return builder @@ -137,7 +137,7 @@ func (builder *AddOrderTestReqBuilder) SetSymbol(value string) *AddOrderTestReqB return builder } -// specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. +// Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. func (builder *AddOrderTestReqBuilder) SetType(value string) *AddOrderTestReqBuilder { builder.obj.Type = &value return builder @@ -155,7 +155,7 @@ func (builder *AddOrderTestReqBuilder) SetPrice(value string) *AddOrderTestReqBu return builder } -// Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds +// Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds func (builder *AddOrderTestReqBuilder) SetSize(value string) *AddOrderTestReqBuilder { builder.obj.Size = &value return builder @@ -191,7 +191,7 @@ func (builder *AddOrderTestReqBuilder) SetVisibleSize(value string) *AddOrderTes return builder } -// Cancel after n seconds,the order timing strategy is GTT +// Cancel after n seconds, the order timing strategy is GTT func (builder *AddOrderTestReqBuilder) SetCancelAfter(value int64) *AddOrderTestReqBuilder { builder.obj.CancelAfter = &value return builder @@ -203,7 +203,7 @@ func (builder *AddOrderTestReqBuilder) SetFunds(value string) *AddOrderTestReqBu return builder } -// true - isolated margin ,false - cross margin. defult as false +// True - isolated margin; false - cross margin. Default is false func (builder *AddOrderTestReqBuilder) SetIsIsolated(value bool) *AddOrderTestReqBuilder { builder.obj.IsIsolated = &value return builder @@ -215,7 +215,7 @@ func (builder *AddOrderTestReqBuilder) SetAutoBorrow(value bool) *AddOrderTestRe return builder } -// AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. +// AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. func (builder *AddOrderTestReqBuilder) SetAutoRepay(value bool) *AddOrderTestReqBuilder { builder.obj.AutoRepay = &value return builder diff --git a/sdk/golang/pkg/generate/margin/order/types_add_order_test_resp.go b/sdk/golang/pkg/generate/margin/order/types_add_order_test_resp.go index dd698abb..79d04510 100644 --- a/sdk/golang/pkg/generate/margin/order/types_add_order_test_resp.go +++ b/sdk/golang/pkg/generate/margin/order/types_add_order_test_resp.go @@ -10,13 +10,13 @@ import ( type AddOrderTestResp struct { // common response CommonResponse *types.RestResponse - // The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + // The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. OrderId string `json:"orderId,omitempty"` // Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. LoanApplyId string `json:"loanApplyId,omitempty"` // ID of the borrowing response. The field is returned only after placing the order under the mode of Auto-Borrow. BorrowSize float32 `json:"borrowSize,omitempty"` - // The user self-defined order id. + // The user self-defined order ID. ClientOid string `json:"clientOid,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/order/types_add_order_test_v1_req.go b/sdk/golang/pkg/generate/margin/order/types_add_order_test_v1_req.go index d19029be..83a97032 100644 --- a/sdk/golang/pkg/generate/margin/order/types_add_order_test_v1_req.go +++ b/sdk/golang/pkg/generate/margin/order/types_add_order_test_v1_req.go @@ -4,19 +4,19 @@ package order // AddOrderTestV1Req struct for AddOrderTestV1Req type AddOrderTestV1Req struct { - // Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + // Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. ClientOid string `json:"clientOid,omitempty"` - // specify if the order is to 'buy' or 'sell' + // Specify if the order is to 'buy' or 'sell'. Side string `json:"side,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` - // specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + // Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. Type *string `json:"type,omitempty"` // [Self Trade Prevention](https://www.kucoin.com/docs-new/api-5176570) is divided into four strategies: CN, CO, CB , and DC Stp *string `json:"stp,omitempty"` // Specify price for order When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. Price *string `json:"price,omitempty"` - // Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + // Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds Size *string `json:"size,omitempty"` // [Time in force](https://www.kucoin.com/docs-new/api-5176570) is a special strategy used during trading TimeInForce *string `json:"timeInForce,omitempty"` @@ -28,13 +28,13 @@ type AddOrderTestV1Req struct { Iceberg *bool `json:"iceberg,omitempty"` // Maximum visible quantity in iceberg orders VisibleSize *string `json:"visibleSize,omitempty"` - // Cancel after n seconds,the order timing strategy is GTT + // Cancel after n seconds, the order timing strategy is GTT CancelAfter *int64 `json:"cancelAfter,omitempty"` // When **type** is market, select one out of two: size or funds Funds *string `json:"funds,omitempty"` // When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. AutoBorrow *bool `json:"autoBorrow,omitempty"` - // AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + // AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. AutoRepay *bool `json:"autoRepay,omitempty"` // The type of trading, including cross (cross mode) and isolated (isolated mode). It is set at cross by default. MarginModel *string `json:"marginModel,omitempty"` @@ -119,13 +119,13 @@ func NewAddOrderTestV1ReqBuilder() *AddOrderTestV1ReqBuilder { return &AddOrderTestV1ReqBuilder{obj: NewAddOrderTestV1ReqWithDefaults()} } -// Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. +// Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. func (builder *AddOrderTestV1ReqBuilder) SetClientOid(value string) *AddOrderTestV1ReqBuilder { builder.obj.ClientOid = value return builder } -// specify if the order is to 'buy' or 'sell' +// Specify if the order is to 'buy' or 'sell'. func (builder *AddOrderTestV1ReqBuilder) SetSide(value string) *AddOrderTestV1ReqBuilder { builder.obj.Side = value return builder @@ -137,7 +137,7 @@ func (builder *AddOrderTestV1ReqBuilder) SetSymbol(value string) *AddOrderTestV1 return builder } -// specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. +// Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. func (builder *AddOrderTestV1ReqBuilder) SetType(value string) *AddOrderTestV1ReqBuilder { builder.obj.Type = &value return builder @@ -155,7 +155,7 @@ func (builder *AddOrderTestV1ReqBuilder) SetPrice(value string) *AddOrderTestV1R return builder } -// Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds +// Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds func (builder *AddOrderTestV1ReqBuilder) SetSize(value string) *AddOrderTestV1ReqBuilder { builder.obj.Size = &value return builder @@ -191,7 +191,7 @@ func (builder *AddOrderTestV1ReqBuilder) SetVisibleSize(value string) *AddOrderT return builder } -// Cancel after n seconds,the order timing strategy is GTT +// Cancel after n seconds, the order timing strategy is GTT func (builder *AddOrderTestV1ReqBuilder) SetCancelAfter(value int64) *AddOrderTestV1ReqBuilder { builder.obj.CancelAfter = &value return builder @@ -209,7 +209,7 @@ func (builder *AddOrderTestV1ReqBuilder) SetAutoBorrow(value bool) *AddOrderTest return builder } -// AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. +// AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. func (builder *AddOrderTestV1ReqBuilder) SetAutoRepay(value bool) *AddOrderTestV1ReqBuilder { builder.obj.AutoRepay = &value return builder diff --git a/sdk/golang/pkg/generate/margin/order/types_add_order_test_v1_resp.go b/sdk/golang/pkg/generate/margin/order/types_add_order_test_v1_resp.go index 68bd7150..3338ce11 100644 --- a/sdk/golang/pkg/generate/margin/order/types_add_order_test_v1_resp.go +++ b/sdk/golang/pkg/generate/margin/order/types_add_order_test_v1_resp.go @@ -10,9 +10,9 @@ import ( type AddOrderTestV1Resp struct { // common response CommonResponse *types.RestResponse - // The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + // The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. OrderId string `json:"orderId,omitempty"` - // Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow. + // Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow. LoanApplyId string `json:"loanApplyId,omitempty"` // Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. BorrowSize string `json:"borrowSize,omitempty"` diff --git a/sdk/golang/pkg/generate/margin/order/types_add_order_v1_req.go b/sdk/golang/pkg/generate/margin/order/types_add_order_v1_req.go index 63f7a4a2..d9cc1f51 100644 --- a/sdk/golang/pkg/generate/margin/order/types_add_order_v1_req.go +++ b/sdk/golang/pkg/generate/margin/order/types_add_order_v1_req.go @@ -4,19 +4,19 @@ package order // AddOrderV1Req struct for AddOrderV1Req type AddOrderV1Req struct { - // Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + // Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. ClientOid string `json:"clientOid,omitempty"` - // specify if the order is to 'buy' or 'sell' + // Specify if the order is to 'buy' or 'sell'. Side string `json:"side,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` - // specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + // Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. Type *string `json:"type,omitempty"` // [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC Stp *string `json:"stp,omitempty"` // Specify price for order When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. Price *string `json:"price,omitempty"` - // Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + // Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds Size *string `json:"size,omitempty"` // [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading TimeInForce *string `json:"timeInForce,omitempty"` @@ -28,13 +28,13 @@ type AddOrderV1Req struct { Iceberg *bool `json:"iceberg,omitempty"` // Maximum visible quantity in iceberg orders VisibleSize *string `json:"visibleSize,omitempty"` - // Cancel after n seconds,the order timing strategy is GTT + // Cancel after n seconds, the order timing strategy is GTT CancelAfter *int64 `json:"cancelAfter,omitempty"` // When **type** is market, select one out of two: size or funds Funds *string `json:"funds,omitempty"` // When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. AutoBorrow *bool `json:"autoBorrow,omitempty"` - // AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + // AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. AutoRepay *bool `json:"autoRepay,omitempty"` // The type of trading, including cross (cross mode) and isolated (isolated mode). It is set at cross by default. MarginModel *string `json:"marginModel,omitempty"` @@ -119,13 +119,13 @@ func NewAddOrderV1ReqBuilder() *AddOrderV1ReqBuilder { return &AddOrderV1ReqBuilder{obj: NewAddOrderV1ReqWithDefaults()} } -// Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. +// Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. func (builder *AddOrderV1ReqBuilder) SetClientOid(value string) *AddOrderV1ReqBuilder { builder.obj.ClientOid = value return builder } -// specify if the order is to 'buy' or 'sell' +// Specify if the order is to 'buy' or 'sell'. func (builder *AddOrderV1ReqBuilder) SetSide(value string) *AddOrderV1ReqBuilder { builder.obj.Side = value return builder @@ -137,7 +137,7 @@ func (builder *AddOrderV1ReqBuilder) SetSymbol(value string) *AddOrderV1ReqBuild return builder } -// specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. +// Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. func (builder *AddOrderV1ReqBuilder) SetType(value string) *AddOrderV1ReqBuilder { builder.obj.Type = &value return builder @@ -155,7 +155,7 @@ func (builder *AddOrderV1ReqBuilder) SetPrice(value string) *AddOrderV1ReqBuilde return builder } -// Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds +// Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds func (builder *AddOrderV1ReqBuilder) SetSize(value string) *AddOrderV1ReqBuilder { builder.obj.Size = &value return builder @@ -191,7 +191,7 @@ func (builder *AddOrderV1ReqBuilder) SetVisibleSize(value string) *AddOrderV1Req return builder } -// Cancel after n seconds,the order timing strategy is GTT +// Cancel after n seconds, the order timing strategy is GTT func (builder *AddOrderV1ReqBuilder) SetCancelAfter(value int64) *AddOrderV1ReqBuilder { builder.obj.CancelAfter = &value return builder @@ -209,7 +209,7 @@ func (builder *AddOrderV1ReqBuilder) SetAutoBorrow(value bool) *AddOrderV1ReqBui return builder } -// AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. +// AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. func (builder *AddOrderV1ReqBuilder) SetAutoRepay(value bool) *AddOrderV1ReqBuilder { builder.obj.AutoRepay = &value return builder diff --git a/sdk/golang/pkg/generate/margin/order/types_add_order_v1_resp.go b/sdk/golang/pkg/generate/margin/order/types_add_order_v1_resp.go index b1025aea..6a81bf38 100644 --- a/sdk/golang/pkg/generate/margin/order/types_add_order_v1_resp.go +++ b/sdk/golang/pkg/generate/margin/order/types_add_order_v1_resp.go @@ -10,9 +10,9 @@ import ( type AddOrderV1Resp struct { // common response CommonResponse *types.RestResponse - // The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + // The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. OrderId string `json:"orderId,omitempty"` - // Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow. + // Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow. LoanApplyId string `json:"loanApplyId,omitempty"` // Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. BorrowSize string `json:"borrowSize,omitempty"` diff --git a/sdk/golang/pkg/generate/margin/order/types_cancel_order_by_client_oid_req.go b/sdk/golang/pkg/generate/margin/order/types_cancel_order_by_client_oid_req.go index 2a6c5ece..473e5266 100644 --- a/sdk/golang/pkg/generate/margin/order/types_cancel_order_by_client_oid_req.go +++ b/sdk/golang/pkg/generate/margin/order/types_cancel_order_by_client_oid_req.go @@ -4,7 +4,7 @@ package order // CancelOrderByClientOidReq struct for CancelOrderByClientOidReq type CancelOrderByClientOidReq struct { - // Client Order Id,unique identifier created by the user + // Client Order Id, unique identifier created by the user ClientOid *string `json:"clientOid,omitempty" path:"clientOid" url:"-"` // symbol Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` @@ -39,7 +39,7 @@ func NewCancelOrderByClientOidReqBuilder() *CancelOrderByClientOidReqBuilder { return &CancelOrderByClientOidReqBuilder{obj: NewCancelOrderByClientOidReqWithDefaults()} } -// Client Order Id,unique identifier created by the user +// Client Order Id, unique identifier created by the user func (builder *CancelOrderByClientOidReqBuilder) SetClientOid(value string) *CancelOrderByClientOidReqBuilder { builder.obj.ClientOid = &value return builder diff --git a/sdk/golang/pkg/generate/margin/order/types_cancel_order_by_client_oid_resp.go b/sdk/golang/pkg/generate/margin/order/types_cancel_order_by_client_oid_resp.go index 45331847..bf2c6b66 100644 --- a/sdk/golang/pkg/generate/margin/order/types_cancel_order_by_client_oid_resp.go +++ b/sdk/golang/pkg/generate/margin/order/types_cancel_order_by_client_oid_resp.go @@ -10,7 +10,7 @@ import ( type CancelOrderByClientOidResp struct { // common response CommonResponse *types.RestResponse - // Client Order Id,unique identifier created by the user + // Client Order Id, unique identifier created by the user ClientOid string `json:"clientOid,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/order/types_cancel_order_by_order_id_resp.go b/sdk/golang/pkg/generate/margin/order/types_cancel_order_by_order_id_resp.go index 6f2b00f7..f087e902 100644 --- a/sdk/golang/pkg/generate/margin/order/types_cancel_order_by_order_id_resp.go +++ b/sdk/golang/pkg/generate/margin/order/types_cancel_order_by_order_id_resp.go @@ -10,7 +10,7 @@ import ( type CancelOrderByOrderIdResp struct { // common response CommonResponse *types.RestResponse - // order id + // Order id OrderId string `json:"orderId,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/order/types_get_closed_orders_items.go b/sdk/golang/pkg/generate/margin/order/types_get_closed_orders_items.go index aa346f4c..3f715532 100644 --- a/sdk/golang/pkg/generate/margin/order/types_get_closed_orders_items.go +++ b/sdk/golang/pkg/generate/margin/order/types_get_closed_orders_items.go @@ -9,13 +9,13 @@ type GetClosedOrdersItems struct { // symbol Symbol string `json:"symbol,omitempty"` OpType string `json:"opType,omitempty"` - // Specify if the order is an 'limit' order or 'market' order. + // Specify if the order is a 'limit' order or 'market' order. Type string `json:"type,omitempty"` // Buy or sell Side string `json:"side,omitempty"` - // Order price + // Order Price Price string `json:"price,omitempty"` - // Order size + // Order Size Size string `json:"size,omitempty"` // Order Funds Funds string `json:"funds,omitempty"` @@ -25,7 +25,7 @@ type GetClosedOrdersItems struct { DealFunds string `json:"dealFunds,omitempty"` // [Handling fees](https://www.kucoin.com/docs-new/api-5327739) Fee string `json:"fee,omitempty"` - // currency used to calculate trading fee + // Currency used to calculate trading fee FeeCurrency string `json:"feeCurrency,omitempty"` // [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC Stp *string `json:"stp,omitempty"` @@ -34,18 +34,18 @@ type GetClosedOrdersItems struct { StopPrice string `json:"stopPrice,omitempty"` // Time in force TimeInForce string `json:"timeInForce,omitempty"` - // Whether its a postOnly order. + // Whether it’s a postOnly order. PostOnly bool `json:"postOnly,omitempty"` - // Whether its a hidden order. + // Whether it’s a hidden order. Hidden bool `json:"hidden,omitempty"` - // Whether its a iceberg order. + // Whether it’s a iceberg order. Iceberg bool `json:"iceberg,omitempty"` // Visible size of iceberg order in order book. VisibleSize string `json:"visibleSize,omitempty"` // A GTT timeInForce that expires in n seconds CancelAfter int32 `json:"cancelAfter,omitempty"` Channel string `json:"channel,omitempty"` - // Client Order Id,unique identifier created by the user + // Client Order Id, unique identifier created by the user ClientOid string `json:"clientOid,omitempty"` // Order placement remarks Remark *string `json:"remark,omitempty"` @@ -57,7 +57,7 @@ type GetClosedOrdersItems struct { LastUpdatedAt int64 `json:"lastUpdatedAt,omitempty"` // Trade type, redundancy param TradeType string `json:"tradeType,omitempty"` - // Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook + // Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook InOrderBook bool `json:"inOrderBook,omitempty"` // Number of canceled transactions CancelledSize string `json:"cancelledSize,omitempty"` @@ -67,9 +67,9 @@ type GetClosedOrdersItems struct { RemainSize string `json:"remainSize,omitempty"` // Funds of remain transactions RemainFunds string `json:"remainFunds,omitempty"` - // Users in some regions need query this field + // Users in some regions have this field Tax string `json:"tax,omitempty"` - // Order status: true-The status of the order isactive; false-The status of the order is done + // Order status: true-The status of the order is active; false-The status of the order is done Active bool `json:"active,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/order/types_get_closed_orders_req.go b/sdk/golang/pkg/generate/margin/order/types_get_closed_orders_req.go index fabc5b91..35a7b785 100644 --- a/sdk/golang/pkg/generate/margin/order/types_get_closed_orders_req.go +++ b/sdk/golang/pkg/generate/margin/order/types_get_closed_orders_req.go @@ -8,17 +8,17 @@ type GetClosedOrdersReq struct { Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` // Transaction type: MARGIN_TRADE - cross margin trade, MARGIN_ISOLATED_TRADE - isolated margin trade TradeType *string `json:"tradeType,omitempty" url:"tradeType,omitempty"` - // specify if the order is to 'buy' or 'sell' + // Specify if the order is to 'buy' or 'sell'. Side *string `json:"side,omitempty" url:"side,omitempty"` - // specify if the order is an 'limit' order or 'market' order. + // Specify if the order is a 'limit' order or 'market' order. Type *string `json:"type,omitempty" url:"type,omitempty"` - // The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + // The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. LastId *int64 `json:"lastId,omitempty" url:"lastId,omitempty"` - // Default20,Max100 + // Default20, Max100 Limit *int32 `json:"limit,omitempty" url:"limit,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` } @@ -73,37 +73,37 @@ func (builder *GetClosedOrdersReqBuilder) SetTradeType(value string) *GetClosedO return builder } -// specify if the order is to 'buy' or 'sell' +// Specify if the order is to 'buy' or 'sell'. func (builder *GetClosedOrdersReqBuilder) SetSide(value string) *GetClosedOrdersReqBuilder { builder.obj.Side = &value return builder } -// specify if the order is an 'limit' order or 'market' order. +// Specify if the order is a 'limit' order or 'market' order. func (builder *GetClosedOrdersReqBuilder) SetType(value string) *GetClosedOrdersReqBuilder { builder.obj.Type = &value return builder } -// The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. +// The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. func (builder *GetClosedOrdersReqBuilder) SetLastId(value int64) *GetClosedOrdersReqBuilder { builder.obj.LastId = &value return builder } -// Default20,Max100 +// Default20, Max100 func (builder *GetClosedOrdersReqBuilder) SetLimit(value int32) *GetClosedOrdersReqBuilder { builder.obj.Limit = &value return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetClosedOrdersReqBuilder) SetStartAt(value int64) *GetClosedOrdersReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetClosedOrdersReqBuilder) SetEndAt(value int64) *GetClosedOrdersReqBuilder { builder.obj.EndAt = &value return builder diff --git a/sdk/golang/pkg/generate/margin/order/types_get_closed_orders_resp.go b/sdk/golang/pkg/generate/margin/order/types_get_closed_orders_resp.go index 020d7c43..b925f181 100644 --- a/sdk/golang/pkg/generate/margin/order/types_get_closed_orders_resp.go +++ b/sdk/golang/pkg/generate/margin/order/types_get_closed_orders_resp.go @@ -10,7 +10,7 @@ import ( type GetClosedOrdersResp struct { // common response CommonResponse *types.RestResponse - // The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + // The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. LastId int64 `json:"lastId,omitempty"` Items []GetClosedOrdersItems `json:"items,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/order/types_get_open_orders_data.go b/sdk/golang/pkg/generate/margin/order/types_get_open_orders_data.go index 2102679a..a80888d9 100644 --- a/sdk/golang/pkg/generate/margin/order/types_get_open_orders_data.go +++ b/sdk/golang/pkg/generate/margin/order/types_get_open_orders_data.go @@ -9,13 +9,13 @@ type GetOpenOrdersData struct { // symbol Symbol string `json:"symbol,omitempty"` OpType string `json:"opType,omitempty"` - // Specify if the order is an 'limit' order or 'market' order. + // Specify if the order is a 'limit' order or 'market' order. Type string `json:"type,omitempty"` // Buy or sell Side string `json:"side,omitempty"` - // Order price + // Order Price Price string `json:"price,omitempty"` - // Order size + // Order Size Size string `json:"size,omitempty"` // Order Funds Funds string `json:"funds,omitempty"` @@ -23,9 +23,9 @@ type GetOpenOrdersData struct { DealSize string `json:"dealSize,omitempty"` // Funds of filled transactions DealFunds string `json:"dealFunds,omitempty"` - // trading fee + // Trading fee Fee string `json:"fee,omitempty"` - // currency used to calculate trading fee + // Currency used to calculate trading fee FeeCurrency string `json:"feeCurrency,omitempty"` // [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC Stp *string `json:"stp,omitempty"` @@ -34,18 +34,18 @@ type GetOpenOrdersData struct { StopPrice string `json:"stopPrice,omitempty"` // Time in force TimeInForce string `json:"timeInForce,omitempty"` - // Whether its a postOnly order. + // Whether it’s a postOnly order. PostOnly bool `json:"postOnly,omitempty"` - // Whether its a hidden order. + // Whether it’s a hidden order. Hidden bool `json:"hidden,omitempty"` - // Whether its a iceberg order. + // Whether it’s a iceberg order. Iceberg bool `json:"iceberg,omitempty"` // Visible size of iceberg order in order book. VisibleSize string `json:"visibleSize,omitempty"` // A GTT timeInForce that expires in n seconds CancelAfter int32 `json:"cancelAfter,omitempty"` Channel string `json:"channel,omitempty"` - // Client Order Id,unique identifier created by the user + // Client Order Id, unique identifier created by the user ClientOid string `json:"clientOid,omitempty"` // Order placement remarks Remark *string `json:"remark,omitempty"` @@ -57,7 +57,7 @@ type GetOpenOrdersData struct { LastUpdatedAt int64 `json:"lastUpdatedAt,omitempty"` // Trade type, redundancy param TradeType string `json:"tradeType,omitempty"` - // Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook + // Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook InOrderBook bool `json:"inOrderBook,omitempty"` // Number of canceled transactions CancelledSize string `json:"cancelledSize,omitempty"` @@ -67,9 +67,9 @@ type GetOpenOrdersData struct { RemainSize string `json:"remainSize,omitempty"` // Funds of remain transactions RemainFunds string `json:"remainFunds,omitempty"` - // Users in some regions need query this field + // Users in some regions have this field Tax string `json:"tax,omitempty"` - // Order status: true-The status of the order isactive; false-The status of the order is done + // Order status: true-The status of the order is active; false-The status of the order is done Active bool `json:"active,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/order/types_get_order_by_client_oid_req.go b/sdk/golang/pkg/generate/margin/order/types_get_order_by_client_oid_req.go index 4ee43713..93447959 100644 --- a/sdk/golang/pkg/generate/margin/order/types_get_order_by_client_oid_req.go +++ b/sdk/golang/pkg/generate/margin/order/types_get_order_by_client_oid_req.go @@ -4,10 +4,10 @@ package order // GetOrderByClientOidReq struct for GetOrderByClientOidReq type GetOrderByClientOidReq struct { + // Client Order Id, unique identifier created by the user + ClientOid *string `json:"clientOid,omitempty" path:"clientOid" url:"-"` // symbol Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` - // Client Order Id,unique identifier created by the user - ClientOid *string `json:"clientOid,omitempty" path:"clientOid" url:"-"` } // NewGetOrderByClientOidReq instantiates a new GetOrderByClientOidReq object @@ -26,8 +26,8 @@ func NewGetOrderByClientOidReqWithDefaults() *GetOrderByClientOidReq { func (o *GetOrderByClientOidReq) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} - toSerialize["symbol"] = o.Symbol toSerialize["clientOid"] = o.ClientOid + toSerialize["symbol"] = o.Symbol return toSerialize } @@ -39,15 +39,15 @@ func NewGetOrderByClientOidReqBuilder() *GetOrderByClientOidReqBuilder { return &GetOrderByClientOidReqBuilder{obj: NewGetOrderByClientOidReqWithDefaults()} } -// symbol -func (builder *GetOrderByClientOidReqBuilder) SetSymbol(value string) *GetOrderByClientOidReqBuilder { - builder.obj.Symbol = &value +// Client Order Id, unique identifier created by the user +func (builder *GetOrderByClientOidReqBuilder) SetClientOid(value string) *GetOrderByClientOidReqBuilder { + builder.obj.ClientOid = &value return builder } -// Client Order Id,unique identifier created by the user -func (builder *GetOrderByClientOidReqBuilder) SetClientOid(value string) *GetOrderByClientOidReqBuilder { - builder.obj.ClientOid = &value +// symbol +func (builder *GetOrderByClientOidReqBuilder) SetSymbol(value string) *GetOrderByClientOidReqBuilder { + builder.obj.Symbol = &value return builder } diff --git a/sdk/golang/pkg/generate/margin/order/types_get_order_by_client_oid_resp.go b/sdk/golang/pkg/generate/margin/order/types_get_order_by_client_oid_resp.go index ecbc571f..afd8502b 100644 --- a/sdk/golang/pkg/generate/margin/order/types_get_order_by_client_oid_resp.go +++ b/sdk/golang/pkg/generate/margin/order/types_get_order_by_client_oid_resp.go @@ -15,13 +15,13 @@ type GetOrderByClientOidResp struct { // symbol Symbol string `json:"symbol,omitempty"` OpType string `json:"opType,omitempty"` - // Specify if the order is an 'limit' order or 'market' order. + // Specify if the order is a 'limit' order or 'market' order. Type string `json:"type,omitempty"` // Buy or sell Side string `json:"side,omitempty"` - // Order price + // Order Price Price string `json:"price,omitempty"` - // Order size + // Order Size Size string `json:"size,omitempty"` // Order Funds Funds string `json:"funds,omitempty"` @@ -31,7 +31,7 @@ type GetOrderByClientOidResp struct { DealFunds string `json:"dealFunds,omitempty"` // [Handling fees](https://www.kucoin.com/docs-new/api-5327739) Fee string `json:"fee,omitempty"` - // currency used to calculate trading fee + // Currency used to calculate trading fee FeeCurrency string `json:"feeCurrency,omitempty"` // [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC Stp *string `json:"stp,omitempty"` @@ -40,18 +40,18 @@ type GetOrderByClientOidResp struct { StopPrice string `json:"stopPrice,omitempty"` // Time in force TimeInForce string `json:"timeInForce,omitempty"` - // Whether its a postOnly order. + // Whether it’s a postOnly order. PostOnly bool `json:"postOnly,omitempty"` - // Whether its a hidden order. + // Whether it’s a hidden order. Hidden bool `json:"hidden,omitempty"` - // Whether its a iceberg order. + // Whether it’s a iceberg order. Iceberg bool `json:"iceberg,omitempty"` // Visible size of iceberg order in order book. VisibleSize string `json:"visibleSize,omitempty"` // A GTT timeInForce that expires in n seconds CancelAfter int32 `json:"cancelAfter,omitempty"` Channel string `json:"channel,omitempty"` - // Client Order Id,unique identifier created by the user + // Client Order Id, unique identifier created by the user ClientOid string `json:"clientOid,omitempty"` // Order placement remarks Remark *string `json:"remark,omitempty"` @@ -63,7 +63,7 @@ type GetOrderByClientOidResp struct { LastUpdatedAt int64 `json:"lastUpdatedAt,omitempty"` // Trade type, redundancy param TradeType string `json:"tradeType,omitempty"` - // Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook + // Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook InOrderBook bool `json:"inOrderBook,omitempty"` // Number of canceled transactions CancelledSize string `json:"cancelledSize,omitempty"` @@ -73,9 +73,9 @@ type GetOrderByClientOidResp struct { RemainSize string `json:"remainSize,omitempty"` // Funds of remain transactions RemainFunds string `json:"remainFunds,omitempty"` - // Users in some regions need query this field + // Users in some regions have this field Tax string `json:"tax,omitempty"` - // Order status: true-The status of the order isactive; false-The status of the order is done + // Order status: true-The status of the order is active; false-The status of the order is done Active bool `json:"active,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/order/types_get_order_by_order_id_req.go b/sdk/golang/pkg/generate/margin/order/types_get_order_by_order_id_req.go index b4b1adb9..e5846476 100644 --- a/sdk/golang/pkg/generate/margin/order/types_get_order_by_order_id_req.go +++ b/sdk/golang/pkg/generate/margin/order/types_get_order_by_order_id_req.go @@ -4,10 +4,10 @@ package order // GetOrderByOrderIdReq struct for GetOrderByOrderIdReq type GetOrderByOrderIdReq struct { - // symbol - Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` // The unique order id generated by the trading system OrderId *string `json:"orderId,omitempty" path:"orderId" url:"-"` + // symbol + Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` } // NewGetOrderByOrderIdReq instantiates a new GetOrderByOrderIdReq object @@ -26,8 +26,8 @@ func NewGetOrderByOrderIdReqWithDefaults() *GetOrderByOrderIdReq { func (o *GetOrderByOrderIdReq) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} - toSerialize["symbol"] = o.Symbol toSerialize["orderId"] = o.OrderId + toSerialize["symbol"] = o.Symbol return toSerialize } @@ -39,18 +39,18 @@ func NewGetOrderByOrderIdReqBuilder() *GetOrderByOrderIdReqBuilder { return &GetOrderByOrderIdReqBuilder{obj: NewGetOrderByOrderIdReqWithDefaults()} } -// symbol -func (builder *GetOrderByOrderIdReqBuilder) SetSymbol(value string) *GetOrderByOrderIdReqBuilder { - builder.obj.Symbol = &value - return builder -} - // The unique order id generated by the trading system func (builder *GetOrderByOrderIdReqBuilder) SetOrderId(value string) *GetOrderByOrderIdReqBuilder { builder.obj.OrderId = &value return builder } +// symbol +func (builder *GetOrderByOrderIdReqBuilder) SetSymbol(value string) *GetOrderByOrderIdReqBuilder { + builder.obj.Symbol = &value + return builder +} + func (builder *GetOrderByOrderIdReqBuilder) Build() *GetOrderByOrderIdReq { return builder.obj } diff --git a/sdk/golang/pkg/generate/margin/order/types_get_order_by_order_id_resp.go b/sdk/golang/pkg/generate/margin/order/types_get_order_by_order_id_resp.go index 97bec085..d2720ba7 100644 --- a/sdk/golang/pkg/generate/margin/order/types_get_order_by_order_id_resp.go +++ b/sdk/golang/pkg/generate/margin/order/types_get_order_by_order_id_resp.go @@ -15,13 +15,13 @@ type GetOrderByOrderIdResp struct { // symbol Symbol string `json:"symbol,omitempty"` OpType string `json:"opType,omitempty"` - // Specify if the order is an 'limit' order or 'market' order. + // Specify if the order is a 'limit' order or 'market' order. Type string `json:"type,omitempty"` // Buy or sell Side string `json:"side,omitempty"` - // Order price + // Order Price Price string `json:"price,omitempty"` - // Order size + // Order Size Size string `json:"size,omitempty"` // Order Funds Funds string `json:"funds,omitempty"` @@ -31,7 +31,7 @@ type GetOrderByOrderIdResp struct { DealFunds string `json:"dealFunds,omitempty"` // [Handling fees](https://www.kucoin.com/docs-new/api-5327739) Fee string `json:"fee,omitempty"` - // currency used to calculate trading fee + // Currency used to calculate trading fee FeeCurrency string `json:"feeCurrency,omitempty"` // [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC Stp *string `json:"stp,omitempty"` @@ -40,18 +40,18 @@ type GetOrderByOrderIdResp struct { StopPrice string `json:"stopPrice,omitempty"` // Time in force TimeInForce string `json:"timeInForce,omitempty"` - // Whether its a postOnly order. + // Whether it’s a postOnly order. PostOnly bool `json:"postOnly,omitempty"` - // Whether its a hidden order. + // Whether it’s a hidden order. Hidden bool `json:"hidden,omitempty"` - // Whether its a iceberg order. + // Whether it’s a iceberg order. Iceberg bool `json:"iceberg,omitempty"` // Visible size of iceberg order in order book. VisibleSize string `json:"visibleSize,omitempty"` // A GTT timeInForce that expires in n seconds CancelAfter int32 `json:"cancelAfter,omitempty"` Channel string `json:"channel,omitempty"` - // Client Order Id,unique identifier created by the user + // Client Order Id, unique identifier created by the user ClientOid string `json:"clientOid,omitempty"` // Order placement remarks Remark string `json:"remark,omitempty"` @@ -63,7 +63,7 @@ type GetOrderByOrderIdResp struct { LastUpdatedAt int64 `json:"lastUpdatedAt,omitempty"` // Trade type, redundancy param TradeType string `json:"tradeType,omitempty"` - // Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook + // Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook InOrderBook bool `json:"inOrderBook,omitempty"` // Number of canceled transactions CancelledSize string `json:"cancelledSize,omitempty"` @@ -73,9 +73,9 @@ type GetOrderByOrderIdResp struct { RemainSize string `json:"remainSize,omitempty"` // Funds of remain transactions RemainFunds string `json:"remainFunds,omitempty"` - // Users in some regions need query this field + // Users in some regions have this field Tax string `json:"tax,omitempty"` - // Order status: true-The status of the order isactive; false-The status of the order is done + // Order status: true-The status of the order is active; false-The status of the order is done Active bool `json:"active,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/order/types_get_trade_history_items.go b/sdk/golang/pkg/generate/margin/order/types_get_trade_history_items.go index 70484ac9..ad24434a 100644 --- a/sdk/golang/pkg/generate/margin/order/types_get_trade_history_items.go +++ b/sdk/golang/pkg/generate/margin/order/types_get_trade_history_items.go @@ -4,24 +4,24 @@ package order // GetTradeHistoryItems struct for GetTradeHistoryItems type GetTradeHistoryItems struct { - // Id of transaction detail + // ID of transaction detail Id int64 `json:"id,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` - // Trade Id, symbol latitude increment + // Trade ID, symbol latitude increment TradeId int64 `json:"tradeId,omitempty"` // The unique order id generated by the trading system OrderId string `json:"orderId,omitempty"` - // Counterparty order Id + // Counterparty order ID CounterOrderId string `json:"counterOrderId,omitempty"` // Buy or sell Side string `json:"side,omitempty"` // Liquidity type: taker or maker Liquidity string `json:"liquidity,omitempty"` ForceTaker bool `json:"forceTaker,omitempty"` - // Order price + // Order Price Price string `json:"price,omitempty"` - // Order size + // Order Size Size string `json:"size,omitempty"` // Order Funds Funds string `json:"funds,omitempty"` @@ -29,17 +29,17 @@ type GetTradeHistoryItems struct { Fee string `json:"fee,omitempty"` // Fee rate FeeRate string `json:"feeRate,omitempty"` - // currency used to calculate trading fee + // Currency used to calculate trading fee FeeCurrency string `json:"feeCurrency,omitempty"` // Take Profit and Stop Loss type, currently HFT does not support the Take Profit and Stop Loss type, so it is empty Stop string `json:"stop,omitempty"` // Trade type, redundancy param TradeType string `json:"tradeType,omitempty"` - // Users in some regions need query this field + // Users in some regions have this field Tax string `json:"tax,omitempty"` - // Tax Rate, Users in some regions need query this field + // Tax Rate: Users in some regions must query this field TaxRate string `json:"taxRate,omitempty"` - // Specify if the order is an 'limit' order or 'market' order. + // Specify if the order is a 'limit' order or 'market' order. Type string `json:"type,omitempty"` CreatedAt int64 `json:"createdAt,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/order/types_get_trade_history_req.go b/sdk/golang/pkg/generate/margin/order/types_get_trade_history_req.go index c71d866f..4f9f08c5 100644 --- a/sdk/golang/pkg/generate/margin/order/types_get_trade_history_req.go +++ b/sdk/golang/pkg/generate/margin/order/types_get_trade_history_req.go @@ -8,19 +8,19 @@ type GetTradeHistoryReq struct { Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` // Trade type: MARGIN_TRADE - cross margin trade, MARGIN_ISOLATED_TRADE - isolated margin trade TradeType *string `json:"tradeType,omitempty" url:"tradeType,omitempty"` - // The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters) + // The unique order id generated by the trading system (If orderId is specified, please ignore the other query parameters) OrderId *string `json:"orderId,omitempty" url:"orderId,omitempty"` - // specify if the order is to 'buy' or 'sell' + // Specify if the order is to 'buy' or 'sell'. Side *string `json:"side,omitempty" url:"side,omitempty"` - // specify if the order is an 'limit' order or 'market' order. + // Specify if the order is a 'limit' order or 'market' order. Type *string `json:"type,omitempty" url:"type,omitempty"` - // The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + // The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. LastId *int64 `json:"lastId,omitempty" url:"lastId,omitempty"` - // Default100,Max200 + // Default20, Max100 Limit *int32 `json:"limit,omitempty" url:"limit,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` } @@ -76,43 +76,43 @@ func (builder *GetTradeHistoryReqBuilder) SetTradeType(value string) *GetTradeHi return builder } -// The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters) +// The unique order id generated by the trading system (If orderId is specified, please ignore the other query parameters) func (builder *GetTradeHistoryReqBuilder) SetOrderId(value string) *GetTradeHistoryReqBuilder { builder.obj.OrderId = &value return builder } -// specify if the order is to 'buy' or 'sell' +// Specify if the order is to 'buy' or 'sell'. func (builder *GetTradeHistoryReqBuilder) SetSide(value string) *GetTradeHistoryReqBuilder { builder.obj.Side = &value return builder } -// specify if the order is an 'limit' order or 'market' order. +// Specify if the order is a 'limit' order or 'market' order. func (builder *GetTradeHistoryReqBuilder) SetType(value string) *GetTradeHistoryReqBuilder { builder.obj.Type = &value return builder } -// The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. +// The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. func (builder *GetTradeHistoryReqBuilder) SetLastId(value int64) *GetTradeHistoryReqBuilder { builder.obj.LastId = &value return builder } -// Default100,Max200 +// Default20, Max100 func (builder *GetTradeHistoryReqBuilder) SetLimit(value int32) *GetTradeHistoryReqBuilder { builder.obj.Limit = &value return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetTradeHistoryReqBuilder) SetStartAt(value int64) *GetTradeHistoryReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetTradeHistoryReqBuilder) SetEndAt(value int64) *GetTradeHistoryReqBuilder { builder.obj.EndAt = &value return builder diff --git a/sdk/golang/pkg/generate/margin/order/types_get_trade_history_resp.go b/sdk/golang/pkg/generate/margin/order/types_get_trade_history_resp.go index 4c8d9623..baae9c21 100644 --- a/sdk/golang/pkg/generate/margin/order/types_get_trade_history_resp.go +++ b/sdk/golang/pkg/generate/margin/order/types_get_trade_history_resp.go @@ -11,7 +11,7 @@ type GetTradeHistoryResp struct { // common response CommonResponse *types.RestResponse Items []GetTradeHistoryItems `json:"items,omitempty"` - // The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + // The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. LastId int64 `json:"lastId,omitempty"` } diff --git a/sdk/golang/pkg/generate/margin/risklimit/api_risk_limit.go b/sdk/golang/pkg/generate/margin/risklimit/api_risk_limit.go index ad024618..6b86c973 100644 --- a/sdk/golang/pkg/generate/margin/risklimit/api_risk_limit.go +++ b/sdk/golang/pkg/generate/margin/risklimit/api_risk_limit.go @@ -10,17 +10,17 @@ import ( type RiskLimitAPI interface { // GetMarginRiskLimit Get Margin Risk Limit - // Description: Request via this endpoint to get the Configure and Risk limit info of the margin. + // Description: Request Configure and Risk limit info of the margin via this endpoint. // Documentation: https://www.kucoin.com/docs-new/api-3470219 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 20 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+---------+ GetMarginRiskLimit(req *GetMarginRiskLimitReq, ctx context.Context) (*GetMarginRiskLimitResp, error) } diff --git a/sdk/golang/pkg/generate/margin/risklimit/types_get_margin_risk_limit_data.go b/sdk/golang/pkg/generate/margin/risklimit/types_get_margin_risk_limit_data.go index 5289996d..8734b3a4 100644 --- a/sdk/golang/pkg/generate/margin/risklimit/types_get_margin_risk_limit_data.go +++ b/sdk/golang/pkg/generate/margin/risklimit/types_get_margin_risk_limit_data.go @@ -18,11 +18,11 @@ type GetMarginRiskLimitData struct { BorrowCoefficient *string `json:"borrowCoefficient,omitempty"` // CROSS MARGIN RESPONSES, [Margin Coefficient](https://www.kucoin.com/land/price-protect) MarginCoefficient *string `json:"marginCoefficient,omitempty"` - // CROSS MARGIN RESPONSES, Currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 + // CROSS MARGIN RESPONSES, Currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 Precision *int32 `json:"precision,omitempty"` // CROSS MARGIN RESPONSES, Minimum personal borrow amount BorrowMinAmount *string `json:"borrowMinAmount,omitempty"` - // CROSS MARGIN RESPONSES, Minimum unit for borrowing, the borrowed amount must be an integer multiple of this value + // CROSS MARGIN RESPONSES, Minimum unit for borrowing; the borrowed amount must be an integer multiple of this value BorrowMinUnit *string `json:"borrowMinUnit,omitempty"` // CROSS MARGIN RESPONSES, Whether to support borrowing BorrowEnabled *bool `json:"borrowEnabled,omitempty"` @@ -40,9 +40,9 @@ type GetMarginRiskLimitData struct { BaseMaxHoldAmount *string `json:"baseMaxHoldAmount,omitempty"` // ISOLATED MARGIN RESPONSES, Quote maximum holding amount QuoteMaxHoldAmount *string `json:"quoteMaxHoldAmount,omitempty"` - // ISOLATED MARGIN RESPONSES, Base currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 + // ISOLATED MARGIN RESPONSES, Base currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 BasePrecision *int32 `json:"basePrecision,omitempty"` - // ISOLATED MARGIN RESPONSES, Quote currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 + // ISOLATED MARGIN RESPONSES, Quote currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 QuotePrecision *int32 `json:"quotePrecision,omitempty"` // ISOLATED MARGIN RESPONSES, Base minimum personal borrow amount BaseBorrowMinAmount *string `json:"baseBorrowMinAmount,omitempty"` diff --git a/sdk/golang/pkg/generate/margin/risklimit/types_get_margin_risk_limit_req.go b/sdk/golang/pkg/generate/margin/risklimit/types_get_margin_risk_limit_req.go index dd04afd4..1f97de64 100644 --- a/sdk/golang/pkg/generate/margin/risklimit/types_get_margin_risk_limit_req.go +++ b/sdk/golang/pkg/generate/margin/risklimit/types_get_margin_risk_limit_req.go @@ -4,11 +4,11 @@ package risklimit // GetMarginRiskLimitReq struct for GetMarginRiskLimitReq type GetMarginRiskLimitReq struct { - // true-isolated, false-cross + // True-isolated, false-cross IsIsolated *bool `json:"isIsolated,omitempty" url:"isIsolated,omitempty"` - // currency, This field is only required for cross margin + // Currency: This field is only required for cross margin Currency *string `json:"currency,omitempty" url:"currency,omitempty"` - // symbol, This field is only required for isolated margin + // Symbol: This field is only required for isolated margin Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` } @@ -42,19 +42,19 @@ func NewGetMarginRiskLimitReqBuilder() *GetMarginRiskLimitReqBuilder { return &GetMarginRiskLimitReqBuilder{obj: NewGetMarginRiskLimitReqWithDefaults()} } -// true-isolated, false-cross +// True-isolated, false-cross func (builder *GetMarginRiskLimitReqBuilder) SetIsIsolated(value bool) *GetMarginRiskLimitReqBuilder { builder.obj.IsIsolated = &value return builder } -// currency, This field is only required for cross margin +// Currency: This field is only required for cross margin func (builder *GetMarginRiskLimitReqBuilder) SetCurrency(value string) *GetMarginRiskLimitReqBuilder { builder.obj.Currency = &value return builder } -// symbol, This field is only required for isolated margin +// Symbol: This field is only required for isolated margin func (builder *GetMarginRiskLimitReqBuilder) SetSymbol(value string) *GetMarginRiskLimitReqBuilder { builder.obj.Symbol = &value return builder diff --git a/sdk/golang/pkg/generate/spot/market/api_market.go b/sdk/golang/pkg/generate/spot/market/api_market.go index 22cfddb0..c478d131 100644 --- a/sdk/golang/pkg/generate/spot/market/api_market.go +++ b/sdk/golang/pkg/generate/spot/market/api_market.go @@ -12,253 +12,295 @@ type MarketAPI interface { // GetAnnouncements Get Announcements // Description: This interface can obtain the latest news announcements, and the default page search is for announcements within a month. // Documentation: https://www.kucoin.com/docs-new/api-3470157 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 20 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+--------+ GetAnnouncements(req *GetAnnouncementsReq, ctx context.Context) (*GetAnnouncementsResp, error) // GetCurrency Get Currency - // Description: Request via this endpoint to get the currency details of a specified currency + // Description: Request the currency details of a specified currency via this endpoint. // Documentation: https://www.kucoin.com/docs-new/api-3470155 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+--------+ GetCurrency(req *GetCurrencyReq, ctx context.Context) (*GetCurrencyResp, error) // GetAllCurrencies Get All Currencies - // Description: Request via this endpoint to get the currency list.Not all currencies currently can be used for trading. + // Description: Request a currency list via this endpoint. Not all currencies can currently be used for trading. // Documentation: https://www.kucoin.com/docs-new/api-3470152 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+--------+ GetAllCurrencies(ctx context.Context) (*GetAllCurrenciesResp, error) // GetSymbol Get Symbol // Description: Request via this endpoint to get detail currency pairs for trading. If you want to get the market information of the trading symbol, please use Get All Tickers. // Documentation: https://www.kucoin.com/docs-new/api-3470159 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 4 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 4 | + // +-----------------------+--------+ GetSymbol(req *GetSymbolReq, ctx context.Context) (*GetSymbolResp, error) // GetAllSymbols Get All Symbols - // Description: Request via this endpoint to get a list of available currency pairs for trading. If you want to get the market information of the trading symbol, please use Get All Tickers. + // Description: Request a list of available currency pairs for trading via this endpoint. If you want to get the market information of the trading symbol, please use Get All Tickers. // Documentation: https://www.kucoin.com/docs-new/api-3470154 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 4 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 4 | + // +-----------------------+--------+ GetAllSymbols(req *GetAllSymbolsReq, ctx context.Context) (*GetAllSymbolsResp, error) // GetTicker Get Ticker // Description: Request via this endpoint to get Level 1 Market Data. The returned value includes the best bid price and size, the best ask price and size as well as the last traded price and the last traded size. // Documentation: https://www.kucoin.com/docs-new/api-3470160 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 2 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+--------+ GetTicker(req *GetTickerReq, ctx context.Context) (*GetTickerResp, error) // GetAllTickers Get All Tickers - // Description: Request market tickers for all the trading pairs in the market (including 24h volume), takes a snapshot every 2 seconds. On the rare occasion that we will change the currency name, if you still want the changed symbol name, you can use the symbolName field instead of the symbol field via “Get all tickers” endpoint. + // Description: Request market tickers for all the trading pairs in the market (including 24h volume); takes a snapshot every 2 seconds. On the rare occasion that we change the currency name, if you still want the changed symbol name, you can use the symbolName field instead of the symbol field via “Get all tickers” endpoint. // Documentation: https://www.kucoin.com/docs-new/api-3470167 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 15 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 15 | + // +-----------------------+--------+ GetAllTickers(ctx context.Context) (*GetAllTickersResp, error) // GetTradeHistory Get Trade History // Description: Request via this endpoint to get the trade history of the specified symbol, the returned quantity is the last 100 transaction records. // Documentation: https://www.kucoin.com/docs-new/api-3470162 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+--------+ GetTradeHistory(req *GetTradeHistoryReq, ctx context.Context) (*GetTradeHistoryResp, error) // GetKlines Get Klines // Description: Get the Kline of the symbol. Data are returned in grouped buckets based on requested type. For each query, the system would return at most 1500 pieces of data. To obtain more data, please page the data by time. // Documentation: https://www.kucoin.com/docs-new/api-3470163 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+--------+ GetKlines(req *GetKlinesReq, ctx context.Context) (*GetKlinesResp, error) // GetPartOrderBook Get Part OrderBook // Description: Query for part orderbook depth data. (aggregated by price) You are recommended to request via this endpoint as the system reponse would be faster and cosume less traffic. // Documentation: https://www.kucoin.com/docs-new/api-3470165 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 2 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+--------+ GetPartOrderBook(req *GetPartOrderBookReq, ctx context.Context) (*GetPartOrderBookResp, error) // GetFullOrderBook Get Full OrderBook // 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 up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook. // Documentation: https://www.kucoin.com/docs-new/api-3470164 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ GetFullOrderBook(req *GetFullOrderBookReq, ctx context.Context) (*GetFullOrderBookResp, error) + // GetCallAuctionPartOrderBook Get Call Auction Part OrderBook + // Description: Query for call auction 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. + // Documentation: https://www.kucoin.com/docs-new/api-3471564 + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+--------+ + GetCallAuctionPartOrderBook(req *GetCallAuctionPartOrderBookReq, ctx context.Context) (*GetCallAuctionPartOrderBookResp, error) + + // GetCallAuctionInfo Get Call Auction Info + // Description: Get call auction data. This interface will return the following information for the specified symbol during the call auction phase: estimated transaction price, estimated transaction quantity, bid price range, and ask price range. + // Documentation: https://www.kucoin.com/docs-new/api-3471565 + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+--------+ + GetCallAuctionInfo(req *GetCallAuctionInfoReq, ctx context.Context) (*GetCallAuctionInfoResp, error) + // GetFiatPrice Get Fiat Price - // Description: Request via this endpoint to get the fiat price of the currencies for the available trading pairs. + // Description: Request the fiat price of the currencies for the available trading pairs via this endpoint. // Documentation: https://www.kucoin.com/docs-new/api-3470153 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+--------+ GetFiatPrice(req *GetFiatPriceReq, ctx context.Context) (*GetFiatPriceResp, error) // Get24hrStats Get 24hr Stats // Description: Request via this endpoint to get the statistics of the specified ticker in the last 24 hours. // Documentation: https://www.kucoin.com/docs-new/api-3470161 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 15 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 15 | + // +-----------------------+--------+ Get24hrStats(req *Get24hrStatsReq, ctx context.Context) (*Get24hrStatsResp, error) // GetMarketList Get Market List - // Description: Request via this endpoint to get the transaction currency for the entire trading market. + // Description: Request via this endpoint the transaction currency for the entire trading market. // Documentation: https://www.kucoin.com/docs-new/api-3470166 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+--------+ GetMarketList(ctx context.Context) (*GetMarketListResp, error) + // GetClientIPAddress Get Client IP Address + // Description: Get the server time. + // Documentation: https://www.kucoin.com/docs-new/api-3471123 + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 0 | + // +-----------------------+--------+ + GetClientIPAddress(ctx context.Context) (*GetClientIPAddressResp, error) + // GetServerTime Get Server Time // Description: Get the server time. // Documentation: https://www.kucoin.com/docs-new/api-3470156 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+--------+ GetServerTime(ctx context.Context) (*GetServerTimeResp, error) // GetServiceStatus Get Service Status - // Description: Get the service status + // Description: Get the service status. // Documentation: https://www.kucoin.com/docs-new/api-3470158 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 3 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+--------+ GetServiceStatus(ctx context.Context) (*GetServiceStatusResp, error) // GetPublicToken Get Public Token - Spot/Margin - // Description: This interface can obtain the token required for websocket to establish a Spot/Margin 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 + // Description: This interface can obtain the token required for Websocket to establish a Spot/Margin 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 // Documentation: https://www.kucoin.com/docs-new/api-3470294 - // +---------------------+--------+ - // | Extra API Info | Value | - // +---------------------+--------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PUBLIC | - // | API-PERMISSION | NULL | - // | API-RATE-LIMIT-POOL | PUBLIC | - // | API-RATE-LIMIT | 10 | - // +---------------------+--------+ + // +-----------------------+--------+ + // | Extra API Info | Value | + // +-----------------------+--------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PUBLIC | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+--------+ GetPublicToken(ctx context.Context) (*GetPublicTokenResp, error) // GetPrivateToken Get Private Token - Spot/Margin - // Description: This interface can obtain the token required for websocket to establish a Spot/Margin 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 + // Description: This interface can obtain the token required for Websocket to establish a Spot/Margin 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 // Documentation: https://www.kucoin.com/docs-new/api-3470295 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ GetPrivateToken(ctx context.Context) (*GetPrivateTokenResp, error) } @@ -336,6 +378,18 @@ func (impl *MarketAPIImpl) GetFullOrderBook(req *GetFullOrderBookReq, ctx contex return resp, err } +func (impl *MarketAPIImpl) GetCallAuctionPartOrderBook(req *GetCallAuctionPartOrderBookReq, ctx context.Context) (*GetCallAuctionPartOrderBookResp, error) { + resp := &GetCallAuctionPartOrderBookResp{} + err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/market/orderbook/callauction/level2_{size}", req, resp, false) + return resp, err +} + +func (impl *MarketAPIImpl) GetCallAuctionInfo(req *GetCallAuctionInfoReq, ctx context.Context) (*GetCallAuctionInfoResp, error) { + resp := &GetCallAuctionInfoResp{} + err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/market/callauctionData", req, resp, false) + return resp, err +} + func (impl *MarketAPIImpl) GetFiatPrice(req *GetFiatPriceReq, ctx context.Context) (*GetFiatPriceResp, error) { resp := &GetFiatPriceResp{} err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/prices", req, resp, false) @@ -354,6 +408,12 @@ func (impl *MarketAPIImpl) GetMarketList(ctx context.Context) (*GetMarketListRes return resp, err } +func (impl *MarketAPIImpl) GetClientIPAddress(ctx context.Context) (*GetClientIPAddressResp, error) { + resp := &GetClientIPAddressResp{} + err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/my-ip", nil, resp, false) + return resp, err +} + func (impl *MarketAPIImpl) GetServerTime(ctx context.Context) (*GetServerTimeResp, error) { resp := &GetServerTimeResp{} err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/timestamp", nil, resp, false) diff --git a/sdk/golang/pkg/generate/spot/market/api_market.template b/sdk/golang/pkg/generate/spot/market/api_market.template index f18eef53..14f41e11 100644 --- a/sdk/golang/pkg/generate/spot/market/api_market.template +++ b/sdk/golang/pkg/generate/spot/market/api_market.template @@ -248,6 +248,52 @@ func TestMarketGetFullOrderBookReq(t *testing.T) { } +func TestMarketGetCallAuctionPartOrderBookReq(t *testing.T) { + // GetCallAuctionPartOrderBook + // Get Call Auction Part OrderBook + // /api/v1/market/orderbook/callauction/level2_{size} + + builder := market.NewGetCallAuctionPartOrderBookReqBuilder() + builder.SetSymbol(?).SetSize(?) + req := builder.Build() + + resp, err := marketApi.GetCallAuctionPartOrderBook(req, context.TODO()) + if err != nil { + panic(err) + } + data, err := json.Marshal(resp.ToMap()) + if err != nil { + panic(err) + } + fmt.Println("code:", resp.CommonResponse.Code) + fmt.Println("message:", resp.CommonResponse.Message) + fmt.Println("data:", string(data)) +} + + +func TestMarketGetCallAuctionInfoReq(t *testing.T) { + // GetCallAuctionInfo + // Get Call Auction Info + // /api/v1/market/callauctionData + + builder := market.NewGetCallAuctionInfoReqBuilder() + builder.SetSymbol(?) + req := builder.Build() + + resp, err := marketApi.GetCallAuctionInfo(req, context.TODO()) + if err != nil { + panic(err) + } + data, err := json.Marshal(resp.ToMap()) + if err != nil { + panic(err) + } + fmt.Println("code:", resp.CommonResponse.Code) + fmt.Println("message:", resp.CommonResponse.Message) + fmt.Println("data:", string(data)) +} + + func TestMarketGetFiatPriceReq(t *testing.T) { // GetFiatPrice // Get Fiat Price @@ -314,6 +360,26 @@ func TestMarketGetMarketListReq(t *testing.T) { } +func TestMarketGetClientIPAddressReq(t *testing.T) { + // GetClientIPAddress + // Get Client IP Address + // /api/v1/my-ip + + + resp, err := marketApi.GetClientIPAddress(context.TODO()) + if err != nil { + panic(err) + } + data, err := json.Marshal(resp.ToMap()) + if err != nil { + panic(err) + } + fmt.Println("code:", resp.CommonResponse.Code) + fmt.Println("message:", resp.CommonResponse.Message) + fmt.Println("data:", string(data)) +} + + func TestMarketGetServerTimeReq(t *testing.T) { // GetServerTime // Get Server Time diff --git a/sdk/golang/pkg/generate/spot/market/api_market_test.go b/sdk/golang/pkg/generate/spot/market/api_market_test.go index 2c033f16..be5f62ae 100644 --- a/sdk/golang/pkg/generate/spot/market/api_market_test.go +++ b/sdk/golang/pkg/generate/spot/market/api_market_test.go @@ -103,7 +103,7 @@ func TestMarketGetSymbolRespModel(t *testing.T) { // Get Symbol // /api/v2/symbols/{symbol} - data := "{\"code\":\"200000\",\"data\":{\"symbol\":\"BTC-USDT\",\"name\":\"BTC-USDT\",\"baseCurrency\":\"BTC\",\"quoteCurrency\":\"USDT\",\"feeCurrency\":\"USDT\",\"market\":\"USDS\",\"baseMinSize\":\"0.00001\",\"quoteMinSize\":\"0.1\",\"baseMaxSize\":\"10000000000\",\"quoteMaxSize\":\"99999999\",\"baseIncrement\":\"0.00000001\",\"quoteIncrement\":\"0.000001\",\"priceIncrement\":\"0.1\",\"priceLimitRate\":\"0.1\",\"minFunds\":\"0.1\",\"isMarginEnabled\":true,\"enableTrading\":true,\"feeCategory\":1,\"makerFeeCoefficient\":\"1.00\",\"takerFeeCoefficient\":\"1.00\",\"st\":false}}" + data := "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"BTC-USDT\",\n \"name\": \"BTC-USDT\",\n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USDT\",\n \"feeCurrency\": \"USDT\",\n \"market\": \"USDS\",\n \"baseMinSize\": \"0.00001\",\n \"quoteMinSize\": \"0.1\",\n \"baseMaxSize\": \"10000000000\",\n \"quoteMaxSize\": \"99999999\",\n \"baseIncrement\": \"0.00000001\",\n \"quoteIncrement\": \"0.000001\",\n \"priceIncrement\": \"0.1\",\n \"priceLimitRate\": \"0.1\",\n \"minFunds\": \"0.1\",\n \"isMarginEnabled\": true,\n \"enableTrading\": true,\n \"feeCategory\": 1,\n \"makerFeeCoefficient\": \"1.00\",\n \"takerFeeCoefficient\": \"1.00\",\n \"st\": false,\n \"callauctionIsEnabled\": false,\n \"callauctionPriceFloor\": null,\n \"callauctionPriceCeiling\": null,\n \"callauctionFirstStageStartTime\": null,\n \"callauctionSecondStageStartTime\": null,\n \"callauctionThirdStageStartTime\": null,\n \"tradingStartTime\": null\n }\n}" commonResp := &types.RestResponse{} err := json.Unmarshal([]byte(data), commonResp) assert.Nil(t, err) @@ -131,7 +131,7 @@ func TestMarketGetAllSymbolsRespModel(t *testing.T) { // Get All Symbols // /api/v2/symbols - data := "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"BTC-USDT\",\n \"name\": \"BTC-USDT\",\n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USDT\",\n \"feeCurrency\": \"USDT\",\n \"market\": \"USDS\",\n \"baseMinSize\": \"0.00001\",\n \"quoteMinSize\": \"0.1\",\n \"baseMaxSize\": \"10000000000\",\n \"quoteMaxSize\": \"99999999\",\n \"baseIncrement\": \"0.00000001\",\n \"quoteIncrement\": \"0.000001\",\n \"priceIncrement\": \"0.1\",\n \"priceLimitRate\": \"0.1\",\n \"minFunds\": \"0.1\",\n \"isMarginEnabled\": true,\n \"enableTrading\": true,\n \"feeCategory\": 1,\n \"makerFeeCoefficient\": \"1.00\",\n \"takerFeeCoefficient\": \"1.00\",\n \"st\": false\n }\n ]\n}" + data := "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"BTC-USDT\",\n \"name\": \"BTC-USDT\",\n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USDT\",\n \"feeCurrency\": \"USDT\",\n \"market\": \"USDS\",\n \"baseMinSize\": \"0.00001\",\n \"quoteMinSize\": \"0.1\",\n \"baseMaxSize\": \"10000000000\",\n \"quoteMaxSize\": \"99999999\",\n \"baseIncrement\": \"0.00000001\",\n \"quoteIncrement\": \"0.000001\",\n \"priceIncrement\": \"0.1\",\n \"priceLimitRate\": \"0.1\",\n \"minFunds\": \"0.1\",\n \"isMarginEnabled\": true,\n \"enableTrading\": true,\n \"feeCategory\": 1,\n \"makerFeeCoefficient\": \"1.00\",\n \"takerFeeCoefficient\": \"1.00\",\n \"st\": false,\n \"callauctionIsEnabled\": false,\n \"callauctionPriceFloor\": null,\n \"callauctionPriceCeiling\": null,\n \"callauctionFirstStageStartTime\": null,\n \"callauctionSecondStageStartTime\": null,\n \"callauctionThirdStageStartTime\": null,\n \"tradingStartTime\": null\n }\n ]\n}" commonResp := &types.RestResponse{} err := json.Unmarshal([]byte(data), commonResp) assert.Nil(t, err) @@ -305,6 +305,62 @@ func TestMarketGetFullOrderBookRespModel(t *testing.T) { assert.Nil(t, err) } +func TestMarketGetCallAuctionPartOrderBookReqModel(t *testing.T) { + // GetCallAuctionPartOrderBook + // Get Call Auction Part OrderBook + // /api/v1/market/orderbook/callauction/level2_{size} + + data := "{\"symbol\": \"BTC-USDT\", \"size\": \"20\"}" + req := &GetCallAuctionPartOrderBookReq{} + err := json.Unmarshal([]byte(data), req) + req.ToMap() + assert.Nil(t, err) +} + +func TestMarketGetCallAuctionPartOrderBookRespModel(t *testing.T) { + // GetCallAuctionPartOrderBook + // Get Call Auction Part OrderBook + // /api/v1/market/orderbook/callauction/level2_{size} + + data := "{\n \"code\": \"200000\",\n \"data\": {\n \"time\": 1729176273859,\n \"sequence\": \"14610502970\",\n \"bids\": [\n [\n \"66976.4\",\n \"0.69109872\"\n ],\n [\n \"66976.3\",\n \"0.14377\"\n ]\n ],\n \"asks\": [\n [\n \"66976.5\",\n \"0.05408199\"\n ],\n [\n \"66976.8\",\n \"0.0005\"\n ]\n ]\n }\n}" + commonResp := &types.RestResponse{} + err := json.Unmarshal([]byte(data), commonResp) + assert.Nil(t, err) + assert.NotNil(t, commonResp.Data) + resp := &GetCallAuctionPartOrderBookResp{} + err = json.Unmarshal([]byte(commonResp.Data), resp) + resp.ToMap() + assert.Nil(t, err) +} + +func TestMarketGetCallAuctionInfoReqModel(t *testing.T) { + // GetCallAuctionInfo + // Get Call Auction Info + // /api/v1/market/callauctionData + + data := "{\"symbol\": \"BTC-USDT\"}" + req := &GetCallAuctionInfoReq{} + err := json.Unmarshal([]byte(data), req) + req.ToMap() + assert.Nil(t, err) +} + +func TestMarketGetCallAuctionInfoRespModel(t *testing.T) { + // GetCallAuctionInfo + // Get Call Auction Info + // /api/v1/market/callauctionData + + data := "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"BTC-USDT\",\n \"estimatedPrice\": \"0.17\",\n \"estimatedSize\": \"0.03715004\",\n \"sellOrderRangeLowPrice\": \"1.788\",\n \"sellOrderRangeHighPrice\": \"2.788\",\n \"buyOrderRangeLowPrice\": \"1.788\",\n \"buyOrderRangeHighPrice\": \"2.788\",\n \"time\": 1550653727731\n }\n}" + commonResp := &types.RestResponse{} + err := json.Unmarshal([]byte(data), commonResp) + assert.Nil(t, err) + assert.NotNil(t, commonResp.Data) + resp := &GetCallAuctionInfoResp{} + err = json.Unmarshal([]byte(commonResp.Data), resp) + resp.ToMap() + assert.Nil(t, err) +} + func TestMarketGetFiatPriceReqModel(t *testing.T) { // GetFiatPrice // Get Fiat Price @@ -384,6 +440,29 @@ func TestMarketGetMarketListRespModel(t *testing.T) { assert.Nil(t, err) } +func TestMarketGetClientIPAddressReqModel(t *testing.T) { + // GetClientIPAddress + // Get Client IP Address + // /api/v1/my-ip + +} + +func TestMarketGetClientIPAddressRespModel(t *testing.T) { + // GetClientIPAddress + // Get Client IP Address + // /api/v1/my-ip + + data := "{\"code\":\"200000\",\"data\":\"20.***.***.128\"}" + commonResp := &types.RestResponse{} + err := json.Unmarshal([]byte(data), commonResp) + assert.Nil(t, err) + assert.NotNil(t, commonResp.Data) + resp := &GetClientIPAddressResp{} + err = json.Unmarshal([]byte(commonResp.Data), resp) + resp.ToMap() + assert.Nil(t, err) +} + func TestMarketGetServerTimeReqModel(t *testing.T) { // GetServerTime // Get Server Time diff --git a/sdk/golang/pkg/generate/spot/market/types_get_all_currencies_data.go b/sdk/golang/pkg/generate/spot/market/types_get_all_currencies_data.go index 0794ea30..a81266e8 100644 --- a/sdk/golang/pkg/generate/spot/market/types_get_all_currencies_data.go +++ b/sdk/golang/pkg/generate/spot/market/types_get_all_currencies_data.go @@ -6,9 +6,9 @@ package market type GetAllCurrenciesData struct { // A unique currency code that will never change Currency string `json:"currency,omitempty"` - // Currency name, will change after renaming + // Currency name; will change after renaming Name string `json:"name,omitempty"` - // Full name of a currency, will change after renaming + // Full currency name; will change after renaming FullName string `json:"fullName,omitempty"` // Currency precision Precision int32 `json:"precision,omitempty"` @@ -16,11 +16,11 @@ type GetAllCurrenciesData struct { Confirms int32 `json:"confirms,omitempty"` // Contract address ContractAddress string `json:"contractAddress,omitempty"` - // Support margin or not + // Margin support or not IsMarginEnabled bool `json:"isMarginEnabled,omitempty"` - // Support debit or not + // Debit support or not IsDebitEnabled bool `json:"isDebitEnabled,omitempty"` - // chain list + // Chain list Chains []GetAllCurrenciesDataChains `json:"chains,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/market/types_get_all_currencies_data_chains.go b/sdk/golang/pkg/generate/spot/market/types_get_all_currencies_data_chains.go index d5b80fb8..d284c344 100644 --- a/sdk/golang/pkg/generate/spot/market/types_get_all_currencies_data_chains.go +++ b/sdk/golang/pkg/generate/spot/market/types_get_all_currencies_data_chains.go @@ -4,19 +4,19 @@ package market // GetAllCurrenciesDataChains struct for GetAllCurrenciesDataChains type GetAllCurrenciesDataChains struct { - // chain name of currency + // Chain name of currency ChainName string `json:"chainName,omitempty"` // Minimum withdrawal amount WithdrawalMinSize string `json:"withdrawalMinSize,omitempty"` // Minimum deposit amount DepositMinSize string `json:"depositMinSize,omitempty"` - // withdraw fee rate + // Withdraw fee rate WithdrawFeeRate string `json:"withdrawFeeRate,omitempty"` // Minimum fees charged for withdrawal WithdrawalMinFee string `json:"withdrawalMinFee,omitempty"` - // Support withdrawal or not + // Withdrawal support or not IsWithdrawEnabled bool `json:"isWithdrawEnabled,omitempty"` - // Support deposit or not + // Deposit support or not IsDepositEnabled bool `json:"isDepositEnabled,omitempty"` // Number of block confirmations Confirms int32 `json:"confirms,omitempty"` @@ -30,13 +30,13 @@ type GetAllCurrenciesDataChains struct { MaxWithdraw string `json:"maxWithdraw,omitempty"` // Maximum amount of single deposit (only applicable to Lightning Network) MaxDeposit string `json:"maxDeposit,omitempty"` - // whether memo/tag is needed + // Need for memo/tag or not NeedTag bool `json:"needTag,omitempty"` - // chain id of currency + // Chain id of currency ChainId string `json:"chainId,omitempty"` - // deposit fee rate (some currencies have this param, the default is empty) + // Deposit fee rate (some currencies have this param; the default is empty) DepositFeeRate *string `json:"depositFeeRate,omitempty"` - // withdraw max fee(some currencies have this param, the default is empty) + // Withdraw max. fee (some currencies have this param; the default is empty) WithdrawMaxFee *string `json:"withdrawMaxFee,omitempty"` DepositTierFee *string `json:"depositTierFee,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/market/types_get_all_symbols_data.go b/sdk/golang/pkg/generate/spot/market/types_get_all_symbols_data.go index 51c88921..426a455b 100644 --- a/sdk/golang/pkg/generate/spot/market/types_get_all_symbols_data.go +++ b/sdk/golang/pkg/generate/spot/market/types_get_all_symbols_data.go @@ -4,19 +4,19 @@ package market // GetAllSymbolsData struct for GetAllSymbolsData type GetAllSymbolsData struct { - // unique code of a symbol, it would not change after renaming + // Unique code of a symbol; it will not change after renaming Symbol string `json:"symbol,omitempty"` - // Name of trading pairs, it would change after renaming + // Name of trading pairs, it will change after renaming Name string `json:"name,omitempty"` - // Base currency,e.g. BTC. + // Base currency, e.g. BTC. BaseCurrency string `json:"baseCurrency,omitempty"` - // Quote currency,e.g. USDT. + // Quote currency, e.g. USDT. QuoteCurrency string `json:"quoteCurrency,omitempty"` // The currency of charged fees. FeeCurrency string `json:"feeCurrency,omitempty"` // The trading market. Market string `json:"market,omitempty"` - // The minimum order quantity requried to place an order. + // The minimum order quantity required to place an order. BaseMinSize string `json:"baseMinSize,omitempty"` // The minimum order funds required to place a market order. QuoteMinSize string `json:"quoteMinSize,omitempty"` @@ -28,11 +28,11 @@ type GetAllSymbolsData struct { BaseIncrement string `json:"baseIncrement,omitempty"` // Quote increment: The funds for a market order must be a positive integer multiple of this increment. The funds refer to the quote currency amount. For example, for the ETH-USDT trading pair, if the quoteIncrement is 0.000001, the amount of USDT for the order can be 3000.000001 but not 3000.0000001. QuoteIncrement string `json:"quoteIncrement,omitempty"` - // Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. specifies the min order price as well as the price increment.This also applies to quote currency. + // Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. Specifies the min. order price as well as the price increment.This also applies to quote currency. PriceIncrement string `json:"priceIncrement,omitempty"` - // Threshold for price portection + // Threshold for price protection PriceLimitRate string `json:"priceLimitRate,omitempty"` - // the minimum trading amounts + // The minimum trading amounts MinFunds string `json:"minFunds,omitempty"` // Available for margin or not. IsMarginEnabled bool `json:"isMarginEnabled,omitempty"` @@ -44,13 +44,27 @@ type GetAllSymbolsData struct { MakerFeeCoefficient string `json:"makerFeeCoefficient,omitempty"` // The taker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee TakerFeeCoefficient string `json:"takerFeeCoefficient,omitempty"` - // Whether it is an [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol + // Whether it is a [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol St bool `json:"st,omitempty"` + // The [call auction](https://www.kucoin.com/support/40999744334105) status returns true/false + CallauctionIsEnabled bool `json:"callauctionIsEnabled,omitempty"` + // The lowest price declared in the call auction + CallauctionPriceFloor string `json:"callauctionPriceFloor,omitempty"` + // The highest bid price in the call auction + CallauctionPriceCeiling string `json:"callauctionPriceCeiling,omitempty"` + // The first phase of the call auction starts at (Allow add orders, allow cancel orders) + CallauctionFirstStageStartTime int64 `json:"callauctionFirstStageStartTime,omitempty"` + // The second phase of the call auction starts at (Allow add orders, don't allow cancel orders) + CallauctionSecondStageStartTime int64 `json:"callauctionSecondStageStartTime,omitempty"` + // The third phase of the call auction starts at (Don't allow add orders, don't allow cancel orders) + CallauctionThirdStageStartTime int64 `json:"callauctionThirdStageStartTime,omitempty"` + // Official opening time (end time of the third phase of call auction) + TradingStartTime int64 `json:"tradingStartTime,omitempty"` } // NewGetAllSymbolsData instantiates a new GetAllSymbolsData object // This constructor will assign default values to properties that have it defined -func NewGetAllSymbolsData(symbol string, name string, baseCurrency string, quoteCurrency string, feeCurrency string, market string, baseMinSize string, quoteMinSize string, baseMaxSize string, quoteMaxSize string, baseIncrement string, quoteIncrement string, priceIncrement string, priceLimitRate string, minFunds string, isMarginEnabled bool, enableTrading bool, feeCategory int32, makerFeeCoefficient string, takerFeeCoefficient string, st bool) *GetAllSymbolsData { +func NewGetAllSymbolsData(symbol string, name string, baseCurrency string, quoteCurrency string, feeCurrency string, market string, baseMinSize string, quoteMinSize string, baseMaxSize string, quoteMaxSize string, baseIncrement string, quoteIncrement string, priceIncrement string, priceLimitRate string, minFunds string, isMarginEnabled bool, enableTrading bool, feeCategory int32, makerFeeCoefficient string, takerFeeCoefficient string, st bool, callauctionIsEnabled bool, callauctionPriceFloor string, callauctionPriceCeiling string, callauctionFirstStageStartTime int64, callauctionSecondStageStartTime int64, callauctionThirdStageStartTime int64, tradingStartTime int64) *GetAllSymbolsData { this := GetAllSymbolsData{} this.Symbol = symbol this.Name = name @@ -73,6 +87,13 @@ func NewGetAllSymbolsData(symbol string, name string, baseCurrency string, quote this.MakerFeeCoefficient = makerFeeCoefficient this.TakerFeeCoefficient = takerFeeCoefficient this.St = st + this.CallauctionIsEnabled = callauctionIsEnabled + this.CallauctionPriceFloor = callauctionPriceFloor + this.CallauctionPriceCeiling = callauctionPriceCeiling + this.CallauctionFirstStageStartTime = callauctionFirstStageStartTime + this.CallauctionSecondStageStartTime = callauctionSecondStageStartTime + this.CallauctionThirdStageStartTime = callauctionThirdStageStartTime + this.TradingStartTime = tradingStartTime return &this } @@ -106,5 +127,12 @@ func (o *GetAllSymbolsData) ToMap() map[string]interface{} { toSerialize["makerFeeCoefficient"] = o.MakerFeeCoefficient toSerialize["takerFeeCoefficient"] = o.TakerFeeCoefficient toSerialize["st"] = o.St + toSerialize["callauctionIsEnabled"] = o.CallauctionIsEnabled + toSerialize["callauctionPriceFloor"] = o.CallauctionPriceFloor + toSerialize["callauctionPriceCeiling"] = o.CallauctionPriceCeiling + toSerialize["callauctionFirstStageStartTime"] = o.CallauctionFirstStageStartTime + toSerialize["callauctionSecondStageStartTime"] = o.CallauctionSecondStageStartTime + toSerialize["callauctionThirdStageStartTime"] = o.CallauctionThirdStageStartTime + toSerialize["tradingStartTime"] = o.TradingStartTime return toSerialize } diff --git a/sdk/golang/pkg/generate/spot/market/types_get_all_tickers_ticker.go b/sdk/golang/pkg/generate/spot/market/types_get_all_tickers_ticker.go index 24c1bf9b..c919c24b 100644 --- a/sdk/golang/pkg/generate/spot/market/types_get_all_tickers_ticker.go +++ b/sdk/golang/pkg/generate/spot/market/types_get_all_tickers_ticker.go @@ -6,7 +6,7 @@ package market type GetAllTickersTicker struct { // Symbol Symbol string `json:"symbol,omitempty"` - // Name of trading pairs, it would change after renaming + // Name of trading pairs, it will change after renaming SymbolName string `json:"symbolName,omitempty"` // Best bid price Buy string `json:"buy,omitempty"` diff --git a/sdk/golang/pkg/generate/spot/market/types_get_call_auction_info_req.go b/sdk/golang/pkg/generate/spot/market/types_get_call_auction_info_req.go new file mode 100644 index 00000000..63ee7ef8 --- /dev/null +++ b/sdk/golang/pkg/generate/spot/market/types_get_call_auction_info_req.go @@ -0,0 +1,47 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package market + +// GetCallAuctionInfoReq struct for GetCallAuctionInfoReq +type GetCallAuctionInfoReq struct { + // symbol + Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` +} + +// NewGetCallAuctionInfoReq instantiates a new GetCallAuctionInfoReq object +// This constructor will assign default values to properties that have it defined +func NewGetCallAuctionInfoReq() *GetCallAuctionInfoReq { + this := GetCallAuctionInfoReq{} + return &this +} + +// NewGetCallAuctionInfoReqWithDefaults instantiates a new GetCallAuctionInfoReq object +// This constructor will only assign default values to properties that have it defined, +func NewGetCallAuctionInfoReqWithDefaults() *GetCallAuctionInfoReq { + this := GetCallAuctionInfoReq{} + return &this +} + +func (o *GetCallAuctionInfoReq) ToMap() map[string]interface{} { + toSerialize := map[string]interface{}{} + toSerialize["symbol"] = o.Symbol + return toSerialize +} + +type GetCallAuctionInfoReqBuilder struct { + obj *GetCallAuctionInfoReq +} + +func NewGetCallAuctionInfoReqBuilder() *GetCallAuctionInfoReqBuilder { + return &GetCallAuctionInfoReqBuilder{obj: NewGetCallAuctionInfoReqWithDefaults()} +} + +// symbol +func (builder *GetCallAuctionInfoReqBuilder) SetSymbol(value string) *GetCallAuctionInfoReqBuilder { + builder.obj.Symbol = &value + return builder +} + +func (builder *GetCallAuctionInfoReqBuilder) Build() *GetCallAuctionInfoReq { + return builder.obj +} diff --git a/sdk/golang/pkg/generate/spot/market/types_get_call_auction_info_resp.go b/sdk/golang/pkg/generate/spot/market/types_get_call_auction_info_resp.go new file mode 100644 index 00000000..c4646883 --- /dev/null +++ b/sdk/golang/pkg/generate/spot/market/types_get_call_auction_info_resp.go @@ -0,0 +1,68 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package market + +import ( + "github.com/Kucoin/kucoin-universal-sdk/sdk/golang/pkg/types" +) + +// GetCallAuctionInfoResp struct for GetCallAuctionInfoResp +type GetCallAuctionInfoResp struct { + // common response + CommonResponse *types.RestResponse + // Symbol + Symbol string `json:"symbol,omitempty"` + // Estimated price + EstimatedPrice string `json:"estimatedPrice,omitempty"` + // Estimated size + EstimatedSize string `json:"estimatedSize,omitempty"` + // Sell ​​order minimum price + SellOrderRangeLowPrice string `json:"sellOrderRangeLowPrice,omitempty"` + // Sell ​​order maximum price + SellOrderRangeHighPrice string `json:"sellOrderRangeHighPrice,omitempty"` + // Buy order minimum price + BuyOrderRangeLowPrice string `json:"buyOrderRangeLowPrice,omitempty"` + // Buy ​​order maximum price + BuyOrderRangeHighPrice string `json:"buyOrderRangeHighPrice,omitempty"` + // Timestamp (ms) + Time int64 `json:"time,omitempty"` +} + +// NewGetCallAuctionInfoResp instantiates a new GetCallAuctionInfoResp object +// This constructor will assign default values to properties that have it defined +func NewGetCallAuctionInfoResp(symbol string, estimatedPrice string, estimatedSize string, sellOrderRangeLowPrice string, sellOrderRangeHighPrice string, buyOrderRangeLowPrice string, buyOrderRangeHighPrice string, time int64) *GetCallAuctionInfoResp { + this := GetCallAuctionInfoResp{} + this.Symbol = symbol + this.EstimatedPrice = estimatedPrice + this.EstimatedSize = estimatedSize + this.SellOrderRangeLowPrice = sellOrderRangeLowPrice + this.SellOrderRangeHighPrice = sellOrderRangeHighPrice + this.BuyOrderRangeLowPrice = buyOrderRangeLowPrice + this.BuyOrderRangeHighPrice = buyOrderRangeHighPrice + this.Time = time + return &this +} + +// NewGetCallAuctionInfoRespWithDefaults instantiates a new GetCallAuctionInfoResp object +// This constructor will only assign default values to properties that have it defined, +func NewGetCallAuctionInfoRespWithDefaults() *GetCallAuctionInfoResp { + this := GetCallAuctionInfoResp{} + return &this +} + +func (o *GetCallAuctionInfoResp) ToMap() map[string]interface{} { + toSerialize := map[string]interface{}{} + toSerialize["symbol"] = o.Symbol + toSerialize["estimatedPrice"] = o.EstimatedPrice + toSerialize["estimatedSize"] = o.EstimatedSize + toSerialize["sellOrderRangeLowPrice"] = o.SellOrderRangeLowPrice + toSerialize["sellOrderRangeHighPrice"] = o.SellOrderRangeHighPrice + toSerialize["buyOrderRangeLowPrice"] = o.BuyOrderRangeLowPrice + toSerialize["buyOrderRangeHighPrice"] = o.BuyOrderRangeHighPrice + toSerialize["time"] = o.Time + return toSerialize +} + +func (o *GetCallAuctionInfoResp) SetCommonResponse(response *types.RestResponse) { + o.CommonResponse = response +} diff --git a/sdk/golang/pkg/generate/spot/market/types_get_call_auction_part_order_book_req.go b/sdk/golang/pkg/generate/spot/market/types_get_call_auction_part_order_book_req.go new file mode 100644 index 00000000..7dd3622f --- /dev/null +++ b/sdk/golang/pkg/generate/spot/market/types_get_call_auction_part_order_book_req.go @@ -0,0 +1,56 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package market + +// GetCallAuctionPartOrderBookReq struct for GetCallAuctionPartOrderBookReq +type GetCallAuctionPartOrderBookReq struct { + // symbol + Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` + // Get the depth layer, optional value: 20, 100 + Size *string `json:"size,omitempty" path:"size" url:"-"` +} + +// NewGetCallAuctionPartOrderBookReq instantiates a new GetCallAuctionPartOrderBookReq object +// This constructor will assign default values to properties that have it defined +func NewGetCallAuctionPartOrderBookReq() *GetCallAuctionPartOrderBookReq { + this := GetCallAuctionPartOrderBookReq{} + return &this +} + +// NewGetCallAuctionPartOrderBookReqWithDefaults instantiates a new GetCallAuctionPartOrderBookReq object +// This constructor will only assign default values to properties that have it defined, +func NewGetCallAuctionPartOrderBookReqWithDefaults() *GetCallAuctionPartOrderBookReq { + this := GetCallAuctionPartOrderBookReq{} + return &this +} + +func (o *GetCallAuctionPartOrderBookReq) ToMap() map[string]interface{} { + toSerialize := map[string]interface{}{} + toSerialize["symbol"] = o.Symbol + toSerialize["size"] = o.Size + return toSerialize +} + +type GetCallAuctionPartOrderBookReqBuilder struct { + obj *GetCallAuctionPartOrderBookReq +} + +func NewGetCallAuctionPartOrderBookReqBuilder() *GetCallAuctionPartOrderBookReqBuilder { + return &GetCallAuctionPartOrderBookReqBuilder{obj: NewGetCallAuctionPartOrderBookReqWithDefaults()} +} + +// symbol +func (builder *GetCallAuctionPartOrderBookReqBuilder) SetSymbol(value string) *GetCallAuctionPartOrderBookReqBuilder { + builder.obj.Symbol = &value + return builder +} + +// Get the depth layer, optional value: 20, 100 +func (builder *GetCallAuctionPartOrderBookReqBuilder) SetSize(value string) *GetCallAuctionPartOrderBookReqBuilder { + builder.obj.Size = &value + return builder +} + +func (builder *GetCallAuctionPartOrderBookReqBuilder) Build() *GetCallAuctionPartOrderBookReq { + return builder.obj +} diff --git a/sdk/golang/pkg/generate/spot/market/types_get_call_auction_part_order_book_resp.go b/sdk/golang/pkg/generate/spot/market/types_get_call_auction_part_order_book_resp.go new file mode 100644 index 00000000..535a5dc4 --- /dev/null +++ b/sdk/golang/pkg/generate/spot/market/types_get_call_auction_part_order_book_resp.go @@ -0,0 +1,52 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package market + +import ( + "github.com/Kucoin/kucoin-universal-sdk/sdk/golang/pkg/types" +) + +// GetCallAuctionPartOrderBookResp struct for GetCallAuctionPartOrderBookResp +type GetCallAuctionPartOrderBookResp struct { + // common response + CommonResponse *types.RestResponse + // Timestamp (milliseconds) + Time int64 `json:"time,omitempty"` + // Sequence number + Sequence string `json:"sequence,omitempty"` + // bids, from high to low + Bids [][]string `json:"bids,omitempty"` + // asks, from low to high + Asks [][]string `json:"asks,omitempty"` +} + +// NewGetCallAuctionPartOrderBookResp instantiates a new GetCallAuctionPartOrderBookResp object +// This constructor will assign default values to properties that have it defined +func NewGetCallAuctionPartOrderBookResp(time int64, sequence string, bids [][]string, asks [][]string) *GetCallAuctionPartOrderBookResp { + this := GetCallAuctionPartOrderBookResp{} + this.Time = time + this.Sequence = sequence + this.Bids = bids + this.Asks = asks + return &this +} + +// NewGetCallAuctionPartOrderBookRespWithDefaults instantiates a new GetCallAuctionPartOrderBookResp object +// This constructor will only assign default values to properties that have it defined, +func NewGetCallAuctionPartOrderBookRespWithDefaults() *GetCallAuctionPartOrderBookResp { + this := GetCallAuctionPartOrderBookResp{} + return &this +} + +func (o *GetCallAuctionPartOrderBookResp) ToMap() map[string]interface{} { + toSerialize := map[string]interface{}{} + toSerialize["time"] = o.Time + toSerialize["sequence"] = o.Sequence + toSerialize["bids"] = o.Bids + toSerialize["asks"] = o.Asks + return toSerialize +} + +func (o *GetCallAuctionPartOrderBookResp) SetCommonResponse(response *types.RestResponse) { + o.CommonResponse = response +} diff --git a/sdk/golang/pkg/generate/spot/market/types_get_client_ip_address_resp.go b/sdk/golang/pkg/generate/spot/market/types_get_client_ip_address_resp.go new file mode 100644 index 00000000..717300dc --- /dev/null +++ b/sdk/golang/pkg/generate/spot/market/types_get_client_ip_address_resp.go @@ -0,0 +1,45 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package market + +import ( + "encoding/json" + "github.com/Kucoin/kucoin-universal-sdk/sdk/golang/pkg/types" +) + +// GetClientIPAddressResp struct for GetClientIPAddressResp +type GetClientIPAddressResp struct { + // common response + CommonResponse *types.RestResponse + Data string `json:"data,omitempty"` +} + +// NewGetClientIPAddressResp instantiates a new GetClientIPAddressResp object +// This constructor will assign default values to properties that have it defined +func NewGetClientIPAddressResp(data string) *GetClientIPAddressResp { + this := GetClientIPAddressResp{} + this.Data = data + return &this +} + +// NewGetClientIPAddressRespWithDefaults instantiates a new GetClientIPAddressResp object +// This constructor will only assign default values to properties that have it defined, +func NewGetClientIPAddressRespWithDefaults() *GetClientIPAddressResp { + this := GetClientIPAddressResp{} + return &this +} + +func (o *GetClientIPAddressResp) ToMap() map[string]interface{} { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize +} + +func (o *GetClientIPAddressResp) UnmarshalJSON(b []byte) error { + err := json.Unmarshal(b, &o.Data) + return err +} + +func (o *GetClientIPAddressResp) SetCommonResponse(response *types.RestResponse) { + o.CommonResponse = response +} diff --git a/sdk/golang/pkg/generate/spot/market/types_get_currency_chains.go b/sdk/golang/pkg/generate/spot/market/types_get_currency_chains.go index 73ae31cb..a746838f 100644 --- a/sdk/golang/pkg/generate/spot/market/types_get_currency_chains.go +++ b/sdk/golang/pkg/generate/spot/market/types_get_currency_chains.go @@ -4,19 +4,19 @@ package market // GetCurrencyChains struct for GetCurrencyChains type GetCurrencyChains struct { - // chain name of currency + // Chain name of currency ChainName string `json:"chainName,omitempty"` // Minimum withdrawal amount WithdrawalMinSize string `json:"withdrawalMinSize,omitempty"` // Minimum deposit amount DepositMinSize string `json:"depositMinSize,omitempty"` - // withdraw fee rate + // Withdraw fee rate WithdrawFeeRate string `json:"withdrawFeeRate,omitempty"` // Minimum fees charged for withdrawal WithdrawalMinFee string `json:"withdrawalMinFee,omitempty"` - // Support withdrawal or not + // Withdrawal support or not IsWithdrawEnabled bool `json:"isWithdrawEnabled,omitempty"` - // Support deposit or not + // Deposit support or not IsDepositEnabled bool `json:"isDepositEnabled,omitempty"` // Number of block confirmations Confirms int32 `json:"confirms,omitempty"` @@ -30,9 +30,9 @@ type GetCurrencyChains struct { MaxWithdraw float32 `json:"maxWithdraw,omitempty"` // Maximum amount of single deposit (only applicable to Lightning Network) MaxDeposit string `json:"maxDeposit,omitempty"` - // whether memo/tag is needed + // Need for memo/tag or not NeedTag bool `json:"needTag,omitempty"` - // chain id of currency + // Chain id of currency ChainId string `json:"chainId,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/market/types_get_currency_req.go b/sdk/golang/pkg/generate/spot/market/types_get_currency_req.go index 56a378db..28ac3b0b 100644 --- a/sdk/golang/pkg/generate/spot/market/types_get_currency_req.go +++ b/sdk/golang/pkg/generate/spot/market/types_get_currency_req.go @@ -6,7 +6,7 @@ package market type GetCurrencyReq struct { // Path parameter, Currency Currency *string `json:"currency,omitempty" path:"currency" url:"-"` - // Support for querying the chain of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20. This only apply for multi-chain currency, and there is no need for single chain currency. + // Support for querying the chain of currency, e.g. the available values for USDT are OMNI, ERC20, TRC20. This only applies to multi-chain currencies; no need for single-chain currencies. Chain *string `json:"chain,omitempty" url:"chain,omitempty"` } @@ -45,7 +45,7 @@ func (builder *GetCurrencyReqBuilder) SetCurrency(value string) *GetCurrencyReqB return builder } -// Support for querying the chain of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20. This only apply for multi-chain currency, and there is no need for single chain currency. +// Support for querying the chain of currency, e.g. the available values for USDT are OMNI, ERC20, TRC20. This only applies to multi-chain currencies; no need for single-chain currencies. func (builder *GetCurrencyReqBuilder) SetChain(value string) *GetCurrencyReqBuilder { builder.obj.Chain = &value return builder diff --git a/sdk/golang/pkg/generate/spot/market/types_get_currency_resp.go b/sdk/golang/pkg/generate/spot/market/types_get_currency_resp.go index a685c443..0f41e3ad 100644 --- a/sdk/golang/pkg/generate/spot/market/types_get_currency_resp.go +++ b/sdk/golang/pkg/generate/spot/market/types_get_currency_resp.go @@ -12,9 +12,9 @@ type GetCurrencyResp struct { CommonResponse *types.RestResponse // A unique currency code that will never change Currency string `json:"currency,omitempty"` - // Currency name, will change after renaming + // Currency name; will change after renaming Name string `json:"name,omitempty"` - // Full name of a currency, will change after renaming + // Full currency name; will change after renaming FullName string `json:"fullName,omitempty"` // Currency precision Precision int32 `json:"precision,omitempty"` @@ -22,11 +22,11 @@ type GetCurrencyResp struct { Confirms int32 `json:"confirms,omitempty"` // Contract address ContractAddress string `json:"contractAddress,omitempty"` - // Support margin or not + // Margin support or not IsMarginEnabled bool `json:"isMarginEnabled,omitempty"` - // Support debit or not + // Debit support or not IsDebitEnabled bool `json:"isDebitEnabled,omitempty"` - // chain list + // Chain list Chains []GetCurrencyChains `json:"chains,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/market/types_get_fiat_price_req.go b/sdk/golang/pkg/generate/spot/market/types_get_fiat_price_req.go index e371d7f1..0a5a9f8d 100644 --- a/sdk/golang/pkg/generate/spot/market/types_get_fiat_price_req.go +++ b/sdk/golang/pkg/generate/spot/market/types_get_fiat_price_req.go @@ -4,7 +4,7 @@ package market // GetFiatPriceReq struct for GetFiatPriceReq type GetFiatPriceReq struct { - // Ticker symbol of a base currency,eg.USD,EUR. Default is USD + // Ticker symbol of a base currency, e.g. USD, EUR. Default is USD Base *string `json:"base,omitempty" url:"base,omitempty"` // Comma-separated cryptocurrencies to be converted into fiat, e.g.: BTC,ETH, etc. Default to return the fiat price of all currencies. Currencies *string `json:"currencies,omitempty" url:"currencies,omitempty"` @@ -43,7 +43,7 @@ func NewGetFiatPriceReqBuilder() *GetFiatPriceReqBuilder { return &GetFiatPriceReqBuilder{obj: NewGetFiatPriceReqWithDefaults()} } -// Ticker symbol of a base currency,eg.USD,EUR. Default is USD +// Ticker symbol of a base currency, e.g. USD, EUR. Default is USD func (builder *GetFiatPriceReqBuilder) SetBase(value string) *GetFiatPriceReqBuilder { builder.obj.Base = &value return builder diff --git a/sdk/golang/pkg/generate/spot/market/types_get_private_token_instance_servers.go b/sdk/golang/pkg/generate/spot/market/types_get_private_token_instance_servers.go index be474fe3..a87df7d0 100644 --- a/sdk/golang/pkg/generate/spot/market/types_get_private_token_instance_servers.go +++ b/sdk/golang/pkg/generate/spot/market/types_get_private_token_instance_servers.go @@ -4,15 +4,15 @@ package market // GetPrivateTokenInstanceServers struct for GetPrivateTokenInstanceServers type GetPrivateTokenInstanceServers struct { - // Websocket domain URL, It is recommended to use a dynamic URL as the URL may change + // Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. Endpoint string `json:"endpoint,omitempty"` // Whether to encrypt. Currently only supports wss, not ws Encrypt bool `json:"encrypt,omitempty"` // Network Protocol Protocol string `json:"protocol,omitempty"` - // Recommended ping interval(millisecond) + // Recommended ping interval (milliseconds) PingInterval int32 `json:"pingInterval,omitempty"` - // Heartbeat timeout(millisecond) + // Heartbeat timeout (milliseconds) PingTimeout int32 `json:"pingTimeout,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/market/types_get_private_token_resp.go b/sdk/golang/pkg/generate/spot/market/types_get_private_token_resp.go index 4333c90e..0a9ff6a7 100644 --- a/sdk/golang/pkg/generate/spot/market/types_get_private_token_resp.go +++ b/sdk/golang/pkg/generate/spot/market/types_get_private_token_resp.go @@ -10,7 +10,7 @@ import ( type GetPrivateTokenResp struct { // common response CommonResponse *types.RestResponse - // The token required to establish a websocket connection + // The token required to establish a Websocket connection Token string `json:"token,omitempty"` InstanceServers []GetPrivateTokenInstanceServers `json:"instanceServers,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/market/types_get_public_token_instance_servers.go b/sdk/golang/pkg/generate/spot/market/types_get_public_token_instance_servers.go index 2984ce3f..f0fc72ce 100644 --- a/sdk/golang/pkg/generate/spot/market/types_get_public_token_instance_servers.go +++ b/sdk/golang/pkg/generate/spot/market/types_get_public_token_instance_servers.go @@ -4,15 +4,15 @@ package market // GetPublicTokenInstanceServers struct for GetPublicTokenInstanceServers type GetPublicTokenInstanceServers struct { - // Websocket domain URL, It is recommended to use a dynamic URL as the URL may change + // Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. Endpoint string `json:"endpoint,omitempty"` // Whether to encrypt. Currently only supports wss, not ws Encrypt bool `json:"encrypt,omitempty"` // Network Protocol Protocol string `json:"protocol,omitempty"` - // Recommended ping interval(millisecond) + // Recommended ping interval (milliseconds) PingInterval int32 `json:"pingInterval,omitempty"` - // Heartbeat timeout(millisecond) + // Heartbeat timeout (milliseconds) PingTimeout int32 `json:"pingTimeout,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/market/types_get_public_token_resp.go b/sdk/golang/pkg/generate/spot/market/types_get_public_token_resp.go index 0c6ee7c7..29c8b3e0 100644 --- a/sdk/golang/pkg/generate/spot/market/types_get_public_token_resp.go +++ b/sdk/golang/pkg/generate/spot/market/types_get_public_token_resp.go @@ -10,7 +10,7 @@ import ( type GetPublicTokenResp struct { // common response CommonResponse *types.RestResponse - // The token required to establish a websocket connection + // The token required to establish a Websocket connection Token string `json:"token,omitempty"` InstanceServers []GetPublicTokenInstanceServers `json:"instanceServers,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/market/types_get_server_time_resp.go b/sdk/golang/pkg/generate/spot/market/types_get_server_time_resp.go index 453b7a66..710b4820 100644 --- a/sdk/golang/pkg/generate/spot/market/types_get_server_time_resp.go +++ b/sdk/golang/pkg/generate/spot/market/types_get_server_time_resp.go @@ -11,7 +11,7 @@ import ( type GetServerTimeResp struct { // common response CommonResponse *types.RestResponse - // ServerTime(millisecond) + // ServerTime (milliseconds) Data int64 `json:"data,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/market/types_get_service_status_resp.go b/sdk/golang/pkg/generate/spot/market/types_get_service_status_resp.go index ce228e05..03d3a7ae 100644 --- a/sdk/golang/pkg/generate/spot/market/types_get_service_status_resp.go +++ b/sdk/golang/pkg/generate/spot/market/types_get_service_status_resp.go @@ -10,7 +10,7 @@ import ( type GetServiceStatusResp struct { // common response CommonResponse *types.RestResponse - // Status of service: open:normal transaction, close:Stop Trading/Maintenance, cancelonly:can only cancel the order but not place order + // Status of service: open: normal transaction; close: Stop Trading/Maintenance; cancelonly: can only cancel the order but not place order Status string `json:"status,omitempty"` // Remark for operation Msg string `json:"msg,omitempty"` diff --git a/sdk/golang/pkg/generate/spot/market/types_get_symbol_resp.go b/sdk/golang/pkg/generate/spot/market/types_get_symbol_resp.go index d9541319..2a54b78d 100644 --- a/sdk/golang/pkg/generate/spot/market/types_get_symbol_resp.go +++ b/sdk/golang/pkg/generate/spot/market/types_get_symbol_resp.go @@ -38,7 +38,7 @@ type GetSymbolResp struct { PriceIncrement string `json:"priceIncrement,omitempty"` // Threshold for price portection PriceLimitRate string `json:"priceLimitRate,omitempty"` - // the minimum trading amounts + // The minimum trading amounts MinFunds string `json:"minFunds,omitempty"` // Available for margin or not. IsMarginEnabled bool `json:"isMarginEnabled,omitempty"` @@ -50,12 +50,27 @@ type GetSymbolResp struct { MakerFeeCoefficient string `json:"makerFeeCoefficient,omitempty"` // The taker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee TakerFeeCoefficient string `json:"takerFeeCoefficient,omitempty"` - St bool `json:"st,omitempty"` + // Whether it is a [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol + St bool `json:"st,omitempty"` + // The [call auction](https://www.kucoin.com/support/40999744334105) status returns true/false + CallauctionIsEnabled bool `json:"callauctionIsEnabled,omitempty"` + // The lowest price declared in the call auction + CallauctionPriceFloor string `json:"callauctionPriceFloor,omitempty"` + // The highest bid price in the call auction + CallauctionPriceCeiling string `json:"callauctionPriceCeiling,omitempty"` + // The first phase of the call auction starts at (Allow add orders, allow cancel orders) + CallauctionFirstStageStartTime int64 `json:"callauctionFirstStageStartTime,omitempty"` + // The second phase of the call auction starts at (Allow add orders, don't allow cancel orders) + CallauctionSecondStageStartTime int64 `json:"callauctionSecondStageStartTime,omitempty"` + // The third phase of the call auction starts at (Don't allow add orders, don't allow cancel orders) + CallauctionThirdStageStartTime int64 `json:"callauctionThirdStageStartTime,omitempty"` + // Official opening time (end time of the third phase of call auction) + TradingStartTime int64 `json:"tradingStartTime,omitempty"` } // NewGetSymbolResp instantiates a new GetSymbolResp object // This constructor will assign default values to properties that have it defined -func NewGetSymbolResp(symbol string, name string, baseCurrency string, quoteCurrency string, feeCurrency string, market string, baseMinSize string, quoteMinSize string, baseMaxSize string, quoteMaxSize string, baseIncrement string, quoteIncrement string, priceIncrement string, priceLimitRate string, minFunds string, isMarginEnabled bool, enableTrading bool, feeCategory int32, makerFeeCoefficient string, takerFeeCoefficient string, st bool) *GetSymbolResp { +func NewGetSymbolResp(symbol string, name string, baseCurrency string, quoteCurrency string, feeCurrency string, market string, baseMinSize string, quoteMinSize string, baseMaxSize string, quoteMaxSize string, baseIncrement string, quoteIncrement string, priceIncrement string, priceLimitRate string, minFunds string, isMarginEnabled bool, enableTrading bool, feeCategory int32, makerFeeCoefficient string, takerFeeCoefficient string, st bool, callauctionIsEnabled bool, callauctionPriceFloor string, callauctionPriceCeiling string, callauctionFirstStageStartTime int64, callauctionSecondStageStartTime int64, callauctionThirdStageStartTime int64, tradingStartTime int64) *GetSymbolResp { this := GetSymbolResp{} this.Symbol = symbol this.Name = name @@ -78,6 +93,13 @@ func NewGetSymbolResp(symbol string, name string, baseCurrency string, quoteCurr this.MakerFeeCoefficient = makerFeeCoefficient this.TakerFeeCoefficient = takerFeeCoefficient this.St = st + this.CallauctionIsEnabled = callauctionIsEnabled + this.CallauctionPriceFloor = callauctionPriceFloor + this.CallauctionPriceCeiling = callauctionPriceCeiling + this.CallauctionFirstStageStartTime = callauctionFirstStageStartTime + this.CallauctionSecondStageStartTime = callauctionSecondStageStartTime + this.CallauctionThirdStageStartTime = callauctionThirdStageStartTime + this.TradingStartTime = tradingStartTime return &this } @@ -111,6 +133,13 @@ func (o *GetSymbolResp) ToMap() map[string]interface{} { toSerialize["makerFeeCoefficient"] = o.MakerFeeCoefficient toSerialize["takerFeeCoefficient"] = o.TakerFeeCoefficient toSerialize["st"] = o.St + toSerialize["callauctionIsEnabled"] = o.CallauctionIsEnabled + toSerialize["callauctionPriceFloor"] = o.CallauctionPriceFloor + toSerialize["callauctionPriceCeiling"] = o.CallauctionPriceCeiling + toSerialize["callauctionFirstStageStartTime"] = o.CallauctionFirstStageStartTime + toSerialize["callauctionSecondStageStartTime"] = o.CallauctionSecondStageStartTime + toSerialize["callauctionThirdStageStartTime"] = o.CallauctionThirdStageStartTime + toSerialize["tradingStartTime"] = o.TradingStartTime return toSerialize } diff --git a/sdk/golang/pkg/generate/spot/order/api_order.go b/sdk/golang/pkg/generate/spot/order/api_order.go index 8b8d02fb..9f580b07 100644 --- a/sdk/golang/pkg/generate/spot/order/api_order.go +++ b/sdk/golang/pkg/generate/spot/order/api_order.go @@ -12,696 +12,710 @@ type OrderAPI interface { // AddOrder Add Order // Description: Place order to the Spot 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. // Documentation: https://www.kucoin.com/docs-new/api-3470188 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ AddOrder(req *AddOrderReq, ctx context.Context) (*AddOrderResp, error) // AddOrderSync Add Order Sync - // Description: Place order to the spot trading system The difference between this interface and \"Add order\" is that this interface will synchronously return the order information after the order matching is completed. For higher latency requirements, please select the \"Add order\" interface. If there is a requirement for returning data integrity, please select this interface + // Description: Place order in the spot trading system. The difference between this interface and \"Add order\" is that this interface will synchronously return the order information after the order matching is completed. For higher latency requirements, please select the \"Add order\" interface. If there is a requirement for returning data integrity, please select this interface. // Documentation: https://www.kucoin.com/docs-new/api-3470170 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ AddOrderSync(req *AddOrderSyncReq, ctx context.Context) (*AddOrderSyncResp, error) // AddOrderTest Add Order Test // Description: Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. // Documentation: https://www.kucoin.com/docs-new/api-3470187 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ AddOrderTest(req *AddOrderTestReq, ctx context.Context) (*AddOrderTestResp, error) // BatchAddOrders Batch Add Orders - // Description: This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5orders can be placed simultaneously. The order types must be limit orders of the same trading pair + // Description: This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5 orders can be placed simultaneously. The order types must be limit orders of the same trading pair // Documentation: https://www.kucoin.com/docs-new/api-3470168 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ BatchAddOrders(req *BatchAddOrdersReq, ctx context.Context) (*BatchAddOrdersResp, error) // BatchAddOrdersSync Batch Add Orders Sync - // Description: This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5orders can be placed simultaneously. The order types must be limit orders of the same trading pair + // Description: This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5 orders can be placed simultaneously. The order types must be limit orders of the same trading pair // Documentation: https://www.kucoin.com/docs-new/api-3470169 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ BatchAddOrdersSync(req *BatchAddOrdersSyncReq, ctx context.Context) (*BatchAddOrdersSyncResp, error) // CancelOrderByOrderId Cancel Order By OrderId - // Description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + // Description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. // Documentation: https://www.kucoin.com/docs-new/api-3470174 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ CancelOrderByOrderId(req *CancelOrderByOrderIdReq, ctx context.Context) (*CancelOrderByOrderIdResp, error) // CancelOrderByOrderIdSync Cancel Order By OrderId Sync // Description: This endpoint can be used to cancel a spot order by orderId. // Documentation: https://www.kucoin.com/docs-new/api-3470185 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ CancelOrderByOrderIdSync(req *CancelOrderByOrderIdSyncReq, ctx context.Context) (*CancelOrderByOrderIdSyncResp, error) // CancelOrderByClientOid Cancel Order By ClientOid // Description: This endpoint can be used to cancel a spot order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. // Documentation: https://www.kucoin.com/docs-new/api-3470184 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ CancelOrderByClientOid(req *CancelOrderByClientOidReq, ctx context.Context) (*CancelOrderByClientOidResp, error) // CancelOrderByClientOidSync Cancel Order By ClientOid Sync // Description: This endpoint can be used to cancel a spot order by orderId. // Documentation: https://www.kucoin.com/docs-new/api-3470186 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ CancelOrderByClientOidSync(req *CancelOrderByClientOidSyncReq, ctx context.Context) (*CancelOrderByClientOidSyncResp, error) // CancelPartialOrder Cancel Partial Order // Description: This interface can cancel the specified quantity of the order according to the orderId. The order execution order is: price first, time first, this interface will not change the queue order // Documentation: https://www.kucoin.com/docs-new/api-3470183 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ CancelPartialOrder(req *CancelPartialOrderReq, ctx context.Context) (*CancelPartialOrderResp, error) // CancelAllOrdersBySymbol Cancel All Orders By Symbol // Description: This endpoint can cancel all spot orders for specific symbol. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. // Documentation: https://www.kucoin.com/docs-new/api-3470175 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ CancelAllOrdersBySymbol(req *CancelAllOrdersBySymbolReq, ctx context.Context) (*CancelAllOrdersBySymbolResp, error) // CancelAllOrders Cancel All Orders // Description: This endpoint can cancel all spot orders for all symbol. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. // Documentation: https://www.kucoin.com/docs-new/api-3470176 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 30 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 30 | + // +-----------------------+---------+ CancelAllOrders(ctx context.Context) (*CancelAllOrdersResp, error) // ModifyOrder Modify Order - // Description: This interface can modify the price and quantity of the order according to orderId or clientOid. The implementation of this interface is: cancel the order and place a new order on the same trading pair, and return the modification result to the client synchronously When the quantity of the new order updated by the user is less than the filled quantity of this order, the order will be considered as completed, and the order will be cancelled, and no new order will be placed + // Description: This interface can modify the price and quantity of the order according to orderId or clientOid. The implementation of this interface is: Cancel the order and place a new order on the same trading pair, and return the modification result to the client synchronously. When the quantity of the new order updated by the user is less than the filled quantity of this order, the order will be considered as completed, and the order will be canceled, and no new order will be placed. // Documentation: https://www.kucoin.com/docs-new/api-3470171 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ ModifyOrder(req *ModifyOrderReq, ctx context.Context) (*ModifyOrderResp, error) // GetOrderByOrderId Get Order By OrderId // Description: This endpoint can be used to obtain information for a single Spot order using the order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. // Documentation: https://www.kucoin.com/docs-new/api-3470181 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetOrderByOrderId(req *GetOrderByOrderIdReq, ctx context.Context) (*GetOrderByOrderIdResp, error) // GetOrderByClientOid Get Order By ClientOid // Description: This endpoint can be used to obtain information for a single Spot order using the client order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. // Documentation: https://www.kucoin.com/docs-new/api-3470182 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetOrderByClientOid(req *GetOrderByClientOidReq, ctx context.Context) (*GetOrderByClientOidResp, error) // GetSymbolsWithOpenOrder Get Symbols With Open Order // Description: This interface can query all spot symbol that has active orders // Documentation: https://www.kucoin.com/docs-new/api-3470177 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetSymbolsWithOpenOrder(ctx context.Context) (*GetSymbolsWithOpenOrderResp, error) // GetOpenOrders Get Open Orders // Description: This interface is to obtain all Spot active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. // Documentation: https://www.kucoin.com/docs-new/api-3470178 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetOpenOrders(req *GetOpenOrdersReq, ctx context.Context) (*GetOpenOrdersResp, error) + // GetOpenOrdersByPage Get Open Orders By Page + // Description: This interface is to obtain Spot active order (uncompleted order) lists by page. The returned data is sorted in descending order according to the create time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. + // Documentation: https://www.kucoin.com/docs-new/api-3471591 + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ + GetOpenOrdersByPage(req *GetOpenOrdersByPageReq, ctx context.Context) (*GetOpenOrdersByPageResp, error) + // GetClosedOrders Get Closed Orders // Description: This interface is to obtain all Spot closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. // Documentation: https://www.kucoin.com/docs-new/api-3470179 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetClosedOrders(req *GetClosedOrdersReq, ctx context.Context) (*GetClosedOrdersResp, error) // GetTradeHistory Get Trade History // Description: This endpoint can be used to obtain a list of the latest Spot transaction details. The returned data is sorted in descending order according to the latest update time of the order. // Documentation: https://www.kucoin.com/docs-new/api-3470180 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetTradeHistory(req *GetTradeHistoryReq, ctx context.Context) (*GetTradeHistoryResp, error) // GetDCP Get DCP - // Description: Get Disconnection Protect(Deadman Swich)Through this interface, you can query the settings of automatic order cancellation + // Description: Get Disconnection Protect (Deadman Switch). Through this interface, you can query the settings of automatic order cancellation. // Documentation: https://www.kucoin.com/docs-new/api-3470172 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ GetDCP(ctx context.Context) (*GetDCPResp, error) // SetDCP Set DCP - // Description: Set Disconnection Protect(Deadman Swich)Through this interface, Call this interface to automatically cancel all orders of the set trading pair after the specified time. If this interface is not called again for renewal or cancellation before the set time, the system will help the user to cancel the order of the corresponding trading pair. Otherwise it will not. + // Description: Set Disconnection Protect (Deadman Switch). Through this interface, call this interface to automatically cancel all orders of the set trading pair after the specified time. If this interface is not called again for renewal or cancellation before the set time, the system will help the user to cancel the order of the corresponding trading pair. Otherwise it will not. // Documentation: https://www.kucoin.com/docs-new/api-3470173 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ SetDCP(req *SetDCPReq, ctx context.Context) (*SetDCPResp, error) // AddStopOrder Add Stop Order // Description: Place stop order to the Spot 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. // Documentation: https://www.kucoin.com/docs-new/api-3470334 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 1 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 1 | + // +-----------------------+---------+ // Deprecated AddStopOrder(req *AddStopOrderReq, ctx context.Context) (*AddStopOrderResp, error) // CancelStopOrderByClientOid Cancel Stop Order By ClientOid // Description: This endpoint can be used to cancel a spot stop order by clientOid. // Documentation: https://www.kucoin.com/docs-new/api-3470336 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 5 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+---------+ // Deprecated CancelStopOrderByClientOid(req *CancelStopOrderByClientOidReq, ctx context.Context) (*CancelStopOrderByClientOidResp, error) // CancelStopOrderByOrderId Cancel Stop Order By OrderId // Description: This endpoint can be used to cancel a spot stop order by orderId. // Documentation: https://www.kucoin.com/docs-new/api-3470335 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ // Deprecated CancelStopOrderByOrderId(req *CancelStopOrderByOrderIdReq, ctx context.Context) (*CancelStopOrderByOrderIdResp, error) // BatchCancelStopOrder Batch Cancel Stop Orders // Description: This endpoint can be used to cancel a spot stop orders by batch. // Documentation: https://www.kucoin.com/docs-new/api-3470337 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ BatchCancelStopOrder(req *BatchCancelStopOrderReq, ctx context.Context) (*BatchCancelStopOrderResp, error) // GetStopOrdersList Get Stop Orders List // Description: This interface is to obtain all Spot active stop order lists // Documentation: https://www.kucoin.com/docs-new/api-3470338 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 8 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 8 | + // +-----------------------+---------+ GetStopOrdersList(req *GetStopOrdersListReq, ctx context.Context) (*GetStopOrdersListResp, error) // GetStopOrderByOrderId Get Stop Order By OrderId // Description: This interface is to obtain Spot stop order details by orderId // Documentation: https://www.kucoin.com/docs-new/api-3470339 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ GetStopOrderByOrderId(req *GetStopOrderByOrderIdReq, ctx context.Context) (*GetStopOrderByOrderIdResp, error) // GetStopOrderByClientOid Get Stop Order By ClientOid // Description: This interface is to obtain Spot stop order details by orderId // Documentation: https://www.kucoin.com/docs-new/api-3470340 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ GetStopOrderByClientOid(req *GetStopOrderByClientOidReq, ctx context.Context) (*GetStopOrderByClientOidResp, error) // AddOcoOrder Add OCO Order // Description: Place OCO order to the Spot trading system // Documentation: https://www.kucoin.com/docs-new/api-3470353 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ // Deprecated AddOcoOrder(req *AddOcoOrderReq, ctx context.Context) (*AddOcoOrderResp, error) // CancelOcoOrderByOrderId Cancel OCO Order By OrderId - // Description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + // Description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. // Documentation: https://www.kucoin.com/docs-new/api-3470354 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ // Deprecated CancelOcoOrderByOrderId(req *CancelOcoOrderByOrderIdReq, ctx context.Context) (*CancelOcoOrderByOrderIdResp, error) // CancelOcoOrderByClientOid Cancel OCO Order By ClientOid // Description: Request via this interface to cancel a stop order via the clientOid. You will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes. // Documentation: https://www.kucoin.com/docs-new/api-3470355 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ // Deprecated CancelOcoOrderByClientOid(req *CancelOcoOrderByClientOidReq, ctx context.Context) (*CancelOcoOrderByClientOidResp, error) // BatchCancelOcoOrders Batch Cancel OCO Order - // Description: This interface can batch cancel OCO orders through orderIds. You will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes. + // Description: This interface can batch cancel OCO orders through orderIds. You will receive canceledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes. // Documentation: https://www.kucoin.com/docs-new/api-3470356 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ // Deprecated BatchCancelOcoOrders(req *BatchCancelOcoOrdersReq, ctx context.Context) (*BatchCancelOcoOrdersResp, error) // GetOcoOrderByOrderId Get OCO Order By OrderId - // Description: Request via this interface to get a oco order information via the order ID. + // Description: Request via this interface an OCO order information via the order ID. // Documentation: https://www.kucoin.com/docs-new/api-3470357 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ // Deprecated GetOcoOrderByOrderId(req *GetOcoOrderByOrderIdReq, ctx context.Context) (*GetOcoOrderByOrderIdResp, error) // GetOcoOrderByClientOid Get OCO Order By ClientOid // Description: Request via this interface to get a oco order information via the client order ID. // Documentation: https://www.kucoin.com/docs-new/api-3470358 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ // Deprecated GetOcoOrderByClientOid(req *GetOcoOrderByClientOidReq, ctx context.Context) (*GetOcoOrderByClientOidResp, error) // GetOcoOrderDetailByOrderId Get OCO Order Detail By OrderId // Description: Request via this interface to get a oco order detail via the order ID. // Documentation: https://www.kucoin.com/docs-new/api-3470359 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ // Deprecated GetOcoOrderDetailByOrderId(req *GetOcoOrderDetailByOrderIdReq, ctx context.Context) (*GetOcoOrderDetailByOrderIdResp, error) // GetOcoOrderList Get OCO Order List - // Description: Request via this endpoint to get your current OCO order list. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. + // Description: Request your current OCO order list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. // Documentation: https://www.kucoin.com/docs-new/api-3470360 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ // Deprecated GetOcoOrderList(req *GetOcoOrderListReq, ctx context.Context) (*GetOcoOrderListResp, error) // AddOrderOld Add Order - Old // Description: Place order to the Spot 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. // Documentation: https://www.kucoin.com/docs-new/api-3470333 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ // Deprecated AddOrderOld(req *AddOrderOldReq, ctx context.Context) (*AddOrderOldResp, error) // AddOrderTestOld Add Order Test - Old // Description: Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. // Documentation: https://www.kucoin.com/docs-new/api-3470341 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ // Deprecated AddOrderTestOld(req *AddOrderTestOldReq, ctx context.Context) (*AddOrderTestOldResp, error) // BatchAddOrdersOld Batch Add Orders - Old // Description: Request via this endpoint to place 5 orders at the same time. The order type must be a limit order of the same symbol. // Documentation: https://www.kucoin.com/docs-new/api-3470342 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ // Deprecated BatchAddOrdersOld(req *BatchAddOrdersOldReq, ctx context.Context) (*BatchAddOrdersOldResp, error) // CancelOrderByOrderIdOld Cancel Order By OrderId - Old - // Description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + // Description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. // Documentation: https://www.kucoin.com/docs-new/api-3470343 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ // Deprecated CancelOrderByOrderIdOld(req *CancelOrderByOrderIdOldReq, ctx context.Context) (*CancelOrderByOrderIdOldResp, error) // CancelOrderByClientOidOld Cancel Order By ClientOid - Old // Description: This endpoint can be used to cancel a spot order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. // Documentation: https://www.kucoin.com/docs-new/api-3470344 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ CancelOrderByClientOidOld(req *CancelOrderByClientOidOldReq, ctx context.Context) (*CancelOrderByClientOidOldResp, error) // BatchCancelOrderOld Batch Cancel Order - Old // Description: Request via this endpoint to cancel all open orders. The response is a list of ids of the canceled orders. // Documentation: https://www.kucoin.com/docs-new/api-3470345 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | SPOT | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 20 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | SPOT | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+---------+ // Deprecated BatchCancelOrderOld(req *BatchCancelOrderOldReq, ctx context.Context) (*BatchCancelOrderOldResp, error) // GetOrdersListOld Get Orders List - Old - // Description: Request via this endpoint to get your current order list. The return value is the data after Pagination, sorted in descending order according to time. + // Description: Request your current order list via this endpoint. The return value is the data after Pagination, sorted in descending order according to time. // Documentation: https://www.kucoin.com/docs-new/api-3470346 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ // Deprecated GetOrdersListOld(req *GetOrdersListOldReq, ctx context.Context) (*GetOrdersListOldResp, error) // GetRecentOrdersListOld Get Recent Orders List - Old - // Description: Request via this endpoint to get your current order list. The return value is the data after Pagination, sorted in descending order according to time. + // Description: Request your current order list via this endpoint. The return value is the data after Pagination, sorted in descending order according to time. // Documentation: https://www.kucoin.com/docs-new/api-3470347 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ // Deprecated - GetRecentOrdersListOld(req *GetRecentOrdersListOldReq, ctx context.Context) (*GetRecentOrdersListOldResp, error) + GetRecentOrdersListOld(ctx context.Context) (*GetRecentOrdersListOldResp, error) // GetOrderByOrderIdOld Get Order By OrderId - Old - // Description: Request via this endpoint to get a single order info by order ID. + // Description: Request a single order info by order ID via this endpoint. // Documentation: https://www.kucoin.com/docs-new/api-3470348 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 2 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 2 | + // +-----------------------+---------+ // Deprecated GetOrderByOrderIdOld(req *GetOrderByOrderIdOldReq, ctx context.Context) (*GetOrderByOrderIdOldResp, error) // GetOrderByClientOidOld Get Order By ClientOid - Old - // Description: Request via this interface to check the information of a single active order via clientOid. The system will prompt that the order does not exists if the order does not exist or has been settled. + // Description: Request via this interface to check the information of a single active order via clientOid. The system will send a prompt that the order does not exist if the order does not exist or has been settled. // Documentation: https://www.kucoin.com/docs-new/api-3470349 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 3 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 3 | + // +-----------------------+---------+ // Deprecated GetOrderByClientOidOld(req *GetOrderByClientOidOldReq, ctx context.Context) (*GetOrderByClientOidOldResp, error) // GetTradeHistoryOld Get Trade History - Old - // Description: Request via this endpoint to get the recent fills. The return value is the data after Pagination, sorted in descending order according to time. + // Description: Request recent fills via this endpoint. The return value is the data after Pagination, sorted in descending order according to time. // Documentation: https://www.kucoin.com/docs-new/api-3470350 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 10 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ // Deprecated GetTradeHistoryOld(req *GetTradeHistoryOldReq, ctx context.Context) (*GetTradeHistoryOldResp, error) // GetRecentTradeHistoryOld Get Recent Trade History - Old - // Description: Request via this endpoint to get a list of 1000 fills in the last 24 hours. The return value is the data after Pagination, sorted in descending order according to time. + // Description: Request a list of 1000 fills in the last 24 hours via this endpoint. The return value is the data after Pagination, sorted in descending order according to time. // Documentation: https://www.kucoin.com/docs-new/api-3470351 - // +---------------------+---------+ - // | Extra API Info | Value | - // +---------------------+---------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | SPOT | - // | API-RATE-LIMIT | 20 | - // +---------------------+---------+ + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | SPOT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+---------+ // Deprecated - GetRecentTradeHistoryOld(req *GetRecentTradeHistoryOldReq, ctx context.Context) (*GetRecentTradeHistoryOldResp, error) + GetRecentTradeHistoryOld(ctx context.Context) (*GetRecentTradeHistoryOldResp, error) } type OrderAPIImpl struct { @@ -814,6 +828,12 @@ func (impl *OrderAPIImpl) GetOpenOrders(req *GetOpenOrdersReq, ctx context.Conte return resp, err } +func (impl *OrderAPIImpl) GetOpenOrdersByPage(req *GetOpenOrdersByPageReq, ctx context.Context) (*GetOpenOrdersByPageResp, error) { + resp := &GetOpenOrdersByPageResp{} + err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/hf/orders/active/page", req, resp, false) + return resp, err +} + func (impl *OrderAPIImpl) GetClosedOrders(req *GetClosedOrdersReq, ctx context.Context) (*GetClosedOrdersResp, error) { resp := &GetClosedOrdersResp{} err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/hf/orders/done", req, resp, false) @@ -864,7 +884,7 @@ func (impl *OrderAPIImpl) BatchCancelStopOrder(req *BatchCancelStopOrderReq, ctx func (impl *OrderAPIImpl) GetStopOrdersList(req *GetStopOrdersListReq, ctx context.Context) (*GetStopOrdersListResp, error) { resp := &GetStopOrdersListResp{} - err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/stop-order", req, resp, true) + err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/stop-order", req, resp, false) return resp, err } @@ -970,9 +990,9 @@ func (impl *OrderAPIImpl) GetOrdersListOld(req *GetOrdersListOldReq, ctx context return resp, err } -func (impl *OrderAPIImpl) GetRecentOrdersListOld(req *GetRecentOrdersListOldReq, ctx context.Context) (*GetRecentOrdersListOldResp, error) { +func (impl *OrderAPIImpl) GetRecentOrdersListOld(ctx context.Context) (*GetRecentOrdersListOldResp, error) { resp := &GetRecentOrdersListOldResp{} - err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/limit/orders", req, resp, false) + err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/limit/orders", nil, resp, false) return resp, err } @@ -994,8 +1014,8 @@ func (impl *OrderAPIImpl) GetTradeHistoryOld(req *GetTradeHistoryOldReq, ctx con return resp, err } -func (impl *OrderAPIImpl) GetRecentTradeHistoryOld(req *GetRecentTradeHistoryOldReq, ctx context.Context) (*GetRecentTradeHistoryOldResp, error) { +func (impl *OrderAPIImpl) GetRecentTradeHistoryOld(ctx context.Context) (*GetRecentTradeHistoryOldResp, error) { resp := &GetRecentTradeHistoryOldResp{} - err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/limit/fills", req, resp, false) + err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/limit/fills", nil, resp, false) return resp, err } diff --git a/sdk/golang/pkg/generate/spot/order/api_order.template b/sdk/golang/pkg/generate/spot/order/api_order.template index dd2f23cb..46c25848 100644 --- a/sdk/golang/pkg/generate/spot/order/api_order.template +++ b/sdk/golang/pkg/generate/spot/order/api_order.template @@ -7,7 +7,7 @@ func TestOrderAddOrderReq(t *testing.T) { // /api/v1/hf/orders builder := order.NewAddOrderReqBuilder() - builder.SetClientOid(?).SetSide(?).SetSymbol(?).SetType(?).SetRemark(?).SetStp(?).SetPrice(?).SetSize(?).SetTimeInForce(?).SetPostOnly(?).SetHidden(?).SetIceberg(?).SetVisibleSize(?).SetTags(?).SetCancelAfter(?).SetFunds(?) + builder.SetClientOid(?).SetSide(?).SetSymbol(?).SetType(?).SetRemark(?).SetStp(?).SetPrice(?).SetSize(?).SetTimeInForce(?).SetPostOnly(?).SetHidden(?).SetIceberg(?).SetVisibleSize(?).SetTags(?).SetCancelAfter(?).SetFunds(?).SetAllowMaxTimeWindow(?).SetClientTimestamp(?) req := builder.Build() resp, err := orderApi.AddOrder(req, context.TODO()) @@ -30,7 +30,7 @@ func TestOrderAddOrderSyncReq(t *testing.T) { // /api/v1/hf/orders/sync builder := order.NewAddOrderSyncReqBuilder() - builder.SetClientOid(?).SetSide(?).SetSymbol(?).SetType(?).SetRemark(?).SetStp(?).SetPrice(?).SetSize(?).SetTimeInForce(?).SetPostOnly(?).SetHidden(?).SetIceberg(?).SetVisibleSize(?).SetTags(?).SetCancelAfter(?).SetFunds(?) + builder.SetClientOid(?).SetSide(?).SetSymbol(?).SetType(?).SetRemark(?).SetStp(?).SetPrice(?).SetSize(?).SetTimeInForce(?).SetPostOnly(?).SetHidden(?).SetIceberg(?).SetVisibleSize(?).SetTags(?).SetCancelAfter(?).SetFunds(?).SetAllowMaxTimeWindow(?).SetClientTimestamp(?) req := builder.Build() resp, err := orderApi.AddOrderSync(req, context.TODO()) @@ -53,7 +53,7 @@ func TestOrderAddOrderTestReq(t *testing.T) { // /api/v1/hf/orders/test builder := order.NewAddOrderTestReqBuilder() - builder.SetClientOid(?).SetSide(?).SetSymbol(?).SetType(?).SetRemark(?).SetStp(?).SetPrice(?).SetSize(?).SetTimeInForce(?).SetPostOnly(?).SetHidden(?).SetIceberg(?).SetVisibleSize(?).SetTags(?).SetCancelAfter(?).SetFunds(?) + builder.SetClientOid(?).SetSide(?).SetSymbol(?).SetType(?).SetRemark(?).SetStp(?).SetPrice(?).SetSize(?).SetTimeInForce(?).SetPostOnly(?).SetHidden(?).SetIceberg(?).SetVisibleSize(?).SetTags(?).SetCancelAfter(?).SetFunds(?).SetAllowMaxTimeWindow(?).SetClientTimestamp(?) req := builder.Build() resp, err := orderApi.AddOrderTest(req, context.TODO()) @@ -145,7 +145,7 @@ func TestOrderCancelOrderByOrderIdSyncReq(t *testing.T) { // /api/v1/hf/orders/sync/{orderId} builder := order.NewCancelOrderByOrderIdSyncReqBuilder() - builder.SetOrderId(?).SetSymbol(?) + builder.SetSymbol(?).SetOrderId(?) req := builder.Build() resp, err := orderApi.CancelOrderByOrderIdSync(req, context.TODO()) @@ -191,7 +191,7 @@ func TestOrderCancelOrderByClientOidSyncReq(t *testing.T) { // /api/v1/hf/orders/sync/client-order/{clientOid} builder := order.NewCancelOrderByClientOidSyncReqBuilder() - builder.SetClientOid(?).SetSymbol(?) + builder.SetSymbol(?).SetClientOid(?) req := builder.Build() resp, err := orderApi.CancelOrderByClientOidSync(req, context.TODO()) @@ -386,6 +386,29 @@ func TestOrderGetOpenOrdersReq(t *testing.T) { } +func TestOrderGetOpenOrdersByPageReq(t *testing.T) { + // GetOpenOrdersByPage + // Get Open Orders By Page + // /api/v1/hf/orders/active/page + + builder := order.NewGetOpenOrdersByPageReqBuilder() + builder.SetSymbol(?).SetPageNum(?).SetPageSize(?) + req := builder.Build() + + resp, err := orderApi.GetOpenOrdersByPage(req, context.TODO()) + if err != nil { + panic(err) + } + data, err := json.Marshal(resp.ToMap()) + if err != nil { + panic(err) + } + fmt.Println("code:", resp.CommonResponse.Code) + fmt.Println("message:", resp.CommonResponse.Message) + fmt.Println("data:", string(data)) +} + + func TestOrderGetClosedOrdersReq(t *testing.T) { // GetClosedOrders // Get Closed Orders @@ -895,7 +918,7 @@ func TestOrderCancelOrderByOrderIdOldReq(t *testing.T) { // /api/v1/orders/{orderId} builder := order.NewCancelOrderByOrderIdOldReqBuilder() - builder.SetSymbol(?).SetOrderId(?) + builder.SetOrderId(?) req := builder.Build() resp, err := orderApi.CancelOrderByOrderIdOld(req, context.TODO()) @@ -918,7 +941,7 @@ func TestOrderCancelOrderByClientOidOldReq(t *testing.T) { // /api/v1/order/client-order/{clientOid} builder := order.NewCancelOrderByClientOidOldReqBuilder() - builder.SetSymbol(?).SetClientOid(?) + builder.SetClientOid(?) req := builder.Build() resp, err := orderApi.CancelOrderByClientOidOld(req, context.TODO()) @@ -986,11 +1009,8 @@ func TestOrderGetRecentOrdersListOldReq(t *testing.T) { // Get Recent Orders List - Old // /api/v1/limit/orders - builder := order.NewGetRecentOrdersListOldReqBuilder() - builder.SetCurrentPage(?).SetPageSize(?) - req := builder.Build() - resp, err := orderApi.GetRecentOrdersListOld(req, context.TODO()) + resp, err := orderApi.GetRecentOrdersListOld(context.TODO()) if err != nil { panic(err) } @@ -1078,11 +1098,8 @@ func TestOrderGetRecentTradeHistoryOldReq(t *testing.T) { // Get Recent Trade History - Old // /api/v1/limit/fills - builder := order.NewGetRecentTradeHistoryOldReqBuilder() - builder.SetCurrentPage(?).SetPageSize(?) - req := builder.Build() - resp, err := orderApi.GetRecentTradeHistoryOld(req, context.TODO()) + resp, err := orderApi.GetRecentTradeHistoryOld(context.TODO()) if err != nil { panic(err) } diff --git a/sdk/golang/pkg/generate/spot/order/api_order_test.go b/sdk/golang/pkg/generate/spot/order/api_order_test.go index 9561f2f3..49c5f29a 100644 --- a/sdk/golang/pkg/generate/spot/order/api_order_test.go +++ b/sdk/golang/pkg/generate/spot/order/api_order_test.go @@ -180,7 +180,7 @@ func TestOrderCancelOrderByOrderIdSyncReqModel(t *testing.T) { // Cancel Order By OrderId Sync // /api/v1/hf/orders/sync/{orderId} - data := "{\"orderId\": \"671128ee365ccb0007534d45\", \"symbol\": \"BTC-USDT\"}" + data := "{\"symbol\": \"BTC-USDT\", \"orderId\": \"671128ee365ccb0007534d45\"}" req := &CancelOrderByOrderIdSyncReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() @@ -236,7 +236,7 @@ func TestOrderCancelOrderByClientOidSyncReqModel(t *testing.T) { // Cancel Order By ClientOid Sync // /api/v1/hf/orders/sync/client-order/{clientOid} - data := "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"symbol\": \"BTC-USDT\"}" + data := "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e493fb\"}" req := &CancelOrderByClientOidSyncReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() @@ -473,6 +473,34 @@ func TestOrderGetOpenOrdersRespModel(t *testing.T) { assert.Nil(t, err) } +func TestOrderGetOpenOrdersByPageReqModel(t *testing.T) { + // GetOpenOrdersByPage + // Get Open Orders By Page + // /api/v1/hf/orders/active/page + + data := "{\"symbol\": \"BTC-USDT\", \"pageNum\": 1, \"pageSize\": 20}" + req := &GetOpenOrdersByPageReq{} + err := json.Unmarshal([]byte(data), req) + req.ToMap() + assert.Nil(t, err) +} + +func TestOrderGetOpenOrdersByPageRespModel(t *testing.T) { + // GetOpenOrdersByPage + // Get Open Orders By Page + // /api/v1/hf/orders/active/page + + data := "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 20,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"id\": \"67c1437ea5226600071cc080\",\n \"symbol\": \"BTC-USDT\",\n \"opType\": \"DEAL\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"funds\": \"0.5\",\n \"dealSize\": \"0\",\n \"dealFunds\": \"0\",\n \"fee\": \"0\",\n \"feeCurrency\": \"USDT\",\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": \"0\",\n \"cancelAfter\": 0,\n \"channel\": \"API\",\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"remark\": \"order remarks\",\n \"tags\": null,\n \"cancelExist\": false,\n \"createdAt\": 1740718974367,\n \"lastUpdatedAt\": 1741867658590,\n \"tradeType\": \"TRADE\",\n \"inOrderBook\": true,\n \"cancelledSize\": \"0\",\n \"cancelledFunds\": \"0\",\n \"remainSize\": \"0.00001\",\n \"remainFunds\": \"0.5\",\n \"tax\": \"0\",\n \"active\": true\n }\n ]\n }\n}" + commonResp := &types.RestResponse{} + err := json.Unmarshal([]byte(data), commonResp) + assert.Nil(t, err) + assert.NotNil(t, commonResp.Data) + resp := &GetOpenOrdersByPageResp{} + err = json.Unmarshal([]byte(commonResp.Data), resp) + resp.ToMap() + assert.Nil(t, err) +} + func TestOrderGetClosedOrdersReqModel(t *testing.T) { // GetClosedOrders // Get Closed Orders @@ -585,7 +613,7 @@ func TestOrderAddStopOrderReqModel(t *testing.T) { // Add Stop Order // /api/v1/stop-order - data := "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\", \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493fb\", \"remark\": \"order remarks\"}" + data := "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\", \"stopPrice\": \"50000\", \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493fb\", \"remark\": \"order remarks\"}" req := &AddStopOrderReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() @@ -597,7 +625,7 @@ func TestOrderAddStopOrderRespModel(t *testing.T) { // Add Stop Order // /api/v1/stop-order - data := "{\"code\":\"200000\",\"data\":{\"orderId\":\"670fd33bf9406e0007ab3945\",\"clientOid\":\"5c52e11203aa677f33e493fb\"}}" + data := "{\n \"code\": \"200000\",\n \"data\": {\n \"orderId\": \"670fd33bf9406e0007ab3945\"\n }\n}" commonResp := &types.RestResponse{} err := json.Unmarshal([]byte(data), commonResp) assert.Nil(t, err) @@ -697,7 +725,7 @@ func TestOrderGetStopOrdersListReqModel(t *testing.T) { // Get Stop Orders List // /api/v1/stop-order - data := "{\"symbol\": \"BTC-USDT\", \"orderId\": \"670fd33bf9406e0007ab3945\", \"newPrice\": \"30000\", \"newSize\": \"0.0001\"}" + data := "{\"symbol\": \"example_string_default_value\", \"side\": \"example_string_default_value\", \"type\": \"limit\", \"tradeType\": \"example_string_default_value\", \"startAt\": 123456, \"endAt\": 123456, \"currentPage\": 1, \"orderIds\": \"example_string_default_value\", \"pageSize\": 50, \"stop\": \"example_string_default_value\"}" req := &GetStopOrdersListReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() @@ -709,7 +737,7 @@ func TestOrderGetStopOrdersListRespModel(t *testing.T) { // Get Stop Orders List // /api/v1/stop-order - data := "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 50,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"id\": \"vs8hoo8kqjnklv4m0038lrfq\",\n \"symbol\": \"KCS-USDT\",\n \"userId\": \"60fe4956c43cbc0006562c2c\",\n \"status\": \"NEW\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"0.01000000000000000000\",\n \"size\": \"0.01000000000000000000\",\n \"funds\": null,\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"cancelAfter\": -1,\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": null,\n \"channel\": \"API\",\n \"clientOid\": \"404814a0fb4311eb9098acde48001122\",\n \"remark\": null,\n \"tags\": null,\n \"orderTime\": 1628755183702150100,\n \"domainId\": \"kucoin\",\n \"tradeSource\": \"USER\",\n \"tradeType\": \"TRADE\",\n \"feeCurrency\": \"USDT\",\n \"takerFeeRate\": \"0.00200000000000000000\",\n \"makerFeeRate\": \"0.00200000000000000000\",\n \"createdAt\": 1628755183704,\n \"stop\": \"loss\",\n \"stopTriggerTime\": null,\n \"stopPrice\": \"10.00000000000000000000\"\n }\n ]\n }\n}" + data := "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 50,\n \"totalNum\": 2,\n \"totalPage\": 1,\n \"items\": [\n {\n \"id\": \"vs93gptvr9t2fsql003l8k5p\",\n \"symbol\": \"BTC-USDT\",\n \"userId\": \"633559791e1cbc0001f319bc\",\n \"status\": \"NEW\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"50000.00000000000000000000\",\n \"size\": \"0.00001000000000000000\",\n \"funds\": null,\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"cancelAfter\": -1,\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": null,\n \"channel\": \"API\",\n \"clientOid\": \"5c52e11203aa677f222233e493fb\",\n \"remark\": \"order remarks\",\n \"tags\": null,\n \"relatedNo\": null,\n \"orderTime\": 1740626554883000024,\n \"domainId\": \"kucoin\",\n \"tradeSource\": \"USER\",\n \"tradeType\": \"TRADE\",\n \"feeCurrency\": \"USDT\",\n \"takerFeeRate\": \"0.00100000000000000000\",\n \"makerFeeRate\": \"0.00100000000000000000\",\n \"createdAt\": 1740626554884,\n \"stop\": \"loss\",\n \"stopTriggerTime\": null,\n \"stopPrice\": \"60000.00000000000000000000\",\n \"limitPrice\": null,\n \"pop\": null,\n \"activateCondition\": null\n }\n ]\n }\n}" commonResp := &types.RestResponse{} err := json.Unmarshal([]byte(data), commonResp) assert.Nil(t, err) @@ -1089,7 +1117,7 @@ func TestOrderCancelOrderByOrderIdOldReqModel(t *testing.T) { // Cancel Order By OrderId - Old // /api/v1/orders/{orderId} - data := "{\"symbol\": \"BTC-USDT\", \"orderId\": \"674a97dfef434f0007efc431\"}" + data := "{\"orderId\": \"674a97dfef434f0007efc431\"}" req := &CancelOrderByOrderIdOldReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() @@ -1117,7 +1145,7 @@ func TestOrderCancelOrderByClientOidOldReqModel(t *testing.T) { // Cancel Order By ClientOid - Old // /api/v1/order/client-order/{clientOid} - data := "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e4923fb\"}" + data := "{\"clientOid\": \"5c52e11203aa677f331e493fb\"}" req := &CancelOrderByClientOidOldReq{} err := json.Unmarshal([]byte(data), req) req.ToMap() @@ -1129,7 +1157,7 @@ func TestOrderCancelOrderByClientOidOldRespModel(t *testing.T) { // Cancel Order By ClientOid - Old // /api/v1/order/client-order/{clientOid} - data := "{\n \"code\": \"200000\",\n \"data\": {\n \"cancelledOrderId\": \"674a9a872033a50007e2790d\",\n \"clientOid\": \"5c52e11203aa677f33e4923fb\",\n \"cancelledOcoOrderIds\": null\n }\n}" + data := "{\n \"code\": \"200000\",\n \"data\": {\n \"cancelledOrderId\": \"67c3252a63d25e0007f91de9\",\n \"clientOid\": \"5c52e11203aa677f331e493fb\",\n \"cancelledOcoOrderIds\": null\n }\n}" commonResp := &types.RestResponse{} err := json.Unmarshal([]byte(data), commonResp) assert.Nil(t, err) @@ -1201,11 +1229,6 @@ func TestOrderGetRecentOrdersListOldReqModel(t *testing.T) { // Get Recent Orders List - Old // /api/v1/limit/orders - data := "{\"currentPage\": 1, \"pageSize\": 50}" - req := &GetRecentOrdersListOldReq{} - err := json.Unmarshal([]byte(data), req) - req.ToMap() - assert.Nil(t, err) } func TestOrderGetRecentOrdersListOldRespModel(t *testing.T) { @@ -1313,11 +1336,6 @@ func TestOrderGetRecentTradeHistoryOldReqModel(t *testing.T) { // Get Recent Trade History - Old // /api/v1/limit/fills - data := "{\"currentPage\": 1, \"pageSize\": 50}" - req := &GetRecentTradeHistoryOldReq{} - err := json.Unmarshal([]byte(data), req) - req.ToMap() - assert.Nil(t, err) } func TestOrderGetRecentTradeHistoryOldRespModel(t *testing.T) { diff --git a/sdk/golang/pkg/generate/spot/order/types_add_order_req.go b/sdk/golang/pkg/generate/spot/order/types_add_order_req.go index 5bc9d072..4c0154f8 100644 --- a/sdk/golang/pkg/generate/spot/order/types_add_order_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_add_order_req.go @@ -32,10 +32,14 @@ type AddOrderReq struct { VisibleSize *string `json:"visibleSize,omitempty"` // Order tag, length cannot exceed 20 characters (ASCII) Tags *string `json:"tags,omitempty"` - // Cancel after n seconds,the order timing strategy is GTT + // Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 CancelAfter *int64 `json:"cancelAfter,omitempty"` - // When **type** is market, select one out of two: size or funds + // When **type** is market, select one out of two: size or funds When placing a market order, the funds field refers to the funds for the priced asset (the asset name written latter) of the trading pair. The funds must be based on the quoteIncrement of the trading pair. The quoteIncrement represents the precision of the trading pair. The funds value for an order must be a multiple of quoteIncrement and must be between quoteMinSize and quoteMaxSize. Funds *string `json:"funds,omitempty"` + // Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. + AllowMaxTimeWindow *int64 `json:"allowMaxTimeWindow,omitempty"` + // Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. + ClientTimestamp *int64 `json:"clientTimestamp,omitempty"` } // NewAddOrderReq instantiates a new AddOrderReq object @@ -53,6 +57,8 @@ func NewAddOrderReq(side string, symbol string, Type_ string) *AddOrderReq { this.Hidden = &hidden var iceberg bool = false this.Iceberg = &iceberg + var cancelAfter int64 = -1 + this.CancelAfter = &cancelAfter return &this } @@ -68,6 +74,8 @@ func NewAddOrderReqWithDefaults() *AddOrderReq { this.Hidden = &hidden var iceberg bool = false this.Iceberg = &iceberg + var cancelAfter int64 = -1 + this.CancelAfter = &cancelAfter return &this } @@ -89,6 +97,8 @@ func (o *AddOrderReq) ToMap() map[string]interface{} { toSerialize["tags"] = o.Tags toSerialize["cancelAfter"] = o.CancelAfter toSerialize["funds"] = o.Funds + toSerialize["allowMaxTimeWindow"] = o.AllowMaxTimeWindow + toSerialize["clientTimestamp"] = o.ClientTimestamp return toSerialize } @@ -184,18 +194,30 @@ func (builder *AddOrderReqBuilder) SetTags(value string) *AddOrderReqBuilder { return builder } -// Cancel after n seconds,the order timing strategy is GTT +// Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 func (builder *AddOrderReqBuilder) SetCancelAfter(value int64) *AddOrderReqBuilder { builder.obj.CancelAfter = &value return builder } -// When **type** is market, select one out of two: size or funds +// When **type** is market, select one out of two: size or funds When placing a market order, the funds field refers to the funds for the priced asset (the asset name written latter) of the trading pair. The funds must be based on the quoteIncrement of the trading pair. The quoteIncrement represents the precision of the trading pair. The funds value for an order must be a multiple of quoteIncrement and must be between quoteMinSize and quoteMaxSize. func (builder *AddOrderReqBuilder) SetFunds(value string) *AddOrderReqBuilder { builder.obj.Funds = &value return builder } +// Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. +func (builder *AddOrderReqBuilder) SetAllowMaxTimeWindow(value int64) *AddOrderReqBuilder { + builder.obj.AllowMaxTimeWindow = &value + return builder +} + +// Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. +func (builder *AddOrderReqBuilder) SetClientTimestamp(value int64) *AddOrderReqBuilder { + builder.obj.ClientTimestamp = &value + return builder +} + func (builder *AddOrderReqBuilder) Build() *AddOrderReq { return builder.obj } diff --git a/sdk/golang/pkg/generate/spot/order/types_add_order_sync_req.go b/sdk/golang/pkg/generate/spot/order/types_add_order_sync_req.go index eda9593f..7438acbc 100644 --- a/sdk/golang/pkg/generate/spot/order/types_add_order_sync_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_add_order_sync_req.go @@ -4,13 +4,13 @@ package order // AddOrderSyncReq struct for AddOrderSyncReq type AddOrderSyncReq struct { - // Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + // Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. ClientOid *string `json:"clientOid,omitempty"` - // specify if the order is to 'buy' or 'sell' + // Specify if the order is to 'buy' or 'sell'. Side string `json:"side,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` - // specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + // Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. Type string `json:"type,omitempty"` // Order placement remarks, length cannot exceed 20 characters (ASCII) Remark *string `json:"remark,omitempty"` @@ -18,7 +18,7 @@ type AddOrderSyncReq struct { Stp *string `json:"stp,omitempty"` // Specify price for order When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. Price *string `json:"price,omitempty"` - // Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + // Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds Size *string `json:"size,omitempty"` // [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading TimeInForce *string `json:"timeInForce,omitempty"` @@ -32,10 +32,14 @@ type AddOrderSyncReq struct { VisibleSize *string `json:"visibleSize,omitempty"` // Order tag, length cannot exceed 20 characters (ASCII) Tags *string `json:"tags,omitempty"` - // Cancel after n seconds,the order timing strategy is GTT + // Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 CancelAfter *int64 `json:"cancelAfter,omitempty"` // When **type** is market, select one out of two: size or funds Funds *string `json:"funds,omitempty"` + // The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + AllowMaxTimeWindow *int64 `json:"allowMaxTimeWindow,omitempty"` + // Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + ClientTimestamp *int64 `json:"clientTimestamp,omitempty"` } // NewAddOrderSyncReq instantiates a new AddOrderSyncReq object @@ -53,6 +57,8 @@ func NewAddOrderSyncReq(side string, symbol string, Type_ string) *AddOrderSyncR this.Hidden = &hidden var iceberg bool = false this.Iceberg = &iceberg + var cancelAfter int64 = -1 + this.CancelAfter = &cancelAfter return &this } @@ -68,6 +74,8 @@ func NewAddOrderSyncReqWithDefaults() *AddOrderSyncReq { this.Hidden = &hidden var iceberg bool = false this.Iceberg = &iceberg + var cancelAfter int64 = -1 + this.CancelAfter = &cancelAfter return &this } @@ -89,6 +97,8 @@ func (o *AddOrderSyncReq) ToMap() map[string]interface{} { toSerialize["tags"] = o.Tags toSerialize["cancelAfter"] = o.CancelAfter toSerialize["funds"] = o.Funds + toSerialize["allowMaxTimeWindow"] = o.AllowMaxTimeWindow + toSerialize["clientTimestamp"] = o.ClientTimestamp return toSerialize } @@ -100,13 +110,13 @@ func NewAddOrderSyncReqBuilder() *AddOrderSyncReqBuilder { return &AddOrderSyncReqBuilder{obj: NewAddOrderSyncReqWithDefaults()} } -// Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. +// Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. func (builder *AddOrderSyncReqBuilder) SetClientOid(value string) *AddOrderSyncReqBuilder { builder.obj.ClientOid = &value return builder } -// specify if the order is to 'buy' or 'sell' +// Specify if the order is to 'buy' or 'sell'. func (builder *AddOrderSyncReqBuilder) SetSide(value string) *AddOrderSyncReqBuilder { builder.obj.Side = value return builder @@ -118,7 +128,7 @@ func (builder *AddOrderSyncReqBuilder) SetSymbol(value string) *AddOrderSyncReqB return builder } -// specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. +// Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. func (builder *AddOrderSyncReqBuilder) SetType(value string) *AddOrderSyncReqBuilder { builder.obj.Type = value return builder @@ -142,7 +152,7 @@ func (builder *AddOrderSyncReqBuilder) SetPrice(value string) *AddOrderSyncReqBu return builder } -// Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds +// Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds func (builder *AddOrderSyncReqBuilder) SetSize(value string) *AddOrderSyncReqBuilder { builder.obj.Size = &value return builder @@ -184,7 +194,7 @@ func (builder *AddOrderSyncReqBuilder) SetTags(value string) *AddOrderSyncReqBui return builder } -// Cancel after n seconds,the order timing strategy is GTT +// Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 func (builder *AddOrderSyncReqBuilder) SetCancelAfter(value int64) *AddOrderSyncReqBuilder { builder.obj.CancelAfter = &value return builder @@ -196,6 +206,18 @@ func (builder *AddOrderSyncReqBuilder) SetFunds(value string) *AddOrderSyncReqBu return builder } +// The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. +func (builder *AddOrderSyncReqBuilder) SetAllowMaxTimeWindow(value int64) *AddOrderSyncReqBuilder { + builder.obj.AllowMaxTimeWindow = &value + return builder +} + +// Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. +func (builder *AddOrderSyncReqBuilder) SetClientTimestamp(value int64) *AddOrderSyncReqBuilder { + builder.obj.ClientTimestamp = &value + return builder +} + func (builder *AddOrderSyncReqBuilder) Build() *AddOrderSyncReq { return builder.obj } diff --git a/sdk/golang/pkg/generate/spot/order/types_add_order_sync_resp.go b/sdk/golang/pkg/generate/spot/order/types_add_order_sync_resp.go index cc982cf5..e4526408 100644 --- a/sdk/golang/pkg/generate/spot/order/types_add_order_sync_resp.go +++ b/sdk/golang/pkg/generate/spot/order/types_add_order_sync_resp.go @@ -10,20 +10,20 @@ import ( type AddOrderSyncResp struct { // common response CommonResponse *types.RestResponse - // The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + // The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. OrderId string `json:"orderId,omitempty"` - // The user self-defined order id. + // The user self-defined order ID. ClientOid string `json:"clientOid,omitempty"` OrderTime int64 `json:"orderTime,omitempty"` - // original order size + // Original order size OriginSize string `json:"originSize,omitempty"` - // deal size + // Deal size DealSize string `json:"dealSize,omitempty"` - // remain size + // Remain size RemainSize string `json:"remainSize,omitempty"` // Cumulative canceled size CanceledSize string `json:"canceledSize,omitempty"` - // Order Status. open:order is active; done:order has been completed + // Order Status. open: order is active; done: order has been completed Status string `json:"status,omitempty"` MatchTime int64 `json:"matchTime,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/order/types_add_order_test_req.go b/sdk/golang/pkg/generate/spot/order/types_add_order_test_req.go index a53761c5..5626d0bc 100644 --- a/sdk/golang/pkg/generate/spot/order/types_add_order_test_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_add_order_test_req.go @@ -32,10 +32,14 @@ type AddOrderTestReq struct { VisibleSize *string `json:"visibleSize,omitempty"` // Order tag, length cannot exceed 20 characters (ASCII) Tags *string `json:"tags,omitempty"` - // Cancel after n seconds,the order timing strategy is GTT + // Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 CancelAfter *int64 `json:"cancelAfter,omitempty"` // When **type** is market, select one out of two: size or funds Funds *string `json:"funds,omitempty"` + // Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. + AllowMaxTimeWindow *int64 `json:"allowMaxTimeWindow,omitempty"` + // Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. + ClientTimestamp *int64 `json:"clientTimestamp,omitempty"` } // NewAddOrderTestReq instantiates a new AddOrderTestReq object @@ -53,6 +57,8 @@ func NewAddOrderTestReq(side string, symbol string, Type_ string) *AddOrderTestR this.Hidden = &hidden var iceberg bool = false this.Iceberg = &iceberg + var cancelAfter int64 = -1 + this.CancelAfter = &cancelAfter return &this } @@ -68,6 +74,8 @@ func NewAddOrderTestReqWithDefaults() *AddOrderTestReq { this.Hidden = &hidden var iceberg bool = false this.Iceberg = &iceberg + var cancelAfter int64 = -1 + this.CancelAfter = &cancelAfter return &this } @@ -89,6 +97,8 @@ func (o *AddOrderTestReq) ToMap() map[string]interface{} { toSerialize["tags"] = o.Tags toSerialize["cancelAfter"] = o.CancelAfter toSerialize["funds"] = o.Funds + toSerialize["allowMaxTimeWindow"] = o.AllowMaxTimeWindow + toSerialize["clientTimestamp"] = o.ClientTimestamp return toSerialize } @@ -184,7 +194,7 @@ func (builder *AddOrderTestReqBuilder) SetTags(value string) *AddOrderTestReqBui return builder } -// Cancel after n seconds,the order timing strategy is GTT +// Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 func (builder *AddOrderTestReqBuilder) SetCancelAfter(value int64) *AddOrderTestReqBuilder { builder.obj.CancelAfter = &value return builder @@ -196,6 +206,18 @@ func (builder *AddOrderTestReqBuilder) SetFunds(value string) *AddOrderTestReqBu return builder } +// Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. +func (builder *AddOrderTestReqBuilder) SetAllowMaxTimeWindow(value int64) *AddOrderTestReqBuilder { + builder.obj.AllowMaxTimeWindow = &value + return builder +} + +// Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. +func (builder *AddOrderTestReqBuilder) SetClientTimestamp(value int64) *AddOrderTestReqBuilder { + builder.obj.ClientTimestamp = &value + return builder +} + func (builder *AddOrderTestReqBuilder) Build() *AddOrderTestReq { return builder.obj } diff --git a/sdk/golang/pkg/generate/spot/order/types_add_stop_order_req.go b/sdk/golang/pkg/generate/spot/order/types_add_stop_order_req.go index a77e3ebe..fa9f5b74 100644 --- a/sdk/golang/pkg/generate/spot/order/types_add_stop_order_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_add_stop_order_req.go @@ -30,7 +30,7 @@ type AddStopOrderReq struct { Iceberg *bool `json:"iceberg,omitempty"` // When **type** is limit, this is Maximum visible quantity in iceberg orders. VisibleSize *string `json:"visibleSize,omitempty"` - // Cancel after n seconds,the order timing strategy is GTT when **type** is limit. + // Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 CancelAfter *int64 `json:"cancelAfter,omitempty"` // When **type** is market, select one out of two: size or funds Funds *string `json:"funds,omitempty"` @@ -55,6 +55,8 @@ func NewAddStopOrderReq(side string, symbol string, Type_ string, stopPrice stri this.Hidden = &hidden var iceberg bool = false this.Iceberg = &iceberg + var cancelAfter int64 = -1 + this.CancelAfter = &cancelAfter this.StopPrice = stopPrice return &this } @@ -71,6 +73,8 @@ func NewAddStopOrderReqWithDefaults() *AddStopOrderReq { this.Hidden = &hidden var iceberg bool = false this.Iceberg = &iceberg + var cancelAfter int64 = -1 + this.CancelAfter = &cancelAfter return &this } @@ -182,7 +186,7 @@ func (builder *AddStopOrderReqBuilder) SetVisibleSize(value string) *AddStopOrde return builder } -// Cancel after n seconds,the order timing strategy is GTT when **type** is limit. +// Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 func (builder *AddStopOrderReqBuilder) SetCancelAfter(value int64) *AddStopOrderReqBuilder { builder.obj.CancelAfter = &value return builder diff --git a/sdk/golang/pkg/generate/spot/order/types_add_stop_order_resp.go b/sdk/golang/pkg/generate/spot/order/types_add_stop_order_resp.go index 4c3dc235..bd0cb945 100644 --- a/sdk/golang/pkg/generate/spot/order/types_add_stop_order_resp.go +++ b/sdk/golang/pkg/generate/spot/order/types_add_stop_order_resp.go @@ -12,16 +12,13 @@ type AddStopOrderResp struct { CommonResponse *types.RestResponse // The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. OrderId string `json:"orderId,omitempty"` - // The user self-defined order id. - ClientOid string `json:"clientOid,omitempty"` } // NewAddStopOrderResp instantiates a new AddStopOrderResp object // This constructor will assign default values to properties that have it defined -func NewAddStopOrderResp(orderId string, clientOid string) *AddStopOrderResp { +func NewAddStopOrderResp(orderId string) *AddStopOrderResp { this := AddStopOrderResp{} this.OrderId = orderId - this.ClientOid = clientOid return &this } @@ -35,7 +32,6 @@ func NewAddStopOrderRespWithDefaults() *AddStopOrderResp { func (o *AddStopOrderResp) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} toSerialize["orderId"] = o.OrderId - toSerialize["clientOid"] = o.ClientOid return toSerialize } diff --git a/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_data.go b/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_data.go index 0be59e37..707db949 100644 --- a/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_data.go +++ b/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_data.go @@ -4,13 +4,13 @@ package order // BatchAddOrdersData struct for BatchAddOrdersData type BatchAddOrdersData struct { - // The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + // The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. OrderId *string `json:"orderId,omitempty"` - // The user self-defined order id. + // The user self-defined order ID. ClientOid *string `json:"clientOid,omitempty"` // Add order success/failure Success bool `json:"success,omitempty"` - // error message + // Error message FailMsg *string `json:"failMsg,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_order_list.go b/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_order_list.go index 7afbbe92..d74f1f7a 100644 --- a/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_order_list.go +++ b/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_order_list.go @@ -4,23 +4,23 @@ package order // BatchAddOrdersOrderList struct for BatchAddOrdersOrderList type BatchAddOrdersOrderList struct { - // Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. + // Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. ClientOid *string `json:"clientOid,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` - // Specify if the order is an 'limit' order or 'market' order. + // Specify if the order is a 'limit' order or 'market' order. Type string `json:"type,omitempty"` // [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading TimeInForce *string `json:"timeInForce,omitempty"` - // Specify if the order is to 'buy' or 'sell' + // Specify if the order is to 'buy' or 'sell'. Side string `json:"side,omitempty"` // Specify price for order Price string `json:"price,omitempty"` - // Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + // Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds Size *string `json:"size,omitempty"` // [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC Stp *string `json:"stp,omitempty"` - // Cancel after n seconds,the order timing strategy is GTT + // Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 CancelAfter *int64 `json:"cancelAfter,omitempty"` // passive order labels, this is disabled when the order timing strategy is IOC or FOK PostOnly *bool `json:"postOnly,omitempty"` @@ -36,6 +36,10 @@ type BatchAddOrdersOrderList struct { Remark *string `json:"remark,omitempty"` // When **type** is market, select one out of two: size or funds Funds *string `json:"funds,omitempty"` + // Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + ClientTimestamp *int64 `json:"clientTimestamp,omitempty"` + // The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + AllowMaxTimeWindow *int64 `json:"allowMaxTimeWindow,omitempty"` } // NewBatchAddOrdersOrderList instantiates a new BatchAddOrdersOrderList object @@ -48,6 +52,8 @@ func NewBatchAddOrdersOrderList(symbol string, Type_ string, side string, price this.TimeInForce = &timeInForce this.Side = side this.Price = price + var cancelAfter int64 = -1 + this.CancelAfter = &cancelAfter var postOnly bool = false this.PostOnly = &postOnly var hidden bool = false @@ -63,6 +69,8 @@ func NewBatchAddOrdersOrderListWithDefaults() *BatchAddOrdersOrderList { this := BatchAddOrdersOrderList{} var timeInForce string = "GTC" this.TimeInForce = &timeInForce + var cancelAfter int64 = -1 + this.CancelAfter = &cancelAfter var postOnly bool = false this.PostOnly = &postOnly var hidden bool = false @@ -90,6 +98,8 @@ func (o *BatchAddOrdersOrderList) ToMap() map[string]interface{} { toSerialize["tags"] = o.Tags toSerialize["remark"] = o.Remark toSerialize["funds"] = o.Funds + toSerialize["clientTimestamp"] = o.ClientTimestamp + toSerialize["allowMaxTimeWindow"] = o.AllowMaxTimeWindow return toSerialize } @@ -101,7 +111,7 @@ func NewBatchAddOrdersOrderListBuilder() *BatchAddOrdersOrderListBuilder { return &BatchAddOrdersOrderListBuilder{obj: NewBatchAddOrdersOrderListWithDefaults()} } -// Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. +// Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. func (builder *BatchAddOrdersOrderListBuilder) SetClientOid(value string) *BatchAddOrdersOrderListBuilder { builder.obj.ClientOid = &value return builder @@ -113,7 +123,7 @@ func (builder *BatchAddOrdersOrderListBuilder) SetSymbol(value string) *BatchAdd return builder } -// Specify if the order is an 'limit' order or 'market' order. +// Specify if the order is a 'limit' order or 'market' order. func (builder *BatchAddOrdersOrderListBuilder) SetType(value string) *BatchAddOrdersOrderListBuilder { builder.obj.Type = value return builder @@ -125,7 +135,7 @@ func (builder *BatchAddOrdersOrderListBuilder) SetTimeInForce(value string) *Bat return builder } -// Specify if the order is to 'buy' or 'sell' +// Specify if the order is to 'buy' or 'sell'. func (builder *BatchAddOrdersOrderListBuilder) SetSide(value string) *BatchAddOrdersOrderListBuilder { builder.obj.Side = value return builder @@ -137,7 +147,7 @@ func (builder *BatchAddOrdersOrderListBuilder) SetPrice(value string) *BatchAddO return builder } -// Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds +// Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds func (builder *BatchAddOrdersOrderListBuilder) SetSize(value string) *BatchAddOrdersOrderListBuilder { builder.obj.Size = &value return builder @@ -149,7 +159,7 @@ func (builder *BatchAddOrdersOrderListBuilder) SetStp(value string) *BatchAddOrd return builder } -// Cancel after n seconds,the order timing strategy is GTT +// Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 func (builder *BatchAddOrdersOrderListBuilder) SetCancelAfter(value int64) *BatchAddOrdersOrderListBuilder { builder.obj.CancelAfter = &value return builder @@ -197,6 +207,18 @@ func (builder *BatchAddOrdersOrderListBuilder) SetFunds(value string) *BatchAddO return builder } +// Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. +func (builder *BatchAddOrdersOrderListBuilder) SetClientTimestamp(value int64) *BatchAddOrdersOrderListBuilder { + builder.obj.ClientTimestamp = &value + return builder +} + +// The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. +func (builder *BatchAddOrdersOrderListBuilder) SetAllowMaxTimeWindow(value int64) *BatchAddOrdersOrderListBuilder { + builder.obj.AllowMaxTimeWindow = &value + return builder +} + func (builder *BatchAddOrdersOrderListBuilder) Build() *BatchAddOrdersOrderList { return builder.obj } diff --git a/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_sync_data.go b/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_sync_data.go index 0cc32f30..7c75e76b 100644 --- a/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_sync_data.go +++ b/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_sync_data.go @@ -4,25 +4,25 @@ package order // BatchAddOrdersSyncData struct for BatchAddOrdersSyncData type BatchAddOrdersSyncData struct { - // The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + // The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. OrderId *string `json:"orderId,omitempty"` - // The user self-defined order id. + // The user self-defined order ID. ClientOid *string `json:"clientOid,omitempty"` OrderTime *int64 `json:"orderTime,omitempty"` - // original order size + // Original order size OriginSize *string `json:"originSize,omitempty"` - // deal size + // Deal size DealSize *string `json:"dealSize,omitempty"` - // remain size + // Remain size RemainSize *string `json:"remainSize,omitempty"` // Cumulative canceled size CanceledSize *string `json:"canceledSize,omitempty"` - // Order Status. open:order is active; done:order has been completed + // Order Status. open: order is active; done: order has been completed Status *string `json:"status,omitempty"` MatchTime *int64 `json:"matchTime,omitempty"` // Add order success/failure Success bool `json:"success,omitempty"` - // error message + // Error message FailMsg *string `json:"failMsg,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_sync_order_list.go b/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_sync_order_list.go index 61dea2bd..6dbceafb 100644 --- a/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_sync_order_list.go +++ b/sdk/golang/pkg/generate/spot/order/types_batch_add_orders_sync_order_list.go @@ -4,23 +4,23 @@ package order // BatchAddOrdersSyncOrderList struct for BatchAddOrdersSyncOrderList type BatchAddOrdersSyncOrderList struct { - // Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. + // Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. ClientOid *string `json:"clientOid,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` - // Specify if the order is an 'limit' order or 'market' order. + // Specify if the order is a 'limit' order or 'market' order. Type string `json:"type,omitempty"` // [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading TimeInForce *string `json:"timeInForce,omitempty"` - // Specify if the order is to 'buy' or 'sell' + // Specify if the order is to 'buy' or 'sell'. Side string `json:"side,omitempty"` // Specify price for order Price string `json:"price,omitempty"` - // Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + // Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds Size *string `json:"size,omitempty"` // [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC Stp *string `json:"stp,omitempty"` - // Cancel after n seconds,the order timing strategy is GTT + // Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 CancelAfter *int64 `json:"cancelAfter,omitempty"` // passive order labels, this is disabled when the order timing strategy is IOC or FOK PostOnly *bool `json:"postOnly,omitempty"` @@ -36,6 +36,10 @@ type BatchAddOrdersSyncOrderList struct { Remark *string `json:"remark,omitempty"` // When **type** is market, select one out of two: size or funds Funds *string `json:"funds,omitempty"` + // The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + AllowMaxTimeWindow *int64 `json:"allowMaxTimeWindow,omitempty"` + // Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + ClientTimestamp *int64 `json:"clientTimestamp,omitempty"` } // NewBatchAddOrdersSyncOrderList instantiates a new BatchAddOrdersSyncOrderList object @@ -48,6 +52,8 @@ func NewBatchAddOrdersSyncOrderList(symbol string, Type_ string, side string, pr this.TimeInForce = &timeInForce this.Side = side this.Price = price + var cancelAfter int64 = -1 + this.CancelAfter = &cancelAfter var postOnly bool = false this.PostOnly = &postOnly var hidden bool = false @@ -63,6 +69,8 @@ func NewBatchAddOrdersSyncOrderListWithDefaults() *BatchAddOrdersSyncOrderList { this := BatchAddOrdersSyncOrderList{} var timeInForce string = "GTC" this.TimeInForce = &timeInForce + var cancelAfter int64 = -1 + this.CancelAfter = &cancelAfter var postOnly bool = false this.PostOnly = &postOnly var hidden bool = false @@ -90,6 +98,8 @@ func (o *BatchAddOrdersSyncOrderList) ToMap() map[string]interface{} { toSerialize["tags"] = o.Tags toSerialize["remark"] = o.Remark toSerialize["funds"] = o.Funds + toSerialize["allowMaxTimeWindow"] = o.AllowMaxTimeWindow + toSerialize["clientTimestamp"] = o.ClientTimestamp return toSerialize } @@ -101,7 +111,7 @@ func NewBatchAddOrdersSyncOrderListBuilder() *BatchAddOrdersSyncOrderListBuilder return &BatchAddOrdersSyncOrderListBuilder{obj: NewBatchAddOrdersSyncOrderListWithDefaults()} } -// Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. +// Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. func (builder *BatchAddOrdersSyncOrderListBuilder) SetClientOid(value string) *BatchAddOrdersSyncOrderListBuilder { builder.obj.ClientOid = &value return builder @@ -113,7 +123,7 @@ func (builder *BatchAddOrdersSyncOrderListBuilder) SetSymbol(value string) *Batc return builder } -// Specify if the order is an 'limit' order or 'market' order. +// Specify if the order is a 'limit' order or 'market' order. func (builder *BatchAddOrdersSyncOrderListBuilder) SetType(value string) *BatchAddOrdersSyncOrderListBuilder { builder.obj.Type = value return builder @@ -125,7 +135,7 @@ func (builder *BatchAddOrdersSyncOrderListBuilder) SetTimeInForce(value string) return builder } -// Specify if the order is to 'buy' or 'sell' +// Specify if the order is to 'buy' or 'sell'. func (builder *BatchAddOrdersSyncOrderListBuilder) SetSide(value string) *BatchAddOrdersSyncOrderListBuilder { builder.obj.Side = value return builder @@ -137,7 +147,7 @@ func (builder *BatchAddOrdersSyncOrderListBuilder) SetPrice(value string) *Batch return builder } -// Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds +// Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds func (builder *BatchAddOrdersSyncOrderListBuilder) SetSize(value string) *BatchAddOrdersSyncOrderListBuilder { builder.obj.Size = &value return builder @@ -149,7 +159,7 @@ func (builder *BatchAddOrdersSyncOrderListBuilder) SetStp(value string) *BatchAd return builder } -// Cancel after n seconds,the order timing strategy is GTT +// Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 func (builder *BatchAddOrdersSyncOrderListBuilder) SetCancelAfter(value int64) *BatchAddOrdersSyncOrderListBuilder { builder.obj.CancelAfter = &value return builder @@ -197,6 +207,18 @@ func (builder *BatchAddOrdersSyncOrderListBuilder) SetFunds(value string) *Batch return builder } +// The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. +func (builder *BatchAddOrdersSyncOrderListBuilder) SetAllowMaxTimeWindow(value int64) *BatchAddOrdersSyncOrderListBuilder { + builder.obj.AllowMaxTimeWindow = &value + return builder +} + +// Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. +func (builder *BatchAddOrdersSyncOrderListBuilder) SetClientTimestamp(value int64) *BatchAddOrdersSyncOrderListBuilder { + builder.obj.ClientTimestamp = &value + return builder +} + func (builder *BatchAddOrdersSyncOrderListBuilder) Build() *BatchAddOrdersSyncOrderList { return builder.obj } diff --git a/sdk/golang/pkg/generate/spot/order/types_batch_cancel_oco_orders_req.go b/sdk/golang/pkg/generate/spot/order/types_batch_cancel_oco_orders_req.go index 47d258e1..66cbe85d 100644 --- a/sdk/golang/pkg/generate/spot/order/types_batch_cancel_oco_orders_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_batch_cancel_oco_orders_req.go @@ -4,9 +4,9 @@ package order // BatchCancelOcoOrdersReq struct for BatchCancelOcoOrdersReq type BatchCancelOcoOrdersReq struct { - // Specify the order id, there can be multiple orders, separated by commas. If not passed, all oco orders will be canceled by default. + // Specify the order ID; there can be multiple orders, separated by commas. If not passed, all OCO orders will be canceled by default. OrderIds *string `json:"orderIds,omitempty" url:"orderIds,omitempty"` - // trading pair. If not passed, the oco orders of all symbols will be canceled by default. + // Trading pair. If not passed, the OCO orders of all symbols will be canceled by default. Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` } @@ -39,13 +39,13 @@ func NewBatchCancelOcoOrdersReqBuilder() *BatchCancelOcoOrdersReqBuilder { return &BatchCancelOcoOrdersReqBuilder{obj: NewBatchCancelOcoOrdersReqWithDefaults()} } -// Specify the order id, there can be multiple orders, separated by commas. If not passed, all oco orders will be canceled by default. +// Specify the order ID; there can be multiple orders, separated by commas. If not passed, all OCO orders will be canceled by default. func (builder *BatchCancelOcoOrdersReqBuilder) SetOrderIds(value string) *BatchCancelOcoOrdersReqBuilder { builder.obj.OrderIds = &value return builder } -// trading pair. If not passed, the oco orders of all symbols will be canceled by default. +// Trading pair. If not passed, the OCO orders of all symbols will be canceled by default. func (builder *BatchCancelOcoOrdersReqBuilder) SetSymbol(value string) *BatchCancelOcoOrdersReqBuilder { builder.obj.Symbol = &value return builder diff --git a/sdk/golang/pkg/generate/spot/order/types_batch_cancel_stop_order_req.go b/sdk/golang/pkg/generate/spot/order/types_batch_cancel_stop_order_req.go index ba986676..99432b9e 100644 --- a/sdk/golang/pkg/generate/spot/order/types_batch_cancel_stop_order_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_batch_cancel_stop_order_req.go @@ -6,7 +6,7 @@ package order type BatchCancelStopOrderReq struct { // Cancel the open order for the specified symbol Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` - // The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE + // The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). TradeType *string `json:"tradeType,omitempty" url:"tradeType,omitempty"` // Comma seperated order IDs. OrderIds *string `json:"orderIds,omitempty" url:"orderIds,omitempty"` @@ -48,7 +48,7 @@ func (builder *BatchCancelStopOrderReqBuilder) SetSymbol(value string) *BatchCan return builder } -// The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE +// The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). func (builder *BatchCancelStopOrderReqBuilder) SetTradeType(value string) *BatchCancelStopOrderReqBuilder { builder.obj.TradeType = &value return builder diff --git a/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_client_oid_old_req.go b/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_client_oid_old_req.go index 8fc3480c..5405eacb 100644 --- a/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_client_oid_old_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_client_oid_old_req.go @@ -4,8 +4,6 @@ package order // CancelOrderByClientOidOldReq struct for CancelOrderByClientOidOldReq type CancelOrderByClientOidOldReq struct { - // symbol - Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` // Client Order Id,unique identifier created by the user ClientOid *string `json:"clientOid,omitempty" path:"clientOid" url:"-"` } @@ -26,7 +24,6 @@ func NewCancelOrderByClientOidOldReqWithDefaults() *CancelOrderByClientOidOldReq func (o *CancelOrderByClientOidOldReq) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} - toSerialize["symbol"] = o.Symbol toSerialize["clientOid"] = o.ClientOid return toSerialize } @@ -39,12 +36,6 @@ func NewCancelOrderByClientOidOldReqBuilder() *CancelOrderByClientOidOldReqBuild return &CancelOrderByClientOidOldReqBuilder{obj: NewCancelOrderByClientOidOldReqWithDefaults()} } -// symbol -func (builder *CancelOrderByClientOidOldReqBuilder) SetSymbol(value string) *CancelOrderByClientOidOldReqBuilder { - builder.obj.Symbol = &value - return builder -} - // Client Order Id,unique identifier created by the user func (builder *CancelOrderByClientOidOldReqBuilder) SetClientOid(value string) *CancelOrderByClientOidOldReqBuilder { builder.obj.ClientOid = &value diff --git a/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_client_oid_old_resp.go b/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_client_oid_old_resp.go index 4833640a..267ce131 100644 --- a/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_client_oid_old_resp.go +++ b/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_client_oid_old_resp.go @@ -11,14 +11,15 @@ type CancelOrderByClientOidOldResp struct { // common response CommonResponse *types.RestResponse // Client Order Id,unique identifier created by the user - ClientOid string `json:"clientOid,omitempty"` - CancelledOrderId string `json:"cancelledOrderId,omitempty"` - CancelledOcoOrderIds string `json:"cancelledOcoOrderIds,omitempty"` + ClientOid string `json:"clientOid,omitempty"` + // The unique order id generated by the trading system + CancelledOrderId string `json:"cancelledOrderId,omitempty"` + CancelledOcoOrderIds []string `json:"cancelledOcoOrderIds,omitempty"` } // NewCancelOrderByClientOidOldResp instantiates a new CancelOrderByClientOidOldResp object // This constructor will assign default values to properties that have it defined -func NewCancelOrderByClientOidOldResp(clientOid string, cancelledOrderId string, cancelledOcoOrderIds string) *CancelOrderByClientOidOldResp { +func NewCancelOrderByClientOidOldResp(clientOid string, cancelledOrderId string, cancelledOcoOrderIds []string) *CancelOrderByClientOidOldResp { this := CancelOrderByClientOidOldResp{} this.ClientOid = clientOid this.CancelledOrderId = cancelledOrderId diff --git a/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_client_oid_sync_req.go b/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_client_oid_sync_req.go index 01a5cbca..f9802ae2 100644 --- a/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_client_oid_sync_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_client_oid_sync_req.go @@ -4,10 +4,10 @@ package order // CancelOrderByClientOidSyncReq struct for CancelOrderByClientOidSyncReq type CancelOrderByClientOidSyncReq struct { - // Client Order Id,unique identifier created by the user - ClientOid *string `json:"clientOid,omitempty" path:"clientOid" url:"-"` // symbol Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` + // Client Order Id,unique identifier created by the user + ClientOid *string `json:"clientOid,omitempty" path:"clientOid" url:"-"` } // NewCancelOrderByClientOidSyncReq instantiates a new CancelOrderByClientOidSyncReq object @@ -26,8 +26,8 @@ func NewCancelOrderByClientOidSyncReqWithDefaults() *CancelOrderByClientOidSyncR func (o *CancelOrderByClientOidSyncReq) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} - toSerialize["clientOid"] = o.ClientOid toSerialize["symbol"] = o.Symbol + toSerialize["clientOid"] = o.ClientOid return toSerialize } @@ -39,18 +39,18 @@ func NewCancelOrderByClientOidSyncReqBuilder() *CancelOrderByClientOidSyncReqBui return &CancelOrderByClientOidSyncReqBuilder{obj: NewCancelOrderByClientOidSyncReqWithDefaults()} } -// Client Order Id,unique identifier created by the user -func (builder *CancelOrderByClientOidSyncReqBuilder) SetClientOid(value string) *CancelOrderByClientOidSyncReqBuilder { - builder.obj.ClientOid = &value - return builder -} - // symbol func (builder *CancelOrderByClientOidSyncReqBuilder) SetSymbol(value string) *CancelOrderByClientOidSyncReqBuilder { builder.obj.Symbol = &value return builder } +// Client Order Id,unique identifier created by the user +func (builder *CancelOrderByClientOidSyncReqBuilder) SetClientOid(value string) *CancelOrderByClientOidSyncReqBuilder { + builder.obj.ClientOid = &value + return builder +} + func (builder *CancelOrderByClientOidSyncReqBuilder) Build() *CancelOrderByClientOidSyncReq { return builder.obj } diff --git a/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_order_id_old_req.go b/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_order_id_old_req.go index 90ee9b77..27da0721 100644 --- a/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_order_id_old_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_order_id_old_req.go @@ -4,8 +4,6 @@ package order // CancelOrderByOrderIdOldReq struct for CancelOrderByOrderIdOldReq type CancelOrderByOrderIdOldReq struct { - // symbol - Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` // The unique order id generated by the trading system OrderId *string `json:"orderId,omitempty" path:"orderId" url:"-"` } @@ -26,7 +24,6 @@ func NewCancelOrderByOrderIdOldReqWithDefaults() *CancelOrderByOrderIdOldReq { func (o *CancelOrderByOrderIdOldReq) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} - toSerialize["symbol"] = o.Symbol toSerialize["orderId"] = o.OrderId return toSerialize } @@ -39,12 +36,6 @@ func NewCancelOrderByOrderIdOldReqBuilder() *CancelOrderByOrderIdOldReqBuilder { return &CancelOrderByOrderIdOldReqBuilder{obj: NewCancelOrderByOrderIdOldReqWithDefaults()} } -// symbol -func (builder *CancelOrderByOrderIdOldReqBuilder) SetSymbol(value string) *CancelOrderByOrderIdOldReqBuilder { - builder.obj.Symbol = &value - return builder -} - // The unique order id generated by the trading system func (builder *CancelOrderByOrderIdOldReqBuilder) SetOrderId(value string) *CancelOrderByOrderIdOldReqBuilder { builder.obj.OrderId = &value diff --git a/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_order_id_resp.go b/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_order_id_resp.go index 6f2b00f7..f087e902 100644 --- a/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_order_id_resp.go +++ b/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_order_id_resp.go @@ -10,7 +10,7 @@ import ( type CancelOrderByOrderIdResp struct { // common response CommonResponse *types.RestResponse - // order id + // Order id OrderId string `json:"orderId,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_order_id_sync_req.go b/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_order_id_sync_req.go index 3c23f7ff..fb35616b 100644 --- a/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_order_id_sync_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_cancel_order_by_order_id_sync_req.go @@ -4,10 +4,10 @@ package order // CancelOrderByOrderIdSyncReq struct for CancelOrderByOrderIdSyncReq type CancelOrderByOrderIdSyncReq struct { - // The unique order id generated by the trading system - OrderId *string `json:"orderId,omitempty" path:"orderId" url:"-"` // symbol Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` + // The unique order id generated by the trading system + OrderId *string `json:"orderId,omitempty" path:"orderId" url:"-"` } // NewCancelOrderByOrderIdSyncReq instantiates a new CancelOrderByOrderIdSyncReq object @@ -26,8 +26,8 @@ func NewCancelOrderByOrderIdSyncReqWithDefaults() *CancelOrderByOrderIdSyncReq { func (o *CancelOrderByOrderIdSyncReq) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} - toSerialize["orderId"] = o.OrderId toSerialize["symbol"] = o.Symbol + toSerialize["orderId"] = o.OrderId return toSerialize } @@ -39,18 +39,18 @@ func NewCancelOrderByOrderIdSyncReqBuilder() *CancelOrderByOrderIdSyncReqBuilder return &CancelOrderByOrderIdSyncReqBuilder{obj: NewCancelOrderByOrderIdSyncReqWithDefaults()} } -// The unique order id generated by the trading system -func (builder *CancelOrderByOrderIdSyncReqBuilder) SetOrderId(value string) *CancelOrderByOrderIdSyncReqBuilder { - builder.obj.OrderId = &value - return builder -} - // symbol func (builder *CancelOrderByOrderIdSyncReqBuilder) SetSymbol(value string) *CancelOrderByOrderIdSyncReqBuilder { builder.obj.Symbol = &value return builder } +// The unique order id generated by the trading system +func (builder *CancelOrderByOrderIdSyncReqBuilder) SetOrderId(value string) *CancelOrderByOrderIdSyncReqBuilder { + builder.obj.OrderId = &value + return builder +} + func (builder *CancelOrderByOrderIdSyncReqBuilder) Build() *CancelOrderByOrderIdSyncReq { return builder.obj } diff --git a/sdk/golang/pkg/generate/spot/order/types_cancel_stop_order_by_order_id_resp.go b/sdk/golang/pkg/generate/spot/order/types_cancel_stop_order_by_order_id_resp.go index 2e10a63c..7175dcd4 100644 --- a/sdk/golang/pkg/generate/spot/order/types_cancel_stop_order_by_order_id_resp.go +++ b/sdk/golang/pkg/generate/spot/order/types_cancel_stop_order_by_order_id_resp.go @@ -10,7 +10,7 @@ import ( type CancelStopOrderByOrderIdResp struct { // common response CommonResponse *types.RestResponse - // order id array + // order ID array CancelledOrderIds []string `json:"cancelledOrderIds,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/order/types_get_dcp_resp.go b/sdk/golang/pkg/generate/spot/order/types_get_dcp_resp.go index 4312ecc0..a2fa4fef 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_dcp_resp.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_dcp_resp.go @@ -10,14 +10,14 @@ import ( type GetDCPResp struct { // common response CommonResponse *types.RestResponse - // Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400 + // Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400 Timeout *int32 `json:"timeout,omitempty"` - // List of trading pairs. Separated by commas, empty means all trading pairs + // List of trading pairs. Separated by commas; empty means all trading pairs Symbols *string `json:"symbols,omitempty"` // System current time (in seconds) - CurrentTime *int32 `json:"currentTime,omitempty"` + CurrentTime *int64 `json:"currentTime,omitempty"` // Trigger cancellation time (in seconds) - TriggerTime *int32 `json:"triggerTime,omitempty"` + TriggerTime *int64 `json:"triggerTime,omitempty"` } // NewGetDCPResp instantiates a new GetDCPResp object diff --git a/sdk/golang/pkg/generate/spot/order/types_get_oco_order_by_order_id_resp.go b/sdk/golang/pkg/generate/spot/order/types_get_oco_order_by_order_id_resp.go index 275d0ce6..d7c3d638 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_oco_order_by_order_id_resp.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_oco_order_by_order_id_resp.go @@ -12,13 +12,13 @@ type GetOcoOrderByOrderIdResp struct { CommonResponse *types.RestResponse // symbol Symbol string `json:"symbol,omitempty"` - // Client Order Id + // Client Order ID ClientOid string `json:"clientOid,omitempty"` - // The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + // The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. OrderId string `json:"orderId,omitempty"` // Order placement time, milliseconds OrderTime int64 `json:"orderTime,omitempty"` - // Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELLED: Cancelled + // Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELED: Canceled Status string `json:"status,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/order/types_get_oco_order_list_items.go b/sdk/golang/pkg/generate/spot/order/types_get_oco_order_list_items.go index ff96005b..958f4760 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_oco_order_list_items.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_oco_order_list_items.go @@ -4,15 +4,15 @@ package order // GetOcoOrderListItems struct for GetOcoOrderListItems type GetOcoOrderListItems struct { - // The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + // The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. OrderId string `json:"orderId,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` - // Client Order Id + // Client Order ID ClientOid string `json:"clientOid,omitempty"` // Order placement time, milliseconds OrderTime int64 `json:"orderTime,omitempty"` - // Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELLED: Cancelled + // Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELED: Canceled Status string `json:"status,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/order/types_get_open_orders_by_page_items.go b/sdk/golang/pkg/generate/spot/order/types_get_open_orders_by_page_items.go new file mode 100644 index 00000000..143b4350 --- /dev/null +++ b/sdk/golang/pkg/generate/spot/order/types_get_open_orders_by_page_items.go @@ -0,0 +1,155 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package order + +// GetOpenOrdersByPageItems struct for GetOpenOrdersByPageItems +type GetOpenOrdersByPageItems struct { + // The unique order id generated by the trading system + Id string `json:"id,omitempty"` + // symbol + Symbol string `json:"symbol,omitempty"` + OpType string `json:"opType,omitempty"` + // Specify if the order is an 'limit' order or 'market' order. + Type string `json:"type,omitempty"` + // Buy or sell + Side string `json:"side,omitempty"` + // Order price + Price string `json:"price,omitempty"` + // Order size + Size string `json:"size,omitempty"` + // Order Funds + Funds string `json:"funds,omitempty"` + // Number of filled transactions + DealSize string `json:"dealSize,omitempty"` + // Funds of filled transactions + DealFunds string `json:"dealFunds,omitempty"` + // [Handling fees](https://www.kucoin.com/docs-new/api-5327739) + Fee string `json:"fee,omitempty"` + // currency used to calculate trading fee + FeeCurrency string `json:"feeCurrency,omitempty"` + // [Self Trade Prevention](https://www.kucoin.com/docs-new/api-5176570) + Stp *string `json:"stp,omitempty"` + // Time in force + TimeInForce string `json:"timeInForce,omitempty"` + // Whether its a postOnly order. + PostOnly bool `json:"postOnly,omitempty"` + // Whether its a hidden order. + Hidden bool `json:"hidden,omitempty"` + // Whether its a iceberg order. + Iceberg bool `json:"iceberg,omitempty"` + // Visible size of iceberg order in order book. + VisibleSize string `json:"visibleSize,omitempty"` + // A GTT timeInForce that expires in n seconds + CancelAfter int64 `json:"cancelAfter,omitempty"` + Channel string `json:"channel,omitempty"` + // Client Order Id,unique identifier created by the user + ClientOid string `json:"clientOid,omitempty"` + // Order placement remarks + Remark *string `json:"remark,omitempty"` + // Order tag + Tags *string `json:"tags,omitempty"` + // Whether there is a cancellation record for the order. + CancelExist bool `json:"cancelExist,omitempty"` + CreatedAt int64 `json:"createdAt,omitempty"` + LastUpdatedAt int64 `json:"lastUpdatedAt,omitempty"` + // Trade type, redundancy param + TradeType string `json:"tradeType,omitempty"` + // Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook + InOrderBook bool `json:"inOrderBook,omitempty"` + // Number of canceled transactions + CancelledSize string `json:"cancelledSize,omitempty"` + // Funds of canceled transactions + CancelledFunds string `json:"cancelledFunds,omitempty"` + // Number of remain transactions + RemainSize string `json:"remainSize,omitempty"` + // Funds of remain transactions + RemainFunds string `json:"remainFunds,omitempty"` + // Users in some regions need query this field + Tax string `json:"tax,omitempty"` + // Order status: true-The status of the order isactive; false-The status of the order is done + Active bool `json:"active,omitempty"` +} + +// NewGetOpenOrdersByPageItems instantiates a new GetOpenOrdersByPageItems object +// This constructor will assign default values to properties that have it defined +func NewGetOpenOrdersByPageItems(id string, symbol string, opType string, Type_ string, side string, price string, size string, funds string, dealSize string, dealFunds string, fee string, feeCurrency string, timeInForce string, postOnly bool, hidden bool, iceberg bool, visibleSize string, cancelAfter int64, channel string, clientOid string, cancelExist bool, createdAt int64, lastUpdatedAt int64, tradeType string, inOrderBook bool, cancelledSize string, cancelledFunds string, remainSize string, remainFunds string, tax string, active bool) *GetOpenOrdersByPageItems { + this := GetOpenOrdersByPageItems{} + this.Id = id + this.Symbol = symbol + this.OpType = opType + this.Type = Type_ + this.Side = side + this.Price = price + this.Size = size + this.Funds = funds + this.DealSize = dealSize + this.DealFunds = dealFunds + this.Fee = fee + this.FeeCurrency = feeCurrency + this.TimeInForce = timeInForce + this.PostOnly = postOnly + this.Hidden = hidden + this.Iceberg = iceberg + this.VisibleSize = visibleSize + this.CancelAfter = cancelAfter + this.Channel = channel + this.ClientOid = clientOid + this.CancelExist = cancelExist + this.CreatedAt = createdAt + this.LastUpdatedAt = lastUpdatedAt + this.TradeType = tradeType + this.InOrderBook = inOrderBook + this.CancelledSize = cancelledSize + this.CancelledFunds = cancelledFunds + this.RemainSize = remainSize + this.RemainFunds = remainFunds + this.Tax = tax + this.Active = active + return &this +} + +// NewGetOpenOrdersByPageItemsWithDefaults instantiates a new GetOpenOrdersByPageItems object +// This constructor will only assign default values to properties that have it defined, +func NewGetOpenOrdersByPageItemsWithDefaults() *GetOpenOrdersByPageItems { + this := GetOpenOrdersByPageItems{} + return &this +} + +func (o *GetOpenOrdersByPageItems) ToMap() map[string]interface{} { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["symbol"] = o.Symbol + toSerialize["opType"] = o.OpType + toSerialize["type"] = o.Type + toSerialize["side"] = o.Side + toSerialize["price"] = o.Price + toSerialize["size"] = o.Size + toSerialize["funds"] = o.Funds + toSerialize["dealSize"] = o.DealSize + toSerialize["dealFunds"] = o.DealFunds + toSerialize["fee"] = o.Fee + toSerialize["feeCurrency"] = o.FeeCurrency + toSerialize["stp"] = o.Stp + toSerialize["timeInForce"] = o.TimeInForce + toSerialize["postOnly"] = o.PostOnly + toSerialize["hidden"] = o.Hidden + toSerialize["iceberg"] = o.Iceberg + toSerialize["visibleSize"] = o.VisibleSize + toSerialize["cancelAfter"] = o.CancelAfter + toSerialize["channel"] = o.Channel + toSerialize["clientOid"] = o.ClientOid + toSerialize["remark"] = o.Remark + toSerialize["tags"] = o.Tags + toSerialize["cancelExist"] = o.CancelExist + toSerialize["createdAt"] = o.CreatedAt + toSerialize["lastUpdatedAt"] = o.LastUpdatedAt + toSerialize["tradeType"] = o.TradeType + toSerialize["inOrderBook"] = o.InOrderBook + toSerialize["cancelledSize"] = o.CancelledSize + toSerialize["cancelledFunds"] = o.CancelledFunds + toSerialize["remainSize"] = o.RemainSize + toSerialize["remainFunds"] = o.RemainFunds + toSerialize["tax"] = o.Tax + toSerialize["active"] = o.Active + return toSerialize +} diff --git a/sdk/golang/pkg/generate/spot/order/types_get_open_orders_by_page_req.go b/sdk/golang/pkg/generate/spot/order/types_get_open_orders_by_page_req.go new file mode 100644 index 00000000..e20390b2 --- /dev/null +++ b/sdk/golang/pkg/generate/spot/order/types_get_open_orders_by_page_req.go @@ -0,0 +1,73 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package order + +// GetOpenOrdersByPageReq struct for GetOpenOrdersByPageReq +type GetOpenOrdersByPageReq struct { + // Symbol + Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` + // Current page + PageNum *int32 `json:"pageNum,omitempty" url:"pageNum,omitempty"` + // Size per page + PageSize *int32 `json:"pageSize,omitempty" url:"pageSize,omitempty"` +} + +// NewGetOpenOrdersByPageReq instantiates a new GetOpenOrdersByPageReq object +// This constructor will assign default values to properties that have it defined +func NewGetOpenOrdersByPageReq() *GetOpenOrdersByPageReq { + this := GetOpenOrdersByPageReq{} + var pageNum int32 = 1 + this.PageNum = &pageNum + var pageSize int32 = 20 + this.PageSize = &pageSize + return &this +} + +// NewGetOpenOrdersByPageReqWithDefaults instantiates a new GetOpenOrdersByPageReq object +// This constructor will only assign default values to properties that have it defined, +func NewGetOpenOrdersByPageReqWithDefaults() *GetOpenOrdersByPageReq { + this := GetOpenOrdersByPageReq{} + var pageNum int32 = 1 + this.PageNum = &pageNum + var pageSize int32 = 20 + this.PageSize = &pageSize + return &this +} + +func (o *GetOpenOrdersByPageReq) ToMap() map[string]interface{} { + toSerialize := map[string]interface{}{} + toSerialize["symbol"] = o.Symbol + toSerialize["pageNum"] = o.PageNum + toSerialize["pageSize"] = o.PageSize + return toSerialize +} + +type GetOpenOrdersByPageReqBuilder struct { + obj *GetOpenOrdersByPageReq +} + +func NewGetOpenOrdersByPageReqBuilder() *GetOpenOrdersByPageReqBuilder { + return &GetOpenOrdersByPageReqBuilder{obj: NewGetOpenOrdersByPageReqWithDefaults()} +} + +// Symbol +func (builder *GetOpenOrdersByPageReqBuilder) SetSymbol(value string) *GetOpenOrdersByPageReqBuilder { + builder.obj.Symbol = &value + return builder +} + +// Current page +func (builder *GetOpenOrdersByPageReqBuilder) SetPageNum(value int32) *GetOpenOrdersByPageReqBuilder { + builder.obj.PageNum = &value + return builder +} + +// Size per page +func (builder *GetOpenOrdersByPageReqBuilder) SetPageSize(value int32) *GetOpenOrdersByPageReqBuilder { + builder.obj.PageSize = &value + return builder +} + +func (builder *GetOpenOrdersByPageReqBuilder) Build() *GetOpenOrdersByPageReq { + return builder.obj +} diff --git a/sdk/golang/pkg/generate/spot/order/types_get_open_orders_by_page_resp.go b/sdk/golang/pkg/generate/spot/order/types_get_open_orders_by_page_resp.go new file mode 100644 index 00000000..950c2c95 --- /dev/null +++ b/sdk/golang/pkg/generate/spot/order/types_get_open_orders_by_page_resp.go @@ -0,0 +1,51 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package order + +import ( + "github.com/Kucoin/kucoin-universal-sdk/sdk/golang/pkg/types" +) + +// GetOpenOrdersByPageResp struct for GetOpenOrdersByPageResp +type GetOpenOrdersByPageResp struct { + // common response + CommonResponse *types.RestResponse + CurrentPage int32 `json:"currentPage,omitempty"` + PageSize int32 `json:"pageSize,omitempty"` + TotalNum int32 `json:"totalNum,omitempty"` + TotalPage int32 `json:"totalPage,omitempty"` + Items []GetOpenOrdersByPageItems `json:"items,omitempty"` +} + +// NewGetOpenOrdersByPageResp instantiates a new GetOpenOrdersByPageResp object +// This constructor will assign default values to properties that have it defined +func NewGetOpenOrdersByPageResp(currentPage int32, pageSize int32, totalNum int32, totalPage int32, items []GetOpenOrdersByPageItems) *GetOpenOrdersByPageResp { + this := GetOpenOrdersByPageResp{} + this.CurrentPage = currentPage + this.PageSize = pageSize + this.TotalNum = totalNum + this.TotalPage = totalPage + this.Items = items + return &this +} + +// NewGetOpenOrdersByPageRespWithDefaults instantiates a new GetOpenOrdersByPageResp object +// This constructor will only assign default values to properties that have it defined, +func NewGetOpenOrdersByPageRespWithDefaults() *GetOpenOrdersByPageResp { + this := GetOpenOrdersByPageResp{} + return &this +} + +func (o *GetOpenOrdersByPageResp) ToMap() map[string]interface{} { + toSerialize := map[string]interface{}{} + toSerialize["currentPage"] = o.CurrentPage + toSerialize["pageSize"] = o.PageSize + toSerialize["totalNum"] = o.TotalNum + toSerialize["totalPage"] = o.TotalPage + toSerialize["items"] = o.Items + return toSerialize +} + +func (o *GetOpenOrdersByPageResp) SetCommonResponse(response *types.RestResponse) { + o.CommonResponse = response +} diff --git a/sdk/golang/pkg/generate/spot/order/types_get_open_orders_data.go b/sdk/golang/pkg/generate/spot/order/types_get_open_orders_data.go index a8b490b0..5244a4e1 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_open_orders_data.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_open_orders_data.go @@ -40,7 +40,7 @@ type GetOpenOrdersData struct { // Visible size of iceberg order in order book. VisibleSize string `json:"visibleSize,omitempty"` // A GTT timeInForce that expires in n seconds - CancelAfter int32 `json:"cancelAfter,omitempty"` + CancelAfter int64 `json:"cancelAfter,omitempty"` Channel string `json:"channel,omitempty"` // Client Order Id,unique identifier created by the user ClientOid string `json:"clientOid,omitempty"` @@ -72,7 +72,7 @@ type GetOpenOrdersData struct { // NewGetOpenOrdersData instantiates a new GetOpenOrdersData object // This constructor will assign default values to properties that have it defined -func NewGetOpenOrdersData(id string, symbol string, opType string, Type_ string, side string, price string, size string, funds string, dealSize string, dealFunds string, fee string, feeCurrency string, timeInForce string, postOnly bool, hidden bool, iceberg bool, visibleSize string, cancelAfter int32, channel string, clientOid string, cancelExist bool, createdAt int64, lastUpdatedAt int64, tradeType string, inOrderBook bool, cancelledSize string, cancelledFunds string, remainSize string, remainFunds string, tax string, active bool) *GetOpenOrdersData { +func NewGetOpenOrdersData(id string, symbol string, opType string, Type_ string, side string, price string, size string, funds string, dealSize string, dealFunds string, fee string, feeCurrency string, timeInForce string, postOnly bool, hidden bool, iceberg bool, visibleSize string, cancelAfter int64, channel string, clientOid string, cancelExist bool, createdAt int64, lastUpdatedAt int64, tradeType string, inOrderBook bool, cancelledSize string, cancelledFunds string, remainSize string, remainFunds string, tax string, active bool) *GetOpenOrdersData { this := GetOpenOrdersData{} this.Id = id this.Symbol = symbol diff --git a/sdk/golang/pkg/generate/spot/order/types_get_order_by_client_oid_old_req.go b/sdk/golang/pkg/generate/spot/order/types_get_order_by_client_oid_old_req.go index 65f11a34..1907a237 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_order_by_client_oid_old_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_order_by_client_oid_old_req.go @@ -4,7 +4,7 @@ package order // GetOrderByClientOidOldReq struct for GetOrderByClientOidOldReq type GetOrderByClientOidOldReq struct { - // Unique order id created by users to identify their orders + // Unique order ID created by users to identify their orders ClientOid *string `json:"clientOid,omitempty" path:"clientOid" url:"-"` } @@ -36,7 +36,7 @@ func NewGetOrderByClientOidOldReqBuilder() *GetOrderByClientOidOldReqBuilder { return &GetOrderByClientOidOldReqBuilder{obj: NewGetOrderByClientOidOldReqWithDefaults()} } -// Unique order id created by users to identify their orders +// Unique order ID created by users to identify their orders func (builder *GetOrderByClientOidOldReqBuilder) SetClientOid(value string) *GetOrderByClientOidOldReqBuilder { builder.obj.ClientOid = &value return builder diff --git a/sdk/golang/pkg/generate/spot/order/types_get_order_by_client_oid_old_resp.go b/sdk/golang/pkg/generate/spot/order/types_get_order_by_client_oid_old_resp.go index 59c07cfb..404a5c93 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_order_by_client_oid_old_resp.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_order_by_client_oid_old_resp.go @@ -10,36 +10,39 @@ import ( type GetOrderByClientOidOldResp struct { // common response CommonResponse *types.RestResponse - Id string `json:"id,omitempty"` - Symbol string `json:"symbol,omitempty"` - OpType string `json:"opType,omitempty"` - Type string `json:"type,omitempty"` - Side string `json:"side,omitempty"` - Price string `json:"price,omitempty"` - Size string `json:"size,omitempty"` - Funds string `json:"funds,omitempty"` - DealFunds string `json:"dealFunds,omitempty"` - DealSize string `json:"dealSize,omitempty"` - Fee string `json:"fee,omitempty"` - FeeCurrency string `json:"feeCurrency,omitempty"` - Stp string `json:"stp,omitempty"` - Stop string `json:"stop,omitempty"` - StopTriggered bool `json:"stopTriggered,omitempty"` - StopPrice string `json:"stopPrice,omitempty"` - TimeInForce string `json:"timeInForce,omitempty"` - PostOnly bool `json:"postOnly,omitempty"` - Hidden bool `json:"hidden,omitempty"` - Iceberg bool `json:"iceberg,omitempty"` - VisibleSize string `json:"visibleSize,omitempty"` - CancelAfter int32 `json:"cancelAfter,omitempty"` - Channel string `json:"channel,omitempty"` - ClientOid string `json:"clientOid,omitempty"` - Remark string `json:"remark,omitempty"` - Tags string `json:"tags,omitempty"` - IsActive bool `json:"isActive,omitempty"` - CancelExist bool `json:"cancelExist,omitempty"` - CreatedAt int64 `json:"createdAt,omitempty"` - TradeType string `json:"tradeType,omitempty"` + Id string `json:"id,omitempty"` + Symbol string `json:"symbol,omitempty"` + OpType string `json:"opType,omitempty"` + Type string `json:"type,omitempty"` + Side string `json:"side,omitempty"` + Price string `json:"price,omitempty"` + Size string `json:"size,omitempty"` + Funds string `json:"funds,omitempty"` + DealFunds string `json:"dealFunds,omitempty"` + DealSize string `json:"dealSize,omitempty"` + Fee string `json:"fee,omitempty"` + FeeCurrency string `json:"feeCurrency,omitempty"` + Stp string `json:"stp,omitempty"` + Stop string `json:"stop,omitempty"` + StopTriggered bool `json:"stopTriggered,omitempty"` + StopPrice string `json:"stopPrice,omitempty"` + TimeInForce string `json:"timeInForce,omitempty"` + PostOnly bool `json:"postOnly,omitempty"` + Hidden bool `json:"hidden,omitempty"` + Iceberg bool `json:"iceberg,omitempty"` + VisibleSize string `json:"visibleSize,omitempty"` + CancelAfter int32 `json:"cancelAfter,omitempty"` + Channel string `json:"channel,omitempty"` + ClientOid string `json:"clientOid,omitempty"` + Remark string `json:"remark,omitempty"` + Tags string `json:"tags,omitempty"` + IsActive bool `json:"isActive,omitempty"` + CancelExist bool `json:"cancelExist,omitempty"` + CreatedAt int64 `json:"createdAt,omitempty"` + TradeType string `json:"tradeType,omitempty"` + Tax *string `json:"tax,omitempty"` + TaxRate *string `json:"taxRate,omitempty"` + TaxCurrency *string `json:"taxCurrency,omitempty"` } // NewGetOrderByClientOidOldResp instantiates a new GetOrderByClientOidOldResp object @@ -118,6 +121,9 @@ func (o *GetOrderByClientOidOldResp) ToMap() map[string]interface{} { toSerialize["cancelExist"] = o.CancelExist toSerialize["createdAt"] = o.CreatedAt toSerialize["tradeType"] = o.TradeType + toSerialize["tax"] = o.Tax + toSerialize["taxRate"] = o.TaxRate + toSerialize["taxCurrency"] = o.TaxCurrency return toSerialize } diff --git a/sdk/golang/pkg/generate/spot/order/types_get_order_by_client_oid_resp.go b/sdk/golang/pkg/generate/spot/order/types_get_order_by_client_oid_resp.go index fb143295..84496c82 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_order_by_client_oid_resp.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_order_by_client_oid_resp.go @@ -46,7 +46,7 @@ type GetOrderByClientOidResp struct { // Visible size of iceberg order in order book. VisibleSize string `json:"visibleSize,omitempty"` // A GTT timeInForce that expires in n seconds - CancelAfter int32 `json:"cancelAfter,omitempty"` + CancelAfter int64 `json:"cancelAfter,omitempty"` Channel string `json:"channel,omitempty"` // Client Order Id,unique identifier created by the user ClientOid string `json:"clientOid,omitempty"` @@ -78,7 +78,7 @@ type GetOrderByClientOidResp struct { // NewGetOrderByClientOidResp instantiates a new GetOrderByClientOidResp object // This constructor will assign default values to properties that have it defined -func NewGetOrderByClientOidResp(id string, symbol string, opType string, Type_ string, side string, price string, size string, funds string, dealSize string, dealFunds string, fee string, feeCurrency string, timeInForce string, postOnly bool, hidden bool, iceberg bool, visibleSize string, cancelAfter int32, channel string, clientOid string, cancelExist bool, createdAt int64, lastUpdatedAt int64, tradeType string, inOrderBook bool, cancelledSize string, cancelledFunds string, remainSize string, remainFunds string, tax string, active bool) *GetOrderByClientOidResp { +func NewGetOrderByClientOidResp(id string, symbol string, opType string, Type_ string, side string, price string, size string, funds string, dealSize string, dealFunds string, fee string, feeCurrency string, timeInForce string, postOnly bool, hidden bool, iceberg bool, visibleSize string, cancelAfter int64, channel string, clientOid string, cancelExist bool, createdAt int64, lastUpdatedAt int64, tradeType string, inOrderBook bool, cancelledSize string, cancelledFunds string, remainSize string, remainFunds string, tax string, active bool) *GetOrderByClientOidResp { this := GetOrderByClientOidResp{} this.Id = id this.Symbol = symbol diff --git a/sdk/golang/pkg/generate/spot/order/types_get_order_by_order_id_old_resp.go b/sdk/golang/pkg/generate/spot/order/types_get_order_by_order_id_old_resp.go index 2317eedf..d36a4e0c 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_order_by_order_id_old_resp.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_order_by_order_id_old_resp.go @@ -10,36 +10,39 @@ import ( type GetOrderByOrderIdOldResp struct { // common response CommonResponse *types.RestResponse - Id string `json:"id,omitempty"` - Symbol string `json:"symbol,omitempty"` - OpType string `json:"opType,omitempty"` - Type string `json:"type,omitempty"` - Side string `json:"side,omitempty"` - Price string `json:"price,omitempty"` - Size string `json:"size,omitempty"` - Funds string `json:"funds,omitempty"` - DealFunds string `json:"dealFunds,omitempty"` - DealSize string `json:"dealSize,omitempty"` - Fee string `json:"fee,omitempty"` - FeeCurrency string `json:"feeCurrency,omitempty"` - Stp string `json:"stp,omitempty"` - Stop string `json:"stop,omitempty"` - StopTriggered bool `json:"stopTriggered,omitempty"` - StopPrice string `json:"stopPrice,omitempty"` - TimeInForce string `json:"timeInForce,omitempty"` - PostOnly bool `json:"postOnly,omitempty"` - Hidden bool `json:"hidden,omitempty"` - Iceberg bool `json:"iceberg,omitempty"` - VisibleSize string `json:"visibleSize,omitempty"` - CancelAfter int32 `json:"cancelAfter,omitempty"` - Channel string `json:"channel,omitempty"` - ClientOid string `json:"clientOid,omitempty"` - Remark string `json:"remark,omitempty"` - Tags string `json:"tags,omitempty"` - IsActive bool `json:"isActive,omitempty"` - CancelExist bool `json:"cancelExist,omitempty"` - CreatedAt int64 `json:"createdAt,omitempty"` - TradeType string `json:"tradeType,omitempty"` + Id string `json:"id,omitempty"` + Symbol string `json:"symbol,omitempty"` + OpType string `json:"opType,omitempty"` + Type string `json:"type,omitempty"` + Side string `json:"side,omitempty"` + Price string `json:"price,omitempty"` + Size string `json:"size,omitempty"` + Funds string `json:"funds,omitempty"` + DealFunds string `json:"dealFunds,omitempty"` + DealSize string `json:"dealSize,omitempty"` + Fee string `json:"fee,omitempty"` + FeeCurrency string `json:"feeCurrency,omitempty"` + Stp string `json:"stp,omitempty"` + Stop string `json:"stop,omitempty"` + StopTriggered bool `json:"stopTriggered,omitempty"` + StopPrice string `json:"stopPrice,omitempty"` + TimeInForce string `json:"timeInForce,omitempty"` + PostOnly bool `json:"postOnly,omitempty"` + Hidden bool `json:"hidden,omitempty"` + Iceberg bool `json:"iceberg,omitempty"` + VisibleSize string `json:"visibleSize,omitempty"` + CancelAfter int32 `json:"cancelAfter,omitempty"` + Channel string `json:"channel,omitempty"` + ClientOid string `json:"clientOid,omitempty"` + Remark string `json:"remark,omitempty"` + Tags string `json:"tags,omitempty"` + IsActive bool `json:"isActive,omitempty"` + CancelExist bool `json:"cancelExist,omitempty"` + CreatedAt int64 `json:"createdAt,omitempty"` + TradeType string `json:"tradeType,omitempty"` + Tax *string `json:"tax,omitempty"` + TaxRate *string `json:"taxRate,omitempty"` + TaxCurrency *string `json:"taxCurrency,omitempty"` } // NewGetOrderByOrderIdOldResp instantiates a new GetOrderByOrderIdOldResp object @@ -118,6 +121,9 @@ func (o *GetOrderByOrderIdOldResp) ToMap() map[string]interface{} { toSerialize["cancelExist"] = o.CancelExist toSerialize["createdAt"] = o.CreatedAt toSerialize["tradeType"] = o.TradeType + toSerialize["tax"] = o.Tax + toSerialize["taxRate"] = o.TaxRate + toSerialize["taxCurrency"] = o.TaxCurrency return toSerialize } diff --git a/sdk/golang/pkg/generate/spot/order/types_get_order_by_order_id_resp.go b/sdk/golang/pkg/generate/spot/order/types_get_order_by_order_id_resp.go index 9cd700c4..b5523480 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_order_by_order_id_resp.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_order_by_order_id_resp.go @@ -46,7 +46,7 @@ type GetOrderByOrderIdResp struct { // Visible size of iceberg order in order book. VisibleSize string `json:"visibleSize,omitempty"` // A GTT timeInForce that expires in n seconds - CancelAfter int32 `json:"cancelAfter,omitempty"` + CancelAfter int64 `json:"cancelAfter,omitempty"` Channel string `json:"channel,omitempty"` // Client Order Id,unique identifier created by the user ClientOid string `json:"clientOid,omitempty"` @@ -78,7 +78,7 @@ type GetOrderByOrderIdResp struct { // NewGetOrderByOrderIdResp instantiates a new GetOrderByOrderIdResp object // This constructor will assign default values to properties that have it defined -func NewGetOrderByOrderIdResp(id string, symbol string, opType string, Type_ string, side string, price string, size string, funds string, dealSize string, dealFunds string, fee string, feeCurrency string, timeInForce string, postOnly bool, hidden bool, iceberg bool, visibleSize string, cancelAfter int32, channel string, clientOid string, cancelExist bool, createdAt int64, lastUpdatedAt int64, tradeType string, inOrderBook bool, cancelledSize string, cancelledFunds string, remainSize string, remainFunds string, tax string, active bool) *GetOrderByOrderIdResp { +func NewGetOrderByOrderIdResp(id string, symbol string, opType string, Type_ string, side string, price string, size string, funds string, dealSize string, dealFunds string, fee string, feeCurrency string, timeInForce string, postOnly bool, hidden bool, iceberg bool, visibleSize string, cancelAfter int64, channel string, clientOid string, cancelExist bool, createdAt int64, lastUpdatedAt int64, tradeType string, inOrderBook bool, cancelledSize string, cancelledFunds string, remainSize string, remainFunds string, tax string, active bool) *GetOrderByOrderIdResp { this := GetOrderByOrderIdResp{} this.Id = id this.Symbol = symbol diff --git a/sdk/golang/pkg/generate/spot/order/types_get_orders_list_old_items.go b/sdk/golang/pkg/generate/spot/order/types_get_orders_list_old_items.go index d89b2d38..5e86acf1 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_orders_list_old_items.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_orders_list_old_items.go @@ -4,36 +4,39 @@ package order // GetOrdersListOldItems struct for GetOrdersListOldItems type GetOrdersListOldItems struct { - Id string `json:"id,omitempty"` - Symbol string `json:"symbol,omitempty"` - OpType string `json:"opType,omitempty"` - Type string `json:"type,omitempty"` - Side string `json:"side,omitempty"` - Price string `json:"price,omitempty"` - Size string `json:"size,omitempty"` - Funds string `json:"funds,omitempty"` - DealFunds string `json:"dealFunds,omitempty"` - DealSize string `json:"dealSize,omitempty"` - Fee string `json:"fee,omitempty"` - FeeCurrency string `json:"feeCurrency,omitempty"` - Stp string `json:"stp,omitempty"` - Stop string `json:"stop,omitempty"` - StopTriggered bool `json:"stopTriggered,omitempty"` - StopPrice string `json:"stopPrice,omitempty"` - TimeInForce string `json:"timeInForce,omitempty"` - PostOnly bool `json:"postOnly,omitempty"` - Hidden bool `json:"hidden,omitempty"` - Iceberg bool `json:"iceberg,omitempty"` - VisibleSize string `json:"visibleSize,omitempty"` - CancelAfter int32 `json:"cancelAfter,omitempty"` - Channel string `json:"channel,omitempty"` - ClientOid string `json:"clientOid,omitempty"` - Remark string `json:"remark,omitempty"` - Tags string `json:"tags,omitempty"` - IsActive bool `json:"isActive,omitempty"` - CancelExist bool `json:"cancelExist,omitempty"` - CreatedAt int64 `json:"createdAt,omitempty"` - TradeType string `json:"tradeType,omitempty"` + Id string `json:"id,omitempty"` + Symbol string `json:"symbol,omitempty"` + OpType string `json:"opType,omitempty"` + Type string `json:"type,omitempty"` + Side string `json:"side,omitempty"` + Price string `json:"price,omitempty"` + Size string `json:"size,omitempty"` + Funds string `json:"funds,omitempty"` + DealFunds string `json:"dealFunds,omitempty"` + DealSize string `json:"dealSize,omitempty"` + Fee string `json:"fee,omitempty"` + FeeCurrency string `json:"feeCurrency,omitempty"` + Stp string `json:"stp,omitempty"` + Stop string `json:"stop,omitempty"` + StopTriggered bool `json:"stopTriggered,omitempty"` + StopPrice string `json:"stopPrice,omitempty"` + TimeInForce string `json:"timeInForce,omitempty"` + PostOnly bool `json:"postOnly,omitempty"` + Hidden bool `json:"hidden,omitempty"` + Iceberg bool `json:"iceberg,omitempty"` + VisibleSize string `json:"visibleSize,omitempty"` + CancelAfter int32 `json:"cancelAfter,omitempty"` + Channel string `json:"channel,omitempty"` + ClientOid string `json:"clientOid,omitempty"` + Remark string `json:"remark,omitempty"` + Tags string `json:"tags,omitempty"` + IsActive bool `json:"isActive,omitempty"` + CancelExist bool `json:"cancelExist,omitempty"` + CreatedAt int64 `json:"createdAt,omitempty"` + TradeType string `json:"tradeType,omitempty"` + Tax *string `json:"tax,omitempty"` + TaxRate *string `json:"taxRate,omitempty"` + TaxCurrency *string `json:"taxCurrency,omitempty"` } // NewGetOrdersListOldItems instantiates a new GetOrdersListOldItems object @@ -112,5 +115,8 @@ func (o *GetOrdersListOldItems) ToMap() map[string]interface{} { toSerialize["cancelExist"] = o.CancelExist toSerialize["createdAt"] = o.CreatedAt toSerialize["tradeType"] = o.TradeType + toSerialize["tax"] = o.Tax + toSerialize["taxRate"] = o.TaxRate + toSerialize["taxCurrency"] = o.TaxCurrency return toSerialize } diff --git a/sdk/golang/pkg/generate/spot/order/types_get_orders_list_old_req.go b/sdk/golang/pkg/generate/spot/order/types_get_orders_list_old_req.go index b88858fb..9c0b07db 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_orders_list_old_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_orders_list_old_req.go @@ -4,19 +4,19 @@ package order // GetOrdersListOldReq struct for GetOrdersListOldReq type GetOrdersListOldReq struct { - // symbol + // Symbol Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` - // active or done(done as default), Only list orders with a specific status . + // Active or done (done as default); only list orders with a specific status. Status *string `json:"status,omitempty" url:"status,omitempty"` - // buy or sell + // Buy or Sell Side *string `json:"side,omitempty" url:"side,omitempty"` - // limit, market, limit_stop or market_stop + // Order type Type *string `json:"type,omitempty" url:"type,omitempty"` - // The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. + // The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. TradeType *string `json:"tradeType,omitempty" url:"tradeType,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` // Current request page. CurrentPage *int32 `json:"currentPage,omitempty" url:"currentPage,omitempty"` @@ -76,43 +76,43 @@ func NewGetOrdersListOldReqBuilder() *GetOrdersListOldReqBuilder { return &GetOrdersListOldReqBuilder{obj: NewGetOrdersListOldReqWithDefaults()} } -// symbol +// Symbol func (builder *GetOrdersListOldReqBuilder) SetSymbol(value string) *GetOrdersListOldReqBuilder { builder.obj.Symbol = &value return builder } -// active or done(done as default), Only list orders with a specific status . +// Active or done (done as default); only list orders with a specific status. func (builder *GetOrdersListOldReqBuilder) SetStatus(value string) *GetOrdersListOldReqBuilder { builder.obj.Status = &value return builder } -// buy or sell +// Buy or Sell func (builder *GetOrdersListOldReqBuilder) SetSide(value string) *GetOrdersListOldReqBuilder { builder.obj.Side = &value return builder } -// limit, market, limit_stop or market_stop +// Order type func (builder *GetOrdersListOldReqBuilder) SetType(value string) *GetOrdersListOldReqBuilder { builder.obj.Type = &value return builder } -// The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. +// The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. func (builder *GetOrdersListOldReqBuilder) SetTradeType(value string) *GetOrdersListOldReqBuilder { builder.obj.TradeType = &value return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetOrdersListOldReqBuilder) SetStartAt(value int64) *GetOrdersListOldReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetOrdersListOldReqBuilder) SetEndAt(value int64) *GetOrdersListOldReqBuilder { builder.obj.EndAt = &value return builder diff --git a/sdk/golang/pkg/generate/spot/order/types_get_recent_orders_list_old_data.go b/sdk/golang/pkg/generate/spot/order/types_get_recent_orders_list_old_data.go index e9bd2dcd..879f7e06 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_recent_orders_list_old_data.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_recent_orders_list_old_data.go @@ -4,36 +4,39 @@ package order // GetRecentOrdersListOldData struct for GetRecentOrdersListOldData type GetRecentOrdersListOldData struct { - Id string `json:"id,omitempty"` - Symbol string `json:"symbol,omitempty"` - OpType string `json:"opType,omitempty"` - Type string `json:"type,omitempty"` - Side string `json:"side,omitempty"` - Price string `json:"price,omitempty"` - Size string `json:"size,omitempty"` - Funds string `json:"funds,omitempty"` - DealFunds string `json:"dealFunds,omitempty"` - DealSize string `json:"dealSize,omitempty"` - Fee string `json:"fee,omitempty"` - FeeCurrency string `json:"feeCurrency,omitempty"` - Stp string `json:"stp,omitempty"` - Stop string `json:"stop,omitempty"` - StopTriggered bool `json:"stopTriggered,omitempty"` - StopPrice string `json:"stopPrice,omitempty"` - TimeInForce string `json:"timeInForce,omitempty"` - PostOnly bool `json:"postOnly,omitempty"` - Hidden bool `json:"hidden,omitempty"` - Iceberg bool `json:"iceberg,omitempty"` - VisibleSize string `json:"visibleSize,omitempty"` - CancelAfter int32 `json:"cancelAfter,omitempty"` - Channel string `json:"channel,omitempty"` - ClientOid string `json:"clientOid,omitempty"` - Remark string `json:"remark,omitempty"` - Tags string `json:"tags,omitempty"` - IsActive bool `json:"isActive,omitempty"` - CancelExist bool `json:"cancelExist,omitempty"` - CreatedAt int64 `json:"createdAt,omitempty"` - TradeType string `json:"tradeType,omitempty"` + Id string `json:"id,omitempty"` + Symbol string `json:"symbol,omitempty"` + OpType string `json:"opType,omitempty"` + Type string `json:"type,omitempty"` + Side string `json:"side,omitempty"` + Price string `json:"price,omitempty"` + Size string `json:"size,omitempty"` + Funds string `json:"funds,omitempty"` + DealFunds string `json:"dealFunds,omitempty"` + DealSize string `json:"dealSize,omitempty"` + Fee string `json:"fee,omitempty"` + FeeCurrency string `json:"feeCurrency,omitempty"` + Stp string `json:"stp,omitempty"` + Stop string `json:"stop,omitempty"` + StopTriggered bool `json:"stopTriggered,omitempty"` + StopPrice string `json:"stopPrice,omitempty"` + TimeInForce string `json:"timeInForce,omitempty"` + PostOnly bool `json:"postOnly,omitempty"` + Hidden bool `json:"hidden,omitempty"` + Iceberg bool `json:"iceberg,omitempty"` + VisibleSize string `json:"visibleSize,omitempty"` + CancelAfter int32 `json:"cancelAfter,omitempty"` + Channel string `json:"channel,omitempty"` + ClientOid string `json:"clientOid,omitempty"` + Remark string `json:"remark,omitempty"` + Tags string `json:"tags,omitempty"` + IsActive bool `json:"isActive,omitempty"` + CancelExist bool `json:"cancelExist,omitempty"` + CreatedAt int64 `json:"createdAt,omitempty"` + TradeType string `json:"tradeType,omitempty"` + Tax *string `json:"tax,omitempty"` + TaxRate *string `json:"taxRate,omitempty"` + TaxCurrency *string `json:"taxCurrency,omitempty"` } // NewGetRecentOrdersListOldData instantiates a new GetRecentOrdersListOldData object @@ -112,5 +115,8 @@ func (o *GetRecentOrdersListOldData) ToMap() map[string]interface{} { toSerialize["cancelExist"] = o.CancelExist toSerialize["createdAt"] = o.CreatedAt toSerialize["tradeType"] = o.TradeType + toSerialize["tax"] = o.Tax + toSerialize["taxRate"] = o.TaxRate + toSerialize["taxCurrency"] = o.TaxCurrency return toSerialize } diff --git a/sdk/golang/pkg/generate/spot/order/types_get_recent_orders_list_old_req.go b/sdk/golang/pkg/generate/spot/order/types_get_recent_orders_list_old_req.go deleted file mode 100644 index 6448026c..00000000 --- a/sdk/golang/pkg/generate/spot/order/types_get_recent_orders_list_old_req.go +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. - -package order - -// GetRecentOrdersListOldReq struct for GetRecentOrdersListOldReq -type GetRecentOrdersListOldReq struct { - // Current request page. - CurrentPage *int32 `json:"currentPage,omitempty" url:"currentPage,omitempty"` - // Number of results per request. Minimum is 10, maximum is 500. - PageSize *int32 `json:"pageSize,omitempty" url:"pageSize,omitempty"` -} - -// NewGetRecentOrdersListOldReq instantiates a new GetRecentOrdersListOldReq object -// This constructor will assign default values to properties that have it defined -func NewGetRecentOrdersListOldReq() *GetRecentOrdersListOldReq { - this := GetRecentOrdersListOldReq{} - var currentPage int32 = 1 - this.CurrentPage = ¤tPage - var pageSize int32 = 50 - this.PageSize = &pageSize - return &this -} - -// NewGetRecentOrdersListOldReqWithDefaults instantiates a new GetRecentOrdersListOldReq object -// This constructor will only assign default values to properties that have it defined, -func NewGetRecentOrdersListOldReqWithDefaults() *GetRecentOrdersListOldReq { - this := GetRecentOrdersListOldReq{} - var currentPage int32 = 1 - this.CurrentPage = ¤tPage - var pageSize int32 = 50 - this.PageSize = &pageSize - return &this -} - -func (o *GetRecentOrdersListOldReq) ToMap() map[string]interface{} { - toSerialize := map[string]interface{}{} - toSerialize["currentPage"] = o.CurrentPage - toSerialize["pageSize"] = o.PageSize - return toSerialize -} - -type GetRecentOrdersListOldReqBuilder struct { - obj *GetRecentOrdersListOldReq -} - -func NewGetRecentOrdersListOldReqBuilder() *GetRecentOrdersListOldReqBuilder { - return &GetRecentOrdersListOldReqBuilder{obj: NewGetRecentOrdersListOldReqWithDefaults()} -} - -// Current request page. -func (builder *GetRecentOrdersListOldReqBuilder) SetCurrentPage(value int32) *GetRecentOrdersListOldReqBuilder { - builder.obj.CurrentPage = &value - return builder -} - -// Number of results per request. Minimum is 10, maximum is 500. -func (builder *GetRecentOrdersListOldReqBuilder) SetPageSize(value int32) *GetRecentOrdersListOldReqBuilder { - builder.obj.PageSize = &value - return builder -} - -func (builder *GetRecentOrdersListOldReqBuilder) Build() *GetRecentOrdersListOldReq { - return builder.obj -} diff --git a/sdk/golang/pkg/generate/spot/order/types_get_recent_trade_history_old_data.go b/sdk/golang/pkg/generate/spot/order/types_get_recent_trade_history_old_data.go index 6fd0ab6c..c9a22ffd 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_recent_trade_history_old_data.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_recent_trade_history_old_data.go @@ -4,29 +4,49 @@ package order // GetRecentTradeHistoryOldData struct for GetRecentTradeHistoryOldData type GetRecentTradeHistoryOldData struct { - Symbol *string `json:"symbol,omitempty"` - TradeId *string `json:"tradeId,omitempty"` - OrderId *string `json:"orderId,omitempty"` - CounterOrderId *string `json:"counterOrderId,omitempty"` - Side *string `json:"side,omitempty"` - Liquidity *string `json:"liquidity,omitempty"` - ForceTaker *bool `json:"forceTaker,omitempty"` - Price *string `json:"price,omitempty"` - Size *string `json:"size,omitempty"` - Funds *string `json:"funds,omitempty"` - Fee *string `json:"fee,omitempty"` - FeeRate *string `json:"feeRate,omitempty"` - FeeCurrency *string `json:"feeCurrency,omitempty"` - Stop *string `json:"stop,omitempty"` - TradeType *string `json:"tradeType,omitempty"` - Type *string `json:"type,omitempty"` - CreatedAt *int64 `json:"createdAt,omitempty"` + Symbol string `json:"symbol,omitempty"` + TradeId string `json:"tradeId,omitempty"` + OrderId string `json:"orderId,omitempty"` + CounterOrderId string `json:"counterOrderId,omitempty"` + Side string `json:"side,omitempty"` + Liquidity string `json:"liquidity,omitempty"` + ForceTaker bool `json:"forceTaker,omitempty"` + Price string `json:"price,omitempty"` + Size string `json:"size,omitempty"` + Funds string `json:"funds,omitempty"` + Fee string `json:"fee,omitempty"` + FeeRate string `json:"feeRate,omitempty"` + FeeCurrency string `json:"feeCurrency,omitempty"` + Stop string `json:"stop,omitempty"` + TradeType string `json:"tradeType,omitempty"` + Type string `json:"type,omitempty"` + CreatedAt int64 `json:"createdAt,omitempty"` + Tax *string `json:"tax,omitempty"` + TaxCurrency *string `json:"taxCurrency,omitempty"` + TaxRate *string `json:"taxRate,omitempty"` } // NewGetRecentTradeHistoryOldData instantiates a new GetRecentTradeHistoryOldData object // This constructor will assign default values to properties that have it defined -func NewGetRecentTradeHistoryOldData() *GetRecentTradeHistoryOldData { +func NewGetRecentTradeHistoryOldData(symbol string, tradeId string, orderId string, counterOrderId string, side string, liquidity string, forceTaker bool, price string, size string, funds string, fee string, feeRate string, feeCurrency string, stop string, tradeType string, Type_ string, createdAt int64) *GetRecentTradeHistoryOldData { this := GetRecentTradeHistoryOldData{} + this.Symbol = symbol + this.TradeId = tradeId + this.OrderId = orderId + this.CounterOrderId = counterOrderId + this.Side = side + this.Liquidity = liquidity + this.ForceTaker = forceTaker + this.Price = price + this.Size = size + this.Funds = funds + this.Fee = fee + this.FeeRate = feeRate + this.FeeCurrency = feeCurrency + this.Stop = stop + this.TradeType = tradeType + this.Type = Type_ + this.CreatedAt = createdAt return &this } @@ -56,5 +76,8 @@ func (o *GetRecentTradeHistoryOldData) ToMap() map[string]interface{} { toSerialize["tradeType"] = o.TradeType toSerialize["type"] = o.Type toSerialize["createdAt"] = o.CreatedAt + toSerialize["tax"] = o.Tax + toSerialize["taxCurrency"] = o.TaxCurrency + toSerialize["taxRate"] = o.TaxRate return toSerialize } diff --git a/sdk/golang/pkg/generate/spot/order/types_get_recent_trade_history_old_req.go b/sdk/golang/pkg/generate/spot/order/types_get_recent_trade_history_old_req.go deleted file mode 100644 index c7ea1137..00000000 --- a/sdk/golang/pkg/generate/spot/order/types_get_recent_trade_history_old_req.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. - -package order - -// GetRecentTradeHistoryOldReq struct for GetRecentTradeHistoryOldReq -type GetRecentTradeHistoryOldReq struct { - // Current request page. - CurrentPage *int32 `json:"currentPage,omitempty" url:"currentPage,omitempty"` - // Number of results per request. Minimum is 10, maximum is 500. - PageSize *int32 `json:"pageSize,omitempty" url:"pageSize,omitempty"` -} - -// NewGetRecentTradeHistoryOldReq instantiates a new GetRecentTradeHistoryOldReq object -// This constructor will assign default values to properties that have it defined -func NewGetRecentTradeHistoryOldReq() *GetRecentTradeHistoryOldReq { - this := GetRecentTradeHistoryOldReq{} - var currentPage int32 = 1 - this.CurrentPage = ¤tPage - return &this -} - -// NewGetRecentTradeHistoryOldReqWithDefaults instantiates a new GetRecentTradeHistoryOldReq object -// This constructor will only assign default values to properties that have it defined, -func NewGetRecentTradeHistoryOldReqWithDefaults() *GetRecentTradeHistoryOldReq { - this := GetRecentTradeHistoryOldReq{} - var currentPage int32 = 1 - this.CurrentPage = ¤tPage - return &this -} - -func (o *GetRecentTradeHistoryOldReq) ToMap() map[string]interface{} { - toSerialize := map[string]interface{}{} - toSerialize["currentPage"] = o.CurrentPage - toSerialize["pageSize"] = o.PageSize - return toSerialize -} - -type GetRecentTradeHistoryOldReqBuilder struct { - obj *GetRecentTradeHistoryOldReq -} - -func NewGetRecentTradeHistoryOldReqBuilder() *GetRecentTradeHistoryOldReqBuilder { - return &GetRecentTradeHistoryOldReqBuilder{obj: NewGetRecentTradeHistoryOldReqWithDefaults()} -} - -// Current request page. -func (builder *GetRecentTradeHistoryOldReqBuilder) SetCurrentPage(value int32) *GetRecentTradeHistoryOldReqBuilder { - builder.obj.CurrentPage = &value - return builder -} - -// Number of results per request. Minimum is 10, maximum is 500. -func (builder *GetRecentTradeHistoryOldReqBuilder) SetPageSize(value int32) *GetRecentTradeHistoryOldReqBuilder { - builder.obj.PageSize = &value - return builder -} - -func (builder *GetRecentTradeHistoryOldReqBuilder) Build() *GetRecentTradeHistoryOldReq { - return builder.obj -} diff --git a/sdk/golang/pkg/generate/spot/order/types_get_stop_order_by_client_oid_data.go b/sdk/golang/pkg/generate/spot/order/types_get_stop_order_by_client_oid_data.go index 15595d17..73716f7c 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_stop_order_by_client_oid_data.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_stop_order_by_client_oid_data.go @@ -12,7 +12,7 @@ type GetStopOrderByClientOidData struct { UserId *string `json:"userId,omitempty"` // Order status, include NEW, TRIGGERED Status *string `json:"status,omitempty"` - // Order type,limit, market, limit_stop or market_stop + // Order type Type *string `json:"type,omitempty"` // transaction direction,include buy and sell Side *string `json:"side,omitempty"` diff --git a/sdk/golang/pkg/generate/spot/order/types_get_stop_order_by_order_id_resp.go b/sdk/golang/pkg/generate/spot/order/types_get_stop_order_by_order_id_resp.go index 5d9ca050..738649db 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_stop_order_by_order_id_resp.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_stop_order_by_order_id_resp.go @@ -18,7 +18,7 @@ type GetStopOrderByOrderIdResp struct { UserId *string `json:"userId,omitempty"` // Order status, include NEW, TRIGGERED Status *string `json:"status,omitempty"` - // Order type,limit, market, limit_stop or market_stop + // Order type Type *string `json:"type,omitempty"` // transaction direction,include buy and sell Side *string `json:"side,omitempty"` diff --git a/sdk/golang/pkg/generate/spot/order/types_get_stop_orders_list_items.go b/sdk/golang/pkg/generate/spot/order/types_get_stop_orders_list_items.go index 9324a9f6..4ce48f2e 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_stop_orders_list_items.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_stop_orders_list_items.go @@ -5,72 +5,102 @@ package order // GetStopOrdersListItems struct for GetStopOrdersListItems type GetStopOrdersListItems struct { // Order ID, the ID of an order. - Id *string `json:"id,omitempty"` + Id string `json:"id,omitempty"` // Symbol name - Symbol *string `json:"symbol,omitempty"` + Symbol string `json:"symbol,omitempty"` // User ID - UserId *string `json:"userId,omitempty"` + UserId string `json:"userId,omitempty"` // Order status, include NEW, TRIGGERED - Status *string `json:"status,omitempty"` - // Order type,limit, market, limit_stop or market_stop - Type *string `json:"type,omitempty"` + Status string `json:"status,omitempty"` + // Order type + Type string `json:"type,omitempty"` // transaction direction,include buy and sell - Side *string `json:"side,omitempty"` + Side string `json:"side,omitempty"` // order price - Price *string `json:"price,omitempty"` + Price string `json:"price,omitempty"` // order quantity - Size *string `json:"size,omitempty"` + Size string `json:"size,omitempty"` // order funds Funds *string `json:"funds,omitempty"` Stp *string `json:"stp,omitempty"` // time InForce,include GTC,GTT,IOC,FOK - TimeInForce *string `json:"timeInForce,omitempty"` + TimeInForce string `json:"timeInForce,omitempty"` // cancel orders after n seconds,requires timeInForce to be GTT - CancelAfter *int32 `json:"cancelAfter,omitempty"` + CancelAfter int32 `json:"cancelAfter,omitempty"` // postOnly - PostOnly *bool `json:"postOnly,omitempty"` + PostOnly bool `json:"postOnly,omitempty"` // hidden order - Hidden *bool `json:"hidden,omitempty"` + Hidden bool `json:"hidden,omitempty"` // Iceberg order - Iceberg *bool `json:"iceberg,omitempty"` + Iceberg bool `json:"iceberg,omitempty"` // displayed quantity for iceberg order VisibleSize *string `json:"visibleSize,omitempty"` // order source - Channel *string `json:"channel,omitempty"` + Channel string `json:"channel,omitempty"` // user-entered order unique mark - ClientOid *string `json:"clientOid,omitempty"` + ClientOid string `json:"clientOid,omitempty"` // Remarks at stop order creation - Remark *string `json:"remark,omitempty"` + Remark string `json:"remark,omitempty"` // tag order source Tags *string `json:"tags,omitempty"` // Time of place a stop order, accurate to nanoseconds - OrderTime *int64 `json:"orderTime,omitempty"` + OrderTime int64 `json:"orderTime,omitempty"` // domainId, e.g: kucoin - DomainId *string `json:"domainId,omitempty"` + DomainId string `json:"domainId,omitempty"` // trade source: USER(Order by user), MARGIN_SYSTEM(Order by margin system) - TradeSource *string `json:"tradeSource,omitempty"` + TradeSource string `json:"tradeSource,omitempty"` // The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). - TradeType *string `json:"tradeType,omitempty"` + TradeType string `json:"tradeType,omitempty"` // The currency of the fee - FeeCurrency *string `json:"feeCurrency,omitempty"` + FeeCurrency string `json:"feeCurrency,omitempty"` // Fee Rate of taker - TakerFeeRate *string `json:"takerFeeRate,omitempty"` + TakerFeeRate string `json:"takerFeeRate,omitempty"` // Fee Rate of maker - MakerFeeRate *string `json:"makerFeeRate,omitempty"` + MakerFeeRate string `json:"makerFeeRate,omitempty"` // order creation time - CreatedAt *int64 `json:"createdAt,omitempty"` + CreatedAt int64 `json:"createdAt,omitempty"` // Stop order type, include loss and entry - Stop *string `json:"stop,omitempty"` + Stop string `json:"stop,omitempty"` // The trigger time of the stop order StopTriggerTime *int64 `json:"stopTriggerTime,omitempty"` // stop price - StopPrice *string `json:"stopPrice,omitempty"` + StopPrice string `json:"stopPrice,omitempty"` + RelatedNo *string `json:"relatedNo,omitempty"` + LimitPrice *string `json:"limitPrice,omitempty"` + Pop *string `json:"pop,omitempty"` + ActivateCondition *string `json:"activateCondition,omitempty"` } // NewGetStopOrdersListItems instantiates a new GetStopOrdersListItems object // This constructor will assign default values to properties that have it defined -func NewGetStopOrdersListItems() *GetStopOrdersListItems { +func NewGetStopOrdersListItems(id string, symbol string, userId string, status string, Type_ string, side string, price string, size string, timeInForce string, cancelAfter int32, postOnly bool, hidden bool, iceberg bool, channel string, clientOid string, remark string, orderTime int64, domainId string, tradeSource string, tradeType string, feeCurrency string, takerFeeRate string, makerFeeRate string, createdAt int64, stop string, stopPrice string) *GetStopOrdersListItems { this := GetStopOrdersListItems{} + this.Id = id + this.Symbol = symbol + this.UserId = userId + this.Status = status + this.Type = Type_ + this.Side = side + this.Price = price + this.Size = size + this.TimeInForce = timeInForce + this.CancelAfter = cancelAfter + this.PostOnly = postOnly + this.Hidden = hidden + this.Iceberg = iceberg + this.Channel = channel + this.ClientOid = clientOid + this.Remark = remark + this.OrderTime = orderTime + this.DomainId = domainId + this.TradeSource = tradeSource + this.TradeType = tradeType + this.FeeCurrency = feeCurrency + this.TakerFeeRate = takerFeeRate + this.MakerFeeRate = makerFeeRate + this.CreatedAt = createdAt + this.Stop = stop + this.StopPrice = stopPrice return &this } @@ -114,5 +144,9 @@ func (o *GetStopOrdersListItems) ToMap() map[string]interface{} { toSerialize["stop"] = o.Stop toSerialize["stopTriggerTime"] = o.StopTriggerTime toSerialize["stopPrice"] = o.StopPrice + toSerialize["relatedNo"] = o.RelatedNo + toSerialize["limitPrice"] = o.LimitPrice + toSerialize["pop"] = o.Pop + toSerialize["activateCondition"] = o.ActivateCondition return toSerialize } diff --git a/sdk/golang/pkg/generate/spot/order/types_get_stop_orders_list_req.go b/sdk/golang/pkg/generate/spot/order/types_get_stop_orders_list_req.go index 74dd1757..b5677d73 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_stop_orders_list_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_stop_orders_list_req.go @@ -5,31 +5,35 @@ package order // GetStopOrdersListReq struct for GetStopOrdersListReq type GetStopOrdersListReq struct { // Only list orders for a specific symbol - Symbol *string `json:"symbol,omitempty"` + Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` // buy or sell - Side *string `json:"side,omitempty"` - // limit, market, limit_stop or market_stop - Type *string `json:"type,omitempty"` + Side *string `json:"side,omitempty" url:"side,omitempty"` + // limit, market + Type *string `json:"type,omitempty" url:"type,omitempty"` // The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE - TradeType *string `json:"tradeType,omitempty"` + TradeType *string `json:"tradeType,omitempty" url:"tradeType,omitempty"` // Start time (milisecond) - StartAt *float32 `json:"startAt,omitempty"` + StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` // End time (milisecond) - EndAt *float32 `json:"endAt,omitempty"` - // current page - CurrentPage *int32 `json:"currentPage,omitempty"` - // comma seperated order ID list - OrderIds *string `json:"orderIds,omitempty"` - // page size - PageSize *int32 `json:"pageSize,omitempty"` + EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` + // Current page + CurrentPage *int32 `json:"currentPage,omitempty" url:"currentPage,omitempty"` + // Comma seperated order ID list + OrderIds *string `json:"orderIds,omitempty" url:"orderIds,omitempty"` + // Page size + PageSize *int32 `json:"pageSize,omitempty" url:"pageSize,omitempty"` // Order type: stop: stop loss order, oco: oco order - Stop *string `json:"stop,omitempty"` + Stop *string `json:"stop,omitempty" url:"stop,omitempty"` } // NewGetStopOrdersListReq instantiates a new GetStopOrdersListReq object // This constructor will assign default values to properties that have it defined func NewGetStopOrdersListReq() *GetStopOrdersListReq { this := GetStopOrdersListReq{} + var currentPage int32 = 1 + this.CurrentPage = ¤tPage + var pageSize int32 = 50 + this.PageSize = &pageSize return &this } @@ -37,6 +41,10 @@ func NewGetStopOrdersListReq() *GetStopOrdersListReq { // This constructor will only assign default values to properties that have it defined, func NewGetStopOrdersListReqWithDefaults() *GetStopOrdersListReq { this := GetStopOrdersListReq{} + var currentPage int32 = 1 + this.CurrentPage = ¤tPage + var pageSize int32 = 50 + this.PageSize = &pageSize return &this } @@ -75,7 +83,7 @@ func (builder *GetStopOrdersListReqBuilder) SetSide(value string) *GetStopOrders return builder } -// limit, market, limit_stop or market_stop +// limit, market func (builder *GetStopOrdersListReqBuilder) SetType(value string) *GetStopOrdersListReqBuilder { builder.obj.Type = &value return builder @@ -88,30 +96,30 @@ func (builder *GetStopOrdersListReqBuilder) SetTradeType(value string) *GetStopO } // Start time (milisecond) -func (builder *GetStopOrdersListReqBuilder) SetStartAt(value float32) *GetStopOrdersListReqBuilder { +func (builder *GetStopOrdersListReqBuilder) SetStartAt(value int64) *GetStopOrdersListReqBuilder { builder.obj.StartAt = &value return builder } // End time (milisecond) -func (builder *GetStopOrdersListReqBuilder) SetEndAt(value float32) *GetStopOrdersListReqBuilder { +func (builder *GetStopOrdersListReqBuilder) SetEndAt(value int64) *GetStopOrdersListReqBuilder { builder.obj.EndAt = &value return builder } -// current page +// Current page func (builder *GetStopOrdersListReqBuilder) SetCurrentPage(value int32) *GetStopOrdersListReqBuilder { builder.obj.CurrentPage = &value return builder } -// comma seperated order ID list +// Comma seperated order ID list func (builder *GetStopOrdersListReqBuilder) SetOrderIds(value string) *GetStopOrdersListReqBuilder { builder.obj.OrderIds = &value return builder } -// page size +// Page size func (builder *GetStopOrdersListReqBuilder) SetPageSize(value int32) *GetStopOrdersListReqBuilder { builder.obj.PageSize = &value return builder diff --git a/sdk/golang/pkg/generate/spot/order/types_get_stop_orders_list_resp.go b/sdk/golang/pkg/generate/spot/order/types_get_stop_orders_list_resp.go index 6cd86224..f12f6fa8 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_stop_orders_list_resp.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_stop_orders_list_resp.go @@ -11,20 +11,25 @@ type GetStopOrdersListResp struct { // common response CommonResponse *types.RestResponse // current page id - CurrentPage *int32 `json:"currentPage,omitempty"` - PageSize *int32 `json:"pageSize,omitempty"` + CurrentPage int32 `json:"currentPage,omitempty"` + PageSize int32 `json:"pageSize,omitempty"` // the stop order count - TotalNum *int32 `json:"totalNum,omitempty"` + TotalNum int32 `json:"totalNum,omitempty"` // total page count of the list - TotalPage *int32 `json:"totalPage,omitempty"` + TotalPage int32 `json:"totalPage,omitempty"` // the list of stop orders Items []GetStopOrdersListItems `json:"items,omitempty"` } // NewGetStopOrdersListResp instantiates a new GetStopOrdersListResp object // This constructor will assign default values to properties that have it defined -func NewGetStopOrdersListResp() *GetStopOrdersListResp { +func NewGetStopOrdersListResp(currentPage int32, pageSize int32, totalNum int32, totalPage int32, items []GetStopOrdersListItems) *GetStopOrdersListResp { this := GetStopOrdersListResp{} + this.CurrentPage = currentPage + this.PageSize = pageSize + this.TotalNum = totalNum + this.TotalPage = totalPage + this.Items = items return &this } diff --git a/sdk/golang/pkg/generate/spot/order/types_get_trade_history_old_items.go b/sdk/golang/pkg/generate/spot/order/types_get_trade_history_old_items.go index 278c8123..b95137b8 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_trade_history_old_items.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_trade_history_old_items.go @@ -9,16 +9,16 @@ type GetTradeHistoryOldItems struct { TradeId *string `json:"tradeId,omitempty"` // The unique order id generated by the trading system OrderId *string `json:"orderId,omitempty"` - // Counterparty order Id + // Counterparty order ID CounterOrderId *string `json:"counterOrderId,omitempty"` // Buy or sell Side *string `json:"side,omitempty"` // Liquidity type: taker or maker Liquidity *string `json:"liquidity,omitempty"` ForceTaker *bool `json:"forceTaker,omitempty"` - // Order price + // Order Price Price *string `json:"price,omitempty"` - // Order size + // Order Size Size *string `json:"size,omitempty"` // Order Funds Funds *string `json:"funds,omitempty"` @@ -26,13 +26,13 @@ type GetTradeHistoryOldItems struct { Fee *string `json:"fee,omitempty"` // Fee rate FeeRate *string `json:"feeRate,omitempty"` - // currency used to calculate trading fee + // Currency used to calculate trading fee FeeCurrency *string `json:"feeCurrency,omitempty"` // Take Profit and Stop Loss type, currently HFT does not support the Take Profit and Stop Loss type, so it is empty Stop *string `json:"stop,omitempty"` // Trade type, redundancy param TradeType *string `json:"tradeType,omitempty"` - // Specify if the order is an 'limit' order or 'market' order. + // Specify if the order is a 'limit' order or 'market' order. Type *string `json:"type,omitempty"` CreatedAt *int64 `json:"createdAt,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/order/types_get_trade_history_old_req.go b/sdk/golang/pkg/generate/spot/order/types_get_trade_history_old_req.go index a9d94848..694309ff 100644 --- a/sdk/golang/pkg/generate/spot/order/types_get_trade_history_old_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_get_trade_history_old_req.go @@ -6,17 +6,17 @@ package order type GetTradeHistoryOldReq struct { // symbol Symbol *string `json:"symbol,omitempty" url:"symbol,omitempty"` - // The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters) + // The unique order ID generated by the trading system. (If orderId is specified, please ignore the other query parameters.) OrderId *string `json:"orderId,omitempty" url:"orderId,omitempty"` - // specify if the order is to 'buy' or 'sell' + // Specify if the order is to 'buy' or 'sell'. Side *string `json:"side,omitempty" url:"side,omitempty"` // limit, market, limit_stop or market_stop Type *string `json:"type,omitempty" url:"type,omitempty"` - // The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. + // The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. TradeType *string `json:"tradeType,omitempty" url:"tradeType,omitempty"` - // Start time (milisecond) + // Start time (milliseconds) StartAt *int64 `json:"startAt,omitempty" url:"startAt,omitempty"` - // End time (milisecond) + // End time (milliseconds) EndAt *int64 `json:"endAt,omitempty" url:"endAt,omitempty"` // Current request page. CurrentPage *int32 `json:"currentPage,omitempty" url:"currentPage,omitempty"` @@ -74,13 +74,13 @@ func (builder *GetTradeHistoryOldReqBuilder) SetSymbol(value string) *GetTradeHi return builder } -// The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters) +// The unique order ID generated by the trading system. (If orderId is specified, please ignore the other query parameters.) func (builder *GetTradeHistoryOldReqBuilder) SetOrderId(value string) *GetTradeHistoryOldReqBuilder { builder.obj.OrderId = &value return builder } -// specify if the order is to 'buy' or 'sell' +// Specify if the order is to 'buy' or 'sell'. func (builder *GetTradeHistoryOldReqBuilder) SetSide(value string) *GetTradeHistoryOldReqBuilder { builder.obj.Side = &value return builder @@ -92,19 +92,19 @@ func (builder *GetTradeHistoryOldReqBuilder) SetType(value string) *GetTradeHist return builder } -// The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. +// The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. func (builder *GetTradeHistoryOldReqBuilder) SetTradeType(value string) *GetTradeHistoryOldReqBuilder { builder.obj.TradeType = &value return builder } -// Start time (milisecond) +// Start time (milliseconds) func (builder *GetTradeHistoryOldReqBuilder) SetStartAt(value int64) *GetTradeHistoryOldReqBuilder { builder.obj.StartAt = &value return builder } -// End time (milisecond) +// End time (milliseconds) func (builder *GetTradeHistoryOldReqBuilder) SetEndAt(value int64) *GetTradeHistoryOldReqBuilder { builder.obj.EndAt = &value return builder diff --git a/sdk/golang/pkg/generate/spot/order/types_modify_order_req.go b/sdk/golang/pkg/generate/spot/order/types_modify_order_req.go index 9b487ee8..f72212e7 100644 --- a/sdk/golang/pkg/generate/spot/order/types_modify_order_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_modify_order_req.go @@ -4,15 +4,15 @@ package order // ModifyOrderReq struct for ModifyOrderReq type ModifyOrderReq struct { - // The old client order id,orderId and clientOid must choose one + // One must be chose out of the old client order ID, orderId and clientOid ClientOid *string `json:"clientOid,omitempty"` // symbol Symbol string `json:"symbol,omitempty"` - // The old order id, orderId and clientOid must choose one + // One must be chosen out of the old order id, orderId and clientOid OrderId *string `json:"orderId,omitempty"` - // The modified price of the new order, newPrice and newSize must choose one + // One must be chosen out of the modified price of the new order, newPrice and newSize NewPrice *string `json:"newPrice,omitempty"` - // The modified size of the new order, newPrice and newSize must choose one + // One must be chosen out of the modified size of the new order, newPrice and newSize NewSize *string `json:"newSize,omitempty"` } @@ -49,7 +49,7 @@ func NewModifyOrderReqBuilder() *ModifyOrderReqBuilder { return &ModifyOrderReqBuilder{obj: NewModifyOrderReqWithDefaults()} } -// The old client order id,orderId and clientOid must choose one +// One must be chose out of the old client order ID, orderId and clientOid func (builder *ModifyOrderReqBuilder) SetClientOid(value string) *ModifyOrderReqBuilder { builder.obj.ClientOid = &value return builder @@ -61,19 +61,19 @@ func (builder *ModifyOrderReqBuilder) SetSymbol(value string) *ModifyOrderReqBui return builder } -// The old order id, orderId and clientOid must choose one +// One must be chosen out of the old order id, orderId and clientOid func (builder *ModifyOrderReqBuilder) SetOrderId(value string) *ModifyOrderReqBuilder { builder.obj.OrderId = &value return builder } -// The modified price of the new order, newPrice and newSize must choose one +// One must be chosen out of the modified price of the new order, newPrice and newSize func (builder *ModifyOrderReqBuilder) SetNewPrice(value string) *ModifyOrderReqBuilder { builder.obj.NewPrice = &value return builder } -// The modified size of the new order, newPrice and newSize must choose one +// One must be chosen out of the modified size of the new order, newPrice and newSize func (builder *ModifyOrderReqBuilder) SetNewSize(value string) *ModifyOrderReqBuilder { builder.obj.NewSize = &value return builder diff --git a/sdk/golang/pkg/generate/spot/order/types_modify_order_resp.go b/sdk/golang/pkg/generate/spot/order/types_modify_order_resp.go index 201007c9..4d7c77e0 100644 --- a/sdk/golang/pkg/generate/spot/order/types_modify_order_resp.go +++ b/sdk/golang/pkg/generate/spot/order/types_modify_order_resp.go @@ -10,9 +10,9 @@ import ( type ModifyOrderResp struct { // common response CommonResponse *types.RestResponse - // The new order id + // The new order ID NewOrderId string `json:"newOrderId,omitempty"` - // The original client order id + // The original client order ID ClientOid string `json:"clientOid,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/order/types_set_dcp_req.go b/sdk/golang/pkg/generate/spot/order/types_set_dcp_req.go index b920dfb2..1051ee46 100644 --- a/sdk/golang/pkg/generate/spot/order/types_set_dcp_req.go +++ b/sdk/golang/pkg/generate/spot/order/types_set_dcp_req.go @@ -4,7 +4,7 @@ package order // SetDCPReq struct for SetDCPReq type SetDCPReq struct { - // Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. + // Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. Timeout int32 `json:"timeout,omitempty"` // List of trading pairs. When this parameter is not empty, separate it with commas and support up to 50 trading pairs. Empty means all trading pairs. When this parameter is changed, the previous setting will be overwritten. Symbols *string `json:"symbols,omitempty"` @@ -40,7 +40,7 @@ func NewSetDCPReqBuilder() *SetDCPReqBuilder { return &SetDCPReqBuilder{obj: NewSetDCPReqWithDefaults()} } -// Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. +// Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. func (builder *SetDCPReqBuilder) SetTimeout(value int32) *SetDCPReqBuilder { builder.obj.Timeout = value return builder diff --git a/sdk/golang/pkg/generate/spot/order/types_set_dcp_resp.go b/sdk/golang/pkg/generate/spot/order/types_set_dcp_resp.go index 27fbeef3..fb6dd0a5 100644 --- a/sdk/golang/pkg/generate/spot/order/types_set_dcp_resp.go +++ b/sdk/golang/pkg/generate/spot/order/types_set_dcp_resp.go @@ -11,14 +11,14 @@ type SetDCPResp struct { // common response CommonResponse *types.RestResponse // System current time (in seconds) - CurrentTime int32 `json:"currentTime,omitempty"` + CurrentTime int64 `json:"currentTime,omitempty"` // Trigger cancellation time (in seconds) - TriggerTime int32 `json:"triggerTime,omitempty"` + TriggerTime int64 `json:"triggerTime,omitempty"` } // NewSetDCPResp instantiates a new SetDCPResp object // This constructor will assign default values to properties that have it defined -func NewSetDCPResp(currentTime int32, triggerTime int32) *SetDCPResp { +func NewSetDCPResp(currentTime int64, triggerTime int64) *SetDCPResp { this := SetDCPResp{} this.CurrentTime = currentTime this.TriggerTime = triggerTime diff --git a/sdk/golang/pkg/generate/spot/spotprivate/api_spot_private.go b/sdk/golang/pkg/generate/spot/spotprivate/api_spot_private.go index be8484b3..f1f8fccd 100644 --- a/sdk/golang/pkg/generate/spot/spotprivate/api_spot_private.go +++ b/sdk/golang/pkg/generate/spot/spotprivate/api_spot_private.go @@ -23,6 +23,11 @@ type SpotPrivateWS interface { // push frequency: real-time OrderV2(callback OrderV2EventCallback) (id string, err error) + // StopOrder Get Stop Order + // This topic will push all change events of your stop orders. + // push frequency: real-time + StopOrder(callback StopOrderEventCallback) (id string, err error) + // Unsubscribe from topics UnSubscribe(id string) error @@ -65,6 +70,14 @@ func (impl *SpotPrivateWSImpl) OrderV2(callback OrderV2EventCallback) (string, e return impl.wsService.Subscribe(topicPrefix, args, &OrderV2EventCallbackWrapper{callback: callback}) } +func (impl *SpotPrivateWSImpl) StopOrder(callback StopOrderEventCallback) (string, error) { + topicPrefix := "/spotMarket/advancedOrders" + + args := []string{} + + return impl.wsService.Subscribe(topicPrefix, args, &StopOrderEventCallbackWrapper{callback: callback}) +} + func (impl *SpotPrivateWSImpl) UnSubscribe(id string) error { return impl.wsService.Unsubscribe(id) } diff --git a/sdk/golang/pkg/generate/spot/spotprivate/api_spot_private_test.go b/sdk/golang/pkg/generate/spot/spotprivate/api_spot_private_test.go index cb0f4d99..02b62f0b 100644 --- a/sdk/golang/pkg/generate/spot/spotprivate/api_spot_private_test.go +++ b/sdk/golang/pkg/generate/spot/spotprivate/api_spot_private_test.go @@ -51,3 +51,18 @@ func TestSpotPrivateOrderV2RespModel(t *testing.T) { err = json.Unmarshal(commonResp.RawData, obj) assert.Nil(t, err) } + +func TestSpotPrivateStopOrderRespModel(t *testing.T) { + // StopOrder + // Get Stop Order + + data := "{\"topic\":\"/spotMarket/advancedOrders\",\"type\":\"message\",\"subject\":\"stopOrder\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"orderId\":\"vs93gpupfa48anof003u85mb\",\"orderPrice\":\"70000\",\"orderType\":\"stop\",\"side\":\"buy\",\"size\":\"0.00007142\",\"stop\":\"loss\",\"stopPrice\":\"71000\",\"symbol\":\"BTC-USDT\",\"tradeType\":\"TRADE\",\"type\":\"open\",\"createdAt\":1742305928064,\"ts\":1742305928091268493}}" + + commonResp := &types.WsMessage{} + err := json.Unmarshal([]byte(data), commonResp) + assert.Nil(t, err) + assert.NotNil(t, commonResp.RawData) + obj := &StopOrderEvent{} + err = json.Unmarshal(commonResp.RawData, obj) + assert.Nil(t, err) +} diff --git a/sdk/golang/pkg/generate/spot/spotprivate/types_order_v1_event.go b/sdk/golang/pkg/generate/spot/spotprivate/types_order_v1_event.go index c65dc201..77e76cc1 100644 --- a/sdk/golang/pkg/generate/spot/spotprivate/types_order_v1_event.go +++ b/sdk/golang/pkg/generate/spot/spotprivate/types_order_v1_event.go @@ -13,13 +13,13 @@ type OrderV1Event struct { CommonResponse *types.WsMessage // Cumulative number of cancellations CanceledSize *string `json:"canceledSize,omitempty"` - // Client Order Id,The ClientOid field is a unique ID created by the user + // Client Order ID: The ClientOid field is a unique ID created by the user ClientOid string `json:"clientOid,omitempty"` - // Cumulative number of filled + // Cumulative number filled FilledSize *string `json:"filledSize,omitempty"` // The unique order id generated by the trading system OrderId string `json:"orderId,omitempty"` - // Order time(millisecond) + // Order time (milliseconds) OrderTime int64 `json:"orderTime,omitempty"` // User-specified order type OrderType string `json:"orderType,omitempty"` @@ -39,7 +39,7 @@ type OrderV1Event struct { Status string `json:"status,omitempty"` // Symbol Symbol string `json:"symbol,omitempty"` - // Push time(Nanosecond) + // Push time (nanoseconds) Ts int64 `json:"ts,omitempty"` // Order Type Type string `json:"type,omitempty"` @@ -53,7 +53,7 @@ type OrderV1Event struct { MatchPrice *string `json:"matchPrice,omitempty"` // Match Size (when the type is \"match\") MatchSize *string `json:"matchSize,omitempty"` - // Trade id, it is generated by Matching engine. + // Trade ID: Generated by Matching engine. TradeId *string `json:"tradeId,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/spotprivate/types_order_v2_event.go b/sdk/golang/pkg/generate/spot/spotprivate/types_order_v2_event.go index 0ab62741..6c283f0e 100644 --- a/sdk/golang/pkg/generate/spot/spotprivate/types_order_v2_event.go +++ b/sdk/golang/pkg/generate/spot/spotprivate/types_order_v2_event.go @@ -13,13 +13,13 @@ type OrderV2Event struct { CommonResponse *types.WsMessage // Cumulative number of cancellations CanceledSize *string `json:"canceledSize,omitempty"` - // Client Order Id,The ClientOid field is a unique ID created by the user + // Client Order ID: The ClientOid field is a unique ID created by the user ClientOid string `json:"clientOid,omitempty"` - // Cumulative number of filled + // Cumulative number filled FilledSize *string `json:"filledSize,omitempty"` // The unique order id generated by the trading system OrderId string `json:"orderId,omitempty"` - // Order time(millisecond) + // Order time (milliseconds) OrderTime int64 `json:"orderTime,omitempty"` // User-specified order type OrderType string `json:"orderType,omitempty"` @@ -39,7 +39,7 @@ type OrderV2Event struct { Status string `json:"status,omitempty"` // Symbol Symbol string `json:"symbol,omitempty"` - // Push time(Nanosecond) + // Push time (nanoseconds) Ts int64 `json:"ts,omitempty"` // Order Type Type string `json:"type,omitempty"` @@ -53,7 +53,7 @@ type OrderV2Event struct { MatchPrice *string `json:"matchPrice,omitempty"` // Match Size (when the type is \"match\") MatchSize *string `json:"matchSize,omitempty"` - // Trade id, it is generated by Matching engine. + // Trade ID: Generated by Matching engine. TradeId *string `json:"tradeId,omitempty"` } diff --git a/sdk/golang/pkg/generate/spot/spotprivate/types_stop_order_event.go b/sdk/golang/pkg/generate/spot/spotprivate/types_stop_order_event.go new file mode 100644 index 00000000..045f36f5 --- /dev/null +++ b/sdk/golang/pkg/generate/spot/spotprivate/types_stop_order_event.go @@ -0,0 +1,97 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package spotprivate + +import ( + "encoding/json" + "github.com/Kucoin/kucoin-universal-sdk/sdk/golang/pkg/types" +) + +// StopOrderEvent struct for StopOrderEvent +type StopOrderEvent struct { + // common response + CommonResponse *types.WsMessage + // Order created time (milliseconds) + CreatedAt int64 `json:"createdAt,omitempty"` + // The unique order id generated by the trading system + OrderId string `json:"orderId,omitempty"` + // Price + OrderPrice string `json:"orderPrice,omitempty"` + // User-specified order type + OrderType string `json:"orderType,omitempty"` + // buy or sell + Side string `json:"side,omitempty"` + // User-specified order size + Size string `json:"size,omitempty"` + // Order type: loss: stop loss order, oco: oco order + Stop string `json:"stop,omitempty"` + // Stop Price + StopPrice string `json:"stopPrice,omitempty"` + // symbol + Symbol string `json:"symbol,omitempty"` + // The type of trading: TRADE (Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). + TradeType string `json:"tradeType,omitempty"` + // Push time (nanoseconds) + Ts int64 `json:"ts,omitempty"` + // Order Type + Type string `json:"type,omitempty"` +} + +// NewStopOrderEvent instantiates a new StopOrderEvent object +// This constructor will assign default values to properties that have it defined +func NewStopOrderEvent(createdAt int64, orderId string, orderPrice string, orderType string, side string, size string, stop string, stopPrice string, symbol string, tradeType string, ts int64, Type_ string) *StopOrderEvent { + this := StopOrderEvent{} + this.CreatedAt = createdAt + this.OrderId = orderId + this.OrderPrice = orderPrice + this.OrderType = orderType + this.Side = side + this.Size = size + this.Stop = stop + this.StopPrice = stopPrice + this.Symbol = symbol + this.TradeType = tradeType + this.Ts = ts + this.Type = Type_ + return &this +} + +// NewStopOrderEventWithDefaults instantiates a new StopOrderEvent object +// This constructor will only assign default values to properties that have it defined, +func NewStopOrderEventWithDefaults() *StopOrderEvent { + this := StopOrderEvent{} + return &this +} + +func (o *StopOrderEvent) ToMap() map[string]interface{} { + toSerialize := map[string]interface{}{} + toSerialize["createdAt"] = o.CreatedAt + toSerialize["orderId"] = o.OrderId + toSerialize["orderPrice"] = o.OrderPrice + toSerialize["orderType"] = o.OrderType + toSerialize["side"] = o.Side + toSerialize["size"] = o.Size + toSerialize["stop"] = o.Stop + toSerialize["stopPrice"] = o.StopPrice + toSerialize["symbol"] = o.Symbol + toSerialize["tradeType"] = o.TradeType + toSerialize["ts"] = o.Ts + toSerialize["type"] = o.Type + return toSerialize +} + +type StopOrderEventCallback func(topic string, subject string, data *StopOrderEvent) error + +type StopOrderEventCallbackWrapper struct { + callback StopOrderEventCallback +} + +func (w *StopOrderEventCallbackWrapper) OnMessage(msg *types.WsMessage) error { + obj := &StopOrderEvent{} + err := json.Unmarshal(msg.RawData, obj) + if err != nil { + return err + } + obj.CommonResponse = msg + return w.callback(msg.Topic, msg.Subject, obj) +} diff --git a/sdk/golang/pkg/generate/spot/spotpublic/api_spot_public.go b/sdk/golang/pkg/generate/spot/spotpublic/api_spot_public.go index ac7ec19e..a510a6d7 100644 --- a/sdk/golang/pkg/generate/spot/spotpublic/api_spot_public.go +++ b/sdk/golang/pkg/generate/spot/spotpublic/api_spot_public.go @@ -10,37 +10,47 @@ import ( type SpotPublicWS interface { // AllTickers Get All Tickers - // Subscribe to this topic to get the push of all market symbols BBO change. + // Subscribe to this topic to get pushes on all market symbol BBO changes. // push frequency: once every 100ms AllTickers(callback AllTickersEventCallback) (id string, err error) + // CallAuctionInfo Get Call Auction Info + // Subscribe to this topic to get the specified symbol call auction info. + // push frequency: once every 100ms + CallAuctionInfo(symbol string, callback CallAuctionInfoEventCallback) (id string, err error) + + // CallAuctionOrderbookLevel50 CallAuctionOrderbook - Level50 + // The system will return the call auction 50 best ask/bid orders data; if there is no change in the market, data will not be pushed + // push frequency: once every 100ms + CallAuctionOrderbookLevel50(symbol string, callback CallAuctionOrderbookLevel50EventCallback) (id string, err error) + // Klines Klines // Subscribe to this topic to get K-Line data. // push frequency: real-time Klines(symbol string, type_ string, callback KlinesEventCallback) (id string, err error) // MarketSnapshot Market Snapshot - // Subscribe this topic to get the snapshot data of for the entire market. + // Subscribe to this topic to get snapshot data for the entire market. // push frequency: once every 2s MarketSnapshot(market string, callback MarketSnapshotEventCallback) (id string, err error) // OrderbookIncrement Orderbook - Increment - // The system will return the increment change orderbook data(All depth), A topic supports up to 100 symbols. If there is no change in the market, data will not be pushed + // The system will return the increment change orderbook data (all depths); a topic supports up to 100 symbols. If there is no change in the market, data will not be pushed // push frequency: real-time OrderbookIncrement(symbol []string, callback OrderbookIncrementEventCallback) (id string, err error) // OrderbookLevel1 Orderbook - Level1 - // The system will return the 1 best ask/bid orders data, A topic supports up to 100 symbols. If there is no change in the market, data will not be pushed + // The system will return the 1 best ask/bid orders data; a topic supports up to 100 symbols. If there is no change in the market, data will not be pushed // push frequency: once every 10ms OrderbookLevel1(symbol []string, callback OrderbookLevel1EventCallback) (id string, err error) // OrderbookLevel50 Orderbook - Level50 - // The system will return the 50 best ask/bid orders data, A topic supports up to 100 symbols. If there is no change in the market, data will not be pushed + // The system will return data for the 50 best ask/bid orders; a topic supports up to 100 symbols. If there is no change in the market, data will not be pushed // push frequency: once every 100ms OrderbookLevel50(symbol []string, callback OrderbookLevel50EventCallback) (id string, err error) // OrderbookLevel5 Orderbook - Level5 - // The system will return the 5 best ask/bid orders data,A topic supports up to 100 symbols. If there is no change in the market, data will not be pushed + // The system will return the 5 best ask/bid orders data; a topic supports up to 100 symbols. If there is no change in the market, data will not be pushed // push frequency: once every 100ms OrderbookLevel5(symbol []string, callback OrderbookLevel5EventCallback) (id string, err error) @@ -50,12 +60,12 @@ type SpotPublicWS interface { SymbolSnapshot(symbol string, callback SymbolSnapshotEventCallback) (id string, err error) // Ticker Get Ticker - // Subscribe to this topic to get the specified symbol push of BBO changes. + // Subscribe to this topic to get specified symbol pushes on BBO changes. // push frequency: once every 100ms Ticker(symbol []string, callback TickerEventCallback) (id string, err error) // Trade Trade - // Subscribe to this topic to get the matching event data flow of Level 3. A topic supports up to 100 symbols. + // Subscribe to this topic to get Level 3 matching event data flows. A topic supports up to 100 symbols. // push frequency: real-time Trade(symbol []string, callback TradeEventCallback) (id string, err error) @@ -85,6 +95,22 @@ func (impl *SpotPublicWSImpl) AllTickers(callback AllTickersEventCallback) (stri return impl.wsService.Subscribe(topicPrefix, args, &AllTickersEventCallbackWrapper{callback: callback}) } +func (impl *SpotPublicWSImpl) CallAuctionInfo(symbol string, callback CallAuctionInfoEventCallback) (string, error) { + topicPrefix := "/callauction/callauctionData" + + args := []string{symbol} + + return impl.wsService.Subscribe(topicPrefix, args, &CallAuctionInfoEventCallbackWrapper{callback: callback}) +} + +func (impl *SpotPublicWSImpl) CallAuctionOrderbookLevel50(symbol string, callback CallAuctionOrderbookLevel50EventCallback) (string, error) { + topicPrefix := "/callauction/level2Depth50" + + args := []string{symbol} + + return impl.wsService.Subscribe(topicPrefix, args, &CallAuctionOrderbookLevel50EventCallbackWrapper{callback: callback}) +} + func (impl *SpotPublicWSImpl) Klines(symbol string, type_ string, callback KlinesEventCallback) (string, error) { topicPrefix := "/market/candles" @@ -118,7 +144,7 @@ func (impl *SpotPublicWSImpl) OrderbookLevel1(symbol []string, callback Orderboo } func (impl *SpotPublicWSImpl) OrderbookLevel50(symbol []string, callback OrderbookLevel50EventCallback) (string, error) { - topicPrefix := "/market/level2" + topicPrefix := "/spotMarket/level2Depth50" args := symbol diff --git a/sdk/golang/pkg/generate/spot/spotpublic/api_spot_public_test.go b/sdk/golang/pkg/generate/spot/spotpublic/api_spot_public_test.go index 9c15639a..d477b907 100644 --- a/sdk/golang/pkg/generate/spot/spotpublic/api_spot_public_test.go +++ b/sdk/golang/pkg/generate/spot/spotpublic/api_spot_public_test.go @@ -22,6 +22,36 @@ func TestSpotPublicAllTickersRespModel(t *testing.T) { assert.Nil(t, err) } +func TestSpotPublicCallAuctionInfoRespModel(t *testing.T) { + // CallAuctionInfo + // Get Call Auction Info + + data := "{\"type\":\"message\",\"topic\":\"/callauction/callauctionData:BTC-USDT\",\"subject\":\"callauction.callauctionData\",\"data\":{\"symbol\":\"BTC-USDT\",\"estimatedPrice\":\"0.17\",\"estimatedSize\":\"0.03715004\",\"sellOrderRangeLowPrice\":\"1.788\",\"sellOrderRangeHighPrice\":\"2.788\",\"buyOrderRangeLowPrice\":\"1.788\",\"buyOrderRangeHighPrice\":\"2.788\",\"time\":1550653727731}}" + + commonResp := &types.WsMessage{} + err := json.Unmarshal([]byte(data), commonResp) + assert.Nil(t, err) + assert.NotNil(t, commonResp.RawData) + obj := &CallAuctionInfoEvent{} + err = json.Unmarshal(commonResp.RawData, obj) + assert.Nil(t, err) +} + +func TestSpotPublicCallAuctionOrderbookLevel50RespModel(t *testing.T) { + // CallAuctionOrderbookLevel50 + // CallAuctionOrderbook - Level50 + + data := "{\"topic\":\"/spotMarket/level2Depth50:BTC-USDT\",\"type\":\"message\",\"subject\":\"level2\",\"data\":{\"asks\":[[\"95964.3\",\"0.08168874\"],[\"95967.9\",\"0.00985094\"],[\"95969.9\",\"0.00078081\"],[\"95971.2\",\"0.10016039\"],[\"95971.3\",\"0.12531139\"],[\"95971.7\",\"0.00291\"],[\"95971.9\",\"0.10271829\"],[\"95973.3\",\"0.00021\"],[\"95974.7\",\"0.10271829\"],[\"95976.9\",\"0.03095177\"],[\"95977\",\"0.10271829\"],[\"95978.7\",\"0.00022411\"],[\"95979.1\",\"0.00023017\"],[\"95981\",\"0.00022008\"],[\"95981.2\",\"0.14330324\"],[\"95982.3\",\"0.27922082\"],[\"95982.5\",\"0.02302674\"],[\"95983.8\",\"0.00011035\"],[\"95985\",\"0.00104222\"],[\"95985.1\",\"0.00021808\"],[\"95985.5\",\"0.211127\"],[\"95986.2\",\"0.09690904\"],[\"95986.3\",\"0.31261\"],[\"95986.9\",\"0.09225037\"],[\"95987\",\"0.01042013\"],[\"95990.5\",\"0.12712438\"],[\"95990.6\",\"0.0916115\"],[\"95992.2\",\"0.279\"],[\"95992.7\",\"0.00521084\"],[\"95995.2\",\"0.00033\"],[\"95999.1\",\"0.02973561\"],[\"96001.1\",\"0.083825\"],[\"96002.6\",\"0.01900906\"],[\"96002.7\",\"0.00041665\"],[\"96002.8\",\"0.12531139\"],[\"96002.9\",\"0.279\"],[\"96004.8\",\"0.02081884\"],[\"96006.3\",\"0.00065542\"],[\"96008.5\",\"0.00033166\"],[\"96011\",\"0.08776246\"],[\"96012.5\",\"0.279\"],[\"96013.3\",\"0.00066666\"],[\"96013.9\",\"0.26097183\"],[\"96014\",\"0.01087009\"],[\"96017\",\"0.06248892\"],[\"96017.1\",\"0.20829641\"],[\"96022\",\"0.00107066\"],[\"96022.1\",\"0.279\"],[\"96022.9\",\"0.0006499\"],[\"96024.6\",\"0.00104131\"]],\"bids\":[[\"95964.2\",\"1.35483359\"],[\"95964.1\",\"0.01117492\"],[\"95962.1\",\"0.0062\"],[\"95961.8\",\"0.03081549\"],[\"95961.7\",\"0.10271829\"],[\"95958.5\",\"0.04681571\"],[\"95958.4\",\"0.05177498\"],[\"95958.2\",\"0.00155911\"],[\"95957.8\",\"0.10271829\"],[\"95954.7\",\"0.16312181\"],[\"95954.6\",\"0.44102109\"],[\"95952.6\",\"0.10271829\"],[\"95951.3\",\"0.0062\"],[\"95951\",\"0.17075141\"],[\"95950.9\",\"0.279\"],[\"95949.5\",\"0.13567811\"],[\"95949.2\",\"0.05177498\"],[\"95948.3\",\"0.10271829\"],[\"95947.2\",\"0.04634798\"],[\"95944.7\",\"0.10271829\"],[\"95944.2\",\"0.05177498\"],[\"95942.3\",\"0.26028569\"],[\"95942.2\",\"0.10271829\"],[\"95940.6\",\"0.12531139\"],[\"95940.2\",\"0.43349327\"],[\"95938.3\",\"0.01041604\"],[\"95937.4\",\"0.04957577\"],[\"95937.2\",\"0.00305\"],[\"95936.3\",\"0.10271829\"],[\"95934\",\"0.05177498\"],[\"95931.9\",\"0.03394093\"],[\"95931.8\",\"0.10271829\"],[\"95930\",\"0.01041814\"],[\"95927.9\",\"0.10271829\"],[\"95927\",\"0.13312774\"],[\"95926.9\",\"0.33077498\"],[\"95924.9\",\"0.10271829\"],[\"95924\",\"0.00180915\"],[\"95923.8\",\"0.00022434\"],[\"95919.6\",\"0.00021854\"],[\"95919.1\",\"0.01471872\"],[\"95919\",\"0.05177498\"],[\"95918.1\",\"0.00001889\"],[\"95917.8\",\"0.1521089\"],[\"95917.5\",\"0.00010962\"],[\"95916.2\",\"0.00021958\"],[\"95915.5\",\"0.12531139\"],[\"95915.3\",\"0.279\"],[\"95913.6\",\"0.01739249\"],[\"95913.5\",\"0.05177498\"]],\"timestamp\":1733124805073}}" + + commonResp := &types.WsMessage{} + err := json.Unmarshal([]byte(data), commonResp) + assert.Nil(t, err) + assert.NotNil(t, commonResp.RawData) + obj := &CallAuctionOrderbookLevel50Event{} + err = json.Unmarshal(commonResp.RawData, obj) + assert.Nil(t, err) +} + func TestSpotPublicKlinesRespModel(t *testing.T) { // Klines // Klines diff --git a/sdk/golang/pkg/generate/spot/spotpublic/types_call_auction_info_event.go b/sdk/golang/pkg/generate/spot/spotpublic/types_call_auction_info_event.go new file mode 100644 index 00000000..92ec48a6 --- /dev/null +++ b/sdk/golang/pkg/generate/spot/spotpublic/types_call_auction_info_event.go @@ -0,0 +1,81 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package spotpublic + +import ( + "encoding/json" + "github.com/Kucoin/kucoin-universal-sdk/sdk/golang/pkg/types" +) + +// CallAuctionInfoEvent struct for CallAuctionInfoEvent +type CallAuctionInfoEvent struct { + // common response + CommonResponse *types.WsMessage + // Symbol + Symbol string `json:"symbol,omitempty"` + // Estimated price + EstimatedPrice string `json:"estimatedPrice,omitempty"` + // Estimated size + EstimatedSize string `json:"estimatedSize,omitempty"` + // Sell ​​order minimum price + SellOrderRangeLowPrice string `json:"sellOrderRangeLowPrice,omitempty"` + // Sell ​​order maximum price + SellOrderRangeHighPrice string `json:"sellOrderRangeHighPrice,omitempty"` + // Buy ​​order minimum price + BuyOrderRangeLowPrice string `json:"buyOrderRangeLowPrice,omitempty"` + // Buy ​​order maximum price + BuyOrderRangeHighPrice string `json:"buyOrderRangeHighPrice,omitempty"` + // Timestamp (ms) + Time int64 `json:"time,omitempty"` +} + +// NewCallAuctionInfoEvent instantiates a new CallAuctionInfoEvent object +// This constructor will assign default values to properties that have it defined +func NewCallAuctionInfoEvent(symbol string, estimatedPrice string, estimatedSize string, sellOrderRangeLowPrice string, sellOrderRangeHighPrice string, buyOrderRangeLowPrice string, buyOrderRangeHighPrice string, time int64) *CallAuctionInfoEvent { + this := CallAuctionInfoEvent{} + this.Symbol = symbol + this.EstimatedPrice = estimatedPrice + this.EstimatedSize = estimatedSize + this.SellOrderRangeLowPrice = sellOrderRangeLowPrice + this.SellOrderRangeHighPrice = sellOrderRangeHighPrice + this.BuyOrderRangeLowPrice = buyOrderRangeLowPrice + this.BuyOrderRangeHighPrice = buyOrderRangeHighPrice + this.Time = time + return &this +} + +// NewCallAuctionInfoEventWithDefaults instantiates a new CallAuctionInfoEvent object +// This constructor will only assign default values to properties that have it defined, +func NewCallAuctionInfoEventWithDefaults() *CallAuctionInfoEvent { + this := CallAuctionInfoEvent{} + return &this +} + +func (o *CallAuctionInfoEvent) ToMap() map[string]interface{} { + toSerialize := map[string]interface{}{} + toSerialize["symbol"] = o.Symbol + toSerialize["estimatedPrice"] = o.EstimatedPrice + toSerialize["estimatedSize"] = o.EstimatedSize + toSerialize["sellOrderRangeLowPrice"] = o.SellOrderRangeLowPrice + toSerialize["sellOrderRangeHighPrice"] = o.SellOrderRangeHighPrice + toSerialize["buyOrderRangeLowPrice"] = o.BuyOrderRangeLowPrice + toSerialize["buyOrderRangeHighPrice"] = o.BuyOrderRangeHighPrice + toSerialize["time"] = o.Time + return toSerialize +} + +type CallAuctionInfoEventCallback func(topic string, subject string, data *CallAuctionInfoEvent) error + +type CallAuctionInfoEventCallbackWrapper struct { + callback CallAuctionInfoEventCallback +} + +func (w *CallAuctionInfoEventCallbackWrapper) OnMessage(msg *types.WsMessage) error { + obj := &CallAuctionInfoEvent{} + err := json.Unmarshal(msg.RawData, obj) + if err != nil { + return err + } + obj.CommonResponse = msg + return w.callback(msg.Topic, msg.Subject, obj) +} diff --git a/sdk/golang/pkg/generate/spot/spotpublic/types_call_auction_orderbook_level50_event.go b/sdk/golang/pkg/generate/spot/spotpublic/types_call_auction_orderbook_level50_event.go new file mode 100644 index 00000000..cde40b27 --- /dev/null +++ b/sdk/golang/pkg/generate/spot/spotpublic/types_call_auction_orderbook_level50_event.go @@ -0,0 +1,59 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package spotpublic + +import ( + "encoding/json" + "github.com/Kucoin/kucoin-universal-sdk/sdk/golang/pkg/types" +) + +// CallAuctionOrderbookLevel50Event struct for CallAuctionOrderbookLevel50Event +type CallAuctionOrderbookLevel50Event struct { + // common response + CommonResponse *types.WsMessage + // price, size + Asks [][]string `json:"asks,omitempty"` + Bids [][]string `json:"bids,omitempty"` + Timestamp int64 `json:"timestamp,omitempty"` +} + +// NewCallAuctionOrderbookLevel50Event instantiates a new CallAuctionOrderbookLevel50Event object +// This constructor will assign default values to properties that have it defined +func NewCallAuctionOrderbookLevel50Event(asks [][]string, bids [][]string, timestamp int64) *CallAuctionOrderbookLevel50Event { + this := CallAuctionOrderbookLevel50Event{} + this.Asks = asks + this.Bids = bids + this.Timestamp = timestamp + return &this +} + +// NewCallAuctionOrderbookLevel50EventWithDefaults instantiates a new CallAuctionOrderbookLevel50Event object +// This constructor will only assign default values to properties that have it defined, +func NewCallAuctionOrderbookLevel50EventWithDefaults() *CallAuctionOrderbookLevel50Event { + this := CallAuctionOrderbookLevel50Event{} + return &this +} + +func (o *CallAuctionOrderbookLevel50Event) ToMap() map[string]interface{} { + toSerialize := map[string]interface{}{} + toSerialize["asks"] = o.Asks + toSerialize["bids"] = o.Bids + toSerialize["timestamp"] = o.Timestamp + return toSerialize +} + +type CallAuctionOrderbookLevel50EventCallback func(topic string, subject string, data *CallAuctionOrderbookLevel50Event) error + +type CallAuctionOrderbookLevel50EventCallbackWrapper struct { + callback CallAuctionOrderbookLevel50EventCallback +} + +func (w *CallAuctionOrderbookLevel50EventCallbackWrapper) OnMessage(msg *types.WsMessage) error { + obj := &CallAuctionOrderbookLevel50Event{} + err := json.Unmarshal(msg.RawData, obj) + if err != nil { + return err + } + obj.CommonResponse = msg + return w.callback(msg.Topic, msg.Subject, obj) +} diff --git a/sdk/golang/pkg/generate/spot/spotpublic/types_market_snapshot_data.go b/sdk/golang/pkg/generate/spot/spotpublic/types_market_snapshot_data.go index 24d894d6..baea920d 100644 --- a/sdk/golang/pkg/generate/spot/spotpublic/types_market_snapshot_data.go +++ b/sdk/golang/pkg/generate/spot/spotpublic/types_market_snapshot_data.go @@ -8,7 +8,7 @@ type MarketSnapshotData struct { AveragePrice float32 `json:"averagePrice,omitempty"` BaseCurrency string `json:"baseCurrency,omitempty"` BidSize float32 `json:"bidSize,omitempty"` - // Trading pair partition: 0.primary partition 1.KuCoin Plus\", example = \"1\" + // Trading pair partition: 0. Primary partition 1.KuCoin Plus\", example = \"1\" Board int32 `json:"board,omitempty"` Buy float32 `json:"buy,omitempty"` ChangePrice float32 `json:"changePrice,omitempty"` @@ -21,7 +21,7 @@ type MarketSnapshotData struct { MakerCoefficient float32 `json:"makerCoefficient,omitempty"` MakerFeeRate float32 `json:"makerFeeRate,omitempty"` MarginTrade bool `json:"marginTrade,omitempty"` - // Trading Pair Mark: 0.default 1.ST. 2.NEW\", example = \"1\" + // Trading Pair Mark: 0. Default 1.ST. 2.NEW\", example = \"1\" Mark int32 `json:"mark,omitempty"` Market string `json:"market,omitempty"` MarketChange1h MarketSnapshotDataMarketChange1h `json:"marketChange1h,omitempty"` diff --git a/sdk/golang/pkg/generate/spot/spotpublic/types_orderbook_level50_changes.go b/sdk/golang/pkg/generate/spot/spotpublic/types_orderbook_level50_changes.go deleted file mode 100644 index 8600a6c5..00000000 --- a/sdk/golang/pkg/generate/spot/spotpublic/types_orderbook_level50_changes.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. - -package spotpublic - -// OrderbookLevel50Changes struct for OrderbookLevel50Changes -type OrderbookLevel50Changes struct { - Asks [][]string `json:"asks,omitempty"` - Bids [][]string `json:"bids,omitempty"` -} - -// NewOrderbookLevel50Changes instantiates a new OrderbookLevel50Changes object -// This constructor will assign default values to properties that have it defined -func NewOrderbookLevel50Changes(asks [][]string, bids [][]string) *OrderbookLevel50Changes { - this := OrderbookLevel50Changes{} - this.Asks = asks - this.Bids = bids - return &this -} - -// NewOrderbookLevel50ChangesWithDefaults instantiates a new OrderbookLevel50Changes object -// This constructor will only assign default values to properties that have it defined, -func NewOrderbookLevel50ChangesWithDefaults() *OrderbookLevel50Changes { - this := OrderbookLevel50Changes{} - return &this -} - -func (o *OrderbookLevel50Changes) ToMap() map[string]interface{} { - toSerialize := map[string]interface{}{} - toSerialize["asks"] = o.Asks - toSerialize["bids"] = o.Bids - return toSerialize -} diff --git a/sdk/golang/pkg/generate/spot/spotpublic/types_orderbook_level50_event.go b/sdk/golang/pkg/generate/spot/spotpublic/types_orderbook_level50_event.go index dcf4fba8..44438b9f 100644 --- a/sdk/golang/pkg/generate/spot/spotpublic/types_orderbook_level50_event.go +++ b/sdk/golang/pkg/generate/spot/spotpublic/types_orderbook_level50_event.go @@ -11,22 +11,19 @@ import ( type OrderbookLevel50Event struct { // common response CommonResponse *types.WsMessage - Changes OrderbookLevel50Changes `json:"changes,omitempty"` - SequenceEnd int64 `json:"sequenceEnd,omitempty"` - SequenceStart int64 `json:"sequenceStart,omitempty"` - Symbol string `json:"symbol,omitempty"` - Time int64 `json:"time,omitempty"` + // price, size + Asks [][]string `json:"asks,omitempty"` + Bids [][]string `json:"bids,omitempty"` + Timestamp int64 `json:"timestamp,omitempty"` } // NewOrderbookLevel50Event instantiates a new OrderbookLevel50Event object // This constructor will assign default values to properties that have it defined -func NewOrderbookLevel50Event(changes OrderbookLevel50Changes, sequenceEnd int64, sequenceStart int64, symbol string, time int64) *OrderbookLevel50Event { +func NewOrderbookLevel50Event(asks [][]string, bids [][]string, timestamp int64) *OrderbookLevel50Event { this := OrderbookLevel50Event{} - this.Changes = changes - this.SequenceEnd = sequenceEnd - this.SequenceStart = sequenceStart - this.Symbol = symbol - this.Time = time + this.Asks = asks + this.Bids = bids + this.Timestamp = timestamp return &this } @@ -39,11 +36,9 @@ func NewOrderbookLevel50EventWithDefaults() *OrderbookLevel50Event { func (o *OrderbookLevel50Event) ToMap() map[string]interface{} { toSerialize := map[string]interface{}{} - toSerialize["changes"] = o.Changes - toSerialize["sequenceEnd"] = o.SequenceEnd - toSerialize["sequenceStart"] = o.SequenceStart - toSerialize["symbol"] = o.Symbol - toSerialize["time"] = o.Time + toSerialize["asks"] = o.Asks + toSerialize["bids"] = o.Bids + toSerialize["timestamp"] = o.Timestamp return toSerialize } diff --git a/sdk/golang/pkg/generate/spot/spotpublic/types_symbol_snapshot_data.go b/sdk/golang/pkg/generate/spot/spotpublic/types_symbol_snapshot_data.go index 1d76448a..66ee4bbb 100644 --- a/sdk/golang/pkg/generate/spot/spotpublic/types_symbol_snapshot_data.go +++ b/sdk/golang/pkg/generate/spot/spotpublic/types_symbol_snapshot_data.go @@ -8,7 +8,7 @@ type SymbolSnapshotData struct { AveragePrice float32 `json:"averagePrice,omitempty"` BaseCurrency string `json:"baseCurrency,omitempty"` BidSize float32 `json:"bidSize,omitempty"` - // Trading pair partition: 0.primary partition 1.KuCoin Plus\", example = \"1\" + // Trading pair partition: 0. Primary partition 1.KuCoin Plus\", example = \"1\" Board int32 `json:"board,omitempty"` Buy float32 `json:"buy,omitempty"` ChangePrice float32 `json:"changePrice,omitempty"` @@ -21,7 +21,7 @@ type SymbolSnapshotData struct { MakerCoefficient float32 `json:"makerCoefficient,omitempty"` MakerFeeRate float32 `json:"makerFeeRate,omitempty"` MarginTrade bool `json:"marginTrade,omitempty"` - // Trading Pair Mark: 0.default 1.ST. 2.NEW\", example = \"1\" + // Trading Pair Mark: 0. Default 1.ST. 2.NEW\", example = \"1\" Mark int32 `json:"mark,omitempty"` Market string `json:"market,omitempty"` MarketChange1h SymbolSnapshotDataMarketChange1h `json:"marketChange1h,omitempty"` diff --git a/sdk/golang/pkg/generate/spot/spotpublic/types_ticker_event.go b/sdk/golang/pkg/generate/spot/spotpublic/types_ticker_event.go index 496f4881..b8acfb57 100644 --- a/sdk/golang/pkg/generate/spot/spotpublic/types_ticker_event.go +++ b/sdk/golang/pkg/generate/spot/spotpublic/types_ticker_event.go @@ -26,7 +26,7 @@ type TickerEvent struct { // Best bid size BestBidSize string `json:"bestBidSize,omitempty"` // The matching time of the latest transaction - Time int64 `json:"Time,omitempty"` + Time int64 `json:"time,omitempty"` } // NewTickerEvent instantiates a new TickerEvent object @@ -60,7 +60,7 @@ func (o *TickerEvent) ToMap() map[string]interface{} { toSerialize["bestAskSize"] = o.BestAskSize toSerialize["bestBid"] = o.BestBid toSerialize["bestBidSize"] = o.BestBidSize - toSerialize["Time"] = o.Time + toSerialize["time"] = o.Time return toSerialize } diff --git a/sdk/golang/pkg/generate/version.go b/sdk/golang/pkg/generate/version.go index aab2ad74..f307607f 100644 --- a/sdk/golang/pkg/generate/version.go +++ b/sdk/golang/pkg/generate/version.go @@ -1,6 +1,6 @@ package generate const ( - SdkVersion = "v1.1.0" - SdkGenerateDate = "2025-01-16" + SdkVersion = "v1.2.0" + SdkGenerateDate = "2025-03-21" ) diff --git a/sdk/golang/pkg/generate/viplending/viplending/api_vip_lending.go b/sdk/golang/pkg/generate/viplending/viplending/api_vip_lending.go index 13f6c439..984728ca 100644 --- a/sdk/golang/pkg/generate/viplending/viplending/api_vip_lending.go +++ b/sdk/golang/pkg/generate/viplending/viplending/api_vip_lending.go @@ -9,32 +9,46 @@ import ( type VIPLendingAPI interface { - // GetAccountDetail Get Account Detail - // Description: The following information is only applicable to loans. Get information on off-exchange funding and loans, This endpoint is only for querying accounts that are currently involved in loans. + // GetDiscountRateConfigs Get Discount Rate Configs + // Description: Get the gradient discount rate of each currency + // Documentation: https://www.kucoin.com/docs-new/api-3471463 + // +-----------------------+---------+ + // | Extra API Info | Value | + // +-----------------------+---------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | NULL | + // | API-RATE-LIMIT-POOL | PUBLIC | + // | API-RATE-LIMIT-WEIGHT | 10 | + // +-----------------------+---------+ + GetDiscountRateConfigs(ctx context.Context) (*GetDiscountRateConfigsResp, error) + + // GetLoanInfo Get Loan Info + // Description: The following information is only applicable to loans. Get information on off-exchange funding and loans. This endpoint is only for querying accounts that are currently involved in loans. // Documentation: https://www.kucoin.com/docs-new/api-3470277 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 1 | - // +---------------------+------------+ - GetAccountDetail(ctx context.Context) (*GetAccountDetailResp, error) + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 5 | + // +-----------------------+------------+ + GetLoanInfo(ctx context.Context) (*GetLoanInfoResp, error) // GetAccounts Get Accounts - // Description: Accounts participating in OTC lending, This interface is only for querying accounts currently running OTC lending. + // Description: Accounts participating in OTC lending. This interface is only for querying accounts currently running OTC lending. // Documentation: https://www.kucoin.com/docs-new/api-3470278 - // +---------------------+------------+ - // | Extra API Info | Value | - // +---------------------+------------+ - // | API-DOMAIN | SPOT | - // | API-CHANNEL | PRIVATE | - // | API-PERMISSION | GENERAL | - // | API-RATE-LIMIT-POOL | MANAGEMENT | - // | API-RATE-LIMIT | 1 | - // +---------------------+------------+ + // +-----------------------+------------+ + // | Extra API Info | Value | + // +-----------------------+------------+ + // | API-DOMAIN | SPOT | + // | API-CHANNEL | PRIVATE | + // | API-PERMISSION | GENERAL | + // | API-RATE-LIMIT-POOL | MANAGEMENT | + // | API-RATE-LIMIT-WEIGHT | 20 | + // +-----------------------+------------+ GetAccounts(ctx context.Context) (*GetAccountsResp, error) } @@ -46,8 +60,14 @@ func NewVIPLendingAPIImp(transport interfaces.Transport) *VIPLendingAPIImpl { return &VIPLendingAPIImpl{transport: transport} } -func (impl *VIPLendingAPIImpl) GetAccountDetail(ctx context.Context) (*GetAccountDetailResp, error) { - resp := &GetAccountDetailResp{} +func (impl *VIPLendingAPIImpl) GetDiscountRateConfigs(ctx context.Context) (*GetDiscountRateConfigsResp, error) { + resp := &GetDiscountRateConfigsResp{} + err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/otc-loan/discount-rate-configs", nil, resp, false) + return resp, err +} + +func (impl *VIPLendingAPIImpl) GetLoanInfo(ctx context.Context) (*GetLoanInfoResp, error) { + resp := &GetLoanInfoResp{} err := impl.transport.Call(ctx, "spot", false, "Get", "/api/v1/otc-loan/loan", nil, resp, false) return resp, err } diff --git a/sdk/golang/pkg/generate/viplending/viplending/api_vip_lending.template b/sdk/golang/pkg/generate/viplending/viplending/api_vip_lending.template index 7f233f03..4d74e1b9 100644 --- a/sdk/golang/pkg/generate/viplending/viplending/api_vip_lending.template +++ b/sdk/golang/pkg/generate/viplending/viplending/api_vip_lending.template @@ -1,13 +1,33 @@ # API FUNCTION TEMPLATE -func TestVIPLendingGetAccountDetailReq(t *testing.T) { - // GetAccountDetail - // Get Account Detail +func TestVIPLendingGetDiscountRateConfigsReq(t *testing.T) { + // GetDiscountRateConfigs + // Get Discount Rate Configs + // /api/v1/otc-loan/discount-rate-configs + + + resp, err := viplendingApi.GetDiscountRateConfigs(context.TODO()) + if err != nil { + panic(err) + } + data, err := json.Marshal(resp.ToMap()) + if err != nil { + panic(err) + } + fmt.Println("code:", resp.CommonResponse.Code) + fmt.Println("message:", resp.CommonResponse.Message) + fmt.Println("data:", string(data)) +} + + +func TestVIPLendingGetLoanInfoReq(t *testing.T) { + // GetLoanInfo + // Get Loan Info // /api/v1/otc-loan/loan - resp, err := viplendingApi.GetAccountDetail(context.TODO()) + resp, err := viplendingApi.GetLoanInfo(context.TODO()) if err != nil { panic(err) } diff --git a/sdk/golang/pkg/generate/viplending/viplending/api_vip_lending_test.go b/sdk/golang/pkg/generate/viplending/viplending/api_vip_lending_test.go index 45816cc4..ea89079f 100644 --- a/sdk/golang/pkg/generate/viplending/viplending/api_vip_lending_test.go +++ b/sdk/golang/pkg/generate/viplending/viplending/api_vip_lending_test.go @@ -7,16 +7,39 @@ import ( "testing" ) -func TestVIPLendingGetAccountDetailReqModel(t *testing.T) { - // GetAccountDetail - // Get Account Detail +func TestVIPLendingGetDiscountRateConfigsReqModel(t *testing.T) { + // GetDiscountRateConfigs + // Get Discount Rate Configs + // /api/v1/otc-loan/discount-rate-configs + +} + +func TestVIPLendingGetDiscountRateConfigsRespModel(t *testing.T) { + // GetDiscountRateConfigs + // Get Discount Rate Configs + // /api/v1/otc-loan/discount-rate-configs + + data := "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"currency\": \"BTC\",\n \"usdtLevels\": [\n {\n \"left\": 0,\n \"right\": 20000000,\n \"discountRate\": \"1.00000000\"\n },\n {\n \"left\": 20000000,\n \"right\": 50000000,\n \"discountRate\": \"0.95000000\"\n },\n {\n \"left\": 50000000,\n \"right\": 100000000,\n \"discountRate\": \"0.90000000\"\n },\n {\n \"left\": 100000000,\n \"right\": 300000000,\n \"discountRate\": \"0.50000000\"\n },\n {\n \"left\": 300000000,\n \"right\": 99999999999,\n \"discountRate\": \"0.00000000\"\n }\n ]\n }\n ]\n}" + commonResp := &types.RestResponse{} + err := json.Unmarshal([]byte(data), commonResp) + assert.Nil(t, err) + assert.NotNil(t, commonResp.Data) + resp := &GetDiscountRateConfigsResp{} + err = json.Unmarshal([]byte(commonResp.Data), resp) + resp.ToMap() + assert.Nil(t, err) +} + +func TestVIPLendingGetLoanInfoReqModel(t *testing.T) { + // GetLoanInfo + // Get Loan Info // /api/v1/otc-loan/loan } -func TestVIPLendingGetAccountDetailRespModel(t *testing.T) { - // GetAccountDetail - // Get Account Detail +func TestVIPLendingGetLoanInfoRespModel(t *testing.T) { + // GetLoanInfo + // Get Loan Info // /api/v1/otc-loan/loan data := "{\n \"code\": \"200000\",\n \"data\": {\n \"parentUid\": \"1260004199\",\n \"orders\": [{\n \"orderId\": \"671a2be815f4140007a588e1\",\n \"principal\": \"100\",\n \"interest\": \"0\",\n \"currency\": \"USDT\"\n }],\n \"ltv\": {\n \"transferLtv\": \"0.6000\",\n \"onlyClosePosLtv\": \"0.7500\",\n \"delayedLiquidationLtv\": \"0.7500\",\n \"instantLiquidationLtv\": \"0.8000\",\n \"currentLtv\": \"0.1111\"\n },\n \"totalMarginAmount\": \"900.00000000\",\n \"transferMarginAmount\": \"166.66666666\",\n \"margins\": [{\n \"marginCcy\": \"USDT\",\n \"marginQty\": \"1000.00000000\",\n \"marginFactor\": \"0.9000000000\"\n }]\n }\n}" @@ -24,7 +47,7 @@ func TestVIPLendingGetAccountDetailRespModel(t *testing.T) { err := json.Unmarshal([]byte(data), commonResp) assert.Nil(t, err) assert.NotNil(t, commonResp.Data) - resp := &GetAccountDetailResp{} + resp := &GetLoanInfoResp{} err = json.Unmarshal([]byte(commonResp.Data), resp) resp.ToMap() assert.Nil(t, err) diff --git a/sdk/golang/pkg/generate/viplending/viplending/types_get_discount_rate_configs_data.go b/sdk/golang/pkg/generate/viplending/viplending/types_get_discount_rate_configs_data.go new file mode 100644 index 00000000..51a8bdbc --- /dev/null +++ b/sdk/golang/pkg/generate/viplending/viplending/types_get_discount_rate_configs_data.go @@ -0,0 +1,34 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package viplending + +// GetDiscountRateConfigsData struct for GetDiscountRateConfigsData +type GetDiscountRateConfigsData struct { + // Currency + Currency string `json:"currency,omitempty"` + // Gradient configuration list, amount converted into USDT + UsdtLevels []GetDiscountRateConfigsDataUsdtLevels `json:"usdtLevels,omitempty"` +} + +// NewGetDiscountRateConfigsData instantiates a new GetDiscountRateConfigsData object +// This constructor will assign default values to properties that have it defined +func NewGetDiscountRateConfigsData(currency string, usdtLevels []GetDiscountRateConfigsDataUsdtLevels) *GetDiscountRateConfigsData { + this := GetDiscountRateConfigsData{} + this.Currency = currency + this.UsdtLevels = usdtLevels + return &this +} + +// NewGetDiscountRateConfigsDataWithDefaults instantiates a new GetDiscountRateConfigsData object +// This constructor will only assign default values to properties that have it defined, +func NewGetDiscountRateConfigsDataWithDefaults() *GetDiscountRateConfigsData { + this := GetDiscountRateConfigsData{} + return &this +} + +func (o *GetDiscountRateConfigsData) ToMap() map[string]interface{} { + toSerialize := map[string]interface{}{} + toSerialize["currency"] = o.Currency + toSerialize["usdtLevels"] = o.UsdtLevels + return toSerialize +} diff --git a/sdk/golang/pkg/generate/viplending/viplending/types_get_discount_rate_configs_data_usdt_levels.go b/sdk/golang/pkg/generate/viplending/viplending/types_get_discount_rate_configs_data_usdt_levels.go new file mode 100644 index 00000000..ddc0f397 --- /dev/null +++ b/sdk/golang/pkg/generate/viplending/viplending/types_get_discount_rate_configs_data_usdt_levels.go @@ -0,0 +1,38 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +package viplending + +// GetDiscountRateConfigsDataUsdtLevels struct for GetDiscountRateConfigsDataUsdtLevels +type GetDiscountRateConfigsDataUsdtLevels struct { + // Left end point of gradient interval, left=14" }, "dependencies": { - "kucoin-universal-sdk": "0.1.1-alpha" + "kucoin-universal-sdk": "1.2.0" } } diff --git a/sdk/node/example/src/js/example_sign.js b/sdk/node/example/src/js/example_sign.js index edc9422d..d3e816b9 100644 --- a/sdk/node/example/src/js/example_sign.js +++ b/sdk/node/example/src/js/example_sign.js @@ -37,7 +37,7 @@ class KcSigner { "KC-API-PASSPHRASE": this.apiPassphrase, "KC-API-TIMESTAMP": timestamp, "KC-API-SIGN": signature, - "KC-API-KEY-VERSION": "2", + "KC-API-KEY-VERSION": "3", "Content-Type": "application/json", }; } diff --git a/sdk/node/example/src/ts/example_sign.ts b/sdk/node/example/src/ts/example_sign.ts index 3a77355e..f9203ddd 100644 --- a/sdk/node/example/src/ts/example_sign.ts +++ b/sdk/node/example/src/ts/example_sign.ts @@ -41,7 +41,7 @@ class KcSigner { "KC-API-PASSPHRASE": this.apiPassphrase, "KC-API-TIMESTAMP": timestamp, "KC-API-SIGN": signature, - "KC-API-KEY-VERSION": "2", + "KC-API-KEY-VERSION": "3", "Content-Type": "application/json", }; } diff --git a/sdk/node/package.json b/sdk/node/package.json index ee23ecef..78d55f52 100644 --- a/sdk/node/package.json +++ b/sdk/node/package.json @@ -1,6 +1,6 @@ { "name": "kucoin-universal-sdk", - "version": "0.1.1-alpha", + "version": "1.2.0", "description": "Official KuCoin Universal SDK.", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/sdk/node/run_test.sh b/sdk/node/run_test.sh new file mode 100644 index 00000000..f1cb093f --- /dev/null +++ b/sdk/node/run_test.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +printf "%-20s | %-10s | %-10s | %-10s\n" "Directory" "Total" "Success" "Fail" +printf "%-20s-+-%-10s-+-%-10s-+-%-10s\n" "--------------------" "----------" "----------" "----------" + +overall_total=0 +overall_success=0 +overall_fail=0 + +JEST_OUTPUT=$(npx jest --json src/generate --testLocationInResults --silent 2>/dev/null) + +RESULTS=$(echo "$JEST_OUTPUT" | jq -c ' + .testResults + | group_by(.name | split("/")[-2]) + | map({ + dir: .[0].name | split("/")[-2], + total: (map(.assertionResults | length) | add // 0), + success: (map(.assertionResults | map(select(.status == "passed")) | length) | add // 0), + fail: (map(.assertionResults | map(select(.status == "failed")) | length) | add // 0) + }) + | .[] +') + +for test_result in $RESULTS; do + dir_name=$(echo "$test_result" | jq -r '.dir') + total_tests=$(echo "$test_result" | jq -r '.total // 0') + successful_tests=$(echo "$test_result" | jq -r '.success // 0') + failed_tests=$(echo "$test_result" | jq -r '.fail // 0') + + printf "%-20s | %-10d | %-10d | %-10d\n" "$dir_name" "$total_tests" "$successful_tests" "$failed_tests" + + ((overall_total += total_tests)) + ((overall_success += successful_tests)) + ((overall_fail += failed_tests)) +done + +printf "%-20s-+-%-10s-+-%-10s-+-%-10s\n" "--------------------" "----------" "----------" "----------" +printf "%-20s | %-10d | %-10d | %-10d\n" "Overall Summary" "$overall_total" "$overall_success" "$overall_fail" diff --git a/sdk/node/src/generate/account/account/api_account.template b/sdk/node/src/generate/account/account/api_account.template index 954eed56..fa6e466c 100644 --- a/sdk/node/src/generate/account/account/api_account.template +++ b/sdk/node/src/generate/account/account/api_account.template @@ -157,6 +157,7 @@ describe('Auto Test', ()=> { expect(result.availableBalance).toEqual(expect.anything()); expect(result.currency).toEqual(expect.anything()); expect(result.riskRatio).toEqual(expect.anything()); + expect(result.maxWithdrawAmount).toEqual(expect.anything()); console.log(resp); }); }) diff --git a/sdk/node/src/generate/account/account/api_account.test.ts b/sdk/node/src/generate/account/account/api_account.test.ts index 4b2151de..17a97caa 100644 --- a/sdk/node/src/generate/account/account/api_account.test.ts +++ b/sdk/node/src/generate/account/account/api_account.test.ts @@ -218,7 +218,7 @@ describe('Auto Test', () => { * /api/v1/account-overview */ let data = - '{\n "code": "200000",\n "data": {\n "currency": "USDT",\n "accountEquity": 48.921913718,\n "unrealisedPNL": 1.59475,\n "marginBalance": 47.548728628,\n "positionMargin": 34.1577964733,\n "orderMargin": 0,\n "frozenFunds": 0,\n "availableBalance": 14.7876172447,\n "riskRatio": 0.0090285199\n }\n}'; + '{\n "code": "200000",\n "data": {\n "accountEquity": 394.439280806,\n "unrealisedPNL": 20.15278,\n "marginBalance": 371.394298816,\n "positionMargin": 102.20664159,\n "orderMargin": 10.06002012,\n "frozenFunds": 0.0,\n "availableBalance": 290.326799096,\n "currency": "USDT",\n "riskRatio": 0.0065289525,\n "maxWithdrawAmount": 290.326419096\n }\n}'; let commonResp = RestResponse.fromJson(data); let resp = GetFuturesAccountResp.fromObject(commonResp.data); if (commonResp.data !== null) { diff --git a/sdk/node/src/generate/account/account/api_account.ts b/sdk/node/src/generate/account/account/api_account.ts index 5a41195a..de5ca19b 100644 --- a/sdk/node/src/generate/account/account/api_account.ts +++ b/sdk/node/src/generate/account/account/api_account.ts @@ -33,31 +33,31 @@ export interface AccountAPI { * getAccountInfo Get Account Summary Info * Description: This endpoint can be used to obtain account summary information. * Documentation: https://www.kucoin.com/docs-new/api-3470119 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ getAccountInfo(): Promise; /** * getApikeyInfo Get Apikey Info - * Description: Get the information of the api key. Use the api key pending to be checked to call the endpoint. Both master and sub user\'s api key are applicable. + * Description: Get the api key information. Use the api key awaiting checking to call the endpoint. Both master and sub user\'s api key are applicable. * Documentation: https://www.kucoin.com/docs-new/api-3470130 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ getApikeyInfo(): Promise; @@ -65,79 +65,79 @@ export interface AccountAPI { * getSpotAccountType Get Account Type - Spot * Description: This interface determines whether the current user is a spot high-frequency user or a spot low-frequency user. * Documentation: https://www.kucoin.com/docs-new/api-3470120 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 30 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 30 | + * +-----------------------+---------+ */ getSpotAccountType(): Promise; /** * getSpotAccountList Get Account List - Spot - * Description: Get a list of accounts. Please Deposit to the main account firstly, then transfer the funds to the trade account via Inner Transfer before transaction. + * Description: Get a list of accounts. Please deposit funds into the main account first, then use the Transfer function to move them to the trade account before trading. * Documentation: https://www.kucoin.com/docs-new/api-3470125 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 5 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+------------+ */ getSpotAccountList(req: GetSpotAccountListReq): Promise; /** * getSpotAccountDetail Get Account Detail - Spot - * Description: get Information for a single spot account. Use this endpoint when you know the accountId. + * Description: Get information for a single spot account. Use this endpoint when you know the accountId. * Documentation: https://www.kucoin.com/docs-new/api-3470126 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 5 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+------------+ */ getSpotAccountDetail(req: GetSpotAccountDetailReq): Promise; /** * getCrossMarginAccount Get Account - Cross Margin - * Description: Request via this endpoint to get the info of the cross margin account. + * Description: Request cross margin account info via this endpoint. * Documentation: https://www.kucoin.com/docs-new/api-3470127 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 15 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+---------+ */ getCrossMarginAccount(req: GetCrossMarginAccountReq): Promise; /** * getIsolatedMarginAccount Get Account - Isolated Margin - * Description: Request via this endpoint to get the info of the isolated margin account. + * Description: Request isolated margin account info via this endpoint. * Documentation: https://www.kucoin.com/docs-new/api-3470128 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 15 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+---------+ */ getIsolatedMarginAccount( req: GetIsolatedMarginAccountReq, @@ -145,115 +145,115 @@ export interface AccountAPI { /** * getFuturesAccount Get Account - Futures - * Description: Request via this endpoint to get the info of the futures account. + * Description: Request futures account info via this endpoint. * Documentation: https://www.kucoin.com/docs-new/api-3470129 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getFuturesAccount(req: GetFuturesAccountReq): Promise; /** * getSpotLedger Get Account Ledgers - Spot/Margin - * Description: This interface is for transaction records from all types of your accounts, supporting inquiry of various currencies. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. + * Description: This interface is for transaction records from all your account types, supporting various currency inquiries. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. * Documentation: https://www.kucoin.com/docs-new/api-3470121 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 2 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+------------+ */ getSpotLedger(req: GetSpotLedgerReq): Promise; /** * getSpotHFLedger Get Account Ledgers - Trade_hf - * Description: This API endpoint returns all transfer (in and out) records in high-frequency trading account and supports multi-coin queries. The query results are sorted in descending order by createdAt and id. + * Description: This API endpoint returns all transfer (in and out) records in high-frequency trading accounts and supports multi-coin queries. The query results are sorted in descending order by createdAt and ID. * Documentation: https://www.kucoin.com/docs-new/api-3470122 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getSpotHFLedger(req: GetSpotHFLedgerReq): Promise; /** * getMarginHFLedger Get Account Ledgers - Margin_hf - * Description: This API endpoint returns all transfer (in and out) records in high-frequency margin trading account and supports multi-coin queries. The query results are sorted in descending order by createdAt and id. + * Description: This API endpoint returns all transfer (in and out) records in high-frequency margin trading accounts and supports multi-coin queries. The query results are sorted in descending order by createdAt and ID. * Documentation: https://www.kucoin.com/docs-new/api-3470123 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getMarginHFLedger(req: GetMarginHFLedgerReq): Promise; /** * getFuturesLedger Get Account Ledgers - Futures - * Description: This interface can query the ledger records of the futures business line + * Description: This interface can query the ledger records of the futures business line. * Documentation: https://www.kucoin.com/docs-new/api-3470124 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getFuturesLedger(req: GetFuturesLedgerReq): Promise; /** * @deprecated * getMarginAccountDetail Get Account Detail - Margin - * Description: Request via this endpoint to get the info of the margin account. + * Description: Request margin account info via this endpoint. * Documentation: https://www.kucoin.com/docs-new/api-3470311 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 40 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 40 | + * +-----------------------+---------+ */ getMarginAccountDetail(): Promise; /** * @deprecated * getIsolatedMarginAccountListV1 Get Account List - Isolated Margin - V1 - * Description: Request via this endpoint to get the info list of the isolated margin account. + * Description: Request the isolated margin account info list via this endpoint. * Documentation: https://www.kucoin.com/docs-new/api-3470314 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 50 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 50 | + * +-----------------------+---------+ */ getIsolatedMarginAccountListV1( req: GetIsolatedMarginAccountListV1Req, @@ -262,17 +262,17 @@ export interface AccountAPI { /** * @deprecated * getIsolatedMarginAccountDetailV1 Get Account Detail - Isolated Margin - V1 - * Description: Request via this endpoint to get the info of the isolated margin account. + * Description: Request isolated margin account info via this endpoint. * Documentation: https://www.kucoin.com/docs-new/api-3470315 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 50 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 50 | + * +-----------------------+---------+ */ getIsolatedMarginAccountDetailV1( req: GetIsolatedMarginAccountDetailV1Req, diff --git a/sdk/node/src/generate/account/account/model_get_account_info_resp.ts b/sdk/node/src/generate/account/account/model_get_account_info_resp.ts index 929f8046..6197d0ee 100644 --- a/sdk/node/src/generate/account/account/model_get_account_info_resp.ts +++ b/sdk/node/src/generate/account/account/model_get_account_info_resp.ts @@ -36,32 +36,32 @@ export class GetAccountInfoResp implements Response { optionSubQuantity: number; /** - * Max number of sub-accounts = maxDefaultSubQuantity + maxSpotSubQuantity + * Max. number of sub-accounts = maxDefaultSubQuantity + maxSpotSubQuantity */ maxSubQuantity: number; /** - * Max number of default open sub-accounts (according to VIP level) + * Max. number of default open sub-accounts (according to VIP level) */ maxDefaultSubQuantity: number; /** - * Max number of sub-accounts with additional Spot trading permissions + * Max. number of sub-accounts with additional spot trading permissions */ maxSpotSubQuantity: number; /** - * Max number of sub-accounts with additional margin trading permissions + * Max. number of sub-accounts with additional margin trading permissions */ maxMarginSubQuantity: number; /** - * Max number of sub-accounts with additional futures trading permissions + * Max. number of sub-accounts with additional futures trading permissions */ maxFuturesSubQuantity: number; /** - * Max number of sub-accounts with additional Option trading permissions + * Max. number of sub-accounts with additional option trading permissions */ maxOptionSubQuantity: number; diff --git a/sdk/node/src/generate/account/account/model_get_cross_margin_account_resp.ts b/sdk/node/src/generate/account/account/model_get_cross_margin_account_resp.ts index 47560592..e4f09cd9 100644 --- a/sdk/node/src/generate/account/account/model_get_cross_margin_account_resp.ts +++ b/sdk/node/src/generate/account/account/model_get_cross_margin_account_resp.ts @@ -22,7 +22,7 @@ export class GetCrossMarginAccountResp implements Response { debtRatio: string; /** - * Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW borrowing + * Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW-borrowing */ status: GetCrossMarginAccountResp.StatusEnum; diff --git a/sdk/node/src/generate/account/account/model_get_futures_account_req.ts b/sdk/node/src/generate/account/account/model_get_futures_account_req.ts index 32f70973..e41e65f0 100644 --- a/sdk/node/src/generate/account/account/model_get_futures_account_req.ts +++ b/sdk/node/src/generate/account/account/model_get_futures_account_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetFuturesAccountReq implements Serializable { /** - * Currecny, Default XBT + * Currency, Default XBT */ currency?: string = 'XBT'; @@ -26,7 +26,7 @@ export class GetFuturesAccountReq implements Serializable { */ static create(data: { /** - * Currecny, Default XBT + * Currency, Default XBT */ currency?: string; }): GetFuturesAccountReq { @@ -64,7 +64,7 @@ export class GetFuturesAccountReqBuilder { this.obj = obj; } /** - * Currecny, Default XBT + * Currency, Default XBT */ setCurrency(value: string): GetFuturesAccountReqBuilder { this.obj.currency = value; diff --git a/sdk/node/src/generate/account/account/model_get_futures_account_resp.ts b/sdk/node/src/generate/account/account/model_get_futures_account_resp.ts index 54c077de..f12626c0 100644 --- a/sdk/node/src/generate/account/account/model_get_futures_account_resp.ts +++ b/sdk/node/src/generate/account/account/model_get_futures_account_resp.ts @@ -6,17 +6,17 @@ import { Response } from '@internal/interfaces/serializable'; export class GetFuturesAccountResp implements Response { /** - * Account equity = marginBalance + Unrealised PNL + * Account equity = marginBalance + unrealizedPNL */ accountEquity: number; /** - * Unrealised profit and loss + * Unrealized profit and loss */ unrealisedPNL: number; /** - * Margin balance = positionMargin + orderMargin + frozenFunds + availableBalance - unrealisedPNL + * Margin balance = positionMargin + orderMargin + frozenFunds + availableBalance - unrealizedPNL */ marginBalance: number; @@ -50,6 +50,11 @@ export class GetFuturesAccountResp implements Response { */ riskRatio: number; + /** + * Maximum amount that can be withdrawn/transferred. + */ + maxWithdrawAmount: number; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -72,6 +77,8 @@ export class GetFuturesAccountResp implements Response { this.currency = null; // @ts-ignore this.riskRatio = null; + // @ts-ignore + this.maxWithdrawAmount = null; } /** * common response diff --git a/sdk/node/src/generate/account/account/model_get_futures_ledger_data_list.ts b/sdk/node/src/generate/account/account/model_get_futures_ledger_data_list.ts index a811428b..e525aa80 100644 --- a/sdk/node/src/generate/account/account/model_get_futures_ledger_data_list.ts +++ b/sdk/node/src/generate/account/account/model_get_futures_ledger_data_list.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetFuturesLedgerDataList implements Serializable { /** - * ledger time + * Ledger time */ time: number; diff --git a/sdk/node/src/generate/account/account/model_get_futures_ledger_req.ts b/sdk/node/src/generate/account/account/model_get_futures_ledger_req.ts index 9e33cacf..bdf8fcb5 100644 --- a/sdk/node/src/generate/account/account/model_get_futures_ledger_req.ts +++ b/sdk/node/src/generate/account/account/model_get_futures_ledger_req.ts @@ -10,17 +10,17 @@ export class GetFuturesLedgerReq implements Serializable { currency?: string; /** - * Type RealisedPNL-Realised profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out + * Type RealizedPNL-Realized profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out */ type?: string; /** - * Start offset. Generally, the only attribute of the last returned result of the previous request is used, and the first page is returned by default + * Start offset. Generally, only the attributes of the last returned result of the previous request are used, and the first page is returned by default */ offset?: number; /** - * 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 + * 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. */ forward?: boolean = true; @@ -30,12 +30,12 @@ export class GetFuturesLedgerReq implements Serializable { maxCount?: number = 50; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; @@ -60,15 +60,15 @@ export class GetFuturesLedgerReq implements Serializable { */ currency?: string; /** - * Type RealisedPNL-Realised profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out + * Type RealizedPNL-Realized profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out */ type?: string; /** - * Start offset. Generally, the only attribute of the last returned result of the previous request is used, and the first page is returned by default + * Start offset. Generally, only the attributes of the last returned result of the previous request are used, and the first page is returned by default */ offset?: number; /** - * 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 + * 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. */ forward?: boolean; /** @@ -76,11 +76,11 @@ export class GetFuturesLedgerReq implements Serializable { */ maxCount?: number; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; }): GetFuturesLedgerReq { @@ -136,7 +136,7 @@ export class GetFuturesLedgerReqBuilder { } /** - * Type RealisedPNL-Realised profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out + * Type RealizedPNL-Realized profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out */ setType(value: string): GetFuturesLedgerReqBuilder { this.obj.type = value; @@ -144,7 +144,7 @@ export class GetFuturesLedgerReqBuilder { } /** - * Start offset. Generally, the only attribute of the last returned result of the previous request is used, and the first page is returned by default + * Start offset. Generally, only the attributes of the last returned result of the previous request are used, and the first page is returned by default */ setOffset(value: number): GetFuturesLedgerReqBuilder { this.obj.offset = value; @@ -152,7 +152,7 @@ export class GetFuturesLedgerReqBuilder { } /** - * 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 + * 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. */ setForward(value: boolean): GetFuturesLedgerReqBuilder { this.obj.forward = value; @@ -168,7 +168,7 @@ export class GetFuturesLedgerReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetFuturesLedgerReqBuilder { this.obj.startAt = value; @@ -176,7 +176,7 @@ export class GetFuturesLedgerReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetFuturesLedgerReqBuilder { this.obj.endAt = value; diff --git a/sdk/node/src/generate/account/account/model_get_futures_ledger_resp.ts b/sdk/node/src/generate/account/account/model_get_futures_ledger_resp.ts index d591d92d..8f130129 100644 --- a/sdk/node/src/generate/account/account/model_get_futures_ledger_resp.ts +++ b/sdk/node/src/generate/account/account/model_get_futures_ledger_resp.ts @@ -13,7 +13,7 @@ export class GetFuturesLedgerResp implements Response { dataList: Array; /** - * Is it the last page. If it is false, it means it is the last page, and if it is true, it means need to turn the page. + * Is it the last page? If it is false, it means it is the last page, and if it is true, it means you need to move to the next page. */ hasMore: boolean; diff --git a/sdk/node/src/generate/account/account/model_get_isolated_margin_account_assets.ts b/sdk/node/src/generate/account/account/model_get_isolated_margin_account_assets.ts index 3f28171e..cc6a2b17 100644 --- a/sdk/node/src/generate/account/account/model_get_isolated_margin_account_assets.ts +++ b/sdk/node/src/generate/account/account/model_get_isolated_margin_account_assets.ts @@ -12,7 +12,7 @@ export class GetIsolatedMarginAccountAssets implements Serializable { symbol: string; /** - * Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW borrowing + * Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW-borrowing */ status: GetIsolatedMarginAccountAssets.StatusEnum; diff --git a/sdk/node/src/generate/account/account/model_get_isolated_margin_account_detail_v1_resp.ts b/sdk/node/src/generate/account/account/model_get_isolated_margin_account_detail_v1_resp.ts index b851e958..52d8f471 100644 --- a/sdk/node/src/generate/account/account/model_get_isolated_margin_account_detail_v1_resp.ts +++ b/sdk/node/src/generate/account/account/model_get_isolated_margin_account_detail_v1_resp.ts @@ -13,7 +13,7 @@ export class GetIsolatedMarginAccountDetailV1Resp implements Response { /** - * The total balance of the isolated margin account(in the request coin) + * The total balance of the isolated margin account (in the request coin) */ totalConversionBalance: string; /** - * Total liabilities of the isolated margin account(in the request coin) + * Total liabilities of the isolated margin account (in the request coin) */ liabilityConversionBalance: string; diff --git a/sdk/node/src/generate/account/account/model_get_margin_hf_ledger_data.ts b/sdk/node/src/generate/account/account/model_get_margin_hf_ledger_data.ts index 25a5df5d..a1c754b7 100644 --- a/sdk/node/src/generate/account/account/model_get_margin_hf_ledger_data.ts +++ b/sdk/node/src/generate/account/account/model_get_margin_hf_ledger_data.ts @@ -20,7 +20,7 @@ export class GetMarginHFLedgerData implements Serializable { amount?: string; /** - * Deposit or withdrawal fee + * Transaction, Deposit or withdrawal fee */ fee?: string; @@ -35,12 +35,12 @@ export class GetMarginHFLedgerData implements Serializable { accountType?: string; /** - * Trnasaction type,such as TRANSFER, TRADE_EXCHANGE, etc. + * Trnasaction type, such as TRANSFER, TRADE_EXCHANGE, etc. */ bizType?: string; /** - * Direction of transfer( out or in) + * Direction of transfer (out or in) */ direction?: string; diff --git a/sdk/node/src/generate/account/account/model_get_margin_hf_ledger_req.ts b/sdk/node/src/generate/account/account/model_get_margin_hf_ledger_req.ts index 5c5afcfd..c0d750f0 100644 --- a/sdk/node/src/generate/account/account/model_get_margin_hf_ledger_req.ts +++ b/sdk/node/src/generate/account/account/model_get_margin_hf_ledger_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetMarginHFLedgerReq implements Serializable { /** - * currency, optional,can select more than one,separate with commas,select no more than 10 currencys,the default will be to query for all currencys if left empty + * Currency optional; more than one can be selected; separate using commas; select no more than 10 currencies; the default will be to query for all currencies if left empty */ currency?: string; @@ -15,27 +15,27 @@ export class GetMarginHFLedgerReq implements Serializable { direction?: GetMarginHFLedgerReq.DirectionEnum; /** - * Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE - cross margin trade, ISOLATED_EXCHANGE - isolated margin trade, LIQUIDATION - liquidation, ASSERT_RETURN - forced liquidation asset return + * Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE-cross margin trade, ISOLATED_EXCHANGE-isolated margin trade, LIQUIDATION-liquidation, ASSERT_RETURN-forced liquidation asset return */ bizType?: string; /** - * The id of the last set of data from the previous batch of data. By default, the latest information is given. + * The ID of the last set of data from the previous data batch. By default, the latest information is given. */ lastId?: number; /** - * Default100,Max200 + * Default100, Max200 */ limit?: number = 100; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; @@ -56,7 +56,7 @@ export class GetMarginHFLedgerReq implements Serializable { */ static create(data: { /** - * currency, optional,can select more than one,separate with commas,select no more than 10 currencys,the default will be to query for all currencys if left empty + * Currency optional; more than one can be selected; separate using commas; select no more than 10 currencies; the default will be to query for all currencies if left empty */ currency?: string; /** @@ -64,23 +64,23 @@ export class GetMarginHFLedgerReq implements Serializable { */ direction?: GetMarginHFLedgerReq.DirectionEnum; /** - * Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE - cross margin trade, ISOLATED_EXCHANGE - isolated margin trade, LIQUIDATION - liquidation, ASSERT_RETURN - forced liquidation asset return + * Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE-cross margin trade, ISOLATED_EXCHANGE-isolated margin trade, LIQUIDATION-liquidation, ASSERT_RETURN-forced liquidation asset return */ bizType?: string; /** - * The id of the last set of data from the previous batch of data. By default, the latest information is given. + * The ID of the last set of data from the previous data batch. By default, the latest information is given. */ lastId?: number; /** - * Default100,Max200 + * Default100, Max200 */ limit?: number; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; }): GetMarginHFLedgerReq { @@ -137,7 +137,7 @@ export class GetMarginHFLedgerReqBuilder { this.obj = obj; } /** - * currency, optional,can select more than one,separate with commas,select no more than 10 currencys,the default will be to query for all currencys if left empty + * Currency optional; more than one can be selected; separate using commas; select no more than 10 currencies; the default will be to query for all currencies if left empty */ setCurrency(value: string): GetMarginHFLedgerReqBuilder { this.obj.currency = value; @@ -153,7 +153,7 @@ export class GetMarginHFLedgerReqBuilder { } /** - * Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE - cross margin trade, ISOLATED_EXCHANGE - isolated margin trade, LIQUIDATION - liquidation, ASSERT_RETURN - forced liquidation asset return + * Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE-cross margin trade, ISOLATED_EXCHANGE-isolated margin trade, LIQUIDATION-liquidation, ASSERT_RETURN-forced liquidation asset return */ setBizType(value: string): GetMarginHFLedgerReqBuilder { this.obj.bizType = value; @@ -161,7 +161,7 @@ export class GetMarginHFLedgerReqBuilder { } /** - * The id of the last set of data from the previous batch of data. By default, the latest information is given. + * The ID of the last set of data from the previous data batch. By default, the latest information is given. */ setLastId(value: number): GetMarginHFLedgerReqBuilder { this.obj.lastId = value; @@ -169,7 +169,7 @@ export class GetMarginHFLedgerReqBuilder { } /** - * Default100,Max200 + * Default100, Max200 */ setLimit(value: number): GetMarginHFLedgerReqBuilder { this.obj.limit = value; @@ -177,7 +177,7 @@ export class GetMarginHFLedgerReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetMarginHFLedgerReqBuilder { this.obj.startAt = value; @@ -185,7 +185,7 @@ export class GetMarginHFLedgerReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetMarginHFLedgerReqBuilder { this.obj.endAt = value; diff --git a/sdk/node/src/generate/account/account/model_get_spot_account_list_data.ts b/sdk/node/src/generate/account/account/model_get_spot_account_list_data.ts index 90bf9b00..3f73de5a 100644 --- a/sdk/node/src/generate/account/account/model_get_spot_account_list_data.ts +++ b/sdk/node/src/generate/account/account/model_get_spot_account_list_data.ts @@ -15,7 +15,7 @@ export class GetSpotAccountListData implements Serializable { currency: string; /** - * Account type:,main、trade、isolated(abandon)、margin(abandon) + * Account type: main, trade, isolated (abandon), margin (abandon) */ type: GetSpotAccountListData.TypeEnum; diff --git a/sdk/node/src/generate/account/account/model_get_spot_account_list_req.ts b/sdk/node/src/generate/account/account/model_get_spot_account_list_req.ts index 5da9c76d..771c1f58 100644 --- a/sdk/node/src/generate/account/account/model_get_spot_account_list_req.ts +++ b/sdk/node/src/generate/account/account/model_get_spot_account_list_req.ts @@ -10,7 +10,7 @@ export class GetSpotAccountListReq implements Serializable { currency?: string; /** - * Account type main、trade + * Account type */ type?: GetSpotAccountListReq.TypeEnum; @@ -35,7 +35,7 @@ export class GetSpotAccountListReq implements Serializable { */ currency?: string; /** - * Account type main、trade + * Account type */ type?: GetSpotAccountListReq.TypeEnum; }): GetSpotAccountListReq { @@ -75,6 +75,10 @@ export namespace GetSpotAccountListReq { * Spot account */ TRADE = 'trade', + /** + * Option account + */ + OPTION = 'option', } } @@ -91,7 +95,7 @@ export class GetSpotAccountListReqBuilder { } /** - * Account type main、trade + * Account type */ setType(value: GetSpotAccountListReq.TypeEnum): GetSpotAccountListReqBuilder { this.obj.type = value; diff --git a/sdk/node/src/generate/account/account/model_get_spot_hf_ledger_data.ts b/sdk/node/src/generate/account/account/model_get_spot_hf_ledger_data.ts index 64dcd85e..ee89c551 100644 --- a/sdk/node/src/generate/account/account/model_get_spot_hf_ledger_data.ts +++ b/sdk/node/src/generate/account/account/model_get_spot_hf_ledger_data.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetSpotHFLedgerData implements Serializable { /** - * Unique id + * Unique ID */ id: string; @@ -20,7 +20,7 @@ export class GetSpotHFLedgerData implements Serializable { amount: string; /** - * Deposit or withdrawal fee + * Transaction, Deposit or withdrawal fee */ fee: string; @@ -40,12 +40,12 @@ export class GetSpotHFLedgerData implements Serializable { accountType: string; /** - * Trnasaction type,such as TRANSFER, TRADE_EXCHANGE, etc. + * Trnasaction type, such as TRANSFER, TRADE_EXCHANGE, etc. */ bizType: string; /** - * Direction of transfer( out or in) + * Direction of transfer (out or in) */ direction: GetSpotHFLedgerData.DirectionEnum; diff --git a/sdk/node/src/generate/account/account/model_get_spot_hf_ledger_req.ts b/sdk/node/src/generate/account/account/model_get_spot_hf_ledger_req.ts index a77e2272..e66908ee 100644 --- a/sdk/node/src/generate/account/account/model_get_spot_hf_ledger_req.ts +++ b/sdk/node/src/generate/account/account/model_get_spot_hf_ledger_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetSpotHFLedgerReq implements Serializable { /** - * Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default. + * Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default. */ currency?: string; @@ -15,27 +15,27 @@ export class GetSpotHFLedgerReq implements Serializable { direction?: GetSpotHFLedgerReq.DirectionEnum; /** - * Transaction type: TRANSFER-transfer funds,TRADE_EXCHANGE-Trade + * Transaction type */ bizType?: GetSpotHFLedgerReq.BizTypeEnum; /** - * The id of the last set of data from the previous batch of data. By default, the latest information is given. + * The ID of the last set of data from the previous data batch. By default, the latest information is given. */ lastId?: number; /** - * Default100,Max200 + * Default100, Max200 */ limit?: number = 100; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; @@ -56,7 +56,7 @@ export class GetSpotHFLedgerReq implements Serializable { */ static create(data: { /** - * Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default. + * Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default. */ currency?: string; /** @@ -64,23 +64,23 @@ export class GetSpotHFLedgerReq implements Serializable { */ direction?: GetSpotHFLedgerReq.DirectionEnum; /** - * Transaction type: TRANSFER-transfer funds,TRADE_EXCHANGE-Trade + * Transaction type */ bizType?: GetSpotHFLedgerReq.BizTypeEnum; /** - * The id of the last set of data from the previous batch of data. By default, the latest information is given. + * The ID of the last set of data from the previous data batch. By default, the latest information is given. */ lastId?: number; /** - * Default100,Max200 + * Default100, Max200 */ limit?: number; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; }): GetSpotHFLedgerReq { @@ -132,13 +132,25 @@ export namespace GetSpotHFLedgerReq { } export enum BizTypeEnum { /** - * + * trade exchange */ TRADE_EXCHANGE = 'TRADE_EXCHANGE', /** - * + * transfer */ TRANSFER = 'TRANSFER', + /** + * returned fees + */ + RETURNED_FEES = 'RETURNED_FEES', + /** + * deduction fees + */ + DEDUCTION_FEES = 'DEDUCTION_FEES', + /** + * other + */ + OTHER = 'OTHER', } } @@ -147,7 +159,7 @@ export class GetSpotHFLedgerReqBuilder { this.obj = obj; } /** - * Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default. + * Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default. */ setCurrency(value: string): GetSpotHFLedgerReqBuilder { this.obj.currency = value; @@ -163,7 +175,7 @@ export class GetSpotHFLedgerReqBuilder { } /** - * Transaction type: TRANSFER-transfer funds,TRADE_EXCHANGE-Trade + * Transaction type */ setBizType(value: GetSpotHFLedgerReq.BizTypeEnum): GetSpotHFLedgerReqBuilder { this.obj.bizType = value; @@ -171,7 +183,7 @@ export class GetSpotHFLedgerReqBuilder { } /** - * The id of the last set of data from the previous batch of data. By default, the latest information is given. + * The ID of the last set of data from the previous data batch. By default, the latest information is given. */ setLastId(value: number): GetSpotHFLedgerReqBuilder { this.obj.lastId = value; @@ -179,7 +191,7 @@ export class GetSpotHFLedgerReqBuilder { } /** - * Default100,Max200 + * Default100, Max200 */ setLimit(value: number): GetSpotHFLedgerReqBuilder { this.obj.limit = value; @@ -187,7 +199,7 @@ export class GetSpotHFLedgerReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetSpotHFLedgerReqBuilder { this.obj.startAt = value; @@ -195,7 +207,7 @@ export class GetSpotHFLedgerReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetSpotHFLedgerReqBuilder { this.obj.endAt = value; diff --git a/sdk/node/src/generate/account/account/model_get_spot_ledger_items.ts b/sdk/node/src/generate/account/account/model_get_spot_ledger_items.ts index 644eef44..d65e68ef 100644 --- a/sdk/node/src/generate/account/account/model_get_spot_ledger_items.ts +++ b/sdk/node/src/generate/account/account/model_get_spot_ledger_items.ts @@ -10,12 +10,12 @@ export class GetSpotLedgerItems implements Serializable { id?: string; /** - * The currency of an account + * Currency */ currency?: string; /** - * The total amount of assets (fees included) involved in assets changes such as transaction, withdrawal and bonus distribution. + * The total amount of assets (fees included) involved in assets changes such as transactions, withdrawals and bonus distributions. */ amount?: string; @@ -25,17 +25,17 @@ export class GetSpotLedgerItems implements Serializable { fee?: string; /** - * Remaining funds after the transaction. + * Remaining funds after the transaction. (Deprecated field, no actual use of the value field) */ balance?: string; /** - * The account type of the master user: MAIN, TRADE, MARGIN or CONTRACT. + * Master user account types: MAIN, TRADE, MARGIN or CONTRACT. */ accountType?: string; /** - * Business type leading to the changes in funds, such as exchange, withdrawal, deposit, KUCOIN_BONUS, REFERRAL_BONUS, Lendings etc. + * Business type leading to changes in funds, such as exchange, withdrawal, deposit, KUCOIN_BONUS, REFERRAL_BONUS, Lendings, etc. */ bizType?: string; @@ -45,12 +45,12 @@ export class GetSpotLedgerItems implements Serializable { direction?: string; /** - * Time of the event + * Time of event */ createdAt?: number; /** - * Business related information such as order ID, serial No., etc. + * Business related information such as order ID, serial no., etc. */ context?: string; diff --git a/sdk/node/src/generate/account/account/model_get_spot_ledger_req.ts b/sdk/node/src/generate/account/account/model_get_spot_ledger_req.ts index 84dc5036..5dbf151b 100644 --- a/sdk/node/src/generate/account/account/model_get_spot_ledger_req.ts +++ b/sdk/node/src/generate/account/account/model_get_spot_ledger_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetSpotLedgerReq implements Serializable { /** - * Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default. + * Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default. */ currency?: string; @@ -15,17 +15,17 @@ export class GetSpotLedgerReq implements Serializable { direction?: GetSpotLedgerReq.DirectionEnum; /** - * Type: DEPOSIT -deposit, WITHDRAW -withdraw, TRANSFER -transfer, SUB_TRANSFER -subaccount transfer,TRADE_EXCHANGE -trade, MARGIN_EXCHANGE -margin trade, KUCOIN_BONUS -bonus, BROKER_TRANSFER -Broker transfer record + * Type: DEPOSIT-deposit, WITHDRAW-withdraw, TRANSFER-transfer, SUB_TRANSFER-sub-account transfer, TRADE_EXCHANGE-trade, MARGIN_EXCHANGE-margin trade, KUCOIN_BONUS-bonus, BROKER_TRANSFER-Broker transfer record */ bizType?: string; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; @@ -56,7 +56,7 @@ export class GetSpotLedgerReq implements Serializable { */ static create(data: { /** - * Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default. + * Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default. */ currency?: string; /** @@ -64,15 +64,15 @@ export class GetSpotLedgerReq implements Serializable { */ direction?: GetSpotLedgerReq.DirectionEnum; /** - * Type: DEPOSIT -deposit, WITHDRAW -withdraw, TRANSFER -transfer, SUB_TRANSFER -subaccount transfer,TRADE_EXCHANGE -trade, MARGIN_EXCHANGE -margin trade, KUCOIN_BONUS -bonus, BROKER_TRANSFER -Broker transfer record + * Type: DEPOSIT-deposit, WITHDRAW-withdraw, TRANSFER-transfer, SUB_TRANSFER-sub-account transfer, TRADE_EXCHANGE-trade, MARGIN_EXCHANGE-margin trade, KUCOIN_BONUS-bonus, BROKER_TRANSFER-Broker transfer record */ bizType?: string; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** @@ -126,11 +126,11 @@ export class GetSpotLedgerReq implements Serializable { export namespace GetSpotLedgerReq { export enum DirectionEnum { /** - * + * Funds in */ _IN = 'in', /** - * + * Funds out */ OUT = 'out', } @@ -141,7 +141,7 @@ export class GetSpotLedgerReqBuilder { this.obj = obj; } /** - * Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default. + * Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default. */ setCurrency(value: string): GetSpotLedgerReqBuilder { this.obj.currency = value; @@ -157,7 +157,7 @@ export class GetSpotLedgerReqBuilder { } /** - * Type: DEPOSIT -deposit, WITHDRAW -withdraw, TRANSFER -transfer, SUB_TRANSFER -subaccount transfer,TRADE_EXCHANGE -trade, MARGIN_EXCHANGE -margin trade, KUCOIN_BONUS -bonus, BROKER_TRANSFER -Broker transfer record + * Type: DEPOSIT-deposit, WITHDRAW-withdraw, TRANSFER-transfer, SUB_TRANSFER-sub-account transfer, TRADE_EXCHANGE-trade, MARGIN_EXCHANGE-margin trade, KUCOIN_BONUS-bonus, BROKER_TRANSFER-Broker transfer record */ setBizType(value: string): GetSpotLedgerReqBuilder { this.obj.bizType = value; @@ -165,7 +165,7 @@ export class GetSpotLedgerReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetSpotLedgerReqBuilder { this.obj.startAt = value; @@ -173,7 +173,7 @@ export class GetSpotLedgerReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetSpotLedgerReqBuilder { this.obj.endAt = value; diff --git a/sdk/node/src/generate/account/account/model_get_spot_ledger_resp.ts b/sdk/node/src/generate/account/account/model_get_spot_ledger_resp.ts index 083fa332..f0c52971 100644 --- a/sdk/node/src/generate/account/account/model_get_spot_ledger_resp.ts +++ b/sdk/node/src/generate/account/account/model_get_spot_ledger_resp.ts @@ -22,7 +22,7 @@ export class GetSpotLedgerResp implements Response { totalNum: number; /** - * total page + * total pages */ totalPage: number; diff --git a/sdk/node/src/generate/account/deposit/api_deposit.template b/sdk/node/src/generate/account/deposit/api_deposit.template index 2e222cdc..8a95d1af 100644 --- a/sdk/node/src/generate/account/deposit/api_deposit.template +++ b/sdk/node/src/generate/account/deposit/api_deposit.template @@ -8,7 +8,7 @@ describe('Auto Test', ()=> { test('addDepositAddressV3 request test', ()=> { /** * addDepositAddressV3 - * Add Deposit Address(V3) + * Add Deposit Address (V3) * /api/v3/deposit-address/create */ let builder = AddDepositAddressV3Req.builder(); @@ -30,7 +30,7 @@ describe('Auto Test', ()=> { test('getDepositAddressV3 request test', ()=> { /** * getDepositAddressV3 - * Get Deposit Address(V3) + * Get Deposit Address (V3) * /api/v3/deposit-addresses */ let builder = GetDepositAddressV3Req.builder(); @@ -66,11 +66,11 @@ describe('Auto Test', ()=> { test('getDepositAddressV2 request test', ()=> { /** * getDepositAddressV2 - * Get Deposit Addresses(V2) + * Get Deposit Addresses (V2) * /api/v2/deposit-addresses */ let builder = GetDepositAddressV2Req.builder(); - builder.setCurrency(?); + builder.setCurrency(?).setChain(?); let req = builder.build(); let resp = api.getDepositAddressV2(req); return resp.then(result => { @@ -128,7 +128,7 @@ describe('Auto Test', ()=> { * /api/v1/deposit-addresses */ let builder = AddDepositAddressV1Req.builder(); - builder.setCurrency(?).setChain(?); + builder.setCurrency(?).setChain(?).setTo(?); let req = builder.build(); let resp = api.addDepositAddressV1(req); return resp.then(result => { diff --git a/sdk/node/src/generate/account/deposit/api_deposit.test.ts b/sdk/node/src/generate/account/deposit/api_deposit.test.ts index 718922a1..3bb77b11 100644 --- a/sdk/node/src/generate/account/deposit/api_deposit.test.ts +++ b/sdk/node/src/generate/account/deposit/api_deposit.test.ts @@ -18,7 +18,7 @@ describe('Auto Test', () => { test('addDepositAddressV3 request test', () => { /** * addDepositAddressV3 - * Add Deposit Address(V3) + * Add Deposit Address (V3) * /api/v3/deposit-address/create */ let data = '{"currency": "TON", "chain": "ton", "to": "trade"}'; @@ -32,7 +32,7 @@ describe('Auto Test', () => { test('addDepositAddressV3 response test', () => { /** * addDepositAddressV3 - * Add Deposit Address(V3) + * Add Deposit Address (V3) * /api/v3/deposit-address/create */ let data = @@ -49,11 +49,10 @@ describe('Auto Test', () => { test('getDepositAddressV3 request test', () => { /** * getDepositAddressV3 - * Get Deposit Address(V3) + * Get Deposit Address (V3) * /api/v3/deposit-addresses */ - let data = - '{"currency": "BTC", "amount": "example_string_default_value", "chain": "example_string_default_value"}'; + let data = '{"currency": "BTC", "amount": "example_string_default_value", "chain": "eth"}'; let req = GetDepositAddressV3Req.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, @@ -64,7 +63,7 @@ describe('Auto Test', () => { test('getDepositAddressV3 response test', () => { /** * getDepositAddressV3 - * Get Deposit Address(V3) + * Get Deposit Address (V3) * /api/v3/deposit-addresses */ let data = @@ -113,10 +112,10 @@ describe('Auto Test', () => { test('getDepositAddressV2 request test', () => { /** * getDepositAddressV2 - * Get Deposit Addresses(V2) + * Get Deposit Addresses (V2) * /api/v2/deposit-addresses */ - let data = '{"currency": "BTC"}'; + let data = '{"currency": "BTC", "chain": "eth"}'; let req = GetDepositAddressV2Req.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, @@ -127,7 +126,7 @@ describe('Auto Test', () => { test('getDepositAddressV2 response test', () => { /** * getDepositAddressV2 - * Get Deposit Addresses(V2) + * Get Deposit Addresses (V2) * /api/v2/deposit-addresses */ let data = diff --git a/sdk/node/src/generate/account/deposit/api_deposit.ts b/sdk/node/src/generate/account/deposit/api_deposit.ts index 1ff90625..4c8af7f4 100644 --- a/sdk/node/src/generate/account/deposit/api_deposit.ts +++ b/sdk/node/src/generate/account/deposit/api_deposit.ts @@ -18,118 +18,118 @@ import { GetDepositAddressV2Resp } from './model_get_deposit_address_v2_resp'; export interface DepositAPI { /** - * addDepositAddressV3 Add Deposit Address(V3) - * Description: Request via this endpoint to create a deposit address for a currency you intend to deposit. + * addDepositAddressV3 Add Deposit Address (V3) + * Description: Request via this endpoint the creation of a deposit address for a currency you intend to deposit. * Documentation: https://www.kucoin.com/docs-new/api-3470142 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ addDepositAddressV3(req: AddDepositAddressV3Req): Promise; /** - * getDepositAddressV3 Get Deposit Address(V3) - * Description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to Add Deposit Address first. + * getDepositAddressV3 Get Deposit Address (V3) + * Description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to add the deposit address first. * Documentation: https://www.kucoin.com/docs-new/api-3470140 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 5 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+------------+ */ getDepositAddressV3(req: GetDepositAddressV3Req): Promise; /** * getDepositHistory Get Deposit History - * Description: Request via this endpoint to get deposit list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. + * Description: Request a deposit list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. * Documentation: https://www.kucoin.com/docs-new/api-3470141 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 5 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+------------+ */ getDepositHistory(req: GetDepositHistoryReq): Promise; /** * @deprecated - * getDepositAddressV2 Get Deposit Addresses(V2) - * Description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to Add Deposit Address first. + * getDepositAddressV2 Get Deposit Addresses (V2) + * Description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to add the deposit address first. * Documentation: https://www.kucoin.com/docs-new/api-3470300 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 5 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+------------+ */ getDepositAddressV2(req: GetDepositAddressV2Req): Promise; /** * @deprecated * getDepositAddressV1 Get Deposit Addresses - V1 - * Description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to Add Deposit Address first. + * Description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to add the deposit address first. * Documentation: https://www.kucoin.com/docs-new/api-3470305 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 5 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+------------+ */ getDepositAddressV1(req: GetDepositAddressV1Req): Promise; /** * @deprecated * getDepositHistoryOld Get Deposit History - Old - * Description: Request via this endpoint to get the V1 historical deposits list on KuCoin. The return value is the data after Pagination, sorted in descending order according to time. + * Description: Request the V1 historical deposits list on KuCoin via this endpoint. The return value is the data after Pagination, sorted in descending order according to time. * Documentation: https://www.kucoin.com/docs-new/api-3470306 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 5 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+------------+ */ getDepositHistoryOld(req: GetDepositHistoryOldReq): Promise; /** * @deprecated * addDepositAddressV1 Add Deposit Address - V1 - * Description: Request via this endpoint to create a deposit address for a currency you intend to deposit. + * Description: Request via this endpoint the creation of a deposit address for a currency you intend to deposit. * Documentation: https://www.kucoin.com/docs-new/api-3470309 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ addDepositAddressV1(req: AddDepositAddressV1Req): Promise; } diff --git a/sdk/node/src/generate/account/deposit/model_add_deposit_address_v1_req.ts b/sdk/node/src/generate/account/deposit/model_add_deposit_address_v1_req.ts index face852d..3ba09744 100644 --- a/sdk/node/src/generate/account/deposit/model_add_deposit_address_v1_req.ts +++ b/sdk/node/src/generate/account/deposit/model_add_deposit_address_v1_req.ts @@ -10,10 +10,15 @@ export class AddDepositAddressV1Req implements Serializable { currency: string; /** - * The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + * The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. */ chain?: string = 'eth'; + /** + * Deposit account type: main (funding account), trade (spot trading account); the default is main + */ + to?: AddDepositAddressV1Req.ToEnum = AddDepositAddressV1Req.ToEnum.MAIN; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -38,9 +43,13 @@ export class AddDepositAddressV1Req implements Serializable { */ currency: string; /** - * The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + * The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. */ chain?: string; + /** + * Deposit account type: main (funding account), trade (spot trading account); the default is main + */ + to?: AddDepositAddressV1Req.ToEnum; }): AddDepositAddressV1Req { let obj = new AddDepositAddressV1Req(); obj.currency = data.currency; @@ -49,6 +58,11 @@ export class AddDepositAddressV1Req implements Serializable { } else { obj.chain = 'eth'; } + if (data.to) { + obj.to = data.to; + } else { + obj.to = AddDepositAddressV1Req.ToEnum.MAIN; + } return obj; } @@ -72,6 +86,19 @@ export class AddDepositAddressV1Req implements Serializable { } } +export namespace AddDepositAddressV1Req { + export enum ToEnum { + /** + * Funding account + */ + MAIN = 'main', + /** + * Spot account + */ + TRADE = 'trade', + } +} + export class AddDepositAddressV1ReqBuilder { constructor(readonly obj: AddDepositAddressV1Req) { this.obj = obj; @@ -85,13 +112,21 @@ export class AddDepositAddressV1ReqBuilder { } /** - * The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + * The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. */ setChain(value: string): AddDepositAddressV1ReqBuilder { this.obj.chain = value; return this; } + /** + * Deposit account type: main (funding account), trade (spot trading account); the default is main + */ + setTo(value: AddDepositAddressV1Req.ToEnum): AddDepositAddressV1ReqBuilder { + this.obj.to = value; + return this; + } + /** * Get the final object. */ diff --git a/sdk/node/src/generate/account/deposit/model_add_deposit_address_v1_resp.ts b/sdk/node/src/generate/account/deposit/model_add_deposit_address_v1_resp.ts index 55df52cd..1b13ff06 100644 --- a/sdk/node/src/generate/account/deposit/model_add_deposit_address_v1_resp.ts +++ b/sdk/node/src/generate/account/deposit/model_add_deposit_address_v1_resp.ts @@ -11,7 +11,7 @@ export class AddDepositAddressV1Resp implements Response { address: string; /** - * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. */ memo: string; diff --git a/sdk/node/src/generate/account/deposit/model_add_deposit_address_v3_req.ts b/sdk/node/src/generate/account/deposit/model_add_deposit_address_v3_req.ts index 36731d1a..4714f9fc 100644 --- a/sdk/node/src/generate/account/deposit/model_add_deposit_address_v3_req.ts +++ b/sdk/node/src/generate/account/deposit/model_add_deposit_address_v3_req.ts @@ -10,12 +10,12 @@ export class AddDepositAddressV3Req implements Serializable { currency: string; /** - * The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + * The currency chainId, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. */ - chain?: string = 'eth'; + chain: string = 'eth'; /** - * Deposit account type: main (funding account), trade (spot trading account), the default is main + * Deposit account type: MAIN (funding account), TRADE (spot trading account); the default is MAIN */ to?: AddDepositAddressV3Req.ToEnum = AddDepositAddressV3Req.ToEnum.MAIN; @@ -30,6 +30,8 @@ export class AddDepositAddressV3Req implements Serializable { private constructor() { // @ts-ignore this.currency = null; + // @ts-ignore + this.chain = null; } /** * Creates a new instance of the `AddDepositAddressV3Req` class. @@ -48,11 +50,11 @@ export class AddDepositAddressV3Req implements Serializable { */ currency: string; /** - * The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + * The currency chainId, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. */ - chain?: string; + chain: string; /** - * Deposit account type: main (funding account), trade (spot trading account), the default is main + * Deposit account type: MAIN (funding account), TRADE (spot trading account); the default is MAIN */ to?: AddDepositAddressV3Req.ToEnum; /** @@ -99,11 +101,11 @@ export class AddDepositAddressV3Req implements Serializable { export namespace AddDepositAddressV3Req { export enum ToEnum { /** - * + * Funding account */ MAIN = 'main', /** - * + * Spot account */ TRADE = 'trade', } @@ -122,7 +124,7 @@ export class AddDepositAddressV3ReqBuilder { } /** - * The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + * The currency chainId, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. */ setChain(value: string): AddDepositAddressV3ReqBuilder { this.obj.chain = value; @@ -130,7 +132,7 @@ export class AddDepositAddressV3ReqBuilder { } /** - * Deposit account type: main (funding account), trade (spot trading account), the default is main + * Deposit account type: MAIN (funding account), TRADE (spot trading account); the default is MAIN */ setTo(value: AddDepositAddressV3Req.ToEnum): AddDepositAddressV3ReqBuilder { this.obj.to = value; diff --git a/sdk/node/src/generate/account/deposit/model_add_deposit_address_v3_resp.ts b/sdk/node/src/generate/account/deposit/model_add_deposit_address_v3_resp.ts index 19931414..68b590e1 100644 --- a/sdk/node/src/generate/account/deposit/model_add_deposit_address_v3_resp.ts +++ b/sdk/node/src/generate/account/deposit/model_add_deposit_address_v3_resp.ts @@ -11,7 +11,7 @@ export class AddDepositAddressV3Resp implements Response { address: string; /** - * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. */ memo: string; @@ -21,12 +21,12 @@ export class AddDepositAddressV3Resp implements Response { chainId: string; /** - * Deposit account type: main (funding account), trade (spot trading account) + * Deposit account type: MAIN (funding account), TRADE (spot trading account) */ to: string; /** - * Expiration time, Lightning network expiration time, non-Lightning network this field is invalid + * Expiration time; Lightning network expiration time; this field is not applicable to non-Lightning networks */ expirationDate: number; diff --git a/sdk/node/src/generate/account/deposit/model_get_deposit_address_v1_req.ts b/sdk/node/src/generate/account/deposit/model_get_deposit_address_v1_req.ts index 025d1fa7..3f7322d0 100644 --- a/sdk/node/src/generate/account/deposit/model_get_deposit_address_v1_req.ts +++ b/sdk/node/src/generate/account/deposit/model_get_deposit_address_v1_req.ts @@ -10,7 +10,7 @@ export class GetDepositAddressV1Req implements Serializable { currency?: string; /** - * The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + * The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. */ chain?: string = 'eth'; @@ -35,7 +35,7 @@ export class GetDepositAddressV1Req implements Serializable { */ currency?: string; /** - * The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + * The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. */ chain?: string; }): GetDepositAddressV1Req { @@ -82,7 +82,7 @@ export class GetDepositAddressV1ReqBuilder { } /** - * The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + * The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. */ setChain(value: string): GetDepositAddressV1ReqBuilder { this.obj.chain = value; diff --git a/sdk/node/src/generate/account/deposit/model_get_deposit_address_v1_resp.ts b/sdk/node/src/generate/account/deposit/model_get_deposit_address_v1_resp.ts index 4596844d..44290510 100644 --- a/sdk/node/src/generate/account/deposit/model_get_deposit_address_v1_resp.ts +++ b/sdk/node/src/generate/account/deposit/model_get_deposit_address_v1_resp.ts @@ -11,7 +11,7 @@ export class GetDepositAddressV1Resp implements Response { address?: string; /** - * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. */ memo?: string; diff --git a/sdk/node/src/generate/account/deposit/model_get_deposit_address_v2_data.ts b/sdk/node/src/generate/account/deposit/model_get_deposit_address_v2_data.ts index b6209198..02b0c915 100644 --- a/sdk/node/src/generate/account/deposit/model_get_deposit_address_v2_data.ts +++ b/sdk/node/src/generate/account/deposit/model_get_deposit_address_v2_data.ts @@ -10,7 +10,7 @@ export class GetDepositAddressV2Data implements Serializable { address?: string; /** - * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. */ memo?: string; diff --git a/sdk/node/src/generate/account/deposit/model_get_deposit_address_v2_req.ts b/sdk/node/src/generate/account/deposit/model_get_deposit_address_v2_req.ts index e6fd7f30..7ce697f7 100644 --- a/sdk/node/src/generate/account/deposit/model_get_deposit_address_v2_req.ts +++ b/sdk/node/src/generate/account/deposit/model_get_deposit_address_v2_req.ts @@ -9,6 +9,11 @@ export class GetDepositAddressV2Req implements Serializable { */ currency?: string; + /** + * Chain ID of currency + */ + chain?: string; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -29,9 +34,14 @@ export class GetDepositAddressV2Req implements Serializable { * currency */ currency?: string; + /** + * Chain ID of currency + */ + chain?: string; }): GetDepositAddressV2Req { let obj = new GetDepositAddressV2Req(); obj.currency = data.currency; + obj.chain = data.chain; return obj; } @@ -67,6 +77,14 @@ export class GetDepositAddressV2ReqBuilder { return this; } + /** + * Chain ID of currency + */ + setChain(value: string): GetDepositAddressV2ReqBuilder { + this.obj.chain = value; + return this; + } + /** * Get the final object. */ diff --git a/sdk/node/src/generate/account/deposit/model_get_deposit_address_v3_data.ts b/sdk/node/src/generate/account/deposit/model_get_deposit_address_v3_data.ts index 609669d5..4140e1fe 100644 --- a/sdk/node/src/generate/account/deposit/model_get_deposit_address_v3_data.ts +++ b/sdk/node/src/generate/account/deposit/model_get_deposit_address_v3_data.ts @@ -10,7 +10,7 @@ export class GetDepositAddressV3Data implements Serializable { address: string; /** - * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. */ memo: string; @@ -20,12 +20,12 @@ export class GetDepositAddressV3Data implements Serializable { chainId: string; /** - * Deposit account type: main (funding account), trade (spot trading account) + * Deposit account type: MAIN (funding account), TRADE (spot trading account) */ - to: string; + to: GetDepositAddressV3Data.ToEnum; /** - * Expiration time, Lightning network expiration time, non-Lightning network this field is invalid + * Expiration time; Lightning network expiration time; this field is not applicable to non-Lightning networks */ expirationDate: number; @@ -84,3 +84,16 @@ export class GetDepositAddressV3Data implements Serializable { return plainToClassFromExist(new GetDepositAddressV3Data(), jsonObject); } } + +export namespace GetDepositAddressV3Data { + export enum ToEnum { + /** + * Funding account + */ + MAIN = 'MAIN', + /** + * Spot account + */ + TRADE = 'TRADE', + } +} diff --git a/sdk/node/src/generate/account/deposit/model_get_deposit_history_items.ts b/sdk/node/src/generate/account/deposit/model_get_deposit_history_items.ts index ae0c197f..1f7ec4f9 100644 --- a/sdk/node/src/generate/account/deposit/model_get_deposit_history_items.ts +++ b/sdk/node/src/generate/account/deposit/model_get_deposit_history_items.ts @@ -50,7 +50,7 @@ export class GetDepositHistoryItems implements Serializable { walletTxId?: string; /** - * Creation time of the database record + * Database record creation time */ createdAt?: number; diff --git a/sdk/node/src/generate/account/deposit/model_get_deposit_history_old_items.ts b/sdk/node/src/generate/account/deposit/model_get_deposit_history_old_items.ts index 7c69a5b1..dc75df57 100644 --- a/sdk/node/src/generate/account/deposit/model_get_deposit_history_old_items.ts +++ b/sdk/node/src/generate/account/deposit/model_get_deposit_history_old_items.ts @@ -10,7 +10,7 @@ export class GetDepositHistoryOldItems implements Serializable { currency?: string; /** - * Creation time of the database record + * Database record creation time */ createAt?: number; diff --git a/sdk/node/src/generate/account/deposit/model_get_deposit_history_old_req.ts b/sdk/node/src/generate/account/deposit/model_get_deposit_history_old_req.ts index e3f0de3e..945fbce6 100644 --- a/sdk/node/src/generate/account/deposit/model_get_deposit_history_old_req.ts +++ b/sdk/node/src/generate/account/deposit/model_get_deposit_history_old_req.ts @@ -15,12 +15,12 @@ export class GetDepositHistoryOldReq implements Serializable { status?: GetDepositHistoryOldReq.StatusEnum; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; @@ -49,11 +49,11 @@ export class GetDepositHistoryOldReq implements Serializable { */ status?: GetDepositHistoryOldReq.StatusEnum; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; }): GetDepositHistoryOldReq { @@ -123,7 +123,7 @@ export class GetDepositHistoryOldReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetDepositHistoryOldReqBuilder { this.obj.startAt = value; @@ -131,7 +131,7 @@ export class GetDepositHistoryOldReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetDepositHistoryOldReqBuilder { this.obj.endAt = value; diff --git a/sdk/node/src/generate/account/deposit/model_get_deposit_history_old_resp.ts b/sdk/node/src/generate/account/deposit/model_get_deposit_history_old_resp.ts index 58a85ec7..5e170b1b 100644 --- a/sdk/node/src/generate/account/deposit/model_get_deposit_history_old_resp.ts +++ b/sdk/node/src/generate/account/deposit/model_get_deposit_history_old_resp.ts @@ -22,7 +22,7 @@ export class GetDepositHistoryOldResp implements Response { totalNum: number; /** - * total page + * total pages */ totalPage: number; diff --git a/sdk/node/src/generate/account/deposit/model_get_deposit_history_req.ts b/sdk/node/src/generate/account/deposit/model_get_deposit_history_req.ts index cd83303d..6b85a280 100644 --- a/sdk/node/src/generate/account/deposit/model_get_deposit_history_req.ts +++ b/sdk/node/src/generate/account/deposit/model_get_deposit_history_req.ts @@ -15,12 +15,12 @@ export class GetDepositHistoryReq implements Serializable { status?: GetDepositHistoryReq.StatusEnum; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; @@ -59,11 +59,11 @@ export class GetDepositHistoryReq implements Serializable { */ status?: GetDepositHistoryReq.StatusEnum; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** @@ -112,15 +112,15 @@ export class GetDepositHistoryReq implements Serializable { export namespace GetDepositHistoryReq { export enum StatusEnum { /** - * + * Deposit processing */ PROCESSING = 'PROCESSING', /** - * + * Deposit success */ SUCCESS = 'SUCCESS', /** - * + * Deposit fail */ FAILURE = 'FAILURE', } @@ -147,7 +147,7 @@ export class GetDepositHistoryReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetDepositHistoryReqBuilder { this.obj.startAt = value; @@ -155,7 +155,7 @@ export class GetDepositHistoryReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetDepositHistoryReqBuilder { this.obj.endAt = value; diff --git a/sdk/node/src/generate/account/deposit/model_get_deposit_history_resp.ts b/sdk/node/src/generate/account/deposit/model_get_deposit_history_resp.ts index 42b22df6..3e4ca00c 100644 --- a/sdk/node/src/generate/account/deposit/model_get_deposit_history_resp.ts +++ b/sdk/node/src/generate/account/deposit/model_get_deposit_history_resp.ts @@ -22,7 +22,7 @@ export class GetDepositHistoryResp implements Response { totalNum: number; /** - * total page + * total pages */ totalPage: number; diff --git a/sdk/node/src/generate/account/fee/api_fee.ts b/sdk/node/src/generate/account/fee/api_fee.ts index feb54d27..9194e631 100644 --- a/sdk/node/src/generate/account/fee/api_fee.ts +++ b/sdk/node/src/generate/account/fee/api_fee.ts @@ -11,49 +11,49 @@ import { GetBasicFeeReq } from './model_get_basic_fee_req'; export interface FeeAPI { /** * getBasicFee Get Basic Fee - Spot/Margin - * Description: This interface is for the spot/margin basic fee rate of users + * Description: This interface is for the user’s spot/margin basic fee rate. * Documentation: https://www.kucoin.com/docs-new/api-3470149 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ getBasicFee(req: GetBasicFeeReq): Promise; /** * getSpotActualFee Get Actual Fee - Spot/Margin - * Description: This interface is for the actual fee rate of the trading pair. You can inquire about fee rates of 10 trading pairs each time at most. The fee rate of your sub-account is the same as that of the master account. + * Description: This interface is for the trading pair’s actual fee rate. You can inquire about fee rates of 10 trading pairs each time at most. The fee rate of your sub-account is the same as that of the master account. * Documentation: https://www.kucoin.com/docs-new/api-3470150 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ getSpotActualFee(req: GetSpotActualFeeReq): Promise; /** * getFuturesActualFee Get Actual Fee - Futures - * Description: This interface is for the actual futures fee rate of the trading pair. The fee rate of your sub-account is the same as that of the master account. + * Description: This interface is for the trading pair’s actual futures fee rate. The fee rate of your sub-account is the same as that of the master account. * Documentation: https://www.kucoin.com/docs-new/api-3470151 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ getFuturesActualFee(req: GetFuturesActualFeeReq): Promise; } diff --git a/sdk/node/src/generate/account/fee/model_get_basic_fee_req.ts b/sdk/node/src/generate/account/fee/model_get_basic_fee_req.ts index 73224158..67f54d06 100644 --- a/sdk/node/src/generate/account/fee/model_get_basic_fee_req.ts +++ b/sdk/node/src/generate/account/fee/model_get_basic_fee_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetBasicFeeReq implements Serializable { /** - * Currency type: 0-crypto currency, 1-fiat currency. default is 0-crypto currency + * Currency type: 0-crypto currency, 1-fiat currency. Default is 0-crypto currency */ currencyType?: GetBasicFeeReq.CurrencyTypeEnum = GetBasicFeeReq.CurrencyTypeEnum._0; @@ -26,7 +26,7 @@ export class GetBasicFeeReq implements Serializable { */ static create(data: { /** - * Currency type: 0-crypto currency, 1-fiat currency. default is 0-crypto currency + * Currency type: 0-crypto currency, 1-fiat currency. Default is 0-crypto currency */ currencyType?: GetBasicFeeReq.CurrencyTypeEnum; }): GetBasicFeeReq { @@ -62,7 +62,7 @@ export class GetBasicFeeReq implements Serializable { export namespace GetBasicFeeReq { export enum CurrencyTypeEnum { /** - * crypto currency + * cryptocurrency */ _0 = 0, /** @@ -77,7 +77,7 @@ export class GetBasicFeeReqBuilder { this.obj = obj; } /** - * Currency type: 0-crypto currency, 1-fiat currency. default is 0-crypto currency + * Currency type: 0-crypto currency, 1-fiat currency. Default is 0-crypto currency */ setCurrencyType(value: GetBasicFeeReq.CurrencyTypeEnum): GetBasicFeeReqBuilder { this.obj.currencyType = value; diff --git a/sdk/node/src/generate/account/fee/model_get_futures_actual_fee_req.ts b/sdk/node/src/generate/account/fee/model_get_futures_actual_fee_req.ts index 50c318ee..6e7592eb 100644 --- a/sdk/node/src/generate/account/fee/model_get_futures_actual_fee_req.ts +++ b/sdk/node/src/generate/account/fee/model_get_futures_actual_fee_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetFuturesActualFeeReq implements Serializable { /** - * Trading pair + * The unique identity of the trading pair; will not change even if the trading pair is renamed */ symbol?: string; @@ -26,7 +26,7 @@ export class GetFuturesActualFeeReq implements Serializable { */ static create(data: { /** - * Trading pair + * The unique identity of the trading pair; will not change even if the trading pair is renamed */ symbol?: string; }): GetFuturesActualFeeReq { @@ -60,7 +60,7 @@ export class GetFuturesActualFeeReqBuilder { this.obj = obj; } /** - * Trading pair + * The unique identity of the trading pair; will not change even if the trading pair is renamed */ setSymbol(value: string): GetFuturesActualFeeReqBuilder { this.obj.symbol = value; diff --git a/sdk/node/src/generate/account/fee/model_get_futures_actual_fee_resp.ts b/sdk/node/src/generate/account/fee/model_get_futures_actual_fee_resp.ts index 5487ad94..e000d5c5 100644 --- a/sdk/node/src/generate/account/fee/model_get_futures_actual_fee_resp.ts +++ b/sdk/node/src/generate/account/fee/model_get_futures_actual_fee_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class GetFuturesActualFeeResp implements Response { /** - * The unique identity of the trading pair and will not change even if the trading pair is renamed + * The unique identity of the trading pair; will not change even if the trading pair is renamed */ symbol: string; diff --git a/sdk/node/src/generate/account/fee/model_get_spot_actual_fee_data.ts b/sdk/node/src/generate/account/fee/model_get_spot_actual_fee_data.ts index 1deb394b..fdc93d21 100644 --- a/sdk/node/src/generate/account/fee/model_get_spot_actual_fee_data.ts +++ b/sdk/node/src/generate/account/fee/model_get_spot_actual_fee_data.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetSpotActualFeeData implements Serializable { /** - * The unique identity of the trading pair and will not change even if the trading pair is renamed + * The unique identity of the trading pair; will not change even if the trading pair is renamed */ symbol: string; @@ -19,6 +19,16 @@ export class GetSpotActualFeeData implements Serializable { */ makerFeeRate: string; + /** + * Buy tax rate; this field is visible to users in certain countries + */ + sellTaxRate?: string; + + /** + * Sell tax rate; this field is visible to users in certain countries + */ + buyTaxRate?: string; + /** * Private constructor, please use the corresponding static methods to construct the object. */ diff --git a/sdk/node/src/generate/account/fee/model_get_spot_actual_fee_req.ts b/sdk/node/src/generate/account/fee/model_get_spot_actual_fee_req.ts index f97e90db..32b8a1f1 100644 --- a/sdk/node/src/generate/account/fee/model_get_spot_actual_fee_req.ts +++ b/sdk/node/src/generate/account/fee/model_get_spot_actual_fee_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetSpotActualFeeReq implements Serializable { /** - * Trading pair (optional, you can inquire fee rates of 10 trading pairs each time at most) + * Trading pair (optional; you can inquire fee rates of 10 trading pairs each time at most) */ symbols?: string; @@ -26,7 +26,7 @@ export class GetSpotActualFeeReq implements Serializable { */ static create(data: { /** - * Trading pair (optional, you can inquire fee rates of 10 trading pairs each time at most) + * Trading pair (optional; you can inquire fee rates of 10 trading pairs each time at most) */ symbols?: string; }): GetSpotActualFeeReq { @@ -60,7 +60,7 @@ export class GetSpotActualFeeReqBuilder { this.obj = obj; } /** - * Trading pair (optional, you can inquire fee rates of 10 trading pairs each time at most) + * Trading pair (optional; you can inquire fee rates of 10 trading pairs each time at most) */ setSymbols(value: string): GetSpotActualFeeReqBuilder { this.obj.symbols = value; diff --git a/sdk/node/src/generate/account/subaccount/api_sub_account.template b/sdk/node/src/generate/account/subaccount/api_sub_account.template index 42245413..f6b1d371 100644 --- a/sdk/node/src/generate/account/subaccount/api_sub_account.template +++ b/sdk/node/src/generate/account/subaccount/api_sub_account.template @@ -8,7 +8,7 @@ describe('Auto Test', ()=> { test('addSubAccount request test', ()=> { /** * addSubAccount - * Add SubAccount + * Add sub-account * /api/v2/sub/user/created */ let builder = AddSubAccountReq.builder(); @@ -27,7 +27,7 @@ describe('Auto Test', ()=> { test('addSubAccountMarginPermission request test', ()=> { /** * addSubAccountMarginPermission - * Add SubAccount Margin Permission + * Add sub-account Margin Permission * /api/v3/sub/user/margin/enable */ let builder = AddSubAccountMarginPermissionReq.builder(); @@ -43,7 +43,7 @@ describe('Auto Test', ()=> { test('addSubAccountFuturesPermission request test', ()=> { /** * addSubAccountFuturesPermission - * Add SubAccount Futures Permission + * Add sub-account Futures Permission * /api/v3/sub/user/futures/enable */ let builder = AddSubAccountFuturesPermissionReq.builder(); @@ -59,7 +59,7 @@ describe('Auto Test', ()=> { test('getSpotSubAccountsSummaryV2 request test', ()=> { /** * getSpotSubAccountsSummaryV2 - * Get SubAccount List - Summary Info + * Get sub-account List - Summary Info * /api/v2/sub/user */ let builder = GetSpotSubAccountsSummaryV2Req.builder(); @@ -79,11 +79,11 @@ describe('Auto Test', ()=> { test('getSpotSubAccountDetail request test', ()=> { /** * getSpotSubAccountDetail - * Get SubAccount Detail - Balance + * Get sub-account Detail - Balance * /api/v1/sub-accounts/{subUserId} */ let builder = GetSpotSubAccountDetailReq.builder(); - builder.setSubUserId(?).setIncludeBaseAmount(?); + builder.setSubUserId(?).setIncludeBaseAmount(?).setBaseCurrency(?).setBaseAmount(?); let req = builder.build(); let resp = api.getSpotSubAccountDetail(req); return resp.then(result => { @@ -100,7 +100,7 @@ describe('Auto Test', ()=> { test('getSpotSubAccountListV2 request test', ()=> { /** * getSpotSubAccountListV2 - * Get SubAccount List - Spot Balance(V2) + * Get sub-account List - Spot Balance (V2) * /api/v2/sub-accounts */ let builder = GetSpotSubAccountListV2Req.builder(); @@ -120,7 +120,7 @@ describe('Auto Test', ()=> { test('getFuturesSubAccountListV2 request test', ()=> { /** * getFuturesSubAccountListV2 - * Get SubAccount List - Futures Balance(V2) + * Get sub-account List - Futures Balance (V2) * /api/v1/account-overview-all */ let builder = GetFuturesSubAccountListV2Req.builder(); @@ -137,7 +137,7 @@ describe('Auto Test', ()=> { test('addSubAccountApi request test', ()=> { /** * addSubAccountApi - * Add SubAccount API + * Add sub-account API * /api/v1/sub/api-key */ let builder = AddSubAccountApiReq.builder(); @@ -161,7 +161,7 @@ describe('Auto Test', ()=> { test('modifySubAccountApi request test', ()=> { /** * modifySubAccountApi - * Modify SubAccount API + * Modify sub-account API * /api/v1/sub/api-key/update */ let builder = ModifySubAccountApiReq.builder(); @@ -180,7 +180,7 @@ describe('Auto Test', ()=> { test('getSubAccountApiList request test', ()=> { /** * getSubAccountApiList - * Get SubAccount API List + * Get sub-account API List * /api/v1/sub/api-key */ let builder = GetSubAccountApiListReq.builder(); @@ -196,7 +196,7 @@ describe('Auto Test', ()=> { test('deleteSubAccountApi request test', ()=> { /** * deleteSubAccountApi - * Delete SubAccount API + * Delete sub-account API * /api/v1/sub/api-key */ let builder = DeleteSubAccountApiReq.builder(); @@ -213,7 +213,7 @@ describe('Auto Test', ()=> { test('getSpotSubAccountsSummaryV1 request test', ()=> { /** * getSpotSubAccountsSummaryV1 - * Get SubAccount List - Summary Info(V1) + * Get sub-account List - Summary Info (V1) * /api/v1/sub/user */ let resp = api.getSpotSubAccountsSummaryV1(); @@ -226,7 +226,7 @@ describe('Auto Test', ()=> { test('getSpotSubAccountListV1 request test', ()=> { /** * getSpotSubAccountListV1 - * Get SubAccount List - Spot Balance(V1) + * Get sub-account List - Spot Balance (V1) * /api/v1/sub-accounts */ let resp = api.getSpotSubAccountListV1(); diff --git a/sdk/node/src/generate/account/subaccount/api_sub_account.test.ts b/sdk/node/src/generate/account/subaccount/api_sub_account.test.ts index 9fb73597..b5086bfb 100644 --- a/sdk/node/src/generate/account/subaccount/api_sub_account.test.ts +++ b/sdk/node/src/generate/account/subaccount/api_sub_account.test.ts @@ -28,7 +28,7 @@ describe('Auto Test', () => { test('addSubAccount request test', () => { /** * addSubAccount - * Add SubAccount + * Add sub-account * /api/v2/sub/user/created */ let data = @@ -43,7 +43,7 @@ describe('Auto Test', () => { test('addSubAccount response test', () => { /** * addSubAccount - * Add SubAccount + * Add sub-account * /api/v2/sub/user/created */ let data = @@ -60,7 +60,7 @@ describe('Auto Test', () => { test('addSubAccountMarginPermission request test', () => { /** * addSubAccountMarginPermission - * Add SubAccount Margin Permission + * Add sub-account Margin Permission * /api/v3/sub/user/margin/enable */ let data = '{"uid": "169579801"}'; @@ -74,7 +74,7 @@ describe('Auto Test', () => { test('addSubAccountMarginPermission response test', () => { /** * addSubAccountMarginPermission - * Add SubAccount Margin Permission + * Add sub-account Margin Permission * /api/v3/sub/user/margin/enable */ let data = '{\n "code": "200000",\n "data": null\n}'; @@ -90,7 +90,7 @@ describe('Auto Test', () => { test('addSubAccountFuturesPermission request test', () => { /** * addSubAccountFuturesPermission - * Add SubAccount Futures Permission + * Add sub-account Futures Permission * /api/v3/sub/user/futures/enable */ let data = '{"uid": "169579801"}'; @@ -104,7 +104,7 @@ describe('Auto Test', () => { test('addSubAccountFuturesPermission response test', () => { /** * addSubAccountFuturesPermission - * Add SubAccount Futures Permission + * Add sub-account Futures Permission * /api/v3/sub/user/futures/enable */ let data = '{\n "code": "200000",\n "data": null\n}'; @@ -120,7 +120,7 @@ describe('Auto Test', () => { test('getSpotSubAccountsSummaryV2 request test', () => { /** * getSpotSubAccountsSummaryV2 - * Get SubAccount List - Summary Info + * Get sub-account List - Summary Info * /api/v2/sub/user */ let data = '{"currentPage": 1, "pageSize": 10}'; @@ -134,7 +134,7 @@ describe('Auto Test', () => { test('getSpotSubAccountsSummaryV2 response test', () => { /** * getSpotSubAccountsSummaryV2 - * Get SubAccount List - Summary Info + * Get sub-account List - Summary Info * /api/v2/sub/user */ let data = @@ -151,10 +151,11 @@ describe('Auto Test', () => { test('getSpotSubAccountDetail request test', () => { /** * getSpotSubAccountDetail - * Get SubAccount Detail - Balance + * Get sub-account Detail - Balance * /api/v1/sub-accounts/{subUserId} */ - let data = '{"subUserId": "63743f07e0c5230001761d08", "includeBaseAmount": true}'; + let data = + '{"subUserId": "63743f07e0c5230001761d08", "includeBaseAmount": true, "baseCurrency": "example_string_default_value", "baseAmount": "example_string_default_value"}'; let req = GetSpotSubAccountDetailReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, @@ -165,7 +166,7 @@ describe('Auto Test', () => { test('getSpotSubAccountDetail response test', () => { /** * getSpotSubAccountDetail - * Get SubAccount Detail - Balance + * Get sub-account Detail - Balance * /api/v1/sub-accounts/{subUserId} */ let data = @@ -182,7 +183,7 @@ describe('Auto Test', () => { test('getSpotSubAccountListV2 request test', () => { /** * getSpotSubAccountListV2 - * Get SubAccount List - Spot Balance(V2) + * Get sub-account List - Spot Balance (V2) * /api/v2/sub-accounts */ let data = '{"currentPage": 1, "pageSize": 10}'; @@ -196,7 +197,7 @@ describe('Auto Test', () => { test('getSpotSubAccountListV2 response test', () => { /** * getSpotSubAccountListV2 - * Get SubAccount List - Spot Balance(V2) + * Get sub-account List - Spot Balance (V2) * /api/v2/sub-accounts */ let data = @@ -213,7 +214,7 @@ describe('Auto Test', () => { test('getFuturesSubAccountListV2 request test', () => { /** * getFuturesSubAccountListV2 - * Get SubAccount List - Futures Balance(V2) + * Get sub-account List - Futures Balance (V2) * /api/v1/account-overview-all */ let data = '{"currency": "USDT"}'; @@ -227,7 +228,7 @@ describe('Auto Test', () => { test('getFuturesSubAccountListV2 response test', () => { /** * getFuturesSubAccountListV2 - * Get SubAccount List - Futures Balance(V2) + * Get sub-account List - Futures Balance (V2) * /api/v1/account-overview-all */ let data = @@ -244,7 +245,7 @@ describe('Auto Test', () => { test('addSubAccountApi request test', () => { /** * addSubAccountApi - * Add SubAccount API + * Add sub-account API * /api/v1/sub/api-key */ let data = @@ -259,7 +260,7 @@ describe('Auto Test', () => { test('addSubAccountApi response test', () => { /** * addSubAccountApi - * Add SubAccount API + * Add sub-account API * /api/v1/sub/api-key */ let data = @@ -276,7 +277,7 @@ describe('Auto Test', () => { test('modifySubAccountApi request test', () => { /** * modifySubAccountApi - * Modify SubAccount API + * Modify sub-account API * /api/v1/sub/api-key/update */ let data = @@ -291,7 +292,7 @@ describe('Auto Test', () => { test('modifySubAccountApi response test', () => { /** * modifySubAccountApi - * Modify SubAccount API + * Modify sub-account API * /api/v1/sub/api-key/update */ let data = @@ -308,7 +309,7 @@ describe('Auto Test', () => { test('getSubAccountApiList request test', () => { /** * getSubAccountApiList - * Get SubAccount API List + * Get sub-account API List * /api/v1/sub/api-key */ let data = '{"apiKey": "example_string_default_value", "subName": "testapi6"}'; @@ -322,7 +323,7 @@ describe('Auto Test', () => { test('getSubAccountApiList response test', () => { /** * getSubAccountApiList - * Get SubAccount API List + * Get sub-account API List * /api/v1/sub/api-key */ let data = @@ -339,7 +340,7 @@ describe('Auto Test', () => { test('deleteSubAccountApi request test', () => { /** * deleteSubAccountApi - * Delete SubAccount API + * Delete sub-account API * /api/v1/sub/api-key */ let data = @@ -354,7 +355,7 @@ describe('Auto Test', () => { test('deleteSubAccountApi response test', () => { /** * deleteSubAccountApi - * Delete SubAccount API + * Delete sub-account API * /api/v1/sub/api-key */ let data = @@ -371,7 +372,7 @@ describe('Auto Test', () => { test('getSpotSubAccountsSummaryV1 request test', () => { /** * getSpotSubAccountsSummaryV1 - * Get SubAccount List - Summary Info(V1) + * Get sub-account List - Summary Info (V1) * /api/v1/sub/user */ }); @@ -379,14 +380,14 @@ describe('Auto Test', () => { test('getSpotSubAccountsSummaryV1 response test', () => { /** * getSpotSubAccountsSummaryV1 - * Get SubAccount List - Summary Info(V1) + * Get sub-account List - Summary Info (V1) * /api/v1/sub/user */ }); test('getSpotSubAccountListV1 request test', () => { /** * getSpotSubAccountListV1 - * Get SubAccount List - Spot Balance(V1) + * Get sub-account List - Spot Balance (V1) * /api/v1/sub-accounts */ }); @@ -394,7 +395,7 @@ describe('Auto Test', () => { test('getSpotSubAccountListV1 response test', () => { /** * getSpotSubAccountListV1 - * Get SubAccount List - Spot Balance(V1) + * Get sub-account List - Spot Balance (V1) * /api/v1/sub-accounts */ }); diff --git a/sdk/node/src/generate/account/subaccount/api_sub_account.ts b/sdk/node/src/generate/account/subaccount/api_sub_account.ts index f619cdba..2bc19f9e 100644 --- a/sdk/node/src/generate/account/subaccount/api_sub_account.ts +++ b/sdk/node/src/generate/account/subaccount/api_sub_account.ts @@ -28,220 +28,220 @@ import { GetSpotSubAccountsSummaryV2Resp } from './model_get_spot_sub_accounts_s export interface SubAccountAPI { /** - * addSubAccount Add SubAccount + * addSubAccount Add sub-account * Description: This endpoint can be used to create sub-accounts. * Documentation: https://www.kucoin.com/docs-new/api-3470135 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 15 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+------------+ */ addSubAccount(req: AddSubAccountReq): Promise; /** - * addSubAccountMarginPermission Add SubAccount Margin Permission - * Description: This endpoint can be used to add sub-accounts Margin permission. Before using this endpoints, you need to ensure that the master account apikey has Margin permissions and the Margin function has been activated. + * addSubAccountMarginPermission Add sub-account Margin Permission + * Description: This endpoint can be used to add sub-account Margin permissions. Before using this endpoint, you need to ensure that the master account apikey has Margin permissions and the Margin function has been activated. * Documentation: https://www.kucoin.com/docs-new/api-3470331 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 15 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+------------+ */ addSubAccountMarginPermission( req: AddSubAccountMarginPermissionReq, ): Promise; /** - * addSubAccountFuturesPermission Add SubAccount Futures Permission - * Description: This endpoint can be used to add sub-accounts Futures permission. Before using this endpoints, you need to ensure that the master account apikey has Futures permissions and the Futures function has been activated. + * addSubAccountFuturesPermission Add sub-account Futures Permission + * Description: This endpoint can be used to add sub-account Futures permissions. Before using this endpoint, you need to ensure that the master account apikey has Futures permissions and the Futures function has been activated. * Documentation: https://www.kucoin.com/docs-new/api-3470332 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 15 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+------------+ */ addSubAccountFuturesPermission( req: AddSubAccountFuturesPermissionReq, ): Promise; /** - * getSpotSubAccountsSummaryV2 Get SubAccount List - Summary Info + * getSpotSubAccountsSummaryV2 Get sub-account List - Summary Info * Description: This endpoint can be used to get a paginated list of sub-accounts. Pagination is required. * Documentation: https://www.kucoin.com/docs-new/api-3470131 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ getSpotSubAccountsSummaryV2( req: GetSpotSubAccountsSummaryV2Req, ): Promise; /** - * getSpotSubAccountDetail Get SubAccount Detail - Balance + * getSpotSubAccountDetail Get sub-account Detail - Balance * Description: This endpoint returns the account info of a sub-user specified by the subUserId. * Documentation: https://www.kucoin.com/docs-new/api-3470132 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 15 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+------------+ */ getSpotSubAccountDetail(req: GetSpotSubAccountDetailReq): Promise; /** - * getSpotSubAccountListV2 Get SubAccount List - Spot Balance(V2) + * getSpotSubAccountListV2 Get sub-account List - Spot Balance (V2) * Description: This endpoint can be used to get paginated Spot sub-account information. Pagination is required. * Documentation: https://www.kucoin.com/docs-new/api-3470133 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ getSpotSubAccountListV2(req: GetSpotSubAccountListV2Req): Promise; /** - * getFuturesSubAccountListV2 Get SubAccount List - Futures Balance(V2) + * getFuturesSubAccountListV2 Get sub-account List - Futures Balance (V2) * Description: This endpoint can be used to get Futures sub-account information. * Documentation: https://www.kucoin.com/docs-new/api-3470134 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 6 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 6 | + * +-----------------------+---------+ */ getFuturesSubAccountListV2( req: GetFuturesSubAccountListV2Req, ): Promise; /** - * addSubAccountApi Add SubAccount API + * addSubAccountApi Add sub-account API * Description: This endpoint can be used to create APIs for sub-accounts. * Documentation: https://www.kucoin.com/docs-new/api-3470138 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ addSubAccountApi(req: AddSubAccountApiReq): Promise; /** - * modifySubAccountApi Modify SubAccount API + * modifySubAccountApi Modify sub-account API * Description: This endpoint can be used to modify sub-account APIs. * Documentation: https://www.kucoin.com/docs-new/api-3470139 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 30 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 30 | + * +-----------------------+------------+ */ modifySubAccountApi(req: ModifySubAccountApiReq): Promise; /** - * getSubAccountApiList Get SubAccount API List - * Description: This endpoint can be used to obtain a list of APIs pertaining to a sub-account.(Not contain ND Broker Sub Account) + * getSubAccountApiList Get sub-account API List + * Description: This endpoint can be used to obtain a list of APIs pertaining to a sub-account (not including ND broker sub-accounts). * Documentation: https://www.kucoin.com/docs-new/api-3470136 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ getSubAccountApiList(req: GetSubAccountApiListReq): Promise; /** - * deleteSubAccountApi Delete SubAccount API + * deleteSubAccountApi Delete sub-account API * Description: This endpoint can be used to delete sub-account APIs. * Documentation: https://www.kucoin.com/docs-new/api-3470137 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 30 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 30 | + * +-----------------------+------------+ */ deleteSubAccountApi(req: DeleteSubAccountApiReq): Promise; /** * @deprecated - * getSpotSubAccountsSummaryV1 Get SubAccount List - Summary Info(V1) - * Description: You can get the user info of all sub-account via this interface It is recommended to use the GET /api/v2/sub/user interface for paging query + * getSpotSubAccountsSummaryV1 Get sub-account List - Summary Info (V1) + * Description: You can get the user info of all sub-account via this interface; it is recommended to use the GET /api/v2/sub/user interface for paging query * Documentation: https://www.kucoin.com/docs-new/api-3470298 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ getSpotSubAccountsSummaryV1(): Promise; /** * @deprecated - * getSpotSubAccountListV1 Get SubAccount List - Spot Balance(V1) + * getSpotSubAccountListV1 Get sub-account List - Spot Balance (V1) * Description: This endpoint returns the account info of all sub-users. * Documentation: https://www.kucoin.com/docs-new/api-3470299 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ getSpotSubAccountListV1(): Promise; } diff --git a/sdk/node/src/generate/account/subaccount/model_add_sub_account_api_req.ts b/sdk/node/src/generate/account/subaccount/model_add_sub_account_api_req.ts index 9a85e5fe..da277d54 100644 --- a/sdk/node/src/generate/account/subaccount/model_add_sub_account_api_req.ts +++ b/sdk/node/src/generate/account/subaccount/model_add_sub_account_api_req.ts @@ -5,27 +5,27 @@ import { Serializable } from '@internal/interfaces/serializable'; export class AddSubAccountApiReq implements Serializable { /** - * Password(Must contain 7-32 characters. Cannot contain any spaces.) + * Password (Must contain 7–32 characters. Cannot contain any spaces.) */ passphrase: string; /** - * Remarks(1~24 characters) + * Remarks (1–24 characters) */ remark: string; /** - * [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") + * [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") */ permission?: string = 'General'; /** - * IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) + * IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) */ ipWhitelist?: string; /** - * API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 + * API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 */ expire?: AddSubAccountApiReq.ExpireEnum = AddSubAccountApiReq.ExpireEnum._1; @@ -58,23 +58,23 @@ export class AddSubAccountApiReq implements Serializable { */ static create(data: { /** - * Password(Must contain 7-32 characters. Cannot contain any spaces.) + * Password (Must contain 7–32 characters. Cannot contain any spaces.) */ passphrase: string; /** - * Remarks(1~24 characters) + * Remarks (1–24 characters) */ remark: string; /** - * [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") + * [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") */ permission?: string; /** - * IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) + * IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) */ ipWhitelist?: string; /** - * API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 + * API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 */ expire?: AddSubAccountApiReq.ExpireEnum; /** @@ -150,7 +150,7 @@ export class AddSubAccountApiReqBuilder { this.obj = obj; } /** - * Password(Must contain 7-32 characters. Cannot contain any spaces.) + * Password (Must contain 7–32 characters. Cannot contain any spaces.) */ setPassphrase(value: string): AddSubAccountApiReqBuilder { this.obj.passphrase = value; @@ -158,7 +158,7 @@ export class AddSubAccountApiReqBuilder { } /** - * Remarks(1~24 characters) + * Remarks (1–24 characters) */ setRemark(value: string): AddSubAccountApiReqBuilder { this.obj.remark = value; @@ -166,7 +166,7 @@ export class AddSubAccountApiReqBuilder { } /** - * [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") + * [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") */ setPermission(value: string): AddSubAccountApiReqBuilder { this.obj.permission = value; @@ -174,7 +174,7 @@ export class AddSubAccountApiReqBuilder { } /** - * IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) + * IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) */ setIpWhitelist(value: string): AddSubAccountApiReqBuilder { this.obj.ipWhitelist = value; @@ -182,7 +182,7 @@ export class AddSubAccountApiReqBuilder { } /** - * API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 + * API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 */ setExpire(value: AddSubAccountApiReq.ExpireEnum): AddSubAccountApiReqBuilder { this.obj.expire = value; diff --git a/sdk/node/src/generate/account/subaccount/model_add_sub_account_api_resp.ts b/sdk/node/src/generate/account/subaccount/model_add_sub_account_api_resp.ts index f8991453..33ad060b 100644 --- a/sdk/node/src/generate/account/subaccount/model_add_sub_account_api_resp.ts +++ b/sdk/node/src/generate/account/subaccount/model_add_sub_account_api_resp.ts @@ -46,7 +46,7 @@ export class AddSubAccountApiResp implements Response { ipWhitelist?: string; /** - * Time of the event + * Time of event */ createdAt: number; diff --git a/sdk/node/src/generate/account/subaccount/model_add_sub_account_req.ts b/sdk/node/src/generate/account/subaccount/model_add_sub_account_req.ts index 139152bd..79e81b44 100644 --- a/sdk/node/src/generate/account/subaccount/model_add_sub_account_req.ts +++ b/sdk/node/src/generate/account/subaccount/model_add_sub_account_req.ts @@ -5,17 +5,17 @@ import { Serializable } from '@internal/interfaces/serializable'; export class AddSubAccountReq implements Serializable { /** - * Password(7-24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) + * Password (7–24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) */ password: string; /** - * Remarks(1~24 characters) + * Remarks (1–24 characters) */ remarks?: string; /** - * Sub-account name(must contain 7-32 characters, at least one number and one letter. Cannot contain any spaces.) + * Sub-account name (must contain 7–32 characters, at least one number and one letter. Cannot contain any spaces.) */ subName: string; @@ -48,15 +48,15 @@ export class AddSubAccountReq implements Serializable { */ static create(data: { /** - * Password(7-24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) + * Password (7–24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) */ password: string; /** - * Remarks(1~24 characters) + * Remarks (1–24 characters) */ remarks?: string; /** - * Sub-account name(must contain 7-32 characters, at least one number and one letter. Cannot contain any spaces.) + * Sub-account name (must contain 7–32 characters, at least one number and one letter. Cannot contain any spaces.) */ subName: string; /** @@ -114,7 +114,7 @@ export class AddSubAccountReqBuilder { this.obj = obj; } /** - * Password(7-24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) + * Password (7–24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) */ setPassword(value: string): AddSubAccountReqBuilder { this.obj.password = value; @@ -122,7 +122,7 @@ export class AddSubAccountReqBuilder { } /** - * Remarks(1~24 characters) + * Remarks (1–24 characters) */ setRemarks(value: string): AddSubAccountReqBuilder { this.obj.remarks = value; @@ -130,7 +130,7 @@ export class AddSubAccountReqBuilder { } /** - * Sub-account name(must contain 7-32 characters, at least one number and one letter. Cannot contain any spaces.) + * Sub-account name (must contain 7–32 characters, at least one number and one letter. Cannot contain any spaces.) */ setSubName(value: string): AddSubAccountReqBuilder { this.obj.subName = value; diff --git a/sdk/node/src/generate/account/subaccount/model_delete_sub_account_api_req.ts b/sdk/node/src/generate/account/subaccount/model_delete_sub_account_api_req.ts index 9db5bd65..2070480a 100644 --- a/sdk/node/src/generate/account/subaccount/model_delete_sub_account_api_req.ts +++ b/sdk/node/src/generate/account/subaccount/model_delete_sub_account_api_req.ts @@ -15,7 +15,7 @@ export class DeleteSubAccountApiReq implements Serializable { subName?: string; /** - * Password(Password of the API key) + * Password (password of the API key) */ passphrase?: string; @@ -44,7 +44,7 @@ export class DeleteSubAccountApiReq implements Serializable { */ subName?: string; /** - * Password(Password of the API key) + * Password (password of the API key) */ passphrase?: string; }): DeleteSubAccountApiReq { @@ -96,7 +96,7 @@ export class DeleteSubAccountApiReqBuilder { } /** - * Password(Password of the API key) + * Password (password of the API key) */ setPassphrase(value: string): DeleteSubAccountApiReqBuilder { this.obj.passphrase = value; diff --git a/sdk/node/src/generate/account/subaccount/model_get_futures_sub_account_list_v2_req.ts b/sdk/node/src/generate/account/subaccount/model_get_futures_sub_account_list_v2_req.ts index 0015ffd4..87032808 100644 --- a/sdk/node/src/generate/account/subaccount/model_get_futures_sub_account_list_v2_req.ts +++ b/sdk/node/src/generate/account/subaccount/model_get_futures_sub_account_list_v2_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetFuturesSubAccountListV2Req implements Serializable { /** - * Currecny, Default XBT + * Currency, Default XBT */ currency?: string = 'XBT'; @@ -26,7 +26,7 @@ export class GetFuturesSubAccountListV2Req implements Serializable { */ static create(data: { /** - * Currecny, Default XBT + * Currency, Default XBT */ currency?: string; }): GetFuturesSubAccountListV2Req { @@ -64,7 +64,7 @@ export class GetFuturesSubAccountListV2ReqBuilder { this.obj = obj; } /** - * Currecny, Default XBT + * Currency, Default XBT */ setCurrency(value: string): GetFuturesSubAccountListV2ReqBuilder { this.obj.currency = value; diff --git a/sdk/node/src/generate/account/subaccount/model_get_futures_sub_account_list_v2_summary.ts b/sdk/node/src/generate/account/subaccount/model_get_futures_sub_account_list_v2_summary.ts index 124813ff..93dfd417 100644 --- a/sdk/node/src/generate/account/subaccount/model_get_futures_sub_account_list_v2_summary.ts +++ b/sdk/node/src/generate/account/subaccount/model_get_futures_sub_account_list_v2_summary.ts @@ -10,7 +10,7 @@ export class GetFuturesSubAccountListV2Summary implements Serializable { accountEquityTotal: number; /** - * Total unrealisedPNL + * Total unrealizedPNL */ unrealisedPNLTotal: number; @@ -35,7 +35,7 @@ export class GetFuturesSubAccountListV2Summary implements Serializable { frozenFundsTotal: number; /** - * total available balance + * Total available balance */ availableBalanceTotal: number; diff --git a/sdk/node/src/generate/account/subaccount/model_get_spot_sub_account_detail_req.ts b/sdk/node/src/generate/account/subaccount/model_get_spot_sub_account_detail_req.ts index 7ab15f3f..3a5da5b1 100644 --- a/sdk/node/src/generate/account/subaccount/model_get_spot_sub_account_detail_req.ts +++ b/sdk/node/src/generate/account/subaccount/model_get_spot_sub_account_detail_req.ts @@ -12,9 +12,19 @@ export class GetSpotSubAccountDetailReq implements Serializable { subUserId?: string; /** - * false: do not display the currency which asset is 0, true: display all currency + * False: Do not display currencies with 0 assets; True: display all currencies */ - includeBaseAmount?: boolean; + includeBaseAmount?: boolean = false; + + /** + * Specify the currency used to convert assets + */ + baseCurrency?: string; + + /** + * The currency balance specified must be greater than or equal to the amount + */ + baseAmount?: string; /** * Private constructor, please use the corresponding static methods to construct the object. @@ -37,13 +47,27 @@ export class GetSpotSubAccountDetailReq implements Serializable { */ subUserId?: string; /** - * false: do not display the currency which asset is 0, true: display all currency + * False: Do not display currencies with 0 assets; True: display all currencies */ includeBaseAmount?: boolean; + /** + * Specify the currency used to convert assets + */ + baseCurrency?: string; + /** + * The currency balance specified must be greater than or equal to the amount + */ + baseAmount?: string; }): GetSpotSubAccountDetailReq { let obj = new GetSpotSubAccountDetailReq(); obj.subUserId = data.subUserId; - obj.includeBaseAmount = data.includeBaseAmount; + if (data.includeBaseAmount) { + obj.includeBaseAmount = data.includeBaseAmount; + } else { + obj.includeBaseAmount = false; + } + obj.baseCurrency = data.baseCurrency; + obj.baseAmount = data.baseAmount; return obj; } @@ -80,13 +104,29 @@ export class GetSpotSubAccountDetailReqBuilder { } /** - * false: do not display the currency which asset is 0, true: display all currency + * False: Do not display currencies with 0 assets; True: display all currencies */ setIncludeBaseAmount(value: boolean): GetSpotSubAccountDetailReqBuilder { this.obj.includeBaseAmount = value; return this; } + /** + * Specify the currency used to convert assets + */ + setBaseCurrency(value: string): GetSpotSubAccountDetailReqBuilder { + this.obj.baseCurrency = value; + return this; + } + + /** + * The currency balance specified must be greater than or equal to the amount + */ + setBaseAmount(value: string): GetSpotSubAccountDetailReqBuilder { + this.obj.baseAmount = value; + return this; + } + /** * Get the final object. */ diff --git a/sdk/node/src/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_items.ts b/sdk/node/src/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_items.ts index 92f41325..8bedaf67 100644 --- a/sdk/node/src/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_items.ts +++ b/sdk/node/src/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_items.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetSpotSubAccountsSummaryV2Items implements Serializable { /** - * Sub-account User Id + * Sub-account User ID */ userId: string; @@ -35,7 +35,7 @@ export class GetSpotSubAccountsSummaryV2Items implements Serializable { access: string; /** - * Time of the event + * Time of event */ createdAt: number; @@ -45,12 +45,12 @@ export class GetSpotSubAccountsSummaryV2Items implements Serializable { remarks: string; /** - * Subaccount Permissions + * Sub-account Permissions */ tradeTypes: Array; /** - * Subaccount active permissions,If do not have the corresponding permissions, need to log in to the sub-account and go to the corresponding web page to activate + * Sub-account active permissions: If you do not have the corresponding permissions, you must log in to the sub-account and go to the corresponding web page to activate. */ openedTradeTypes: Array; @@ -119,11 +119,11 @@ export namespace GetSpotSubAccountsSummaryV2Items { } export enum TypeEnum { /** - * Normal subaccount + * Normal sub-account */ NORMAL = 0, /** - * Robot subaccount + * Robot sub-account */ ROBOT = 1, /** @@ -131,7 +131,7 @@ export namespace GetSpotSubAccountsSummaryV2Items { */ NOVICE = 2, /** - * Asset management subaccount + * Asset management sub-account */ HOSTED = 5, } diff --git a/sdk/node/src/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_resp.ts b/sdk/node/src/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_resp.ts index 075e02e8..0ca9a70e 100644 --- a/sdk/node/src/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_resp.ts +++ b/sdk/node/src/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_resp.ts @@ -22,7 +22,7 @@ export class GetSpotSubAccountsSummaryV2Resp implements Response { totalNum: number; /** - * Total number of page + * Total number of pages */ totalPage: number; diff --git a/sdk/node/src/generate/account/subaccount/model_modify_sub_account_api_req.ts b/sdk/node/src/generate/account/subaccount/model_modify_sub_account_api_req.ts index c81a88ef..3b08c93a 100644 --- a/sdk/node/src/generate/account/subaccount/model_modify_sub_account_api_req.ts +++ b/sdk/node/src/generate/account/subaccount/model_modify_sub_account_api_req.ts @@ -5,22 +5,22 @@ import { Serializable } from '@internal/interfaces/serializable'; export class ModifySubAccountApiReq implements Serializable { /** - * Password(Must contain 7-32 characters. Cannot contain any spaces.) + * Password (Must contain 7–32 characters. Cannot contain any spaces.) */ passphrase: string; /** - * [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") + * [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") */ permission?: string = 'General'; /** - * IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) + * IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) */ ipWhitelist?: string; /** - * API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 + * API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 */ expire?: ModifySubAccountApiReq.ExpireEnum = ModifySubAccountApiReq.ExpireEnum._1; @@ -30,7 +30,7 @@ export class ModifySubAccountApiReq implements Serializable { subName: string; /** - * API-Key(Sub-account APIKey) + * API-Key (Sub-account APIKey) */ apiKey: string; @@ -58,19 +58,19 @@ export class ModifySubAccountApiReq implements Serializable { */ static create(data: { /** - * Password(Must contain 7-32 characters. Cannot contain any spaces.) + * Password (Must contain 7–32 characters. Cannot contain any spaces.) */ passphrase: string; /** - * [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") + * [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") */ permission?: string; /** - * IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) + * IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) */ ipWhitelist?: string; /** - * API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 + * API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 */ expire?: ModifySubAccountApiReq.ExpireEnum; /** @@ -78,7 +78,7 @@ export class ModifySubAccountApiReq implements Serializable { */ subName: string; /** - * API-Key(Sub-account APIKey) + * API-Key (Sub-account APIKey) */ apiKey: string; }): ModifySubAccountApiReq { @@ -150,7 +150,7 @@ export class ModifySubAccountApiReqBuilder { this.obj = obj; } /** - * Password(Must contain 7-32 characters. Cannot contain any spaces.) + * Password (Must contain 7–32 characters. Cannot contain any spaces.) */ setPassphrase(value: string): ModifySubAccountApiReqBuilder { this.obj.passphrase = value; @@ -158,7 +158,7 @@ export class ModifySubAccountApiReqBuilder { } /** - * [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") + * [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") */ setPermission(value: string): ModifySubAccountApiReqBuilder { this.obj.permission = value; @@ -166,7 +166,7 @@ export class ModifySubAccountApiReqBuilder { } /** - * IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) + * IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) */ setIpWhitelist(value: string): ModifySubAccountApiReqBuilder { this.obj.ipWhitelist = value; @@ -174,7 +174,7 @@ export class ModifySubAccountApiReqBuilder { } /** - * API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 + * API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 */ setExpire(value: ModifySubAccountApiReq.ExpireEnum): ModifySubAccountApiReqBuilder { this.obj.expire = value; @@ -190,7 +190,7 @@ export class ModifySubAccountApiReqBuilder { } /** - * API-Key(Sub-account APIKey) + * API-Key (Sub-account APIKey) */ setApiKey(value: string): ModifySubAccountApiReqBuilder { this.obj.apiKey = value; diff --git a/sdk/node/src/generate/account/transfer/api_transfer.template b/sdk/node/src/generate/account/transfer/api_transfer.template index 8f776289..964ced24 100644 --- a/sdk/node/src/generate/account/transfer/api_transfer.template +++ b/sdk/node/src/generate/account/transfer/api_transfer.template @@ -44,11 +44,11 @@ describe('Auto Test', ()=> { test('subAccountTransfer request test', ()=> { /** * subAccountTransfer - * SubAccount Transfer + * Sub-account Transfer * /api/v2/accounts/sub-transfer */ let builder = SubAccountTransferReq.builder(); - builder.setClientOid(?).setCurrency(?).setAmount(?).setDirection(?).setAccountType(?).setSubAccountType(?).setSubUserId(?); + builder.setClientOid(?).setCurrency(?).setAmount(?).setDirection(?).setAccountType(?).setSubAccountType(?).setSubUserId(?).setTag(?).setSubTag(?); let req = builder.build(); let resp = api.subAccountTransfer(req); return resp.then(result => { @@ -60,7 +60,7 @@ describe('Auto Test', ()=> { test('innerTransfer request test', ()=> { /** * innerTransfer - * Inner Transfer + * Internal Transfer * /api/v2/accounts/inner-transfer */ let builder = InnerTransferReq.builder(); @@ -73,6 +73,26 @@ describe('Auto Test', ()=> { }); }) + test('getFuturesAccountTransferOutLedger request test', ()=> { + /** + * getFuturesAccountTransferOutLedger + * Get Futures Account Transfer Out Ledger + * /api/v1/transfer-list + */ + let builder = GetFuturesAccountTransferOutLedgerReq.builder(); + builder.setCurrency(?).setType(?).setTag(?).setStartAt(?).setEndAt(?).setCurrentPage(?).setPageSize(?); + let req = builder.build(); + let resp = api.getFuturesAccountTransferOutLedger(req); + return resp.then(result => { + expect(result.currentPage).toEqual(expect.anything()); + expect(result.pageSize).toEqual(expect.anything()); + expect(result.totalNum).toEqual(expect.anything()); + expect(result.totalPage).toEqual(expect.anything()); + expect(result.items).toEqual(expect.anything()); + console.log(resp); + }); + }) + test('futuresAccountTransferOut request test', ()=> { /** * futuresAccountTransferOut @@ -121,24 +141,4 @@ describe('Auto Test', ()=> { }); }) - test('getFuturesAccountTransferOutLedger request test', ()=> { - /** - * getFuturesAccountTransferOutLedger - * Get Futures Account Transfer Out Ledger - * /api/v1/transfer-list - */ - let builder = GetFuturesAccountTransferOutLedgerReq.builder(); - builder.setCurrency(?).setType(?).setTag(?).setStartAt(?).setEndAt(?).setCurrentPage(?).setPageSize(?); - let req = builder.build(); - let resp = api.getFuturesAccountTransferOutLedger(req); - return resp.then(result => { - expect(result.currentPage).toEqual(expect.anything()); - expect(result.pageSize).toEqual(expect.anything()); - expect(result.totalNum).toEqual(expect.anything()); - expect(result.totalPage).toEqual(expect.anything()); - expect(result.items).toEqual(expect.anything()); - console.log(resp); - }); - }) - }) \ No newline at end of file diff --git a/sdk/node/src/generate/account/transfer/api_transfer.test.ts b/sdk/node/src/generate/account/transfer/api_transfer.test.ts index c6fa7411..7f5a18a9 100644 --- a/sdk/node/src/generate/account/transfer/api_transfer.test.ts +++ b/sdk/node/src/generate/account/transfer/api_transfer.test.ts @@ -81,7 +81,7 @@ describe('Auto Test', () => { test('subAccountTransfer request test', () => { /** * subAccountTransfer - * SubAccount Transfer + * Sub-account Transfer * /api/v2/accounts/sub-transfer */ let data = @@ -96,7 +96,7 @@ describe('Auto Test', () => { test('subAccountTransfer response test', () => { /** * subAccountTransfer - * SubAccount Transfer + * Sub-account Transfer * /api/v2/accounts/sub-transfer */ let data = '{"code":"200000","data":{"orderId":"670be6b0b1b9080007040a9b"}}'; @@ -112,7 +112,7 @@ describe('Auto Test', () => { test('innerTransfer request test', () => { /** * innerTransfer - * Inner Transfer + * Internal Transfer * /api/v2/accounts/inner-transfer */ let data = @@ -127,7 +127,7 @@ describe('Auto Test', () => { test('innerTransfer response test', () => { /** * innerTransfer - * Inner Transfer + * Internal Transfer * /api/v2/accounts/inner-transfer */ let data = '{"code":"200000","data":{"orderId":"670beb3482a1bb0007dec644"}}'; @@ -140,6 +140,38 @@ describe('Auto Test', () => { console.log(resp); } }); + test('getFuturesAccountTransferOutLedger request test', () => { + /** + * getFuturesAccountTransferOutLedger + * Get Futures Account Transfer Out Ledger + * /api/v1/transfer-list + */ + let data = + '{"currency": "XBT", "type": "MAIN", "tag": ["mock_a", "mock_b"], "startAt": 1728663338000, "endAt": 1728692138000, "currentPage": 1, "pageSize": 50}'; + let req = GetFuturesAccountTransferOutLedgerReq.fromJson(data); + expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( + false, + ); + console.log(req); + }); + + test('getFuturesAccountTransferOutLedger response test', () => { + /** + * getFuturesAccountTransferOutLedger + * Get Futures Account Transfer Out Ledger + * /api/v1/transfer-list + */ + let data = + '{"code":"200000","data":{"currentPage":1,"pageSize":50,"totalNum":1,"totalPage":1,"items":[{"applyId":"670bf84c577f6c00017a1c48","currency":"USDT","recRemark":"","recSystem":"KUCOIN","status":"SUCCESS","amount":"0.01","reason":"","offset":1519769124134806,"createdAt":1728837708000,"remark":""}]}}'; + let commonResp = RestResponse.fromJson(data); + let resp = GetFuturesAccountTransferOutLedgerResp.fromObject(commonResp.data); + if (commonResp.data !== null) { + expect( + Object.values(resp).every((value) => value === null || value === undefined), + ).toBe(false); + console.log(resp); + } + }); test('futuresAccountTransferOut request test', () => { /** * futuresAccountTransferOut @@ -201,36 +233,4 @@ describe('Auto Test', () => { console.log(resp); } }); - test('getFuturesAccountTransferOutLedger request test', () => { - /** - * getFuturesAccountTransferOutLedger - * Get Futures Account Transfer Out Ledger - * /api/v1/transfer-list - */ - let data = - '{"currency": "XBT", "type": "MAIN", "tag": ["mock_a", "mock_b"], "startAt": 1728663338000, "endAt": 1728692138000, "currentPage": 1, "pageSize": 50}'; - let req = GetFuturesAccountTransferOutLedgerReq.fromJson(data); - expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( - false, - ); - console.log(req); - }); - - test('getFuturesAccountTransferOutLedger response test', () => { - /** - * getFuturesAccountTransferOutLedger - * Get Futures Account Transfer Out Ledger - * /api/v1/transfer-list - */ - let data = - '{"code":"200000","data":{"currentPage":1,"pageSize":50,"totalNum":1,"totalPage":1,"items":[{"applyId":"670bf84c577f6c00017a1c48","currency":"USDT","recRemark":"","recSystem":"KUCOIN","status":"SUCCESS","amount":"0.01","reason":"","offset":1519769124134806,"createdAt":1728837708000,"remark":""}]}}'; - let commonResp = RestResponse.fromJson(data); - let resp = GetFuturesAccountTransferOutLedgerResp.fromObject(commonResp.data); - if (commonResp.data !== null) { - expect( - Object.values(resp).every((value) => value === null || value === undefined), - ).toBe(false); - console.log(resp); - } - }); }); diff --git a/sdk/node/src/generate/account/transfer/api_transfer.ts b/sdk/node/src/generate/account/transfer/api_transfer.ts index 9fd96335..667dd53e 100644 --- a/sdk/node/src/generate/account/transfer/api_transfer.ts +++ b/sdk/node/src/generate/account/transfer/api_transfer.ts @@ -21,82 +21,101 @@ export interface TransferAPI { * getTransferQuotas Get Transfer Quotas * Description: This endpoint returns the transferable balance of a specified account. * Documentation: https://www.kucoin.com/docs-new/api-3470148 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ getTransferQuotas(req: GetTransferQuotasReq): Promise; /** * flexTransfer Flex Transfer - * Description: This interface can be used for transfers between master and sub accounts and inner transfers + * Description: This interface can be used for transfers between master- and sub-accounts and transfers * Documentation: https://www.kucoin.com/docs-new/api-3470147 - * +---------------------+---------------+ - * | Extra API Info | Value | - * +---------------------+---------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FLEXTRANSFERS | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 4 | - * +---------------------+---------------+ + * +-----------------------+---------------+ + * | Extra API Info | Value | + * +-----------------------+---------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FLEXTRANSFERS | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 4 | + * +-----------------------+---------------+ */ flexTransfer(req: FlexTransferReq): Promise; /** * @deprecated - * subAccountTransfer SubAccount Transfer + * subAccountTransfer Sub-account Transfer * Description: Funds in the main account, trading account and margin account of a Master Account can be transferred to the main account, trading account, futures account and margin account of its Sub-Account. The futures account of both the Master Account and Sub-Account can only accept funds transferred in from the main account, trading account and margin account and cannot transfer out to these accounts. * Documentation: https://www.kucoin.com/docs-new/api-3470301 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 30 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 30 | + * +-----------------------+------------+ */ subAccountTransfer(req: SubAccountTransferReq): Promise; /** * @deprecated - * innerTransfer Inner Transfer - * Description: This API endpoint can be used to transfer funds between accounts internally. Users can transfer funds between their account free of charge. + * innerTransfer Internal Transfer + * Description: This API endpoint can be used to transfer funds between accounts internally. Users can transfer funds between their accounts free of charge. * Documentation: https://www.kucoin.com/docs-new/api-3470302 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 10 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+------------+ */ innerTransfer(req: InnerTransferReq): Promise; + /** + * @deprecated + * getFuturesAccountTransferOutLedger Get Futures Account Transfer Out Ledger + * Description: Futures account transfer out ledgers can be obtained at this endpoint. + * Documentation: https://www.kucoin.com/docs-new/api-3470307 + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ + */ + getFuturesAccountTransferOutLedger( + req: GetFuturesAccountTransferOutLedgerReq, + ): Promise; + /** * @deprecated * futuresAccountTransferOut Futures Account Transfer Out * Description: The amount to be transferred will be deducted from the KuCoin Futures Account. Please ensure that you have sufficient funds in your KuCoin Futures Account, or the transfer will fail. * Documentation: https://www.kucoin.com/docs-new/api-3470303 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ futuresAccountTransferOut( req: FuturesAccountTransferOutReq, @@ -105,40 +124,21 @@ export interface TransferAPI { /** * @deprecated * futuresAccountTransferIn Futures Account Transfer In - * Description: The amount to be transferred will be deducted from the payAccount. Please ensure that you have sufficient funds in your payAccount Account, or the transfer will fail. + * Description: The amount to be transferred will be deducted from the payAccount. Please ensure that you have sufficient funds in your payAccount account, or the transfer will fail. * Documentation: https://www.kucoin.com/docs-new/api-3470304 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ futuresAccountTransferIn( req: FuturesAccountTransferInReq, ): Promise; - - /** - * @deprecated - * getFuturesAccountTransferOutLedger Get Futures Account Transfer Out Ledger - * Description: This endpoint can get futures account transfer out ledger - * Documentation: https://www.kucoin.com/docs-new/api-3470307 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ - */ - getFuturesAccountTransferOutLedger( - req: GetFuturesAccountTransferOutLedgerReq, - ): Promise; } export class TransferAPIImpl implements TransferAPI { @@ -192,6 +192,20 @@ export class TransferAPIImpl implements TransferAPI { ); } + getFuturesAccountTransferOutLedger( + req: GetFuturesAccountTransferOutLedgerReq, + ): Promise { + return this.transport.call( + 'futures', + false, + 'GET', + '/api/v1/transfer-list', + req, + GetFuturesAccountTransferOutLedgerResp, + false, + ); + } + futuresAccountTransferOut( req: FuturesAccountTransferOutReq, ): Promise { @@ -219,18 +233,4 @@ export class TransferAPIImpl implements TransferAPI { false, ); } - - getFuturesAccountTransferOutLedger( - req: GetFuturesAccountTransferOutLedgerReq, - ): Promise { - return this.transport.call( - 'futures', - false, - 'GET', - '/api/v1/transfer-list', - req, - GetFuturesAccountTransferOutLedgerResp, - false, - ); - } } diff --git a/sdk/node/src/generate/account/transfer/model_flex_transfer_req.ts b/sdk/node/src/generate/account/transfer/model_flex_transfer_req.ts index 708a7b1c..e294fa8f 100644 --- a/sdk/node/src/generate/account/transfer/model_flex_transfer_req.ts +++ b/sdk/node/src/generate/account/transfer/model_flex_transfer_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class FlexTransferReq implements Serializable { /** - * Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + * Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits */ clientOid: string; @@ -15,42 +15,42 @@ export class FlexTransferReq implements Serializable { currency: string; /** - * Transfer amount, the amount is a positive integer multiple of the currency precision. + * Transfer amount: The amount is a positive integer multiple of the currency precision. */ amount: string; /** - * Transfer out UserId, This is required when transferring sub-account to master-account. It is optional for internal transfers. + * Transfer out UserId: This is required when transferring from sub-account to master-account. It is optional for internal transfers. */ fromUserId?: string; /** - * Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 + * Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ fromAccountType: FlexTransferReq.FromAccountTypeEnum; /** - * Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT + * Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT */ fromAccountTag?: string; /** - * Transfer type:INTERNAL(Transfer within account)、PARENT_TO_SUB(Transfer from master-account to sub-account),SUB_TO_PARENT(Transfer from sub-account to master-account) + * Transfer type: INTERNAL (Transfer within account), PARENT_TO_SUB (Transfer from master-account to sub-account), SUB_TO_PARENT (Transfer from sub-account to master-account) */ type: FlexTransferReq.TypeEnum; /** - * Transfer in UserId, This is required when transferring master-account to sub-account. It is optional for internal transfers. + * Transfer in UserId: This is required when transferring master-account to sub-account. It is optional for internal transfers. */ toUserId?: string; /** - * Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 + * Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ toAccountType: FlexTransferReq.ToAccountTypeEnum; /** - * Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT + * Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT */ toAccountTag?: string; @@ -84,7 +84,7 @@ export class FlexTransferReq implements Serializable { */ static create(data: { /** - * Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + * Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits */ clientOid: string; /** @@ -92,35 +92,35 @@ export class FlexTransferReq implements Serializable { */ currency: string; /** - * Transfer amount, the amount is a positive integer multiple of the currency precision. + * Transfer amount: The amount is a positive integer multiple of the currency precision. */ amount: string; /** - * Transfer out UserId, This is required when transferring sub-account to master-account. It is optional for internal transfers. + * Transfer out UserId: This is required when transferring from sub-account to master-account. It is optional for internal transfers. */ fromUserId?: string; /** - * Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 + * Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ fromAccountType: FlexTransferReq.FromAccountTypeEnum; /** - * Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT + * Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT */ fromAccountTag?: string; /** - * Transfer type:INTERNAL(Transfer within account)、PARENT_TO_SUB(Transfer from master-account to sub-account),SUB_TO_PARENT(Transfer from sub-account to master-account) + * Transfer type: INTERNAL (Transfer within account), PARENT_TO_SUB (Transfer from master-account to sub-account), SUB_TO_PARENT (Transfer from sub-account to master-account) */ type: FlexTransferReq.TypeEnum; /** - * Transfer in UserId, This is required when transferring master-account to sub-account. It is optional for internal transfers. + * Transfer in UserId: This is required when transferring master-account to sub-account. It is optional for internal transfers. */ toUserId?: string; /** - * Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 + * Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ toAccountType: FlexTransferReq.ToAccountTypeEnum; /** - * Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT + * Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT */ toAccountTag?: string; }): FlexTransferReq { @@ -248,7 +248,7 @@ export class FlexTransferReqBuilder { this.obj = obj; } /** - * Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + * Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits */ setClientOid(value: string): FlexTransferReqBuilder { this.obj.clientOid = value; @@ -264,7 +264,7 @@ export class FlexTransferReqBuilder { } /** - * Transfer amount, the amount is a positive integer multiple of the currency precision. + * Transfer amount: The amount is a positive integer multiple of the currency precision. */ setAmount(value: string): FlexTransferReqBuilder { this.obj.amount = value; @@ -272,7 +272,7 @@ export class FlexTransferReqBuilder { } /** - * Transfer out UserId, This is required when transferring sub-account to master-account. It is optional for internal transfers. + * Transfer out UserId: This is required when transferring from sub-account to master-account. It is optional for internal transfers. */ setFromUserId(value: string): FlexTransferReqBuilder { this.obj.fromUserId = value; @@ -280,7 +280,7 @@ export class FlexTransferReqBuilder { } /** - * Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 + * Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ setFromAccountType(value: FlexTransferReq.FromAccountTypeEnum): FlexTransferReqBuilder { this.obj.fromAccountType = value; @@ -288,7 +288,7 @@ export class FlexTransferReqBuilder { } /** - * Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT + * Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT */ setFromAccountTag(value: string): FlexTransferReqBuilder { this.obj.fromAccountTag = value; @@ -296,7 +296,7 @@ export class FlexTransferReqBuilder { } /** - * Transfer type:INTERNAL(Transfer within account)、PARENT_TO_SUB(Transfer from master-account to sub-account),SUB_TO_PARENT(Transfer from sub-account to master-account) + * Transfer type: INTERNAL (Transfer within account), PARENT_TO_SUB (Transfer from master-account to sub-account), SUB_TO_PARENT (Transfer from sub-account to master-account) */ setType(value: FlexTransferReq.TypeEnum): FlexTransferReqBuilder { this.obj.type = value; @@ -304,7 +304,7 @@ export class FlexTransferReqBuilder { } /** - * Transfer in UserId, This is required when transferring master-account to sub-account. It is optional for internal transfers. + * Transfer in UserId: This is required when transferring master-account to sub-account. It is optional for internal transfers. */ setToUserId(value: string): FlexTransferReqBuilder { this.obj.toUserId = value; @@ -312,7 +312,7 @@ export class FlexTransferReqBuilder { } /** - * Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 + * Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ setToAccountType(value: FlexTransferReq.ToAccountTypeEnum): FlexTransferReqBuilder { this.obj.toAccountType = value; @@ -320,7 +320,7 @@ export class FlexTransferReqBuilder { } /** - * Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT + * Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT */ setToAccountTag(value: string): FlexTransferReqBuilder { this.obj.toAccountTag = value; diff --git a/sdk/node/src/generate/account/transfer/model_futures_account_transfer_in_req.ts b/sdk/node/src/generate/account/transfer/model_futures_account_transfer_in_req.ts index 82cab53d..4f553b14 100644 --- a/sdk/node/src/generate/account/transfer/model_futures_account_transfer_in_req.ts +++ b/sdk/node/src/generate/account/transfer/model_futures_account_transfer_in_req.ts @@ -5,17 +5,17 @@ import { Serializable } from '@internal/interfaces/serializable'; export class FuturesAccountTransferInReq implements Serializable { /** - * Currency, including XBT,USDT... + * Currency, including XBT, USDT... */ currency: string; /** - * Amount to be transfered in + * Amount to be transferred in */ amount: number; /** - * Payment account type, including MAIN,TRADE + * Payment account type, including MAIN, TRADE */ payAccountType: FuturesAccountTransferInReq.PayAccountTypeEnum; @@ -43,15 +43,15 @@ export class FuturesAccountTransferInReq implements Serializable { */ static create(data: { /** - * Currency, including XBT,USDT... + * Currency, including XBT, USDT... */ currency: string; /** - * Amount to be transfered in + * Amount to be transferred in */ amount: number; /** - * Payment account type, including MAIN,TRADE + * Payment account type, including MAIN, TRADE */ payAccountType: FuturesAccountTransferInReq.PayAccountTypeEnum; }): FuturesAccountTransferInReq { @@ -100,7 +100,7 @@ export class FuturesAccountTransferInReqBuilder { this.obj = obj; } /** - * Currency, including XBT,USDT... + * Currency, including XBT, USDT... */ setCurrency(value: string): FuturesAccountTransferInReqBuilder { this.obj.currency = value; @@ -108,7 +108,7 @@ export class FuturesAccountTransferInReqBuilder { } /** - * Amount to be transfered in + * Amount to be transferred in */ setAmount(value: number): FuturesAccountTransferInReqBuilder { this.obj.amount = value; @@ -116,7 +116,7 @@ export class FuturesAccountTransferInReqBuilder { } /** - * Payment account type, including MAIN,TRADE + * Payment account type, including MAIN, TRADE */ setPayAccountType( value: FuturesAccountTransferInReq.PayAccountTypeEnum, diff --git a/sdk/node/src/generate/account/transfer/model_futures_account_transfer_out_req.ts b/sdk/node/src/generate/account/transfer/model_futures_account_transfer_out_req.ts index 6034ca19..8afe0ef3 100644 --- a/sdk/node/src/generate/account/transfer/model_futures_account_transfer_out_req.ts +++ b/sdk/node/src/generate/account/transfer/model_futures_account_transfer_out_req.ts @@ -5,17 +5,17 @@ import { Serializable } from '@internal/interfaces/serializable'; export class FuturesAccountTransferOutReq implements Serializable { /** - * Currency, including XBT,USDT... + * Currency, including XBT, USDT... */ currency: string; /** - * Amount to be transfered out, the maximum cannot exceed 1000000000 + * Amount to be transferred out; cannot exceed 1000000000 */ amount: number; /** - * Receive account type, including MAIN,TRADE + * Receive account type, including MAIN, TRADE */ recAccountType: FuturesAccountTransferOutReq.RecAccountTypeEnum; @@ -43,15 +43,15 @@ export class FuturesAccountTransferOutReq implements Serializable { */ static create(data: { /** - * Currency, including XBT,USDT... + * Currency, including XBT, USDT... */ currency: string; /** - * Amount to be transfered out, the maximum cannot exceed 1000000000 + * Amount to be transferred out; cannot exceed 1000000000 */ amount: number; /** - * Receive account type, including MAIN,TRADE + * Receive account type, including MAIN, TRADE */ recAccountType: FuturesAccountTransferOutReq.RecAccountTypeEnum; }): FuturesAccountTransferOutReq { @@ -100,7 +100,7 @@ export class FuturesAccountTransferOutReqBuilder { this.obj = obj; } /** - * Currency, including XBT,USDT... + * Currency, including XBT, USDT... */ setCurrency(value: string): FuturesAccountTransferOutReqBuilder { this.obj.currency = value; @@ -108,7 +108,7 @@ export class FuturesAccountTransferOutReqBuilder { } /** - * Amount to be transfered out, the maximum cannot exceed 1000000000 + * Amount to be transferred out; cannot exceed 1000000000 */ setAmount(value: number): FuturesAccountTransferOutReqBuilder { this.obj.amount = value; @@ -116,7 +116,7 @@ export class FuturesAccountTransferOutReqBuilder { } /** - * Receive account type, including MAIN,TRADE + * Receive account type, including MAIN, TRADE */ setRecAccountType( value: FuturesAccountTransferOutReq.RecAccountTypeEnum, diff --git a/sdk/node/src/generate/account/transfer/model_futures_account_transfer_out_resp.ts b/sdk/node/src/generate/account/transfer/model_futures_account_transfer_out_resp.ts index bf28faa9..69b8e043 100644 --- a/sdk/node/src/generate/account/transfer/model_futures_account_transfer_out_resp.ts +++ b/sdk/node/src/generate/account/transfer/model_futures_account_transfer_out_resp.ts @@ -61,7 +61,7 @@ export class FuturesAccountTransferOutResp implements Response { currency: string; /** - * Transfer amout + * Transfer amount */ amount: string; diff --git a/sdk/node/src/generate/account/transfer/model_get_futures_account_transfer_out_ledger_items.ts b/sdk/node/src/generate/account/transfer/model_get_futures_account_transfer_out_ledger_items.ts index 78950dce..6e28dd38 100644 --- a/sdk/node/src/generate/account/transfer/model_get_futures_account_transfer_out_ledger_items.ts +++ b/sdk/node/src/generate/account/transfer/model_get_futures_account_transfer_out_ledger_items.ts @@ -35,7 +35,7 @@ export class GetFuturesAccountTransferOutLedgerItems implements Serializable { amount?: string; /** - * Reason caused the failure + * Reason for the failure */ reason?: string; diff --git a/sdk/node/src/generate/account/transfer/model_get_futures_account_transfer_out_ledger_req.ts b/sdk/node/src/generate/account/transfer/model_get_futures_account_transfer_out_ledger_req.ts index d9e35377..72f0aec6 100644 --- a/sdk/node/src/generate/account/transfer/model_get_futures_account_transfer_out_ledger_req.ts +++ b/sdk/node/src/generate/account/transfer/model_get_futures_account_transfer_out_ledger_req.ts @@ -20,22 +20,22 @@ export class GetFuturesAccountTransferOutLedgerReq implements Serializable { tag?: Array; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** - * Current request page, The default currentPage is 1 + * Current request page. The default currentPage is 1 */ currentPage?: number = 1; /** - * pageSize, The default pageSize is 50 + * pageSize; the default pageSize is 50 */ pageSize?: number = 50; @@ -70,19 +70,19 @@ export class GetFuturesAccountTransferOutLedgerReq implements Serializable { */ tag?: Array; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** - * Current request page, The default currentPage is 1 + * Current request page. The default currentPage is 1 */ currentPage?: number; /** - * pageSize, The default pageSize is 50 + * pageSize; the default pageSize is 50 */ pageSize?: number; }): GetFuturesAccountTransferOutLedgerReq { @@ -177,7 +177,7 @@ export class GetFuturesAccountTransferOutLedgerReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetFuturesAccountTransferOutLedgerReqBuilder { this.obj.startAt = value; @@ -185,7 +185,7 @@ export class GetFuturesAccountTransferOutLedgerReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetFuturesAccountTransferOutLedgerReqBuilder { this.obj.endAt = value; @@ -193,7 +193,7 @@ export class GetFuturesAccountTransferOutLedgerReqBuilder { } /** - * Current request page, The default currentPage is 1 + * Current request page. The default currentPage is 1 */ setCurrentPage(value: number): GetFuturesAccountTransferOutLedgerReqBuilder { this.obj.currentPage = value; @@ -201,7 +201,7 @@ export class GetFuturesAccountTransferOutLedgerReqBuilder { } /** - * pageSize, The default pageSize is 50 + * pageSize; the default pageSize is 50 */ setPageSize(value: number): GetFuturesAccountTransferOutLedgerReqBuilder { this.obj.pageSize = value; diff --git a/sdk/node/src/generate/account/transfer/model_get_futures_account_transfer_out_ledger_resp.ts b/sdk/node/src/generate/account/transfer/model_get_futures_account_transfer_out_ledger_resp.ts index 729231bd..e7118afa 100644 --- a/sdk/node/src/generate/account/transfer/model_get_futures_account_transfer_out_ledger_resp.ts +++ b/sdk/node/src/generate/account/transfer/model_get_futures_account_transfer_out_ledger_resp.ts @@ -22,7 +22,7 @@ export class GetFuturesAccountTransferOutLedgerResp implements Response'TRADE', /** - * Cross margin account + * Spot cross margin account */ MARGIN = 'MARGIN', /** - * Isolated margin account + * Spot isolated margin account */ ISOLATED = 'ISOLATED', /** * Option account */ OPTION = 'OPTION', + /** + * Spot cross margin HF account + */ + MARGIN_V2 = 'MARGIN_V2', + /** + * Spot isolated margin HF account + */ + ISOLATED_V2 = 'ISOLATED_V2', } } @@ -117,7 +125,7 @@ export class GetTransferQuotasReqBuilder { } /** - * The account type:MAIN、TRADE、MARGIN、ISOLATED + * The account type:MAIN, TRADE, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ setType(value: GetTransferQuotasReq.TypeEnum): GetTransferQuotasReqBuilder { this.obj.type = value; @@ -125,7 +133,7 @@ export class GetTransferQuotasReqBuilder { } /** - * Trading pair, required when the account type is ISOLATED; other types are not passed, e.g.: BTC-USDT + * Trading pair required when the account type is ISOLATED; other types do not pass, e.g.: BTC-USDT */ setTag(value: string): GetTransferQuotasReqBuilder { this.obj.tag = value; diff --git a/sdk/node/src/generate/account/transfer/model_inner_transfer_req.ts b/sdk/node/src/generate/account/transfer/model_inner_transfer_req.ts index 4c18ca57..3ec8bd1a 100644 --- a/sdk/node/src/generate/account/transfer/model_inner_transfer_req.ts +++ b/sdk/node/src/generate/account/transfer/model_inner_transfer_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class InnerTransferReq implements Serializable { /** - * Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + * Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits */ clientOid: string; @@ -15,7 +15,7 @@ export class InnerTransferReq implements Serializable { currency: string; /** - * Transfer amount, the amount is a positive integer multiple of the currency precision. + * Transfer amount: The amount is a positive integer multiple of the currency precision. */ amount: string; @@ -67,7 +67,7 @@ export class InnerTransferReq implements Serializable { */ static create(data: { /** - * Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + * Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits */ clientOid: string; /** @@ -75,7 +75,7 @@ export class InnerTransferReq implements Serializable { */ currency: string; /** - * Transfer amount, the amount is a positive integer multiple of the currency precision. + * Transfer amount: The amount is a positive integer multiple of the currency precision. */ amount: string; /** @@ -194,7 +194,7 @@ export class InnerTransferReqBuilder { this.obj = obj; } /** - * Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + * Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits */ setClientOid(value: string): InnerTransferReqBuilder { this.obj.clientOid = value; @@ -210,7 +210,7 @@ export class InnerTransferReqBuilder { } /** - * Transfer amount, the amount is a positive integer multiple of the currency precision. + * Transfer amount: The amount is a positive integer multiple of the currency precision. */ setAmount(value: string): InnerTransferReqBuilder { this.obj.amount = value; diff --git a/sdk/node/src/generate/account/transfer/model_sub_account_transfer_req.ts b/sdk/node/src/generate/account/transfer/model_sub_account_transfer_req.ts index 0e9278fd..cb606bb2 100644 --- a/sdk/node/src/generate/account/transfer/model_sub_account_transfer_req.ts +++ b/sdk/node/src/generate/account/transfer/model_sub_account_transfer_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class SubAccountTransferReq implements Serializable { /** - * Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + * Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits */ clientOid: string; @@ -15,23 +15,23 @@ export class SubAccountTransferReq implements Serializable { currency: string; /** - * Transfer amount, the amount is a positive integer multiple of the currency precision. + * Transfer amount: The amount is a positive integer multiple of the currency precision. */ amount: string; /** - * OUT — the master user to sub user IN — the sub user to the master user. + * OUT — the master user to sub user IN — the sub user to the master user */ direction: SubAccountTransferReq.DirectionEnum; /** - * Account type:MAIN、TRADE、CONTRACT、MARGIN + * Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED */ accountType?: SubAccountTransferReq.AccountTypeEnum = SubAccountTransferReq.AccountTypeEnum.MAIN; /** - * Sub Account type:MAIN、TRADE、CONTRACT、MARGIN + * Sub-account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED */ subAccountType?: SubAccountTransferReq.SubAccountTypeEnum = SubAccountTransferReq.SubAccountTypeEnum.MAIN; @@ -41,6 +41,16 @@ export class SubAccountTransferReq implements Serializable { */ subUserId?: string; + /** + * Need to be defined if accountType=ISOLATED. + */ + tag?: string; + + /** + * Need to be defined if subAccountType=ISOLATED. + */ + subTag: string; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -53,6 +63,8 @@ export class SubAccountTransferReq implements Serializable { this.amount = null; // @ts-ignore this.direction = null; + // @ts-ignore + this.subTag = null; } /** * Creates a new instance of the `SubAccountTransferReq` class. @@ -67,7 +79,7 @@ export class SubAccountTransferReq implements Serializable { */ static create(data: { /** - * Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + * Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits */ clientOid: string; /** @@ -75,25 +87,33 @@ export class SubAccountTransferReq implements Serializable { */ currency: string; /** - * Transfer amount, the amount is a positive integer multiple of the currency precision. + * Transfer amount: The amount is a positive integer multiple of the currency precision. */ amount: string; /** - * OUT — the master user to sub user IN — the sub user to the master user. + * OUT — the master user to sub user IN — the sub user to the master user */ direction: SubAccountTransferReq.DirectionEnum; /** - * Account type:MAIN、TRADE、CONTRACT、MARGIN + * Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED */ accountType?: SubAccountTransferReq.AccountTypeEnum; /** - * Sub Account type:MAIN、TRADE、CONTRACT、MARGIN + * Sub-account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED */ subAccountType?: SubAccountTransferReq.SubAccountTypeEnum; /** * the user ID of a sub-account. */ subUserId?: string; + /** + * Need to be defined if accountType=ISOLATED. + */ + tag?: string; + /** + * Need to be defined if subAccountType=ISOLATED. + */ + subTag: string; }): SubAccountTransferReq { let obj = new SubAccountTransferReq(); obj.clientOid = data.clientOid; @@ -111,6 +131,8 @@ export class SubAccountTransferReq implements Serializable { obj.subAccountType = SubAccountTransferReq.SubAccountTypeEnum.MAIN; } obj.subUserId = data.subUserId; + obj.tag = data.tag; + obj.subTag = data.subTag; return obj; } @@ -192,7 +214,7 @@ export class SubAccountTransferReqBuilder { this.obj = obj; } /** - * Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + * Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits */ setClientOid(value: string): SubAccountTransferReqBuilder { this.obj.clientOid = value; @@ -208,7 +230,7 @@ export class SubAccountTransferReqBuilder { } /** - * Transfer amount, the amount is a positive integer multiple of the currency precision. + * Transfer amount: The amount is a positive integer multiple of the currency precision. */ setAmount(value: string): SubAccountTransferReqBuilder { this.obj.amount = value; @@ -216,7 +238,7 @@ export class SubAccountTransferReqBuilder { } /** - * OUT — the master user to sub user IN — the sub user to the master user. + * OUT — the master user to sub user IN — the sub user to the master user */ setDirection(value: SubAccountTransferReq.DirectionEnum): SubAccountTransferReqBuilder { this.obj.direction = value; @@ -224,7 +246,7 @@ export class SubAccountTransferReqBuilder { } /** - * Account type:MAIN、TRADE、CONTRACT、MARGIN + * Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED */ setAccountType(value: SubAccountTransferReq.AccountTypeEnum): SubAccountTransferReqBuilder { this.obj.accountType = value; @@ -232,7 +254,7 @@ export class SubAccountTransferReqBuilder { } /** - * Sub Account type:MAIN、TRADE、CONTRACT、MARGIN + * Sub-account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED */ setSubAccountType( value: SubAccountTransferReq.SubAccountTypeEnum, @@ -249,6 +271,22 @@ export class SubAccountTransferReqBuilder { return this; } + /** + * Need to be defined if accountType=ISOLATED. + */ + setTag(value: string): SubAccountTransferReqBuilder { + this.obj.tag = value; + return this; + } + + /** + * Need to be defined if subAccountType=ISOLATED. + */ + setSubTag(value: string): SubAccountTransferReqBuilder { + this.obj.subTag = value; + return this; + } + /** * Get the final object. */ diff --git a/sdk/node/src/generate/account/withdrawal/api_withdrawal.template b/sdk/node/src/generate/account/withdrawal/api_withdrawal.template index ea8f4053..811b0c60 100644 --- a/sdk/node/src/generate/account/withdrawal/api_withdrawal.template +++ b/sdk/node/src/generate/account/withdrawal/api_withdrawal.template @@ -39,7 +39,7 @@ describe('Auto Test', ()=> { test('withdrawalV3 request test', ()=> { /** * withdrawalV3 - * Withdraw(V3) + * Withdraw (V3) * /api/v3/withdrawals */ let builder = WithdrawalV3Req.builder(); diff --git a/sdk/node/src/generate/account/withdrawal/api_withdrawal.test.ts b/sdk/node/src/generate/account/withdrawal/api_withdrawal.test.ts index 5da114fa..f6bd81ff 100644 --- a/sdk/node/src/generate/account/withdrawal/api_withdrawal.test.ts +++ b/sdk/node/src/generate/account/withdrawal/api_withdrawal.test.ts @@ -47,7 +47,7 @@ describe('Auto Test', () => { test('withdrawalV3 request test', () => { /** * withdrawalV3 - * Withdraw(V3) + * Withdraw (V3) * /api/v3/withdrawals */ let data = @@ -62,7 +62,7 @@ describe('Auto Test', () => { test('withdrawalV3 response test', () => { /** * withdrawalV3 - * Withdraw(V3) + * Withdraw (V3) * /api/v3/withdrawals */ let data = '{"code":"200000","data":{"withdrawalId":"670deec84d64da0007d7c946"}}'; diff --git a/sdk/node/src/generate/account/withdrawal/api_withdrawal.ts b/sdk/node/src/generate/account/withdrawal/api_withdrawal.ts index 5bc33311..97523d5d 100644 --- a/sdk/node/src/generate/account/withdrawal/api_withdrawal.ts +++ b/sdk/node/src/generate/account/withdrawal/api_withdrawal.ts @@ -17,99 +17,99 @@ import { GetWithdrawalHistoryResp } from './model_get_withdrawal_history_resp'; export interface WithdrawalAPI { /** * getWithdrawalQuotas Get Withdrawal Quotas - * Description: This interface can obtain the withdrawal quotas information of this currency. + * Description: This interface can obtain the withdrawal quota information of this currency. * Documentation: https://www.kucoin.com/docs-new/api-3470143 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ getWithdrawalQuotas(req: GetWithdrawalQuotasReq): Promise; /** - * withdrawalV3 Withdraw(V3) - * Description: Use this interface to withdraw the specified currency + * withdrawalV3 Withdraw (V3) + * Description: Use this interface to withdraw the specified currency. * Documentation: https://www.kucoin.com/docs-new/api-3470146 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | WITHDRAWAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 5 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | WITHDRAWAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+------------+ */ withdrawalV3(req: WithdrawalV3Req): Promise; /** * cancelWithdrawal Cancel Withdrawal - * Description: This interface can cancel the withdrawal, Only withdrawals requests of PROCESSING status could be canceled. + * Description: This interface can cancel the withdrawal. Only withdrawal requests with PROCESSING status can be canceled. * Documentation: https://www.kucoin.com/docs-new/api-3470144 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | WITHDRAWAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | WITHDRAWAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ cancelWithdrawal(req: CancelWithdrawalReq): Promise; /** * getWithdrawalHistory Get Withdrawal History - * Description: Request via this endpoint to get deposit list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. + * Description: Request a withdrawal list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. * Documentation: https://www.kucoin.com/docs-new/api-3470145 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ getWithdrawalHistory(req: GetWithdrawalHistoryReq): Promise; /** * @deprecated * getWithdrawalHistoryOld Get Withdrawal History - Old - * Description: Request via this endpoint to get deposit list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. + * Description: Request a deposit list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. * Documentation: https://www.kucoin.com/docs-new/api-3470308 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 20 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ getWithdrawalHistoryOld(req: GetWithdrawalHistoryOldReq): Promise; /** * @deprecated * withdrawalV1 Withdraw - V1 - * Description: Use this interface to withdraw the specified currency + * Description: Use this interface to withdraw the specified currency. * Documentation: https://www.kucoin.com/docs-new/api-3470310 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | WITHDRAWAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 5 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | WITHDRAWAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+------------+ */ withdrawalV1(req: WithdrawalV1Req): Promise; } diff --git a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_items.ts b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_items.ts index 60d67043..74d30668 100644 --- a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_items.ts +++ b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_items.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetWithdrawalHistoryItems implements Serializable { /** - * Unique id + * Unique ID */ id?: string; @@ -20,7 +20,7 @@ export class GetWithdrawalHistoryItems implements Serializable { chain?: string; /** - * Status + * Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE */ status?: GetWithdrawalHistoryItems.StatusEnum; @@ -55,7 +55,7 @@ export class GetWithdrawalHistoryItems implements Serializable { walletTxId?: string; /** - * Creation time of the database record + * Database record creation time */ createdAt?: number; @@ -65,7 +65,7 @@ export class GetWithdrawalHistoryItems implements Serializable { updatedAt?: number; /** - * remark + * Remark */ remark?: string; @@ -95,6 +95,10 @@ export class GetWithdrawalHistoryItems implements Serializable { export namespace GetWithdrawalHistoryItems { export enum StatusEnum { + /** + * + */ + REVIEW = 'REVIEW', /** * */ @@ -106,10 +110,10 @@ export namespace GetWithdrawalHistoryItems { /** * */ - SUCCESS = 'SUCCESS', + FAILURE = 'FAILURE', /** * */ - FAILURE = 'FAILURE', + SUCCESS = 'SUCCESS', } } diff --git a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_old_items.ts b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_old_items.ts index 12345e6d..1ce39b78 100644 --- a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_old_items.ts +++ b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_old_items.ts @@ -10,7 +10,7 @@ export class GetWithdrawalHistoryOldItems implements Serializable { currency?: string; /** - * Creation time of the database record + * Database record creation time */ createAt?: number; diff --git a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_old_req.ts b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_old_req.ts index 9a2d0029..7f593f91 100644 --- a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_old_req.ts +++ b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_old_req.ts @@ -15,12 +15,12 @@ export class GetWithdrawalHistoryOldReq implements Serializable { status?: GetWithdrawalHistoryOldReq.StatusEnum; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; @@ -59,11 +59,11 @@ export class GetWithdrawalHistoryOldReq implements Serializable { */ status?: GetWithdrawalHistoryOldReq.StatusEnum; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** @@ -151,7 +151,7 @@ export class GetWithdrawalHistoryOldReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetWithdrawalHistoryOldReqBuilder { this.obj.startAt = value; @@ -159,7 +159,7 @@ export class GetWithdrawalHistoryOldReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetWithdrawalHistoryOldReqBuilder { this.obj.endAt = value; diff --git a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_old_resp.ts b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_old_resp.ts index 34e8415e..abc3182d 100644 --- a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_old_resp.ts +++ b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_old_resp.ts @@ -22,7 +22,7 @@ export class GetWithdrawalHistoryOldResp implements Response { totalNum: number; /** - * total page + * total pages */ totalPage: number; diff --git a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_req.ts b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_req.ts index 2150c655..ff7beb1e 100644 --- a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_req.ts +++ b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_req.ts @@ -10,17 +10,17 @@ export class GetWithdrawalHistoryReq implements Serializable { currency?: string; /** - * Status. Available value: PROCESSING, WALLET_PROCESSING, SUCCESS, and FAILURE + * Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE */ status?: GetWithdrawalHistoryReq.StatusEnum; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; @@ -55,15 +55,15 @@ export class GetWithdrawalHistoryReq implements Serializable { */ currency?: string; /** - * Status. Available value: PROCESSING, WALLET_PROCESSING, SUCCESS, and FAILURE + * Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE */ status?: GetWithdrawalHistoryReq.StatusEnum; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** @@ -119,6 +119,10 @@ export namespace GetWithdrawalHistoryReq { * */ PROCESSING = 'PROCESSING', + /** + * + */ + REVIEW = 'REVIEW', /** * */ @@ -147,7 +151,7 @@ export class GetWithdrawalHistoryReqBuilder { } /** - * Status. Available value: PROCESSING, WALLET_PROCESSING, SUCCESS, and FAILURE + * Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE */ setStatus(value: GetWithdrawalHistoryReq.StatusEnum): GetWithdrawalHistoryReqBuilder { this.obj.status = value; @@ -155,7 +159,7 @@ export class GetWithdrawalHistoryReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetWithdrawalHistoryReqBuilder { this.obj.startAt = value; @@ -163,7 +167,7 @@ export class GetWithdrawalHistoryReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetWithdrawalHistoryReqBuilder { this.obj.endAt = value; diff --git a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_resp.ts b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_resp.ts index b71cdf13..1c77f54a 100644 --- a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_resp.ts +++ b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_history_resp.ts @@ -22,7 +22,7 @@ export class GetWithdrawalHistoryResp implements Response { totalNum: number; /** - * total page + * total pages */ totalPage: number; diff --git a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_quotas_req.ts b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_quotas_req.ts index 77cca4c5..ec8bb61f 100644 --- a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_quotas_req.ts +++ b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_quotas_req.ts @@ -10,7 +10,7 @@ export class GetWithdrawalQuotasReq implements Serializable { currency?: string; /** - * The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + * The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. */ chain?: string = 'eth'; @@ -35,7 +35,7 @@ export class GetWithdrawalQuotasReq implements Serializable { */ currency?: string; /** - * The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + * The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. */ chain?: string; }): GetWithdrawalQuotasReq { @@ -82,7 +82,7 @@ export class GetWithdrawalQuotasReqBuilder { } /** - * The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + * The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. */ setChain(value: string): GetWithdrawalQuotasReqBuilder { this.obj.chain = value; diff --git a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_quotas_resp.ts b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_quotas_resp.ts index 5e2cbf8c..da831b7c 100644 --- a/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_quotas_resp.ts +++ b/sdk/node/src/generate/account/withdrawal/model_get_withdrawal_quotas_resp.ts @@ -21,17 +21,17 @@ export class GetWithdrawalQuotasResp implements Response { usedBTCAmount: string; /** - * withdrawal limit currency + * Withdrawal limit currency */ quotaCurrency: string; /** - * The intraday available withdrawal amount(withdrawal limit currency) + * The intraday available withdrawal amount (withdrawal limit currency) */ limitQuotaCurrencyAmount: string; /** - * The intraday cumulative withdrawal amount(withdrawal limit currency) + * The intraday cumulative withdrawal amount (withdrawal limit currency) */ usedQuotaCurrencyAmount: string; @@ -61,7 +61,7 @@ export class GetWithdrawalQuotasResp implements Response { withdrawMinSize: string; /** - * Is the withdraw function enabled or not + * Is the withdraw function enabled? */ isWithdrawEnabled: boolean; @@ -76,7 +76,7 @@ export class GetWithdrawalQuotasResp implements Response { chain: string; /** - * Reasons for restriction, Usually empty + * Reasons for restriction. Usually empty. */ reason: string; diff --git a/sdk/node/src/generate/account/withdrawal/model_withdrawal_v1_req.ts b/sdk/node/src/generate/account/withdrawal/model_withdrawal_v1_req.ts index f44487cb..dd53c2c0 100644 --- a/sdk/node/src/generate/account/withdrawal/model_withdrawal_v1_req.ts +++ b/sdk/node/src/generate/account/withdrawal/model_withdrawal_v1_req.ts @@ -10,7 +10,7 @@ export class WithdrawalV1Req implements Serializable { currency: string; /** - * The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. + * The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. */ chain?: string = 'eth'; @@ -25,22 +25,22 @@ export class WithdrawalV1Req implements Serializable { amount: number; /** - * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. */ memo?: string; /** - * Internal withdrawal or not. Default : false + * Internal withdrawal or not. Default: False */ isInner?: boolean = false; /** - * remark + * Remark */ remark?: string; /** - * Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don\'t specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. + * Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don\'t specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. */ feeDeductType?: string; @@ -72,7 +72,7 @@ export class WithdrawalV1Req implements Serializable { */ currency: string; /** - * The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. + * The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. */ chain?: string; /** @@ -84,19 +84,19 @@ export class WithdrawalV1Req implements Serializable { */ amount: number; /** - * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. */ memo?: string; /** - * Internal withdrawal or not. Default : false + * Internal withdrawal or not. Default: False */ isInner?: boolean; /** - * remark + * Remark */ remark?: string; /** - * Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don\'t specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. + * Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don\'t specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. */ feeDeductType?: string; }): WithdrawalV1Req { @@ -153,7 +153,7 @@ export class WithdrawalV1ReqBuilder { } /** - * The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. + * The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. */ setChain(value: string): WithdrawalV1ReqBuilder { this.obj.chain = value; @@ -177,7 +177,7 @@ export class WithdrawalV1ReqBuilder { } /** - * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. */ setMemo(value: string): WithdrawalV1ReqBuilder { this.obj.memo = value; @@ -185,7 +185,7 @@ export class WithdrawalV1ReqBuilder { } /** - * Internal withdrawal or not. Default : false + * Internal withdrawal or not. Default: False */ setIsInner(value: boolean): WithdrawalV1ReqBuilder { this.obj.isInner = value; @@ -193,7 +193,7 @@ export class WithdrawalV1ReqBuilder { } /** - * remark + * Remark */ setRemark(value: string): WithdrawalV1ReqBuilder { this.obj.remark = value; @@ -201,7 +201,7 @@ export class WithdrawalV1ReqBuilder { } /** - * Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don\'t specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. + * Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don\'t specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. */ setFeeDeductType(value: string): WithdrawalV1ReqBuilder { this.obj.feeDeductType = value; diff --git a/sdk/node/src/generate/account/withdrawal/model_withdrawal_v3_req.ts b/sdk/node/src/generate/account/withdrawal/model_withdrawal_v3_req.ts index 5facbd4b..403fa4cf 100644 --- a/sdk/node/src/generate/account/withdrawal/model_withdrawal_v3_req.ts +++ b/sdk/node/src/generate/account/withdrawal/model_withdrawal_v3_req.ts @@ -10,7 +10,7 @@ export class WithdrawalV3Req implements Serializable { currency: string; /** - * The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. + * The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. */ chain?: string = 'eth'; @@ -20,22 +20,22 @@ export class WithdrawalV3Req implements Serializable { amount: number; /** - * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. */ memo?: string; /** - * Internal withdrawal or not. Default : false + * Internal withdrawal or not. Default: False */ isInner?: boolean = false; /** - * remark + * Remark */ remark?: string; /** - * Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don\'t specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. + * Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don\'t specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. */ feeDeductType?: string; @@ -45,7 +45,7 @@ export class WithdrawalV3Req implements Serializable { toAddress: string; /** - * Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will have rate limited: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) + * Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will be rate limits: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) */ withdrawType: WithdrawalV3Req.WithdrawTypeEnum; @@ -79,7 +79,7 @@ export class WithdrawalV3Req implements Serializable { */ currency: string; /** - * The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. + * The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. */ chain?: string; /** @@ -87,19 +87,19 @@ export class WithdrawalV3Req implements Serializable { */ amount: number; /** - * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. */ memo?: string; /** - * Internal withdrawal or not. Default : false + * Internal withdrawal or not. Default: False */ isInner?: boolean; /** - * remark + * Remark */ remark?: string; /** - * Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don\'t specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. + * Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don\'t specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. */ feeDeductType?: string; /** @@ -107,7 +107,7 @@ export class WithdrawalV3Req implements Serializable { */ toAddress: string; /** - * Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will have rate limited: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) + * Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will be rate limits: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) */ withdrawType: WithdrawalV3Req.WithdrawTypeEnum; }): WithdrawalV3Req { @@ -186,7 +186,7 @@ export class WithdrawalV3ReqBuilder { } /** - * The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. + * The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. */ setChain(value: string): WithdrawalV3ReqBuilder { this.obj.chain = value; @@ -202,7 +202,7 @@ export class WithdrawalV3ReqBuilder { } /** - * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. */ setMemo(value: string): WithdrawalV3ReqBuilder { this.obj.memo = value; @@ -210,7 +210,7 @@ export class WithdrawalV3ReqBuilder { } /** - * Internal withdrawal or not. Default : false + * Internal withdrawal or not. Default: False */ setIsInner(value: boolean): WithdrawalV3ReqBuilder { this.obj.isInner = value; @@ -218,7 +218,7 @@ export class WithdrawalV3ReqBuilder { } /** - * remark + * Remark */ setRemark(value: string): WithdrawalV3ReqBuilder { this.obj.remark = value; @@ -226,7 +226,7 @@ export class WithdrawalV3ReqBuilder { } /** - * Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don\'t specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. + * Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don\'t specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. */ setFeeDeductType(value: string): WithdrawalV3ReqBuilder { this.obj.feeDeductType = value; @@ -242,7 +242,7 @@ export class WithdrawalV3ReqBuilder { } /** - * Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will have rate limited: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) + * Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will be rate limits: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) */ setWithdrawType(value: WithdrawalV3Req.WithdrawTypeEnum): WithdrawalV3ReqBuilder { this.obj.withdrawType = value; diff --git a/sdk/node/src/generate/affiliate/affiliate/api_affiliate.ts b/sdk/node/src/generate/affiliate/affiliate/api_affiliate.ts index 3d2a43ca..c7781148 100644 --- a/sdk/node/src/generate/affiliate/affiliate/api_affiliate.ts +++ b/sdk/node/src/generate/affiliate/affiliate/api_affiliate.ts @@ -6,17 +6,17 @@ import { GetAccountResp } from './model_get_account_resp'; export interface AffiliateAPI { /** * getAccount Get Account - * Description: This endpoint allows getting affiliate user rebate information. + * Description: Affiliate user rebate information can be obtained at this endpoint. * Documentation: https://www.kucoin.com/docs-new/api-3470279 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 30 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 30 | + * +-----------------------+------------+ */ getAccount(): Promise; } diff --git a/sdk/node/src/generate/affiliate/affiliate/model_get_account_margins.ts b/sdk/node/src/generate/affiliate/affiliate/model_get_account_margins.ts index bb9b9703..abca7ecf 100644 --- a/sdk/node/src/generate/affiliate/affiliate/model_get_account_margins.ts +++ b/sdk/node/src/generate/affiliate/affiliate/model_get_account_margins.ts @@ -15,7 +15,7 @@ export class GetAccountMargins implements Serializable { marginQty: string; /** - * Margin Coefficient return real time margin discount rate to USDT + * Margin Coefficient return real-time margin discount rate to USDT */ marginFactor: string; diff --git a/sdk/node/src/generate/broker/apibroker/api_api_broker.ts b/sdk/node/src/generate/broker/apibroker/api_api_broker.ts index 86f839c8..dee9670e 100644 --- a/sdk/node/src/generate/broker/apibroker/api_api_broker.ts +++ b/sdk/node/src/generate/broker/apibroker/api_api_broker.ts @@ -7,17 +7,17 @@ import { GetRebaseReq } from './model_get_rebase_req'; export interface APIBrokerAPI { /** * getRebase Get Broker Rebate - * Description: This interface supports downloading Broker rebate orders + * Description: This interface supports the downloading of Broker rebate orders. * Documentation: https://www.kucoin.com/docs-new/api-3470280 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 3 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+------------+ */ getRebase(req: GetRebaseReq): Promise; } diff --git a/sdk/node/src/generate/broker/apibroker/model_get_rebase_req.ts b/sdk/node/src/generate/broker/apibroker/model_get_rebase_req.ts index 552102ed..5f661df5 100644 --- a/sdk/node/src/generate/broker/apibroker/model_get_rebase_req.ts +++ b/sdk/node/src/generate/broker/apibroker/model_get_rebase_req.ts @@ -15,7 +15,7 @@ export class GetRebaseReq implements Serializable { end?: string; /** - * Transaction type, 1: spot 2: futures + * Transaction type: 1, spot; 2, futures */ tradeType?: GetRebaseReq.TradeTypeEnum; @@ -44,7 +44,7 @@ export class GetRebaseReq implements Serializable { */ end?: string; /** - * Transaction type, 1: spot 2: futures + * Transaction type: 1, spot; 2, futures */ tradeType?: GetRebaseReq.TradeTypeEnum; }): GetRebaseReq { @@ -109,7 +109,7 @@ export class GetRebaseReqBuilder { } /** - * Transaction type, 1: spot 2: futures + * Transaction type: 1, spot; 2, futures */ setTradeType(value: GetRebaseReq.TradeTypeEnum): GetRebaseReqBuilder { this.obj.tradeType = value; diff --git a/sdk/node/src/generate/broker/ndbroker/api_nd_broker.template b/sdk/node/src/generate/broker/ndbroker/api_nd_broker.template index 9502b9b2..b62b3f02 100644 --- a/sdk/node/src/generate/broker/ndbroker/api_nd_broker.template +++ b/sdk/node/src/generate/broker/ndbroker/api_nd_broker.template @@ -26,7 +26,7 @@ describe('Auto Test', ()=> { test('addSubAccount request test', ()=> { /** * addSubAccount - * Add SubAccount + * Add sub-account * /api/v1/broker/nd/account */ let builder = AddSubAccountReq.builder(); @@ -45,7 +45,7 @@ describe('Auto Test', ()=> { test('getSubAccount request test', ()=> { /** * getSubAccount - * Get SubAccount + * Get sub-account * /api/v1/broker/nd/account */ let builder = GetSubAccountReq.builder(); @@ -65,7 +65,7 @@ describe('Auto Test', ()=> { test('addSubAccountApi request test', ()=> { /** * addSubAccountApi - * Add SubAccount API + * Add sub-account API * /api/v1/broker/nd/account/apikey */ let builder = AddSubAccountApiReq.builder(); @@ -88,7 +88,7 @@ describe('Auto Test', ()=> { test('getSubAccountAPI request test', ()=> { /** * getSubAccountAPI - * Get SubAccount API + * Get sub-account API * /api/v1/broker/nd/account/apikey */ let builder = GetSubAccountAPIReq.builder(); @@ -104,7 +104,7 @@ describe('Auto Test', ()=> { test('modifySubAccountApi request test', ()=> { /** * modifySubAccountApi - * Modify SubAccount API + * Modify sub-account API * /api/v1/broker/nd/account/update-apikey */ let builder = ModifySubAccountApiReq.builder(); @@ -126,7 +126,7 @@ describe('Auto Test', ()=> { test('deleteSubAccountAPI request test', ()=> { /** * deleteSubAccountAPI - * Delete SubAccount API + * Delete sub-account API * /api/v1/broker/nd/account/apikey */ let builder = DeleteSubAccountAPIReq.builder(); diff --git a/sdk/node/src/generate/broker/ndbroker/api_nd_broker.test.ts b/sdk/node/src/generate/broker/ndbroker/api_nd_broker.test.ts index 1fe720de..f257dfdc 100644 --- a/sdk/node/src/generate/broker/ndbroker/api_nd_broker.test.ts +++ b/sdk/node/src/generate/broker/ndbroker/api_nd_broker.test.ts @@ -61,7 +61,7 @@ describe('Auto Test', () => { test('addSubAccount request test', () => { /** * addSubAccount - * Add SubAccount + * Add sub-account * /api/v1/broker/nd/account */ let data = '{"accountName": "Account1"}'; @@ -75,7 +75,7 @@ describe('Auto Test', () => { test('addSubAccount response test', () => { /** * addSubAccount - * Add SubAccount + * Add sub-account * /api/v1/broker/nd/account */ let data = @@ -92,7 +92,7 @@ describe('Auto Test', () => { test('getSubAccount request test', () => { /** * getSubAccount - * Get SubAccount + * Get sub-account * /api/v1/broker/nd/account */ let data = '{"uid": "226383154", "currentPage": 1, "pageSize": 20}'; @@ -106,7 +106,7 @@ describe('Auto Test', () => { test('getSubAccount response test', () => { /** * getSubAccount - * Get SubAccount + * Get sub-account * /api/v1/broker/nd/account */ let data = @@ -123,7 +123,7 @@ describe('Auto Test', () => { test('addSubAccountApi request test', () => { /** * addSubAccountApi - * Add SubAccount API + * Add sub-account API * /api/v1/broker/nd/account/apikey */ let data = @@ -138,7 +138,7 @@ describe('Auto Test', () => { test('addSubAccountApi response test', () => { /** * addSubAccountApi - * Add SubAccount API + * Add sub-account API * /api/v1/broker/nd/account/apikey */ let data = @@ -155,7 +155,7 @@ describe('Auto Test', () => { test('getSubAccountAPI request test', () => { /** * getSubAccountAPI - * Get SubAccount API + * Get sub-account API * /api/v1/broker/nd/account/apikey */ let data = '{"uid": "226383154", "apiKey": "671afb36cee20f00015cfaf1"}'; @@ -169,7 +169,7 @@ describe('Auto Test', () => { test('getSubAccountAPI response test', () => { /** * getSubAccountAPI - * Get SubAccount API + * Get sub-account API * /api/v1/broker/nd/account/apikey */ let data = @@ -186,7 +186,7 @@ describe('Auto Test', () => { test('modifySubAccountApi request test', () => { /** * modifySubAccountApi - * Modify SubAccount API + * Modify sub-account API * /api/v1/broker/nd/account/update-apikey */ let data = @@ -201,7 +201,7 @@ describe('Auto Test', () => { test('modifySubAccountApi response test', () => { /** * modifySubAccountApi - * Modify SubAccount API + * Modify sub-account API * /api/v1/broker/nd/account/update-apikey */ let data = @@ -218,7 +218,7 @@ describe('Auto Test', () => { test('deleteSubAccountAPI request test', () => { /** * deleteSubAccountAPI - * Delete SubAccount API + * Delete sub-account API * /api/v1/broker/nd/account/apikey */ let data = '{"uid": "226383154", "apiKey": "671afb36cee20f00015cfaf1"}'; @@ -232,7 +232,7 @@ describe('Auto Test', () => { test('deleteSubAccountAPI response test', () => { /** * deleteSubAccountAPI - * Delete SubAccount API + * Delete sub-account API * /api/v1/broker/nd/account/apikey */ let data = '{\n "code": "200000",\n "data": true\n}'; diff --git a/sdk/node/src/generate/broker/ndbroker/api_nd_broker.ts b/sdk/node/src/generate/broker/ndbroker/api_nd_broker.ts index 23c38686..a2d57ab8 100644 --- a/sdk/node/src/generate/broker/ndbroker/api_nd_broker.ts +++ b/sdk/node/src/generate/broker/ndbroker/api_nd_broker.ts @@ -31,209 +31,209 @@ import { TransferReq } from './model_transfer_req'; export interface NDBrokerAPI { /** * getBrokerInfo Get Broker Info - * Description: This endpoint supports querying the basic information of the current Broker + * Description: This endpoint supports querying the basic information of the current Broker. * Documentation: https://www.kucoin.com/docs-new/api-3470282 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | BROKER | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | BROKER | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | BROKER | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | BROKER | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getBrokerInfo(req: GetBrokerInfoReq): Promise; /** - * addSubAccount Add SubAccount - * Description: This endpoint supports Broker users to create sub-accounts + * addSubAccount Add sub-account + * Description: This endpoint supports Broker users creating sub-accounts. * Documentation: https://www.kucoin.com/docs-new/api-3470290 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | BROKER | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | BROKER | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | BROKER | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | BROKER | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ addSubAccount(req: AddSubAccountReq): Promise; /** - * getSubAccount Get SubAccount - * Description: This interface supports querying sub-accounts created by Broker + * getSubAccount Get sub-account + * Description: This interface supports querying sub-accounts created by Broker. * Documentation: https://www.kucoin.com/docs-new/api-3470283 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | BROKER | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | BROKER | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | BROKER | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | BROKER | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getSubAccount(req: GetSubAccountReq): Promise; /** - * addSubAccountApi Add SubAccount API - * Description: This interface supports the creation of Broker sub-account APIKEY + * addSubAccountApi Add sub-account API + * Description: This interface supports the creation of Broker sub-account APIKEY. * Documentation: https://www.kucoin.com/docs-new/api-3470291 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | BROKER | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | BROKER | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | BROKER | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | BROKER | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ addSubAccountApi(req: AddSubAccountApiReq): Promise; /** - * getSubAccountAPI Get SubAccount API - * Description: This interface supports querying the Broker’s sub-account APIKEY + * getSubAccountAPI Get sub-account API + * Description: This interface supports querying the Broker’s sub-account APIKEY. * Documentation: https://www.kucoin.com/docs-new/api-3470284 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | BROKER | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | BROKER | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | BROKER | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | BROKER | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getSubAccountAPI(req: GetSubAccountAPIReq): Promise; /** - * modifySubAccountApi Modify SubAccount API - * Description: This interface supports modify the Broker’s sub-account APIKEY + * modifySubAccountApi Modify sub-account API + * Description: This interface supports modifying the Broker’s sub-account APIKEY. * Documentation: https://www.kucoin.com/docs-new/api-3470292 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | BROKER | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | BROKER | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | BROKER | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | BROKER | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ modifySubAccountApi(req: ModifySubAccountApiReq): Promise; /** - * deleteSubAccountAPI Delete SubAccount API - * Description: This interface supports deleting Broker’s sub-account APIKEY + * deleteSubAccountAPI Delete sub-account API + * Description: This interface supports deleting Broker’s sub-account APIKEY. * Documentation: https://www.kucoin.com/docs-new/api-3470289 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | BROKER | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | BROKER | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | BROKER | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | BROKER | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ deleteSubAccountAPI(req: DeleteSubAccountAPIReq): Promise; /** * transfer Transfer - * Description: This endpoint supports fund transfer between Broker account and Broker sub-accounts. Please be aware that withdrawal from sub-account is not directly supported. Broker has to transfer funds from broker sub-account to broker account to initiate the withdrawals. + * Description: This endpoint supports fund transfer between Broker accounts and Broker sub-accounts. Please be aware that withdrawal from sub-accounts is not directly supported. Broker has to transfer funds from broker sub-account to broker account to initiate the withdrawals. * Documentation: https://www.kucoin.com/docs-new/api-3470293 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | BROKER | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | BROKER | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | BROKER | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | BROKER | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ transfer(req: TransferReq): Promise; /** * getTransferHistory Get Transfer History - * Description: This endpoint supports querying transfer records of the broker itself and its created sub-accounts. + * Description: This endpoint supports querying the transfer records of the broker itself and its created sub-accounts. * Documentation: https://www.kucoin.com/docs-new/api-3470286 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | BROKER | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | BROKER | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | BROKER | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | BROKER | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ getTransferHistory(req: GetTransferHistoryReq): Promise; /** * getDepositList Get Deposit List - * Description: This endpoint can obtain the deposit records of each sub-account under the ND Broker. + * Description: The deposit records of each sub-account under the ND broker can be obtained at this endpoint. * Documentation: https://www.kucoin.com/docs-new/api-3470285 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | BROKER | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | BROKER | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | BROKER | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | BROKER | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ getDepositList(req: GetDepositListReq): Promise; /** * getDepositDetail Get Deposit Detail - * Description: This endpoint supports querying the deposit record of sub-accounts created by a Broker (excluding main account of nd broker) + * Description: This endpoint supports querying the deposit record of sub-accounts created by a Broker (excluding main account of ND broker). * Documentation: https://www.kucoin.com/docs-new/api-3470288 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | BROKER | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | BROKER | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | BROKER | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | BROKER | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ getDepositDetail(req: GetDepositDetailReq): Promise; /** * getWithdrawDetail Get Withdraw Detail - * Description: This endpoint supports querying the withdrawal records of sub-accounts created by a Broker (excluding main account of nd broker). + * Description: This endpoint supports querying the withdrawal records of sub-accounts created by a Broker (excluding main account of ND broker). * Documentation: https://www.kucoin.com/docs-new/api-3470287 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | BROKER | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | BROKER | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | BROKER | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | BROKER | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ getWithdrawDetail(req: GetWithdrawDetailReq): Promise; /** * getRebase Get Broker Rebate - * Description: This interface supports downloading Broker rebate orders + * Description: This interface supports the downloading of Broker rebate orders. * Documentation: https://www.kucoin.com/docs-new/api-3470281 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | BROKER | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | BROKER | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | BROKER | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | BROKER | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ getRebase(req: GetRebaseReq): Promise; } diff --git a/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_api_req.ts b/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_api_req.ts index fa165136..9dc4c65f 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_api_req.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_api_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class AddSubAccountApiReq implements Serializable { /** - * Subaccount UID + * Sub-account UID */ uid: string; @@ -20,7 +20,7 @@ export class AddSubAccountApiReq implements Serializable { ipWhitelist: Array; /** - * Permission group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) + * Permission group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). */ permissions: Array; @@ -57,7 +57,7 @@ export class AddSubAccountApiReq implements Serializable { */ static create(data: { /** - * Subaccount UID + * Sub-account UID */ uid: string; /** @@ -69,7 +69,7 @@ export class AddSubAccountApiReq implements Serializable { */ ipWhitelist: Array; /** - * Permission group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) + * Permission group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). */ permissions: Array; /** @@ -128,7 +128,7 @@ export class AddSubAccountApiReqBuilder { this.obj = obj; } /** - * Subaccount UID + * Sub-account UID */ setUid(value: string): AddSubAccountApiReqBuilder { this.obj.uid = value; @@ -152,7 +152,7 @@ export class AddSubAccountApiReqBuilder { } /** - * Permission group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) + * Permission group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). */ setPermissions(value: Array): AddSubAccountApiReqBuilder { this.obj.permissions = value; diff --git a/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_api_resp.ts b/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_api_resp.ts index 9e843188..6d2811d0 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_api_resp.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_api_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class AddSubAccountApiResp implements Response { /** - * Sub-Account UID + * Sub-account UID */ uid: string; @@ -41,7 +41,7 @@ export class AddSubAccountApiResp implements Response { ipWhitelist: Array; /** - * Creation time, unix timestamp (milliseconds) + * Creation time, Unix timestamp (milliseconds) */ createdAt: number; diff --git a/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_req.ts b/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_req.ts index 16c139df..de82fd20 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_req.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class AddSubAccountReq implements Serializable { /** - * Sub Account Name, Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication. + * Sub-account Name. Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication. */ accountName: string; @@ -29,7 +29,7 @@ export class AddSubAccountReq implements Serializable { */ static create(data: { /** - * Sub Account Name, Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication. + * Sub-account Name. Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication. */ accountName: string; }): AddSubAccountReq { @@ -63,7 +63,7 @@ export class AddSubAccountReqBuilder { this.obj = obj; } /** - * Sub Account Name, Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication. + * Sub-account Name. Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication. */ setAccountName(value: string): AddSubAccountReqBuilder { this.obj.accountName = value; diff --git a/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_resp.ts b/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_resp.ts index c8dee3f1..45771c65 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_resp.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_add_sub_account_resp.ts @@ -6,22 +6,22 @@ import { Response } from '@internal/interfaces/serializable'; export class AddSubAccountResp implements Response { /** - * Sub-Account name + * Sub-account name */ accountName: string; /** - * Sub-Account UID + * Sub-account UID */ uid: string; /** - * Creation time, unix timestamp (milliseconds) + * Creation time, Unix timestamp (milliseconds) */ createdAt: number; /** - * Subaccount VIP level + * Sub-account VIP level */ level: number; diff --git a/sdk/node/src/generate/broker/ndbroker/model_get_broker_info_req.ts b/sdk/node/src/generate/broker/ndbroker/model_get_broker_info_req.ts index c910783b..a6464597 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_get_broker_info_req.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_get_broker_info_req.ts @@ -15,7 +15,7 @@ export class GetBrokerInfoReq implements Serializable { end?: string; /** - * Transaction type, 1: spot 2: futures + * Transaction type: 1, spot; 2: futures */ tradeType?: GetBrokerInfoReq.TradeTypeEnum; @@ -44,7 +44,7 @@ export class GetBrokerInfoReq implements Serializable { */ end?: string; /** - * Transaction type, 1: spot 2: futures + * Transaction type: 1, spot; 2: futures */ tradeType?: GetBrokerInfoReq.TradeTypeEnum; }): GetBrokerInfoReq { @@ -109,7 +109,7 @@ export class GetBrokerInfoReqBuilder { } /** - * Transaction type, 1: spot 2: futures + * Transaction type: 1, spot; 2: futures */ setTradeType(value: GetBrokerInfoReq.TradeTypeEnum): GetBrokerInfoReqBuilder { this.obj.tradeType = value; diff --git a/sdk/node/src/generate/broker/ndbroker/model_get_broker_info_resp.ts b/sdk/node/src/generate/broker/ndbroker/model_get_broker_info_resp.ts index cb393a37..ba59aa15 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_get_broker_info_resp.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_get_broker_info_resp.ts @@ -11,7 +11,7 @@ export class GetBrokerInfoResp implements Response { accountSize: number; /** - * The maximum number of sub-accounts allowed to be created, null means no limit + * The maximum number of sub-accounts allowed to be created; null means no limit */ maxAccountSize: number; diff --git a/sdk/node/src/generate/broker/ndbroker/model_get_deposit_detail_resp.ts b/sdk/node/src/generate/broker/ndbroker/model_get_deposit_detail_resp.ts index 3d03921b..967d19d9 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_get_deposit_detail_resp.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_get_deposit_detail_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class GetDepositDetailResp implements Response { /** - * chain id of currency + * Chain ID of currency */ chain: string; diff --git a/sdk/node/src/generate/broker/ndbroker/model_get_deposit_list_data.ts b/sdk/node/src/generate/broker/ndbroker/model_get_deposit_list_data.ts index e1186f23..3839e275 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_get_deposit_list_data.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_get_deposit_list_data.ts @@ -20,7 +20,7 @@ export class GetDepositListData implements Serializable { address: string; /** - * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + * Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. */ memo: string; @@ -55,17 +55,17 @@ export class GetDepositListData implements Serializable { status: GetDepositListData.StatusEnum; /** - * remark + * Remark */ remark: string; /** - * chain name of currency + * Chain name of currency */ chain: string; /** - * Creation time of the database record + * Database record creation time */ createdAt: number; diff --git a/sdk/node/src/generate/broker/ndbroker/model_get_deposit_list_req.ts b/sdk/node/src/generate/broker/ndbroker/model_get_deposit_list_req.ts index d9d679c7..fb409660 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_get_deposit_list_req.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_get_deposit_list_req.ts @@ -20,12 +20,12 @@ export class GetDepositListReq implements Serializable { hash?: string; /** - * Start time (milisecond) + * Start time (milliseconds) */ startTimestamp?: number; /** - * End time (milisecond),Default sorting in descending order + * End time (milliseconds); default sorting in descending order */ endTimestamp?: number; @@ -63,11 +63,11 @@ export class GetDepositListReq implements Serializable { */ hash?: string; /** - * Start time (milisecond) + * Start time (milliseconds) */ startTimestamp?: number; /** - * End time (milisecond),Default sorting in descending order + * End time (milliseconds); default sorting in descending order */ endTimestamp?: number; /** @@ -138,7 +138,7 @@ export class GetDepositListReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartTimestamp(value: number): GetDepositListReqBuilder { this.obj.startTimestamp = value; @@ -146,7 +146,7 @@ export class GetDepositListReqBuilder { } /** - * End time (milisecond),Default sorting in descending order + * End time (milliseconds); default sorting in descending order */ setEndTimestamp(value: number): GetDepositListReqBuilder { this.obj.endTimestamp = value; diff --git a/sdk/node/src/generate/broker/ndbroker/model_get_rebase_req.ts b/sdk/node/src/generate/broker/ndbroker/model_get_rebase_req.ts index 552102ed..5f661df5 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_get_rebase_req.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_get_rebase_req.ts @@ -15,7 +15,7 @@ export class GetRebaseReq implements Serializable { end?: string; /** - * Transaction type, 1: spot 2: futures + * Transaction type: 1, spot; 2, futures */ tradeType?: GetRebaseReq.TradeTypeEnum; @@ -44,7 +44,7 @@ export class GetRebaseReq implements Serializable { */ end?: string; /** - * Transaction type, 1: spot 2: futures + * Transaction type: 1, spot; 2, futures */ tradeType?: GetRebaseReq.TradeTypeEnum; }): GetRebaseReq { @@ -109,7 +109,7 @@ export class GetRebaseReqBuilder { } /** - * Transaction type, 1: spot 2: futures + * Transaction type: 1, spot; 2, futures */ setTradeType(value: GetRebaseReq.TradeTypeEnum): GetRebaseReqBuilder { this.obj.tradeType = value; diff --git a/sdk/node/src/generate/broker/ndbroker/model_get_sub_account_api_data.ts b/sdk/node/src/generate/broker/ndbroker/model_get_sub_account_api_data.ts index a1d033b5..0d7ab9a6 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_get_sub_account_api_data.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_get_sub_account_api_data.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetSubAccountAPIData implements Serializable { /** - * Sub-Account UID + * Sub-account UID */ uid: string; @@ -35,7 +35,7 @@ export class GetSubAccountAPIData implements Serializable { ipWhitelist: Array; /** - * Creation time, unix timestamp (milliseconds) + * Creation time, Unix timestamp (milliseconds) */ createdAt: number; diff --git a/sdk/node/src/generate/broker/ndbroker/model_get_sub_account_items.ts b/sdk/node/src/generate/broker/ndbroker/model_get_sub_account_items.ts index adef44a8..b5b24186 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_get_sub_account_items.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_get_sub_account_items.ts @@ -15,7 +15,7 @@ export class GetSubAccountItems implements Serializable { uid: string; /** - * Creation time, unix timestamp (milliseconds) + * Creation time, Unix timestamp (milliseconds) */ createdAt: number; diff --git a/sdk/node/src/generate/broker/ndbroker/model_get_sub_account_resp.ts b/sdk/node/src/generate/broker/ndbroker/model_get_sub_account_resp.ts index 02e8c16c..a962a5e0 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_get_sub_account_resp.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_get_sub_account_resp.ts @@ -22,7 +22,7 @@ export class GetSubAccountResp implements Response { totalNum: number; /** - * Total Page + * Total Pages */ totalPage: number; diff --git a/sdk/node/src/generate/broker/ndbroker/model_get_transfer_history_resp.ts b/sdk/node/src/generate/broker/ndbroker/model_get_transfer_history_resp.ts index 3c5568a6..d11fcaae 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_get_transfer_history_resp.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_get_transfer_history_resp.ts @@ -26,12 +26,12 @@ export class GetTransferHistoryResp implements Response { fromUid: number; /** - * From Account Type:Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED + * From Account Type: Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED */ fromAccountType: GetTransferHistoryResp.FromAccountTypeEnum; /** - * Trading pair, required if the account type is ISOLATED, e.g., BTC-USDT + * Trading pair (required if the account type is ISOLATED), e.g., BTC-USDT */ fromAccountTag: string; @@ -41,12 +41,12 @@ export class GetTransferHistoryResp implements Response { toUid: number; /** - * Account Type:Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED + * Account Type: Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED */ toAccountType: GetTransferHistoryResp.ToAccountTypeEnum; /** - * To Trading pair, required if the account type is ISOLATED, e.g., BTC-USDT + * To Trading pair (required if the account type is ISOLATED), e.g., BTC-USDT */ toAccountTag: string; diff --git a/sdk/node/src/generate/broker/ndbroker/model_get_withdraw_detail_resp.ts b/sdk/node/src/generate/broker/ndbroker/model_get_withdraw_detail_resp.ts index c9ee23af..c15c76e0 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_get_withdraw_detail_resp.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_get_withdraw_detail_resp.ts @@ -11,7 +11,7 @@ export class GetWithdrawDetailResp implements Response { id: string; /** - * chain id of currency + * Chain ID of currency */ chain: string; diff --git a/sdk/node/src/generate/broker/ndbroker/model_modify_sub_account_api_req.ts b/sdk/node/src/generate/broker/ndbroker/model_modify_sub_account_api_req.ts index 77a65815..0bd72a03 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_modify_sub_account_api_req.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_modify_sub_account_api_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class ModifySubAccountApiReq implements Serializable { /** - * Subaccount UID + * Sub-account UID */ uid: string; @@ -15,7 +15,7 @@ export class ModifySubAccountApiReq implements Serializable { ipWhitelist: Array; /** - * [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) + * [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). */ permissions: Array; @@ -25,7 +25,7 @@ export class ModifySubAccountApiReq implements Serializable { label: string; /** - * Subaccount apiKey + * Sub-account apiKey */ apiKey: string; @@ -57,7 +57,7 @@ export class ModifySubAccountApiReq implements Serializable { */ static create(data: { /** - * Subaccount UID + * Sub-account UID */ uid: string; /** @@ -65,7 +65,7 @@ export class ModifySubAccountApiReq implements Serializable { */ ipWhitelist: Array; /** - * [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) + * [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). */ permissions: Array; /** @@ -73,7 +73,7 @@ export class ModifySubAccountApiReq implements Serializable { */ label: string; /** - * Subaccount apiKey + * Sub-account apiKey */ apiKey: string; }): ModifySubAccountApiReq { @@ -128,7 +128,7 @@ export class ModifySubAccountApiReqBuilder { this.obj = obj; } /** - * Subaccount UID + * Sub-account UID */ setUid(value: string): ModifySubAccountApiReqBuilder { this.obj.uid = value; @@ -144,7 +144,7 @@ export class ModifySubAccountApiReqBuilder { } /** - * [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) + * [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). */ setPermissions( value: Array, @@ -162,7 +162,7 @@ export class ModifySubAccountApiReqBuilder { } /** - * Subaccount apiKey + * Sub-account apiKey */ setApiKey(value: string): ModifySubAccountApiReqBuilder { this.obj.apiKey = value; diff --git a/sdk/node/src/generate/broker/ndbroker/model_modify_sub_account_api_resp.ts b/sdk/node/src/generate/broker/ndbroker/model_modify_sub_account_api_resp.ts index 1426a406..8e125976 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_modify_sub_account_api_resp.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_modify_sub_account_api_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class ModifySubAccountApiResp implements Response { /** - * Sub-Account UID + * Sub-account UID */ uid: string; @@ -36,7 +36,7 @@ export class ModifySubAccountApiResp implements Response { ipWhitelist: Array; /** - * Creation time, unix timestamp (milliseconds) + * Creation time, Unix timestamp (milliseconds) */ createdAt: number; diff --git a/sdk/node/src/generate/broker/ndbroker/model_transfer_req.ts b/sdk/node/src/generate/broker/ndbroker/model_transfer_req.ts index 2c43ed94..900dd43e 100644 --- a/sdk/node/src/generate/broker/ndbroker/model_transfer_req.ts +++ b/sdk/node/src/generate/broker/ndbroker/model_transfer_req.ts @@ -25,7 +25,7 @@ export class TransferReq implements Serializable { accountType: TransferReq.AccountTypeEnum; /** - * Broker subaccount uid, must be the Broker subaccount created by the current Broker user. + * Broker sub-account UID, must be the Broker sub-account created by the current Broker user. */ specialUid: string; @@ -35,7 +35,7 @@ export class TransferReq implements Serializable { specialAccountType: TransferReq.SpecialAccountTypeEnum; /** - * Client Order Id, The unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. + * Client Order ID, the unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. */ clientOid: string; @@ -87,7 +87,7 @@ export class TransferReq implements Serializable { */ accountType: TransferReq.AccountTypeEnum; /** - * Broker subaccount uid, must be the Broker subaccount created by the current Broker user. + * Broker sub-account UID, must be the Broker sub-account created by the current Broker user. */ specialUid: string; /** @@ -95,7 +95,7 @@ export class TransferReq implements Serializable { */ specialAccountType: TransferReq.SpecialAccountTypeEnum; /** - * Client Order Id, The unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. + * Client Order ID, the unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. */ clientOid: string; }): TransferReq { @@ -200,7 +200,7 @@ export class TransferReqBuilder { } /** - * Broker subaccount uid, must be the Broker subaccount created by the current Broker user. + * Broker sub-account UID, must be the Broker sub-account created by the current Broker user. */ setSpecialUid(value: string): TransferReqBuilder { this.obj.specialUid = value; @@ -216,7 +216,7 @@ export class TransferReqBuilder { } /** - * Client Order Id, The unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. + * Client Order ID, the unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. */ setClientOid(value: string): TransferReqBuilder { this.obj.clientOid = value; diff --git a/sdk/node/src/generate/copytrading/futures/api_futures.template b/sdk/node/src/generate/copytrading/futures/api_futures.template index 848c36ce..05ae6c83 100644 --- a/sdk/node/src/generate/copytrading/futures/api_futures.template +++ b/sdk/node/src/generate/copytrading/futures/api_futures.template @@ -12,7 +12,7 @@ describe('Auto Test', ()=> { * /api/v1/copy-trade/futures/orders */ let builder = AddOrderReq.builder(); - builder.setClientOid(?).setSide(?).setSymbol(?).setLeverage(?).setType(?).setRemark(?).setStop(?).setStopPriceType(?).setStopPrice(?).setReduceOnly(?).setCloseOrder(?).setForceHold(?).setMarginMode(?).setPrice(?).setSize(?).setTimeInForce(?).setPostOnly(?).setHidden(?).setIceberg(?).setVisibleSize(?); + builder.setClientOid(?).setSide(?).setSymbol(?).setLeverage(?).setType(?).setStop(?).setStopPriceType(?).setStopPrice(?).setReduceOnly(?).setCloseOrder(?).setMarginMode(?).setPrice(?).setSize(?).setTimeInForce(?).setPostOnly(?).setHidden(?).setIceberg(?).setVisibleSize(?); let req = builder.build(); let resp = api.addOrder(req); return resp.then(result => { @@ -29,7 +29,7 @@ describe('Auto Test', ()=> { * /api/v1/copy-trade/futures/orders/test */ let builder = AddOrderTestReq.builder(); - builder.setClientOid(?).setSide(?).setSymbol(?).setLeverage(?).setType(?).setRemark(?).setStop(?).setStopPriceType(?).setStopPrice(?).setReduceOnly(?).setCloseOrder(?).setForceHold(?).setMarginMode(?).setPrice(?).setSize(?).setTimeInForce(?).setPostOnly(?).setHidden(?).setIceberg(?).setVisibleSize(?); + builder.setClientOid(?).setSide(?).setSymbol(?).setLeverage(?).setType(?).setStop(?).setStopPriceType(?).setStopPrice(?).setReduceOnly(?).setCloseOrder(?).setMarginMode(?).setPrice(?).setSize(?).setTimeInForce(?).setPostOnly(?).setHidden(?).setIceberg(?).setVisibleSize(?); let req = builder.build(); let resp = api.addOrderTest(req); return resp.then(result => { @@ -46,7 +46,7 @@ describe('Auto Test', ()=> { * /api/v1/copy-trade/futures/st-orders */ let builder = AddTPSLOrderReq.builder(); - builder.setClientOid(?).setSide(?).setSymbol(?).setLeverage(?).setType(?).setRemark(?).setStopPriceType(?).setReduceOnly(?).setCloseOrder(?).setForceHold(?).setMarginMode(?).setPrice(?).setSize(?).setTimeInForce(?).setPostOnly(?).setHidden(?).setIceberg(?).setVisibleSize(?).setTriggerStopUpPrice(?).setTriggerStopDownPrice(?); + builder.setClientOid(?).setSide(?).setSymbol(?).setLeverage(?).setType(?).setStopPriceType(?).setReduceOnly(?).setCloseOrder(?).setMarginMode(?).setPrice(?).setSize(?).setTimeInForce(?).setPostOnly(?).setHidden(?).setIceberg(?).setVisibleSize(?).setTriggerStopUpPrice(?).setTriggerStopDownPrice(?); let req = builder.build(); let resp = api.addTPSLOrder(req); return resp.then(result => { diff --git a/sdk/node/src/generate/copytrading/futures/api_futures.test.ts b/sdk/node/src/generate/copytrading/futures/api_futures.test.ts index 9da105d9..0de980ba 100644 --- a/sdk/node/src/generate/copytrading/futures/api_futures.test.ts +++ b/sdk/node/src/generate/copytrading/futures/api_futures.test.ts @@ -187,8 +187,7 @@ describe('Auto Test', () => { * Get Max Open Size * /api/v1/copy-trade/futures/get-max-open-size */ - let data = - '{"symbol": "XBTUSDTM", "price": "example_string_default_value", "leverage": 123456}'; + let data = '{"symbol": "XBTUSDTM", "price": 123456.0, "leverage": 123456}'; let req = GetMaxOpenSizeReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, @@ -203,7 +202,7 @@ describe('Auto Test', () => { * /api/v1/copy-trade/futures/get-max-open-size */ let data = - '{\n "code": "200000",\n "data": {\n "symbol": "XBTUSDTM",\n "maxBuyOpenSize": "8",\n "maxSellOpenSize": "5"\n }\n}'; + '{\n "code": "200000",\n "data": {\n "symbol": "XBTUSDTM",\n "maxBuyOpenSize": "1000000",\n "maxSellOpenSize": "51"\n }\n}'; let commonResp = RestResponse.fromJson(data); let resp = GetMaxOpenSizeResp.fromObject(commonResp.data); if (commonResp.data !== null) { @@ -280,7 +279,7 @@ describe('Auto Test', () => { * Remove Isolated Margin * /api/v1/copy-trade/futures/position/margin/withdraw-margin */ - let data = '{"symbol": "XBTUSDTM", "withdrawAmount": "0.0000001"}'; + let data = '{"symbol": "XBTUSDTM", "withdrawAmount": 1e-07}'; let req = RemoveIsolatedMarginReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, diff --git a/sdk/node/src/generate/copytrading/futures/api_futures.ts b/sdk/node/src/generate/copytrading/futures/api_futures.ts index 2725ad75..f5204b79 100644 --- a/sdk/node/src/generate/copytrading/futures/api_futures.ts +++ b/sdk/node/src/generate/copytrading/futures/api_futures.ts @@ -29,31 +29,31 @@ export interface FuturesAPI { * addOrder Add Order * Description: Place 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. * Documentation: https://www.kucoin.com/docs-new/api-3470363 - * +---------------------+------------------+ - * | Extra API Info | Value | - * +---------------------+------------------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | LEADTRADEFUTURES | - * | API-RATE-LIMIT-POOL | COPYTRADING | - * | API-RATE-LIMIT | 2 | - * +---------------------+------------------+ + * +-----------------------+------------------+ + * | Extra API Info | Value | + * +-----------------------+------------------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | + * | API-RATE-LIMIT-POOL | COPYTRADING | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+------------------+ */ addOrder(req: AddOrderReq): Promise; /** * addOrderTest Add Order Test - * Description: Place order to the futures trading system just for validation + * Description: Place order the futures trading system just for validation * Documentation: https://www.kucoin.com/docs-new/api-3470618 - * +---------------------+-------------+ - * | Extra API Info | Value | - * +---------------------+-------------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | COPYTRADING | - * | API-RATE-LIMIT | 2 | - * +---------------------+-------------+ + * +-----------------------+------------------+ + * | Extra API Info | Value | + * +-----------------------+------------------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | + * | API-RATE-LIMIT-POOL | COPYTRADING | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+------------------+ */ addOrderTest(req: AddOrderTestReq): Promise; @@ -61,47 +61,47 @@ export interface FuturesAPI { * addTPSLOrder Add Take Profit And Stop Loss Order * 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. * Documentation: https://www.kucoin.com/docs-new/api-3470619 - * +---------------------+-------------+ - * | Extra API Info | Value | - * +---------------------+-------------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | COPYTRADING | - * | API-RATE-LIMIT | 2 | - * +---------------------+-------------+ + * +-----------------------+------------------+ + * | Extra API Info | Value | + * +-----------------------+------------------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | + * | API-RATE-LIMIT-POOL | COPYTRADING | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+------------------+ */ addTPSLOrder(req: AddTPSLOrderReq): Promise; /** * cancelOrderById Cancel Order By OrderId - * Description: Cancel order by system generated orderId. + * Description: Cancel order by system-generated orderId. * Documentation: https://www.kucoin.com/docs-new/api-3470620 - * +---------------------+-------------+ - * | Extra API Info | Value | - * +---------------------+-------------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | COPYTRADING | - * | API-RATE-LIMIT | 1 | - * +---------------------+-------------+ + * +-----------------------+------------------+ + * | Extra API Info | Value | + * +-----------------------+------------------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | + * | API-RATE-LIMIT-POOL | COPYTRADING | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+------------------+ */ cancelOrderById(req: CancelOrderByIdReq): Promise; /** * cancelOrderByClientOid Cancel Order By ClientOid - * Description: Cancel order by client defined orderId. + * Description: Cancel order by client-defined orderId. * Documentation: https://www.kucoin.com/docs-new/api-3470621 - * +---------------------+-------------+ - * | Extra API Info | Value | - * +---------------------+-------------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | COPYTRADING | - * | API-RATE-LIMIT | 1 | - * +---------------------+-------------+ + * +-----------------------+------------------+ + * | Extra API Info | Value | + * +-----------------------+------------------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | + * | API-RATE-LIMIT-POOL | COPYTRADING | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+------------------+ */ cancelOrderByClientOid(req: CancelOrderByClientOidReq): Promise; @@ -109,15 +109,15 @@ export interface FuturesAPI { * getMaxOpenSize Get Max Open Size * Description: Get Maximum Open Position Size. * Documentation: https://www.kucoin.com/docs-new/api-3470612 - * +---------------------+-------------+ - * | Extra API Info | Value | - * +---------------------+-------------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | COPYTRADING | - * | API-RATE-LIMIT | 2 | - * +---------------------+-------------+ + * +-----------------------+------------------+ + * | Extra API Info | Value | + * +-----------------------+------------------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | + * | API-RATE-LIMIT-POOL | COPYTRADING | + * | API-RATE-LIMIT-WEIGHT | 4 | + * +-----------------------+------------------+ */ getMaxOpenSize(req: GetMaxOpenSizeReq): Promise; @@ -125,15 +125,15 @@ export interface FuturesAPI { * getMaxWithdrawMargin Get Max Withdraw Margin * Description: This interface can query the maximum amount of margin that the current position supports withdrawal. * Documentation: https://www.kucoin.com/docs-new/api-3470616 - * +---------------------+-------------+ - * | Extra API Info | Value | - * +---------------------+-------------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | COPYTRADING | - * | API-RATE-LIMIT | 10 | - * +---------------------+-------------+ + * +-----------------------+------------------+ + * | Extra API Info | Value | + * +-----------------------+------------------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | + * | API-RATE-LIMIT-POOL | COPYTRADING | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+------------------+ */ getMaxWithdrawMargin(req: GetMaxWithdrawMarginReq): Promise; @@ -141,15 +141,15 @@ export interface FuturesAPI { * addIsolatedMargin Add Isolated Margin * Description: Add Isolated Margin Manually. * Documentation: https://www.kucoin.com/docs-new/api-3470614 - * +---------------------+-------------+ - * | Extra API Info | Value | - * +---------------------+-------------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | COPYTRADING | - * | API-RATE-LIMIT | 4 | - * +---------------------+-------------+ + * +-----------------------+------------------+ + * | Extra API Info | Value | + * +-----------------------+------------------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | + * | API-RATE-LIMIT-POOL | COPYTRADING | + * | API-RATE-LIMIT-WEIGHT | 4 | + * +-----------------------+------------------+ */ addIsolatedMargin(req: AddIsolatedMarginReq): Promise; @@ -157,31 +157,31 @@ export interface FuturesAPI { * removeIsolatedMargin Remove Isolated Margin * Description: Remove Isolated Margin Manually. * Documentation: https://www.kucoin.com/docs-new/api-3470615 - * +---------------------+-------------+ - * | Extra API Info | Value | - * +---------------------+-------------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | COPYTRADING | - * | API-RATE-LIMIT | 10 | - * +---------------------+-------------+ + * +-----------------------+------------------+ + * | Extra API Info | Value | + * +-----------------------+------------------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | + * | API-RATE-LIMIT-POOL | COPYTRADING | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+------------------+ */ removeIsolatedMargin(req: RemoveIsolatedMarginReq): Promise; /** * modifyIsolatedMarginRiskLimt Modify Isolated Margin Risk Limit - * Description: This interface can be used to obtain information about risk limit level of a specific contract(Only valid for isolated Margin). + * Description: This interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin). * Documentation: https://www.kucoin.com/docs-new/api-3470613 - * +---------------------+-------------+ - * | Extra API Info | Value | - * +---------------------+-------------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | COPYTRADING | - * | API-RATE-LIMIT | 4 | - * +---------------------+-------------+ + * +-----------------------+------------------+ + * | Extra API Info | Value | + * +-----------------------+------------------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | + * | API-RATE-LIMIT-POOL | COPYTRADING | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+------------------+ */ modifyIsolatedMarginRiskLimt( req: ModifyIsolatedMarginRiskLimtReq, @@ -191,15 +191,15 @@ export interface FuturesAPI { * modifyAutoDepositStatus Modify Isolated Margin Auto-Deposit Status * Description: This endpoint is only applicable to isolated margin and is no longer recommended. It is recommended to use cross margin instead. * Documentation: https://www.kucoin.com/docs-new/api-3470617 - * +---------------------+-------------+ - * | Extra API Info | Value | - * +---------------------+-------------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | COPYTRADING | - * | API-RATE-LIMIT | 4 | - * +---------------------+-------------+ + * +-----------------------+------------------+ + * | Extra API Info | Value | + * +-----------------------+------------------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | LEADTRADEFUTURES | + * | API-RATE-LIMIT-POOL | COPYTRADING | + * | API-RATE-LIMIT-WEIGHT | 4 | + * +-----------------------+------------------+ */ modifyAutoDepositStatus(req: ModifyAutoDepositStatusReq): Promise; } diff --git a/sdk/node/src/generate/copytrading/futures/model_add_order_req.ts b/sdk/node/src/generate/copytrading/futures/model_add_order_req.ts index 5fe688c6..988ec54f 100644 --- a/sdk/node/src/generate/copytrading/futures/model_add_order_req.ts +++ b/sdk/node/src/generate/copytrading/futures/model_add_order_req.ts @@ -29,18 +29,13 @@ export class AddOrderReq implements Serializable { */ type: AddOrderReq.TypeEnum = AddOrderReq.TypeEnum.LIMIT; - /** - * remark for the order, length cannot exceed 100 utf8 characters - */ - remark?: string; - /** * Either \'down\' or \'up\'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. */ stop?: AddOrderReq.StopEnum; /** - * Either \'TP\', \'IP\' or \'MP\', Need to be defined if stop is specified. + * Either \'TP\' or \'MP\', Need to be defined if stop is specified. */ stopPriceType?: AddOrderReq.StopPriceTypeEnum; @@ -60,12 +55,7 @@ export class AddOrderReq implements Serializable { closeOrder?: boolean = false; /** - * 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. - */ - forceHold?: boolean = false; - - /** - * Margin mode: ISOLATED, CROSS, default: ISOLATED + * Margin mode: ISOLATED, default: ISOLATED */ marginMode?: AddOrderReq.MarginModeEnum = AddOrderReq.MarginModeEnum.ISOLATED; @@ -100,7 +90,7 @@ export class AddOrderReq implements Serializable { iceberg?: boolean = false; /** - * 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. + * 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. */ visibleSize?: string; @@ -151,16 +141,12 @@ export class AddOrderReq implements Serializable { * specify if the order is an \'limit\' order or \'market\' order */ type: AddOrderReq.TypeEnum; - /** - * remark for the order, length cannot exceed 100 utf8 characters - */ - remark?: string; /** * Either \'down\' or \'up\'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. */ stop?: AddOrderReq.StopEnum; /** - * Either \'TP\', \'IP\' or \'MP\', Need to be defined if stop is specified. + * Either \'TP\' or \'MP\', Need to be defined if stop is specified. */ stopPriceType?: AddOrderReq.StopPriceTypeEnum; /** @@ -176,11 +162,7 @@ export class AddOrderReq implements Serializable { */ closeOrder?: boolean; /** - * 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. - */ - forceHold?: boolean; - /** - * Margin mode: ISOLATED, CROSS, default: ISOLATED + * Margin mode: ISOLATED, default: ISOLATED */ marginMode?: AddOrderReq.MarginModeEnum; /** @@ -208,7 +190,7 @@ export class AddOrderReq implements Serializable { */ iceberg?: boolean; /** - * 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. + * 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. */ visibleSize?: string; }): AddOrderReq { @@ -222,7 +204,6 @@ export class AddOrderReq implements Serializable { } else { obj.type = AddOrderReq.TypeEnum.LIMIT; } - obj.remark = data.remark; obj.stop = data.stop; obj.stopPriceType = data.stopPriceType; obj.stopPrice = data.stopPrice; @@ -236,11 +217,6 @@ export class AddOrderReq implements Serializable { } else { obj.closeOrder = false; } - if (data.forceHold) { - obj.forceHold = data.forceHold; - } else { - obj.forceHold = false; - } if (data.marginMode) { obj.marginMode = data.marginMode; } else { @@ -332,20 +308,12 @@ export namespace AddOrderReq { * MP for mark price, The mark price can be obtained through relevant OPEN API for index services */ MARK_PRICE = 'MP', - /** - * IP for index price, The index price can be obtained through relevant OPEN API for index services - */ - INDEX_PRICE = 'IP', } export enum MarginModeEnum { /** * Isolated Margin */ ISOLATED = 'ISOLATED', - /** - * Cross Margin - */ - CROSS = 'CROSS', } export enum TimeInForceEnum { /** @@ -403,14 +371,6 @@ export class AddOrderReqBuilder { return this; } - /** - * remark for the order, length cannot exceed 100 utf8 characters - */ - setRemark(value: string): AddOrderReqBuilder { - this.obj.remark = value; - return this; - } - /** * Either \'down\' or \'up\'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. */ @@ -420,7 +380,7 @@ export class AddOrderReqBuilder { } /** - * Either \'TP\', \'IP\' or \'MP\', Need to be defined if stop is specified. + * Either \'TP\' or \'MP\', Need to be defined if stop is specified. */ setStopPriceType(value: AddOrderReq.StopPriceTypeEnum): AddOrderReqBuilder { this.obj.stopPriceType = value; @@ -452,15 +412,7 @@ export class AddOrderReqBuilder { } /** - * 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. - */ - setForceHold(value: boolean): AddOrderReqBuilder { - this.obj.forceHold = value; - return this; - } - - /** - * Margin mode: ISOLATED, CROSS, default: ISOLATED + * Margin mode: ISOLATED, default: ISOLATED */ setMarginMode(value: AddOrderReq.MarginModeEnum): AddOrderReqBuilder { this.obj.marginMode = value; @@ -516,7 +468,7 @@ export class AddOrderReqBuilder { } /** - * 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. + * 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. */ setVisibleSize(value: string): AddOrderReqBuilder { this.obj.visibleSize = value; diff --git a/sdk/node/src/generate/copytrading/futures/model_add_order_test_req.ts b/sdk/node/src/generate/copytrading/futures/model_add_order_test_req.ts index 15269f7c..bfbf2afd 100644 --- a/sdk/node/src/generate/copytrading/futures/model_add_order_test_req.ts +++ b/sdk/node/src/generate/copytrading/futures/model_add_order_test_req.ts @@ -5,17 +5,17 @@ import { Serializable } from '@internal/interfaces/serializable'; export class AddOrderTestReq implements Serializable { /** - * 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(-) + * 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 (-). */ clientOid: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddOrderTestReq.SideEnum; /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; @@ -25,27 +25,22 @@ export class AddOrderTestReq implements Serializable { leverage: number; /** - * specify if the order is an \'limit\' order or \'market\' order + * Specify if the order is a \'limit\' order or \'market\' order */ type: AddOrderTestReq.TypeEnum = AddOrderTestReq.TypeEnum.LIMIT; /** - * remark for the order, length cannot exceed 100 utf8 characters - */ - remark?: string; - - /** - * Either \'down\' or \'up\'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. + * Either \'down\' or \'up\'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. */ stop?: AddOrderTestReq.StopEnum; /** - * Either \'TP\', \'IP\' or \'MP\', Need to be defined if stop is specified. + * Either \'TP\' or \'MP\' need to be defined if stop is specified. */ stopPriceType?: AddOrderTestReq.StopPriceTypeEnum; /** - * Need to be defined if stop is specified. + * Needs to be defined if stop is specified. */ stopPrice?: string; @@ -60,12 +55,7 @@ export class AddOrderTestReq implements Serializable { closeOrder?: boolean = false; /** - * 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. - */ - forceHold?: boolean = false; - - /** - * Margin mode: ISOLATED, CROSS, default: ISOLATED + * Margin mode: ISOLATED, default: ISOLATED */ marginMode?: AddOrderTestReq.MarginModeEnum = AddOrderTestReq.MarginModeEnum.ISOLATED; @@ -75,7 +65,7 @@ export class AddOrderTestReq implements Serializable { price?: string; /** - * Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. + * Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. */ size: number; @@ -86,22 +76,22 @@ export class AddOrderTestReq implements Serializable { AddOrderTestReq.TimeInForceEnum.GOOD_TILL_CANCELED; /** - * 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. + * Optional for type is \'limit\' order, post only flag, invalid when timeInForce is IOC. When postOnly is true, not allowed to 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 fees, the order will be fully rejected. */ postOnly?: boolean = false; /** - * Optional for type is \'limit\' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. + * Optional for type is \'limit\' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. */ hidden?: boolean = false; /** - * 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. + * Optional for type is \'limit\' order, Only visible portion of the order is displayed in the order book. When iceberg is chose, choosing postOnly is not allowed. */ iceberg?: boolean = false; /** - * 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. + * 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. */ visibleSize?: string; @@ -135,15 +125,15 @@ export class AddOrderTestReq implements Serializable { */ static create(data: { /** - * 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(-) + * 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 (-). */ clientOid: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddOrderTestReq.SideEnum; /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; /** @@ -151,23 +141,19 @@ export class AddOrderTestReq implements Serializable { */ leverage: number; /** - * specify if the order is an \'limit\' order or \'market\' order + * Specify if the order is a \'limit\' order or \'market\' order */ type: AddOrderTestReq.TypeEnum; /** - * remark for the order, length cannot exceed 100 utf8 characters - */ - remark?: string; - /** - * Either \'down\' or \'up\'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. + * Either \'down\' or \'up\'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. */ stop?: AddOrderTestReq.StopEnum; /** - * Either \'TP\', \'IP\' or \'MP\', Need to be defined if stop is specified. + * Either \'TP\' or \'MP\' need to be defined if stop is specified. */ stopPriceType?: AddOrderTestReq.StopPriceTypeEnum; /** - * Need to be defined if stop is specified. + * Needs to be defined if stop is specified. */ stopPrice?: string; /** @@ -179,11 +165,7 @@ export class AddOrderTestReq implements Serializable { */ closeOrder?: boolean; /** - * 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. - */ - forceHold?: boolean; - /** - * Margin mode: ISOLATED, CROSS, default: ISOLATED + * Margin mode: ISOLATED, default: ISOLATED */ marginMode?: AddOrderTestReq.MarginModeEnum; /** @@ -191,7 +173,7 @@ export class AddOrderTestReq implements Serializable { */ price?: string; /** - * Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. + * Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. */ size: number; /** @@ -199,19 +181,19 @@ export class AddOrderTestReq implements Serializable { */ timeInForce?: AddOrderTestReq.TimeInForceEnum; /** - * 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. + * Optional for type is \'limit\' order, post only flag, invalid when timeInForce is IOC. When postOnly is true, not allowed to 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 fees, the order will be fully rejected. */ postOnly?: boolean; /** - * Optional for type is \'limit\' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. + * Optional for type is \'limit\' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. */ hidden?: boolean; /** - * 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. + * Optional for type is \'limit\' order, Only visible portion of the order is displayed in the order book. When iceberg is chose, choosing postOnly is not allowed. */ iceberg?: boolean; /** - * 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. + * 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. */ visibleSize?: string; }): AddOrderTestReq { @@ -225,7 +207,6 @@ export class AddOrderTestReq implements Serializable { } else { obj.type = AddOrderTestReq.TypeEnum.LIMIT; } - obj.remark = data.remark; obj.stop = data.stop; obj.stopPriceType = data.stopPriceType; obj.stopPrice = data.stopPrice; @@ -239,11 +220,6 @@ export class AddOrderTestReq implements Serializable { } else { obj.closeOrder = false; } - if (data.forceHold) { - obj.forceHold = data.forceHold; - } else { - obj.forceHold = false; - } if (data.marginMode) { obj.marginMode = data.marginMode; } else { @@ -322,7 +298,7 @@ export namespace AddOrderTestReq { */ DOWN = 'down', /** - * Triggers when the price reaches or goes above the stopPrice + * Triggers when the price reaches or goes above the stopPrice. */ UP = 'up', } @@ -332,23 +308,15 @@ export namespace AddOrderTestReq { */ TRADE_PRICE = 'TP', /** - * MP for mark price, The mark price can be obtained through relevant OPEN API for index services + * MP for mark price. The mark price can be obtained through relevant OPEN API for index services. */ MARK_PRICE = 'MP', - /** - * IP for index price, The index price can be obtained through relevant OPEN API for index services - */ - INDEX_PRICE = 'IP', } export enum MarginModeEnum { /** - * + * Isolated Margin */ ISOLATED = 'ISOLATED', - /** - * - */ - CROSS = 'CROSS', } export enum TimeInForceEnum { /** @@ -367,7 +335,7 @@ export class AddOrderTestReqBuilder { this.obj = obj; } /** - * 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(-) + * 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 (-). */ setClientOid(value: string): AddOrderTestReqBuilder { this.obj.clientOid = value; @@ -375,7 +343,7 @@ export class AddOrderTestReqBuilder { } /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ setSide(value: AddOrderTestReq.SideEnum): AddOrderTestReqBuilder { this.obj.side = value; @@ -383,7 +351,7 @@ export class AddOrderTestReqBuilder { } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): AddOrderTestReqBuilder { this.obj.symbol = value; @@ -399,7 +367,7 @@ export class AddOrderTestReqBuilder { } /** - * specify if the order is an \'limit\' order or \'market\' order + * Specify if the order is a \'limit\' order or \'market\' order */ setType(value: AddOrderTestReq.TypeEnum): AddOrderTestReqBuilder { this.obj.type = value; @@ -407,15 +375,7 @@ export class AddOrderTestReqBuilder { } /** - * remark for the order, length cannot exceed 100 utf8 characters - */ - setRemark(value: string): AddOrderTestReqBuilder { - this.obj.remark = value; - return this; - } - - /** - * Either \'down\' or \'up\'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. + * Either \'down\' or \'up\'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. */ setStop(value: AddOrderTestReq.StopEnum): AddOrderTestReqBuilder { this.obj.stop = value; @@ -423,7 +383,7 @@ export class AddOrderTestReqBuilder { } /** - * Either \'TP\', \'IP\' or \'MP\', Need to be defined if stop is specified. + * Either \'TP\' or \'MP\' need to be defined if stop is specified. */ setStopPriceType(value: AddOrderTestReq.StopPriceTypeEnum): AddOrderTestReqBuilder { this.obj.stopPriceType = value; @@ -431,7 +391,7 @@ export class AddOrderTestReqBuilder { } /** - * Need to be defined if stop is specified. + * Needs to be defined if stop is specified. */ setStopPrice(value: string): AddOrderTestReqBuilder { this.obj.stopPrice = value; @@ -455,15 +415,7 @@ export class AddOrderTestReqBuilder { } /** - * 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. - */ - setForceHold(value: boolean): AddOrderTestReqBuilder { - this.obj.forceHold = value; - return this; - } - - /** - * Margin mode: ISOLATED, CROSS, default: ISOLATED + * Margin mode: ISOLATED, default: ISOLATED */ setMarginMode(value: AddOrderTestReq.MarginModeEnum): AddOrderTestReqBuilder { this.obj.marginMode = value; @@ -479,7 +431,7 @@ export class AddOrderTestReqBuilder { } /** - * Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. + * Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. */ setSize(value: number): AddOrderTestReqBuilder { this.obj.size = value; @@ -495,7 +447,7 @@ export class AddOrderTestReqBuilder { } /** - * 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. + * Optional for type is \'limit\' order, post only flag, invalid when timeInForce is IOC. When postOnly is true, not allowed to 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 fees, the order will be fully rejected. */ setPostOnly(value: boolean): AddOrderTestReqBuilder { this.obj.postOnly = value; @@ -503,7 +455,7 @@ export class AddOrderTestReqBuilder { } /** - * Optional for type is \'limit\' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. + * Optional for type is \'limit\' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. */ setHidden(value: boolean): AddOrderTestReqBuilder { this.obj.hidden = value; @@ -511,7 +463,7 @@ export class AddOrderTestReqBuilder { } /** - * 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. + * Optional for type is \'limit\' order, Only visible portion of the order is displayed in the order book. When iceberg is chose, choosing postOnly is not allowed. */ setIceberg(value: boolean): AddOrderTestReqBuilder { this.obj.iceberg = value; @@ -519,7 +471,7 @@ export class AddOrderTestReqBuilder { } /** - * 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. + * 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. */ setVisibleSize(value: string): AddOrderTestReqBuilder { this.obj.visibleSize = value; diff --git a/sdk/node/src/generate/copytrading/futures/model_add_order_test_resp.ts b/sdk/node/src/generate/copytrading/futures/model_add_order_test_resp.ts index a1aa0a09..756bcf0d 100644 --- a/sdk/node/src/generate/copytrading/futures/model_add_order_test_resp.ts +++ b/sdk/node/src/generate/copytrading/futures/model_add_order_test_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class AddOrderTestResp implements Response { /** - * The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + * The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. */ orderId: string; diff --git a/sdk/node/src/generate/copytrading/futures/model_add_tpsl_order_req.ts b/sdk/node/src/generate/copytrading/futures/model_add_tpsl_order_req.ts index 1e4a3286..9877af57 100644 --- a/sdk/node/src/generate/copytrading/futures/model_add_tpsl_order_req.ts +++ b/sdk/node/src/generate/copytrading/futures/model_add_tpsl_order_req.ts @@ -5,17 +5,17 @@ import { Serializable } from '@internal/interfaces/serializable'; export class AddTPSLOrderReq implements Serializable { /** - * 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(-) + * 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 (-). */ clientOid: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddTPSLOrderReq.SideEnum; /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; @@ -25,17 +25,12 @@ export class AddTPSLOrderReq implements Serializable { leverage: number; /** - * specify if the order is an \'limit\' order or \'market\' order + * Specify if the order is a \'limit\' order or \'market\' order */ type: AddTPSLOrderReq.TypeEnum = AddTPSLOrderReq.TypeEnum.LIMIT; /** - * remark for the order, length cannot exceed 100 utf8 characters - */ - remark?: string; - - /** - * Either \'TP\', \'IP\' or \'MP\' + * Either \'TP\' or \'MP\' */ stopPriceType?: AddTPSLOrderReq.StopPriceTypeEnum; @@ -50,12 +45,7 @@ export class AddTPSLOrderReq implements Serializable { closeOrder?: boolean = false; /** - * 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. - */ - forceHold?: boolean = false; - - /** - * Margin mode: ISOLATED, CROSS, default: ISOLATED + * Margin mode: ISOLATED, default: ISOLATED */ marginMode?: AddTPSLOrderReq.MarginModeEnum = AddTPSLOrderReq.MarginModeEnum.ISOLATED; @@ -65,7 +55,7 @@ export class AddTPSLOrderReq implements Serializable { price?: string; /** - * Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. + * Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. */ size: number; @@ -76,22 +66,22 @@ export class AddTPSLOrderReq implements Serializable { AddTPSLOrderReq.TimeInForceEnum.GOOD_TILL_CANCELED; /** - * 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. + * 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. */ postOnly?: boolean = false; /** - * Optional for type is \'limit\' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. + * Optional for type is \'limit\' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. */ hidden?: boolean = false; /** - * 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. + * 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. */ iceberg?: boolean = false; /** - * 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. + * 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. */ visibleSize?: string; @@ -135,15 +125,15 @@ export class AddTPSLOrderReq implements Serializable { */ static create(data: { /** - * 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(-) + * 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 (-). */ clientOid: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddTPSLOrderReq.SideEnum; /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; /** @@ -151,15 +141,11 @@ export class AddTPSLOrderReq implements Serializable { */ leverage: number; /** - * specify if the order is an \'limit\' order or \'market\' order + * Specify if the order is a \'limit\' order or \'market\' order */ type: AddTPSLOrderReq.TypeEnum; /** - * remark for the order, length cannot exceed 100 utf8 characters - */ - remark?: string; - /** - * Either \'TP\', \'IP\' or \'MP\' + * Either \'TP\' or \'MP\' */ stopPriceType?: AddTPSLOrderReq.StopPriceTypeEnum; /** @@ -171,11 +157,7 @@ export class AddTPSLOrderReq implements Serializable { */ closeOrder?: boolean; /** - * 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. - */ - forceHold?: boolean; - /** - * Margin mode: ISOLATED, CROSS, default: ISOLATED + * Margin mode: ISOLATED, default: ISOLATED */ marginMode?: AddTPSLOrderReq.MarginModeEnum; /** @@ -183,7 +165,7 @@ export class AddTPSLOrderReq implements Serializable { */ price?: string; /** - * Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. + * Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. */ size: number; /** @@ -191,19 +173,19 @@ export class AddTPSLOrderReq implements Serializable { */ timeInForce?: AddTPSLOrderReq.TimeInForceEnum; /** - * 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. + * 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. */ postOnly?: boolean; /** - * Optional for type is \'limit\' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. + * Optional for type is \'limit\' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. */ hidden?: boolean; /** - * 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. + * 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. */ iceberg?: boolean; /** - * 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. + * 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. */ visibleSize?: string; /** @@ -225,7 +207,6 @@ export class AddTPSLOrderReq implements Serializable { } else { obj.type = AddTPSLOrderReq.TypeEnum.LIMIT; } - obj.remark = data.remark; obj.stopPriceType = data.stopPriceType; if (data.reduceOnly) { obj.reduceOnly = data.reduceOnly; @@ -237,11 +218,6 @@ export class AddTPSLOrderReq implements Serializable { } else { obj.closeOrder = false; } - if (data.forceHold) { - obj.forceHold = data.forceHold; - } else { - obj.forceHold = false; - } if (data.marginMode) { obj.marginMode = data.marginMode; } else { @@ -322,31 +298,23 @@ export namespace AddTPSLOrderReq { */ TRADE_PRICE = 'TP', /** - * MP for mark price, The mark price can be obtained through relevant OPEN API for index services + * MP for mark price. The mark price can be obtained through relevant OPEN API for index services. */ MARK_PRICE = 'MP', - /** - * IP for index price, The index price can be obtained through relevant OPEN API for index services - */ - INDEX_PRICE = 'IP', } export enum MarginModeEnum { /** * */ ISOLATED = 'ISOLATED', - /** - * - */ - CROSS = 'CROSS', } export enum TimeInForceEnum { /** - * order remains open on the order book until canceled. This is the default type if the field is left empty. + * Order remains open on the order book until canceled. This is the default type if the field is left empty. */ GOOD_TILL_CANCELED = 'GTC', /** - * being matched or not, the remaining size of the order will be instantly canceled instead of entering the order book. + * Being matched or not, the remaining size of the order will be instantly canceled instead of entering the order book. */ IMMEDIATE_OR_CANCEL = 'IOC', } @@ -357,7 +325,7 @@ export class AddTPSLOrderReqBuilder { this.obj = obj; } /** - * 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(-) + * 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 (-). */ setClientOid(value: string): AddTPSLOrderReqBuilder { this.obj.clientOid = value; @@ -365,7 +333,7 @@ export class AddTPSLOrderReqBuilder { } /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ setSide(value: AddTPSLOrderReq.SideEnum): AddTPSLOrderReqBuilder { this.obj.side = value; @@ -373,7 +341,7 @@ export class AddTPSLOrderReqBuilder { } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): AddTPSLOrderReqBuilder { this.obj.symbol = value; @@ -389,7 +357,7 @@ export class AddTPSLOrderReqBuilder { } /** - * specify if the order is an \'limit\' order or \'market\' order + * Specify if the order is a \'limit\' order or \'market\' order */ setType(value: AddTPSLOrderReq.TypeEnum): AddTPSLOrderReqBuilder { this.obj.type = value; @@ -397,15 +365,7 @@ export class AddTPSLOrderReqBuilder { } /** - * remark for the order, length cannot exceed 100 utf8 characters - */ - setRemark(value: string): AddTPSLOrderReqBuilder { - this.obj.remark = value; - return this; - } - - /** - * Either \'TP\', \'IP\' or \'MP\' + * Either \'TP\' or \'MP\' */ setStopPriceType(value: AddTPSLOrderReq.StopPriceTypeEnum): AddTPSLOrderReqBuilder { this.obj.stopPriceType = value; @@ -429,15 +389,7 @@ export class AddTPSLOrderReqBuilder { } /** - * 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. - */ - setForceHold(value: boolean): AddTPSLOrderReqBuilder { - this.obj.forceHold = value; - return this; - } - - /** - * Margin mode: ISOLATED, CROSS, default: ISOLATED + * Margin mode: ISOLATED, default: ISOLATED */ setMarginMode(value: AddTPSLOrderReq.MarginModeEnum): AddTPSLOrderReqBuilder { this.obj.marginMode = value; @@ -453,7 +405,7 @@ export class AddTPSLOrderReqBuilder { } /** - * Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. + * Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. */ setSize(value: number): AddTPSLOrderReqBuilder { this.obj.size = value; @@ -469,7 +421,7 @@ export class AddTPSLOrderReqBuilder { } /** - * 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. + * 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. */ setPostOnly(value: boolean): AddTPSLOrderReqBuilder { this.obj.postOnly = value; @@ -477,7 +429,7 @@ export class AddTPSLOrderReqBuilder { } /** - * Optional for type is \'limit\' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. + * Optional for type is \'limit\' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. */ setHidden(value: boolean): AddTPSLOrderReqBuilder { this.obj.hidden = value; @@ -485,7 +437,7 @@ export class AddTPSLOrderReqBuilder { } /** - * 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. + * 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. */ setIceberg(value: boolean): AddTPSLOrderReqBuilder { this.obj.iceberg = value; @@ -493,7 +445,7 @@ export class AddTPSLOrderReqBuilder { } /** - * 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. + * 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. */ setVisibleSize(value: string): AddTPSLOrderReqBuilder { this.obj.visibleSize = value; diff --git a/sdk/node/src/generate/copytrading/futures/model_add_tpsl_order_resp.ts b/sdk/node/src/generate/copytrading/futures/model_add_tpsl_order_resp.ts index 84ea3778..98319120 100644 --- a/sdk/node/src/generate/copytrading/futures/model_add_tpsl_order_resp.ts +++ b/sdk/node/src/generate/copytrading/futures/model_add_tpsl_order_resp.ts @@ -6,12 +6,12 @@ import { Response } from '@internal/interfaces/serializable'; export class AddTPSLOrderResp implements Response { /** - * The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + * The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. */ orderId: string; /** - * The user self-defined order id. + * The user self-defined order ID. */ clientOid: string; diff --git a/sdk/node/src/generate/copytrading/futures/model_cancel_order_by_client_oid_req.ts b/sdk/node/src/generate/copytrading/futures/model_cancel_order_by_client_oid_req.ts index 8c351924..7b62defa 100644 --- a/sdk/node/src/generate/copytrading/futures/model_cancel_order_by_client_oid_req.ts +++ b/sdk/node/src/generate/copytrading/futures/model_cancel_order_by_client_oid_req.ts @@ -5,12 +5,12 @@ import { Serializable } from '@internal/interfaces/serializable'; export class CancelOrderByClientOidReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * The user self-defined order id. + * The user self-defined order ID. */ clientOid?: string; @@ -31,11 +31,11 @@ export class CancelOrderByClientOidReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * The user self-defined order id. + * The user self-defined order ID. */ clientOid?: string; }): CancelOrderByClientOidReq { @@ -70,7 +70,7 @@ export class CancelOrderByClientOidReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): CancelOrderByClientOidReqBuilder { this.obj.symbol = value; @@ -78,7 +78,7 @@ export class CancelOrderByClientOidReqBuilder { } /** - * The user self-defined order id. + * The user self-defined order ID. */ setClientOid(value: string): CancelOrderByClientOidReqBuilder { this.obj.clientOid = value; diff --git a/sdk/node/src/generate/copytrading/futures/model_cancel_order_by_id_req.ts b/sdk/node/src/generate/copytrading/futures/model_cancel_order_by_id_req.ts index 775dab8f..a344f48f 100644 --- a/sdk/node/src/generate/copytrading/futures/model_cancel_order_by_id_req.ts +++ b/sdk/node/src/generate/copytrading/futures/model_cancel_order_by_id_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class CancelOrderByIdReq implements Serializable { /** - * Order id + * Order ID */ orderId?: string; @@ -26,7 +26,7 @@ export class CancelOrderByIdReq implements Serializable { */ static create(data: { /** - * Order id + * Order ID */ orderId?: string; }): CancelOrderByIdReq { @@ -60,7 +60,7 @@ export class CancelOrderByIdReqBuilder { this.obj = obj; } /** - * Order id + * Order ID */ setOrderId(value: string): CancelOrderByIdReqBuilder { this.obj.orderId = value; diff --git a/sdk/node/src/generate/copytrading/futures/model_get_max_open_size_req.ts b/sdk/node/src/generate/copytrading/futures/model_get_max_open_size_req.ts index 79388690..335940b5 100644 --- a/sdk/node/src/generate/copytrading/futures/model_get_max_open_size_req.ts +++ b/sdk/node/src/generate/copytrading/futures/model_get_max_open_size_req.ts @@ -5,14 +5,14 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetMaxOpenSizeReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Order price + * Order Price */ - price?: string; + price?: number; /** * Leverage @@ -36,13 +36,13 @@ export class GetMaxOpenSizeReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Order price + * Order Price */ - price?: string; + price?: number; /** * Leverage */ @@ -80,7 +80,7 @@ export class GetMaxOpenSizeReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetMaxOpenSizeReqBuilder { this.obj.symbol = value; @@ -88,9 +88,9 @@ export class GetMaxOpenSizeReqBuilder { } /** - * Order price + * Order Price */ - setPrice(value: string): GetMaxOpenSizeReqBuilder { + setPrice(value: number): GetMaxOpenSizeReqBuilder { this.obj.price = value; return this; } diff --git a/sdk/node/src/generate/copytrading/futures/model_get_max_open_size_resp.ts b/sdk/node/src/generate/copytrading/futures/model_get_max_open_size_resp.ts index 62d48c39..bbcb6453 100644 --- a/sdk/node/src/generate/copytrading/futures/model_get_max_open_size_resp.ts +++ b/sdk/node/src/generate/copytrading/futures/model_get_max_open_size_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class GetMaxOpenSizeResp implements Response { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; diff --git a/sdk/node/src/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_req.ts b/sdk/node/src/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_req.ts index e790a40d..c157c7be 100644 --- a/sdk/node/src/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_req.ts +++ b/sdk/node/src/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_req.ts @@ -5,12 +5,12 @@ import { Serializable } from '@internal/interfaces/serializable'; export class ModifyIsolatedMarginRiskLimtReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; /** - * level + * Level */ level: number; @@ -36,11 +36,11 @@ export class ModifyIsolatedMarginRiskLimtReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; /** - * level + * Level */ level: number; }): ModifyIsolatedMarginRiskLimtReq { @@ -75,7 +75,7 @@ export class ModifyIsolatedMarginRiskLimtReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): ModifyIsolatedMarginRiskLimtReqBuilder { this.obj.symbol = value; @@ -83,7 +83,7 @@ export class ModifyIsolatedMarginRiskLimtReqBuilder { } /** - * level + * Level */ setLevel(value: number): ModifyIsolatedMarginRiskLimtReqBuilder { this.obj.level = value; diff --git a/sdk/node/src/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_resp.ts b/sdk/node/src/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_resp.ts index 8c4b0edf..65b06032 100644 --- a/sdk/node/src/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_resp.ts +++ b/sdk/node/src/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class ModifyIsolatedMarginRiskLimtResp implements Response { /** - * To adjust the level will cancel the open order, the response can only indicate whether the submit of the adjustment request is successful or not. + * Adjusting the level will result in the cancellation of any open orders. The response will indicate only whether the adjustment request was successfully submitted. */ data: boolean; diff --git a/sdk/node/src/generate/copytrading/futures/model_remove_isolated_margin_req.ts b/sdk/node/src/generate/copytrading/futures/model_remove_isolated_margin_req.ts index bec03120..eb1967e0 100644 --- a/sdk/node/src/generate/copytrading/futures/model_remove_isolated_margin_req.ts +++ b/sdk/node/src/generate/copytrading/futures/model_remove_isolated_margin_req.ts @@ -12,7 +12,7 @@ export class RemoveIsolatedMarginReq implements Serializable { /** * 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 */ - withdrawAmount: string; + withdrawAmount: number; /** * Private constructor, please use the corresponding static methods to construct the object. @@ -42,7 +42,7 @@ export class RemoveIsolatedMarginReq implements Serializable { /** * 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 */ - withdrawAmount: string; + withdrawAmount: number; }): RemoveIsolatedMarginReq { let obj = new RemoveIsolatedMarginReq(); obj.symbol = data.symbol; @@ -85,7 +85,7 @@ export class RemoveIsolatedMarginReqBuilder { /** * 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 */ - setWithdrawAmount(value: string): RemoveIsolatedMarginReqBuilder { + setWithdrawAmount(value: number): RemoveIsolatedMarginReqBuilder { this.obj.withdrawAmount = value; return this; } diff --git a/sdk/node/src/generate/earn/earn/api_earn.template b/sdk/node/src/generate/earn/earn/api_earn.template index 5d1b55bf..1cebd832 100644 --- a/sdk/node/src/generate/earn/earn/api_earn.template +++ b/sdk/node/src/generate/earn/earn/api_earn.template @@ -8,7 +8,7 @@ describe('Auto Test', ()=> { test('purchase request test', ()=> { /** * purchase - * purchase + * Purchase * /api/v1/earn/orders */ let builder = PurchaseReq.builder(); @@ -95,26 +95,6 @@ describe('Auto Test', ()=> { }); }) - test('getAccountHolding request test', ()=> { - /** - * getAccountHolding - * Get Account Holding - * /api/v1/earn/hold-assets - */ - let builder = GetAccountHoldingReq.builder(); - builder.setCurrency(?).setProductId(?).setProductCategory(?).setCurrentPage(?).setPageSize(?); - let req = builder.build(); - let resp = api.getAccountHolding(req); - return resp.then(result => { - expect(result.totalNum).toEqual(expect.anything()); - expect(result.items).toEqual(expect.anything()); - expect(result.currentPage).toEqual(expect.anything()); - expect(result.pageSize).toEqual(expect.anything()); - expect(result.totalPage).toEqual(expect.anything()); - console.log(resp); - }); - }) - test('getStakingProducts request test', ()=> { /** * getStakingProducts @@ -163,4 +143,24 @@ describe('Auto Test', ()=> { }); }) + test('getAccountHolding request test', ()=> { + /** + * getAccountHolding + * Get Account Holding + * /api/v1/earn/hold-assets + */ + let builder = GetAccountHoldingReq.builder(); + builder.setCurrency(?).setProductId(?).setProductCategory(?).setCurrentPage(?).setPageSize(?); + let req = builder.build(); + let resp = api.getAccountHolding(req); + return resp.then(result => { + expect(result.totalNum).toEqual(expect.anything()); + expect(result.items).toEqual(expect.anything()); + expect(result.currentPage).toEqual(expect.anything()); + expect(result.pageSize).toEqual(expect.anything()); + expect(result.totalPage).toEqual(expect.anything()); + console.log(resp); + }); + }) + }) \ No newline at end of file diff --git a/sdk/node/src/generate/earn/earn/api_earn.test.ts b/sdk/node/src/generate/earn/earn/api_earn.test.ts index 732b2480..a1c13d88 100644 --- a/sdk/node/src/generate/earn/earn/api_earn.test.ts +++ b/sdk/node/src/generate/earn/earn/api_earn.test.ts @@ -22,7 +22,7 @@ describe('Auto Test', () => { test('purchase request test', () => { /** * purchase - * purchase + * Purchase * /api/v1/earn/orders */ let data = '{"productId": "2611", "amount": "1", "accountType": "TRADE"}'; @@ -36,7 +36,7 @@ describe('Auto Test', () => { test('purchase response test', () => { /** * purchase - * purchase + * Purchase * /api/v1/earn/orders */ let data = @@ -175,38 +175,6 @@ describe('Auto Test', () => { console.log(resp); } }); - test('getAccountHolding request test', () => { - /** - * getAccountHolding - * Get Account Holding - * /api/v1/earn/hold-assets - */ - let data = - '{"currency": "KCS", "productId": "example_string_default_value", "productCategory": "DEMAND", "currentPage": 1, "pageSize": 10}'; - let req = GetAccountHoldingReq.fromJson(data); - expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( - false, - ); - console.log(req); - }); - - test('getAccountHolding response test', () => { - /** - * getAccountHolding - * Get Account Holding - * /api/v1/earn/hold-assets - */ - let data = - '{\n "code": "200000",\n "data": {\n "totalNum": 1,\n "totalPage": 1,\n "currentPage": 1,\n "pageSize": 15,\n "items": [\n {\n "orderId": "2767291",\n "productId": "2611",\n "productCategory": "KCS_STAKING",\n "productType": "DEMAND",\n "currency": "KCS",\n "incomeCurrency": "KCS",\n "returnRate": "0.03471727",\n "holdAmount": "1",\n "redeemedAmount": "0",\n "redeemingAmount": "1",\n "lockStartTime": 1701252000000,\n "lockEndTime": null,\n "purchaseTime": 1729257513000,\n "redeemPeriod": 3,\n "status": "REDEEMING",\n "earlyRedeemSupported": 0\n }\n ]\n }\n}'; - let commonResp = RestResponse.fromJson(data); - let resp = GetAccountHoldingResp.fromObject(commonResp.data); - if (commonResp.data !== null) { - expect( - Object.values(resp).every((value) => value === null || value === undefined), - ).toBe(false); - console.log(resp); - } - }); test('getStakingProducts request test', () => { /** * getStakingProducts @@ -300,4 +268,36 @@ describe('Auto Test', () => { console.log(resp); } }); + test('getAccountHolding request test', () => { + /** + * getAccountHolding + * Get Account Holding + * /api/v1/earn/hold-assets + */ + let data = + '{"currency": "KCS", "productId": "example_string_default_value", "productCategory": "DEMAND", "currentPage": 1, "pageSize": 10}'; + let req = GetAccountHoldingReq.fromJson(data); + expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( + false, + ); + console.log(req); + }); + + test('getAccountHolding response test', () => { + /** + * getAccountHolding + * Get Account Holding + * /api/v1/earn/hold-assets + */ + let data = + '{\n "code": "200000",\n "data": {\n "totalNum": 1,\n "totalPage": 1,\n "currentPage": 1,\n "pageSize": 15,\n "items": [\n {\n "orderId": "2767291",\n "productId": "2611",\n "productCategory": "KCS_STAKING",\n "productType": "DEMAND",\n "currency": "KCS",\n "incomeCurrency": "KCS",\n "returnRate": "0.03471727",\n "holdAmount": "1",\n "redeemedAmount": "0",\n "redeemingAmount": "1",\n "lockStartTime": 1701252000000,\n "lockEndTime": null,\n "purchaseTime": 1729257513000,\n "redeemPeriod": 3,\n "status": "REDEEMING",\n "earlyRedeemSupported": 0\n }\n ]\n }\n}'; + let commonResp = RestResponse.fromJson(data); + let resp = GetAccountHoldingResp.fromObject(commonResp.data); + if (commonResp.data !== null) { + expect( + Object.values(resp).every((value) => value === null || value === undefined), + ).toBe(false); + console.log(resp); + } + }); }); diff --git a/sdk/node/src/generate/earn/earn/api_earn.ts b/sdk/node/src/generate/earn/earn/api_earn.ts index 8ba5bad8..3a3acd38 100644 --- a/sdk/node/src/generate/earn/earn/api_earn.ts +++ b/sdk/node/src/generate/earn/earn/api_earn.ts @@ -22,148 +22,148 @@ import { GetKcsStakingProductsResp } from './model_get_kcs_staking_products_resp export interface EarnAPI { /** - * purchase purchase - * Description: This endpoint allows subscribing earn product + * purchase Purchase + * Description: This endpoint allows you to subscribe Earn products. * Documentation: https://www.kucoin.com/docs-new/api-3470268 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | EARN | - * | API-RATE-LIMIT-POOL | EARN | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | EARN | + * | API-RATE-LIMIT-POOL | EARN | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ purchase(req: PurchaseReq): Promise; /** * getRedeemPreview Get Redeem Preview - * Description: This endpoint allows subscribing earn products + * Description: This endpoint allows you to subscribe Earn products. * Documentation: https://www.kucoin.com/docs-new/api-3470269 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | EARN | - * | API-RATE-LIMIT-POOL | EARN | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | EARN | + * | API-RATE-LIMIT-POOL | EARN | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getRedeemPreview(req: GetRedeemPreviewReq): Promise; /** * redeem Redeem - * Description: This endpoint allows initiating redemption by holding ID. If the current holding is fully redeemed or in the process of being redeemed, it indicates that the holding does not exist. + * Description: This endpoint allows you to redeem Earn products by using holding ID. If the current holding is fully redeemed or in the process of being redeemed, it means that the holding does not exist. * Documentation: https://www.kucoin.com/docs-new/api-3470270 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | EARN | - * | API-RATE-LIMIT-POOL | EARN | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | EARN | + * | API-RATE-LIMIT-POOL | EARN | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ redeem(req: RedeemReq): Promise; /** * getSavingsProducts Get Savings Products - * Description: This endpoint can get available savings products. If no products are available, an empty list is returned. + * Description: Available savings products can be obtained at this endpoint. If no products are available, an empty list is returned. * Documentation: https://www.kucoin.com/docs-new/api-3470271 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | EARN | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | EARN | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getSavingsProducts(req: GetSavingsProductsReq): Promise; /** * getPromotionProducts Get Promotion Products - * Description: This endpoint can get available limited-time promotion products. If no products are available, an empty list is returned. + * Description: Available limited-duration products can be obtained at this endpoint. If no products are available, an empty list is returned. * Documentation: https://www.kucoin.com/docs-new/api-3470272 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | EARN | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | EARN | + * | API-RATE-LIMIT-WEIGHT | NULL | + * +-----------------------+---------+ */ getPromotionProducts(req: GetPromotionProductsReq): Promise; - /** - * getAccountHolding Get Account Holding - * Description: This endpoint can get current holding assets information. If no current holding assets are available, an empty list is returned. - * Documentation: https://www.kucoin.com/docs-new/api-3470273 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | EARN | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ - */ - getAccountHolding(req: GetAccountHoldingReq): Promise; - /** * getStakingProducts Get Staking Products - * Description: This endpoint can get available staking products. If no products are available, an empty list is returned. + * Description: Available staking products can be obtained at this endpoint. If no products are available, an empty list is returned. * Documentation: https://www.kucoin.com/docs-new/api-3470274 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | EARN | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | EARN | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getStakingProducts(req: GetStakingProductsReq): Promise; /** * getKcsStakingProducts Get KCS Staking Products - * Description: This endpoint can get available KCS staking products. If no products are available, an empty list is returned. + * Description: Available KCS staking products can be obtained at this endpoint. If no products are available, an empty list is returned. * Documentation: https://www.kucoin.com/docs-new/api-3470275 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | EARN | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | EARN | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getKcsStakingProducts(req: GetKcsStakingProductsReq): Promise; /** * getETHStakingProducts Get ETH Staking Products - * Description: This endpoint can get available ETH staking products. If no products are available, an empty list is returned. + * Description: Available ETH staking products can be obtained at this endpoint. If no products are available, an empty list is returned. * Documentation: https://www.kucoin.com/docs-new/api-3470276 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | EARN | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | EARN | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getETHStakingProducts(req: GetETHStakingProductsReq): Promise; + + /** + * getAccountHolding Get Account Holding + * Description: Information on currently held assets can be obtained at this endpoint. If no assets are currently held, an empty list is returned. + * Documentation: https://www.kucoin.com/docs-new/api-3470273 + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | EARN | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ + */ + getAccountHolding(req: GetAccountHoldingReq): Promise; } export class EarnAPIImpl implements EarnAPI { @@ -229,18 +229,6 @@ export class EarnAPIImpl implements EarnAPI { ); } - getAccountHolding(req: GetAccountHoldingReq): Promise { - return this.transport.call( - 'spot', - false, - 'GET', - '/api/v1/earn/hold-assets', - req, - GetAccountHoldingResp, - false, - ); - } - getStakingProducts(req: GetStakingProductsReq): Promise { return this.transport.call( 'spot', @@ -276,4 +264,16 @@ export class EarnAPIImpl implements EarnAPI { false, ); } + + getAccountHolding(req: GetAccountHoldingReq): Promise { + return this.transport.call( + 'spot', + false, + 'GET', + '/api/v1/earn/hold-assets', + req, + GetAccountHoldingResp, + false, + ); + } } diff --git a/sdk/node/src/generate/earn/earn/model_get_account_holding_resp.ts b/sdk/node/src/generate/earn/earn/model_get_account_holding_resp.ts index 711e7078..0e11b1e1 100644 --- a/sdk/node/src/generate/earn/earn/model_get_account_holding_resp.ts +++ b/sdk/node/src/generate/earn/earn/model_get_account_holding_resp.ts @@ -28,7 +28,7 @@ export class GetAccountHoldingResp implements Response { pageSize: number; /** - * total page + * total pages */ totalPage: number; diff --git a/sdk/node/src/generate/earn/earn/model_get_eth_staking_products_data.ts b/sdk/node/src/generate/earn/earn/model_get_eth_staking_products_data.ts index 97071ced..6b5ebe67 100644 --- a/sdk/node/src/generate/earn/earn/model_get_eth_staking_products_data.ts +++ b/sdk/node/src/generate/earn/earn/model_get_eth_staking_products_data.ts @@ -40,22 +40,22 @@ export class GetETHStakingProductsData implements Serializable { returnRate: string; /** - * Min user subscribe amount + * Min. user subscribe amount */ userLowerLimit: string; /** - * Max user subscribe amount + * Max. user subscription amount */ userUpperLimit: string; /** - * Products total subscribe amount + * Products total subscription amount */ productUpperLimit: string; /** - * Products remain subscribe amount + * Remaining product subscription amount */ productRemainAmount: string; @@ -95,12 +95,12 @@ export class GetETHStakingProductsData implements Serializable { lockEndTime?: number; /** - * Most recent interest date(millisecond) + * Most recent interest date (milliseconds) */ interestDate: number; /** - * Whether the product is exclusive for new users: 0 (no), 1 (yes) + * Whether the product is exclusive to new users: 0 (no), 1 (yes) */ newUserOnly: GetETHStakingProductsData.NewUserOnlyEnum; @@ -115,7 +115,7 @@ export class GetETHStakingProductsData implements Serializable { duration: number; /** - * Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) + * Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) */ status: GetETHStakingProductsData.StatusEnum; diff --git a/sdk/node/src/generate/earn/earn/model_get_kcs_staking_products_data.ts b/sdk/node/src/generate/earn/earn/model_get_kcs_staking_products_data.ts index 68b00346..fafcbf95 100644 --- a/sdk/node/src/generate/earn/earn/model_get_kcs_staking_products_data.ts +++ b/sdk/node/src/generate/earn/earn/model_get_kcs_staking_products_data.ts @@ -30,17 +30,17 @@ export class GetKcsStakingProductsData implements Serializable { precision: number; /** - * Products total subscribe amount + * Products total subscription amount */ productUpperLimit: string; /** - * Max user subscribe amount + * Max. user subscription amount */ userUpperLimit: string; /** - * Min user subscribe amount + * Min. user subscribe amount */ userLowerLimit: string; @@ -85,12 +85,12 @@ export class GetKcsStakingProductsData implements Serializable { earlyRedeemSupported: GetKcsStakingProductsData.EarlyRedeemSupportedEnum; /** - * Products remain subscribe amount + * Remaining product subscription amount */ productRemainAmount: string; /** - * Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) + * Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) */ status: GetKcsStakingProductsData.StatusEnum; @@ -105,7 +105,7 @@ export class GetKcsStakingProductsData implements Serializable { incomeReleaseType: GetKcsStakingProductsData.IncomeReleaseTypeEnum; /** - * Most recent interest date(millisecond) + * Most recent interest date (milliseconds) */ interestDate: number; @@ -115,7 +115,7 @@ export class GetKcsStakingProductsData implements Serializable { duration: number; /** - * Whether the product is exclusive for new users: 0 (no), 1 (yes) + * Whether the product is exclusive to new users: 0 (no), 1 (yes) */ newUserOnly: GetKcsStakingProductsData.NewUserOnlyEnum; diff --git a/sdk/node/src/generate/earn/earn/model_get_promotion_products_data.ts b/sdk/node/src/generate/earn/earn/model_get_promotion_products_data.ts index 93443937..1941efa3 100644 --- a/sdk/node/src/generate/earn/earn/model_get_promotion_products_data.ts +++ b/sdk/node/src/generate/earn/earn/model_get_promotion_products_data.ts @@ -30,17 +30,17 @@ export class GetPromotionProductsData implements Serializable { precision: number; /** - * Products total subscribe amount + * Products total subscription amount */ productUpperLimit: string; /** - * Max user subscribe amount + * Max. user subscription amount */ userUpperLimit: string; /** - * Min user subscribe amount + * Min. user subscribe amount */ userLowerLimit: string; @@ -55,7 +55,7 @@ export class GetPromotionProductsData implements Serializable { lockStartTime: number; /** - * Product earliest interest end time, in milliseconds + * Earliest interest end time of product, in milliseconds */ lockEndTime: number; @@ -85,12 +85,12 @@ export class GetPromotionProductsData implements Serializable { earlyRedeemSupported: GetPromotionProductsData.EarlyRedeemSupportedEnum; /** - * Products remain subscribe amount + * Remaining product subscription amount */ productRemainAmount: string; /** - * Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) + * Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) */ status: GetPromotionProductsData.StatusEnum; @@ -105,7 +105,7 @@ export class GetPromotionProductsData implements Serializable { incomeReleaseType: GetPromotionProductsData.IncomeReleaseTypeEnum; /** - * Most recent interest date(millisecond) + * Most recent interest date (milliseconds) */ interestDate: number; @@ -115,7 +115,7 @@ export class GetPromotionProductsData implements Serializable { duration: number; /** - * Whether the product is exclusive for new users: 0 (no), 1 (yes) + * Whether the product is exclusive to new users: 0 (no), 1 (yes) */ newUserOnly: GetPromotionProductsData.NewUserOnlyEnum; diff --git a/sdk/node/src/generate/earn/earn/model_get_savings_products_data.ts b/sdk/node/src/generate/earn/earn/model_get_savings_products_data.ts index fa18f338..9297f551 100644 --- a/sdk/node/src/generate/earn/earn/model_get_savings_products_data.ts +++ b/sdk/node/src/generate/earn/earn/model_get_savings_products_data.ts @@ -30,17 +30,17 @@ export class GetSavingsProductsData implements Serializable { precision: number; /** - * Products total subscribe amount + * Products total subscription amount */ productUpperLimit: string; /** - * Max user subscribe amount + * Max. user subscription amount */ userUpperLimit: string; /** - * Min user subscribe amount + * Min. user subscribe amount */ userLowerLimit: string; @@ -85,12 +85,12 @@ export class GetSavingsProductsData implements Serializable { earlyRedeemSupported: GetSavingsProductsData.EarlyRedeemSupportedEnum; /** - * Products remain subscribe amount + * Remaining product subscription amount */ productRemainAmount: string; /** - * Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) + * Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) */ status: GetSavingsProductsData.StatusEnum; @@ -105,7 +105,7 @@ export class GetSavingsProductsData implements Serializable { incomeReleaseType: GetSavingsProductsData.IncomeReleaseTypeEnum; /** - * Most recent interest date(millisecond) + * Most recent interest date (milliseconds) */ interestDate: number; @@ -115,7 +115,7 @@ export class GetSavingsProductsData implements Serializable { duration: number; /** - * Whether the product is exclusive for new users: 0 (no), 1 (yes) + * Whether the product is exclusive to new users: 0 (no), 1 (yes) */ newUserOnly: GetSavingsProductsData.NewUserOnlyEnum; diff --git a/sdk/node/src/generate/earn/earn/model_get_staking_products_data.ts b/sdk/node/src/generate/earn/earn/model_get_staking_products_data.ts index b37ec4b9..9282eb91 100644 --- a/sdk/node/src/generate/earn/earn/model_get_staking_products_data.ts +++ b/sdk/node/src/generate/earn/earn/model_get_staking_products_data.ts @@ -30,17 +30,17 @@ export class GetStakingProductsData implements Serializable { precision: number; /** - * Products total subscribe amount + * Products total subscription amount */ productUpperLimit: string; /** - * Max user subscribe amount + * Max. user subscription amount */ userUpperLimit: string; /** - * Min user subscribe amount + * Min. user subscription amount */ userLowerLimit: string; @@ -85,12 +85,12 @@ export class GetStakingProductsData implements Serializable { earlyRedeemSupported: GetStakingProductsData.EarlyRedeemSupportedEnum; /** - * Products remain subscribe amount + * Remaining product subscription amount */ productRemainAmount: string; /** - * Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) + * Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest accrual in progress) */ status: GetStakingProductsData.StatusEnum; @@ -105,7 +105,7 @@ export class GetStakingProductsData implements Serializable { incomeReleaseType: GetStakingProductsData.IncomeReleaseTypeEnum; /** - * Most recent interest date(millisecond) + * Most recent interest date (milliseconds) */ interestDate: number; @@ -115,7 +115,7 @@ export class GetStakingProductsData implements Serializable { duration: number; /** - * Whether the product is exclusive for new users: 0 (no), 1 (yes) + * Whether the product is exclusive to new users: 0 (no), 1 (yes) */ newUserOnly: GetStakingProductsData.NewUserOnlyEnum; diff --git a/sdk/node/src/generate/earn/earn/model_purchase_req.ts b/sdk/node/src/generate/earn/earn/model_purchase_req.ts index 61ca9ee8..2c05554c 100644 --- a/sdk/node/src/generate/earn/earn/model_purchase_req.ts +++ b/sdk/node/src/generate/earn/earn/model_purchase_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class PurchaseReq implements Serializable { /** - * Product Id + * Product ID */ productId: string; @@ -43,7 +43,7 @@ export class PurchaseReq implements Serializable { */ static create(data: { /** - * Product Id + * Product ID */ productId: string; /** @@ -100,7 +100,7 @@ export class PurchaseReqBuilder { this.obj = obj; } /** - * Product Id + * Product ID */ setProductId(value: string): PurchaseReqBuilder { this.obj.productId = value; diff --git a/sdk/node/src/generate/futures/fundingfees/api_funding_fees.template b/sdk/node/src/generate/futures/fundingfees/api_funding_fees.template index c5cdeaff..329ba797 100644 --- a/sdk/node/src/generate/futures/fundingfees/api_funding_fees.template +++ b/sdk/node/src/generate/futures/fundingfees/api_funding_fees.template @@ -8,7 +8,7 @@ describe('Auto Test', ()=> { test('getCurrentFundingRate request test', ()=> { /** * getCurrentFundingRate - * Get Current Funding Rate + * Get Current Funding Rate. * /api/v1/funding-rate/{symbol}/current */ let builder = GetCurrentFundingRateReq.builder(); @@ -50,7 +50,7 @@ describe('Auto Test', ()=> { * /api/v1/funding-history */ let builder = GetPrivateFundingHistoryReq.builder(); - builder.setSymbol(?).setFrom(?).setTo(?).setReverse(?).setOffset(?).setForward(?).setMaxCount(?); + builder.setSymbol(?).setStartAt(?).setEndAt(?).setReverse(?).setOffset(?).setForward(?).setMaxCount(?); let req = builder.build(); let resp = api.getPrivateFundingHistory(req); return resp.then(result => { diff --git a/sdk/node/src/generate/futures/fundingfees/api_funding_fees.test.ts b/sdk/node/src/generate/futures/fundingfees/api_funding_fees.test.ts index 725b165e..66910f9a 100644 --- a/sdk/node/src/generate/futures/fundingfees/api_funding_fees.test.ts +++ b/sdk/node/src/generate/futures/fundingfees/api_funding_fees.test.ts @@ -10,7 +10,7 @@ describe('Auto Test', () => { test('getCurrentFundingRate request test', () => { /** * getCurrentFundingRate - * Get Current Funding Rate + * Get Current Funding Rate. * /api/v1/funding-rate/{symbol}/current */ let data = '{"symbol": "XBTUSDTM"}'; @@ -24,7 +24,7 @@ describe('Auto Test', () => { test('getCurrentFundingRate response test', () => { /** * getCurrentFundingRate - * Get Current Funding Rate + * Get Current Funding Rate. * /api/v1/funding-rate/{symbol}/current */ let data = @@ -76,7 +76,7 @@ describe('Auto Test', () => { * /api/v1/funding-history */ let data = - '{"symbol": "XBTUSDTM", "from": 1700310700000, "to": 1702310700000, "reverse": true, "offset": 123456, "forward": true, "maxCount": 123456}'; + '{"symbol": "XBTUSDTM", "startAt": 1700310700000, "endAt": 1702310700000, "reverse": true, "offset": 123456, "forward": true, "maxCount": 123456}'; let req = GetPrivateFundingHistoryReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, diff --git a/sdk/node/src/generate/futures/fundingfees/api_funding_fees.ts b/sdk/node/src/generate/futures/fundingfees/api_funding_fees.ts index 70f10d11..d8a39f46 100644 --- a/sdk/node/src/generate/futures/fundingfees/api_funding_fees.ts +++ b/sdk/node/src/generate/futures/fundingfees/api_funding_fees.ts @@ -10,34 +10,34 @@ import { GetCurrentFundingRateReq } from './model_get_current_funding_rate_req'; export interface FundingFeesAPI { /** - * getCurrentFundingRate Get Current Funding Rate - * Description: get Current Funding Rate + * getCurrentFundingRate Get Current Funding Rate. + * Description: Get Current Funding Rate. * Documentation: https://www.kucoin.com/docs-new/api-3470265 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getCurrentFundingRate(req: GetCurrentFundingRateReq): Promise; /** * getPublicFundingHistory Get Public Funding History - * Description: Query the funding rate at each settlement time point within a certain time range of the corresponding contract + * Description: Query the funding rate at each settlement time point within a certain time range of the corresponding contract. * Documentation: https://www.kucoin.com/docs-new/api-3470266 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getPublicFundingHistory(req: GetPublicFundingHistoryReq): Promise; @@ -45,15 +45,15 @@ export interface FundingFeesAPI { * getPrivateFundingHistory Get Private Funding History * Description: Submit request to get the funding history. * Documentation: https://www.kucoin.com/docs-new/api-3470267 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getPrivateFundingHistory( req: GetPrivateFundingHistoryReq, diff --git a/sdk/node/src/generate/futures/fundingfees/model_get_current_funding_rate_req.ts b/sdk/node/src/generate/futures/fundingfees/model_get_current_funding_rate_req.ts index 31a92233..cbf9be3d 100644 --- a/sdk/node/src/generate/futures/fundingfees/model_get_current_funding_rate_req.ts +++ b/sdk/node/src/generate/futures/fundingfees/model_get_current_funding_rate_req.ts @@ -6,7 +6,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetCurrentFundingRateReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ @Reflect.metadata('path', 'symbol') symbol?: string; @@ -28,7 +28,7 @@ export class GetCurrentFundingRateReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; }): GetCurrentFundingRateReq { @@ -62,7 +62,7 @@ export class GetCurrentFundingRateReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetCurrentFundingRateReqBuilder { this.obj.symbol = value; diff --git a/sdk/node/src/generate/futures/fundingfees/model_get_current_funding_rate_resp.ts b/sdk/node/src/generate/futures/fundingfees/model_get_current_funding_rate_resp.ts index b9f31c4e..4eea89e9 100644 --- a/sdk/node/src/generate/futures/fundingfees/model_get_current_funding_rate_resp.ts +++ b/sdk/node/src/generate/futures/fundingfees/model_get_current_funding_rate_resp.ts @@ -11,12 +11,12 @@ export class GetCurrentFundingRateResp implements Response { symbol: string; /** - * Granularity (milisecond) + * Granularity (milliseconds) */ granularity: number; /** - * The funding rate settlement time point of the previous cycle (milisecond) + * The funding rate settlement time point of the previous cycle (milliseconds) */ timePoint: number; diff --git a/sdk/node/src/generate/futures/fundingfees/model_get_private_funding_history_data_list.ts b/sdk/node/src/generate/futures/fundingfees/model_get_private_funding_history_data_list.ts index dc44b007..2e51a67c 100644 --- a/sdk/node/src/generate/futures/fundingfees/model_get_private_funding_history_data_list.ts +++ b/sdk/node/src/generate/futures/fundingfees/model_get_private_funding_history_data_list.ts @@ -5,17 +5,17 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetPrivateFundingHistoryDataList implements Serializable { /** - * id + * ID */ id: number; /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; /** - * Time point (milisecond) + * Time point (milliseconds) */ timePoint: number; @@ -40,17 +40,17 @@ export class GetPrivateFundingHistoryDataList implements Serializable { positionCost: number; /** - * Settled funding fees. A positive number means that the user received the funding fee, and vice versa. + * Settled funding fees A positive number means that the user received the funding fee, and vice versa. */ funding: number; /** - * settlement currency + * Settlement currency */ settleCurrency: string; /** - * context + * Context */ context: string; diff --git a/sdk/node/src/generate/futures/fundingfees/model_get_private_funding_history_req.ts b/sdk/node/src/generate/futures/fundingfees/model_get_private_funding_history_req.ts index 90789fc4..8465d4b5 100644 --- a/sdk/node/src/generate/futures/fundingfees/model_get_private_funding_history_req.ts +++ b/sdk/node/src/generate/futures/fundingfees/model_get_private_funding_history_req.ts @@ -5,22 +5,22 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetPrivateFundingHistoryReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Begin time (milisecond) + * Begin time (milliseconds) */ - from?: number; + startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ - to?: number; + endAt?: number; /** - * 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 + * 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. */ reverse?: boolean; @@ -30,12 +30,12 @@ export class GetPrivateFundingHistoryReq implements Serializable { offset?: number; /** - * 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 + * 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. */ forward?: boolean; /** - * Max record count. The default record count is 10 + * Max. record count. The default record count is 10 */ maxCount?: number; @@ -56,19 +56,19 @@ export class GetPrivateFundingHistoryReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Begin time (milisecond) + * Begin time (milliseconds) */ - from?: number; + startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ - to?: number; + endAt?: number; /** - * 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 + * 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. */ reverse?: boolean; /** @@ -76,18 +76,18 @@ export class GetPrivateFundingHistoryReq implements Serializable { */ offset?: number; /** - * 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 + * 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. */ forward?: boolean; /** - * Max record count. The default record count is 10 + * Max. record count. The default record count is 10 */ maxCount?: number; }): GetPrivateFundingHistoryReq { let obj = new GetPrivateFundingHistoryReq(); obj.symbol = data.symbol; - obj.from = data.from; - obj.to = data.to; + obj.startAt = data.startAt; + obj.endAt = data.endAt; obj.reverse = data.reverse; obj.offset = data.offset; obj.forward = data.forward; @@ -120,7 +120,7 @@ export class GetPrivateFundingHistoryReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetPrivateFundingHistoryReqBuilder { this.obj.symbol = value; @@ -128,23 +128,23 @@ export class GetPrivateFundingHistoryReqBuilder { } /** - * Begin time (milisecond) + * Begin time (milliseconds) */ - setFrom(value: number): GetPrivateFundingHistoryReqBuilder { - this.obj.from = value; + setStartAt(value: number): GetPrivateFundingHistoryReqBuilder { + this.obj.startAt = value; return this; } /** - * End time (milisecond) + * End time (milliseconds) */ - setTo(value: number): GetPrivateFundingHistoryReqBuilder { - this.obj.to = value; + setEndAt(value: number): GetPrivateFundingHistoryReqBuilder { + this.obj.endAt = value; return this; } /** - * 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 + * 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. */ setReverse(value: boolean): GetPrivateFundingHistoryReqBuilder { this.obj.reverse = value; @@ -160,7 +160,7 @@ export class GetPrivateFundingHistoryReqBuilder { } /** - * 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 + * 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. */ setForward(value: boolean): GetPrivateFundingHistoryReqBuilder { this.obj.forward = value; @@ -168,7 +168,7 @@ export class GetPrivateFundingHistoryReqBuilder { } /** - * Max record count. The default record count is 10 + * Max. record count. The default record count is 10 */ setMaxCount(value: number): GetPrivateFundingHistoryReqBuilder { this.obj.maxCount = value; diff --git a/sdk/node/src/generate/futures/fundingfees/model_get_public_funding_history_data.ts b/sdk/node/src/generate/futures/fundingfees/model_get_public_funding_history_data.ts index f6e8c24c..5d77c5fc 100644 --- a/sdk/node/src/generate/futures/fundingfees/model_get_public_funding_history_data.ts +++ b/sdk/node/src/generate/futures/fundingfees/model_get_public_funding_history_data.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetPublicFundingHistoryData implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; @@ -15,7 +15,7 @@ export class GetPublicFundingHistoryData implements Serializable { fundingRate: number; /** - * Time point (milisecond) + * Time point (milliseconds) */ timepoint: number; diff --git a/sdk/node/src/generate/futures/fundingfees/model_get_public_funding_history_req.ts b/sdk/node/src/generate/futures/fundingfees/model_get_public_funding_history_req.ts index f23cbdef..93a08d78 100644 --- a/sdk/node/src/generate/futures/fundingfees/model_get_public_funding_history_req.ts +++ b/sdk/node/src/generate/futures/fundingfees/model_get_public_funding_history_req.ts @@ -5,17 +5,17 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetPublicFundingHistoryReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Begin time (milisecond) + * Begin time (milliseconds) */ from?: number; /** - * End time (milisecond) + * End time (milliseconds) */ to?: number; @@ -36,15 +36,15 @@ export class GetPublicFundingHistoryReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Begin time (milisecond) + * Begin time (milliseconds) */ from?: number; /** - * End time (milisecond) + * End time (milliseconds) */ to?: number; }): GetPublicFundingHistoryReq { @@ -80,7 +80,7 @@ export class GetPublicFundingHistoryReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetPublicFundingHistoryReqBuilder { this.obj.symbol = value; @@ -88,7 +88,7 @@ export class GetPublicFundingHistoryReqBuilder { } /** - * Begin time (milisecond) + * Begin time (milliseconds) */ setFrom(value: number): GetPublicFundingHistoryReqBuilder { this.obj.from = value; @@ -96,7 +96,7 @@ export class GetPublicFundingHistoryReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setTo(value: number): GetPublicFundingHistoryReqBuilder { this.obj.to = value; diff --git a/sdk/node/src/generate/futures/futuresprivate/api_futures_private.ts b/sdk/node/src/generate/futures/futuresprivate/api_futures_private.ts index 818f28f0..56fe8bbf 100644 --- a/sdk/node/src/generate/futures/futuresprivate/api_futures_private.ts +++ b/sdk/node/src/generate/futures/futuresprivate/api_futures_private.ts @@ -20,56 +20,56 @@ export interface FuturesPrivateWS { /** * allOrder All Order change pushes. * Push order changes for all symbol - * push frequency: realtime + * push frequency: real-time */ allOrder(callback: AllOrderEventCallback): Promise; /** * allPosition All symbol position change events push - * Subscribe this topic to get the realtime push of position change event of all symbol - * push frequency: realtime + * Subscribe to this topic to get real-time pushes on all symbols’ position change events + * push frequency: real-time */ allPosition(callback: AllPositionEventCallback): Promise; /** * balance the balance change push - * Subscribe this topic to get the realtime push of balance change - * push frequency: realtime + * Subscribe to this topic to get real-time balance change pushes + * push frequency: real-time */ balance(callback: BalanceEventCallback): Promise; /** * crossLeverage the leverage change push - * Subscribe this topic to get the realtime push of leverage change of contracts that are in cross margin mode - * push frequency: realtime + * Subscribe to this topic to get real-time pushes on leverage changes of contracts that are in cross margin mode + * push frequency: real-time */ crossLeverage(callback: CrossLeverageEventCallback): Promise; /** * marginMode the margin mode change - * Subscribe this topic to get the realtime push of margin mode change event of a symbol - * push frequency: realtime + * Subscribe to this topic to get real-time pushes on symbols’ margin mode change events + * push frequency: real-time */ marginMode(callback: MarginModeEventCallback): Promise; /** * order Order change pushes. * Push order changes for the specified symbol - * push frequency: realtime + * push frequency: real-time */ order(symbol: string, callback: OrderEventCallback): Promise; /** * position the position change events push - * Subscribe this topic to get the realtime push of position change event of a symbol - * push frequency: realtime + * Subscribe this topic to get real-time pushes on symbols’ position change events + * push frequency: real-time */ position(symbol: string, callback: PositionEventCallback): Promise; /** * stopOrders stop order change pushes. - * Subscribe this topic to get the realtime push of stop order changes. - * push frequency: realtime + * Subscribe to this topic to get real-time pushes on stop order changes. + * push frequency: real-time */ stopOrders(callback: StopOrdersEventCallback): Promise; diff --git a/sdk/node/src/generate/futures/futuresprivate/model_all_order_event.ts b/sdk/node/src/generate/futures/futuresprivate/model_all_order_event.ts index 021dcbf8..18a33c99 100644 --- a/sdk/node/src/generate/futures/futuresprivate/model_all_order_event.ts +++ b/sdk/node/src/generate/futures/futuresprivate/model_all_order_event.ts @@ -7,7 +7,7 @@ import { Response } from '@internal/interfaces/serializable'; export class AllOrderEvent implements Response { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) */ symbol: string; /** @@ -35,7 +35,7 @@ export class AllOrderEvent implements Response { */ type: AllOrderEvent.TypeEnum; /** - * Order time(Nanosecond) + * Order time (nanoseconds) */ orderTime: number; /** @@ -43,7 +43,7 @@ export class AllOrderEvent implements Response { */ size: string; /** - * Cumulative number of filled + * Cumulative number filled */ filledSize: string; /** @@ -59,7 +59,7 @@ export class AllOrderEvent implements Response { */ status: AllOrderEvent.StatusEnum; /** - * Push time(Nanosecond) + * Push time (nanoseconds) */ ts: number; /** @@ -71,7 +71,7 @@ export class AllOrderEvent implements Response { */ feeType?: AllOrderEvent.FeeTypeEnum; /** - * Match Price(when the type is \"match\") + * Match Price (when the type is \"match\") */ matchPrice?: string; /** @@ -79,7 +79,7 @@ export class AllOrderEvent implements Response { */ matchSize?: string; /** - * Trade id, it is generated by Matching engine. + * Trade ID: Generated by Matching engine. */ tradeId?: string; /** @@ -87,7 +87,7 @@ export class AllOrderEvent implements Response { */ oldSize?: string; /** - * Client Order Id,The ClientOid field is a unique ID created by the user + * Client Order ID: The ClientOid field is a unique ID created by the user */ clientOid?: string; /** @@ -188,15 +188,15 @@ export namespace AllOrderEvent { } export enum TypeEnum { /** - * the order is in the order book(maker order) + * the order is in the order book (maker order) */ OPEN = 'open', /** - * the message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. + * The message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. */ MATCH = 'match', /** - * The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three situations: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. + * The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three scenarios: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. */ UPDATE = 'update', /** @@ -210,7 +210,7 @@ export namespace AllOrderEvent { } export enum StatusEnum { /** - * the order is in the order book(maker order) + * the order is in the order book (maker order) */ OPEN = 'open', /** @@ -248,7 +248,7 @@ export namespace AllOrderEvent { */ TRADE = 'trade', /** - * Liquid order, except type=update, all other types will be pushed + * Liquid order; all other types with the exception of type=update will be pushed */ LIQUID = 'liquid', } diff --git a/sdk/node/src/generate/futures/futuresprivate/model_all_position_event.ts b/sdk/node/src/generate/futures/futuresprivate/model_all_position_event.ts index c81a2476..548e12f7 100644 --- a/sdk/node/src/generate/futures/futuresprivate/model_all_position_event.ts +++ b/sdk/node/src/generate/futures/futuresprivate/model_all_position_event.ts @@ -7,7 +7,7 @@ import { Response } from '@internal/interfaces/serializable'; export class AllPositionEvent implements Response { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) */ symbol: string; /** @@ -27,11 +27,11 @@ export class AllPositionEvent implements Response { */ currentTimestamp: number; /** - * Current postion quantity + * Current position quantity */ currentQty: number; /** - * Current postion value + * Current position value */ currentCost: number; /** @@ -39,15 +39,15 @@ export class AllPositionEvent implements Response { */ currentComm: number; /** - * Unrealised value + * Unrealized value */ unrealisedCost: number; /** - * Accumulated realised gross profit value + * Accumulated realized gross profit value */ realisedGrossCost: number; /** - * Current realised position value + * Current realized position value */ realisedCost: number; /** @@ -75,15 +75,15 @@ export class AllPositionEvent implements Response { */ posMargin: number; /** - * Accumulated realised gross profit value + * Accumulated realized gross profit value */ realisedGrossPnl: number; /** - * Realised profit and loss + * Realized profit and loss */ realisedPnl: number; /** - * Unrealised profit and loss + * Unrealized profit and loss */ unrealisedPnl: number; /** @@ -99,11 +99,11 @@ export class AllPositionEvent implements Response { */ avgEntryPrice: number; /** - * Liquidation price For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. + * Liquidation price: For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. */ liquidationPrice: number; /** - * Bankruptcy price For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. + * Bankruptcy price: For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. */ bankruptPrice: number; /** @@ -111,7 +111,7 @@ export class AllPositionEvent implements Response { */ settleCurrency: string; /** - * Margin Mode: CROSS,ISOLATED + * Margin Mode: CROSS, ISOLATED */ marginMode: AllPositionEvent.MarginModeEnum; /** @@ -139,7 +139,7 @@ export class AllPositionEvent implements Response { */ realLeverage?: number; /** - * added margin **Only applicable to Isolated Margin** + * Added margin **Only applicable to Isolated Margin** */ posCross?: number; /** @@ -179,7 +179,7 @@ export class AllPositionEvent implements Response { */ fundingFee?: number; /** - * Funding Fee Settlement Time (nanosecond) + * Funding Fee Settlement Time (nanoseconds) */ ts?: number; /** diff --git a/sdk/node/src/generate/futures/futuresprivate/model_order_event.ts b/sdk/node/src/generate/futures/futuresprivate/model_order_event.ts index fc97d2a0..425d030f 100644 --- a/sdk/node/src/generate/futures/futuresprivate/model_order_event.ts +++ b/sdk/node/src/generate/futures/futuresprivate/model_order_event.ts @@ -7,7 +7,7 @@ import { Response } from '@internal/interfaces/serializable'; export class OrderEvent implements Response { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) */ symbol: string; /** @@ -35,7 +35,7 @@ export class OrderEvent implements Response { */ type: OrderEvent.TypeEnum; /** - * Order time(Nanosecond) + * Order time (nanoseconds) */ orderTime: number; /** @@ -43,7 +43,7 @@ export class OrderEvent implements Response { */ size: string; /** - * Cumulative number of filled + * Cumulative number filled */ filledSize: string; /** @@ -59,7 +59,7 @@ export class OrderEvent implements Response { */ status: OrderEvent.StatusEnum; /** - * Push time(Nanosecond) + * Push time (nanoseconds) */ ts: number; /** @@ -71,7 +71,7 @@ export class OrderEvent implements Response { */ feeType?: OrderEvent.FeeTypeEnum; /** - * Match Price(when the type is \"match\") + * Match Price (when the type is \"match\") */ matchPrice?: string; /** @@ -79,7 +79,7 @@ export class OrderEvent implements Response { */ matchSize?: string; /** - * Trade id, it is generated by Matching engine. + * Trade ID: Generated by Matching engine. */ tradeId?: string; /** @@ -87,7 +87,7 @@ export class OrderEvent implements Response { */ oldSize?: string; /** - * Client Order Id,The ClientOid field is a unique ID created by the user + * Client Order ID: The ClientOid field is a unique ID created by the user */ clientOid?: string; /** @@ -188,15 +188,15 @@ export namespace OrderEvent { } export enum TypeEnum { /** - * the order is in the order book(maker order) + * the order is in the order book (maker order) */ OPEN = 'open', /** - * the message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. + * The message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. */ MATCH = 'match', /** - * The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three situations: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. + * The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three scenarios: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. */ UPDATE = 'update', /** @@ -210,7 +210,7 @@ export namespace OrderEvent { } export enum StatusEnum { /** - * the order is in the order book(maker order) + * the order is in the order book (maker order) */ OPEN = 'open', /** @@ -248,7 +248,7 @@ export namespace OrderEvent { */ TRADE = 'trade', /** - * Liquid order, except type=update, all other types will be pushed + * Liquid order; all other types with the exception of type=update will be pushed */ LIQUID = 'liquid', } diff --git a/sdk/node/src/generate/futures/futuresprivate/model_position_event.ts b/sdk/node/src/generate/futures/futuresprivate/model_position_event.ts index ada2a1bb..4ce4fe1b 100644 --- a/sdk/node/src/generate/futures/futuresprivate/model_position_event.ts +++ b/sdk/node/src/generate/futures/futuresprivate/model_position_event.ts @@ -7,7 +7,7 @@ import { Response } from '@internal/interfaces/serializable'; export class PositionEvent implements Response { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) */ symbol: string; /** @@ -27,11 +27,11 @@ export class PositionEvent implements Response { */ currentTimestamp: number; /** - * Current postion quantity + * Current position quantity */ currentQty: number; /** - * Current postion value + * Current position value */ currentCost: number; /** @@ -39,15 +39,15 @@ export class PositionEvent implements Response { */ currentComm: number; /** - * Unrealised value + * Unrealized value */ unrealisedCost: number; /** - * Accumulated realised gross profit value + * Accumulated realized gross profit value */ realisedGrossCost: number; /** - * Current realised position value + * Current realized position value */ realisedCost: number; /** @@ -75,15 +75,15 @@ export class PositionEvent implements Response { */ posMargin: number; /** - * Accumulated realised gross profit value + * Accumulated realized gross profit value */ realisedGrossPnl: number; /** - * Realised profit and loss + * Realized profit and loss */ realisedPnl: number; /** - * Unrealised profit and loss + * Unrealized profit and loss */ unrealisedPnl: number; /** @@ -99,11 +99,11 @@ export class PositionEvent implements Response { */ avgEntryPrice: number; /** - * Liquidation price For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. + * Liquidation price: For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. */ liquidationPrice: number; /** - * Bankruptcy price For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. + * Bankruptcy price: For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. */ bankruptPrice: number; /** @@ -111,7 +111,7 @@ export class PositionEvent implements Response { */ settleCurrency: string; /** - * Margin Mode: CROSS,ISOLATED + * Margin Mode: CROSS, ISOLATED */ marginMode: PositionEvent.MarginModeEnum; /** @@ -139,7 +139,7 @@ export class PositionEvent implements Response { */ realLeverage?: number; /** - * added margin **Only applicable to Isolated Margin** + * Added margin **Only applicable to Isolated Margin** */ posCross?: number; /** @@ -179,7 +179,7 @@ export class PositionEvent implements Response { */ fundingFee?: number; /** - * Funding Fee Settlement Time (nanosecond) + * Funding Fee Settlement Time (nanoseconds) */ ts?: number; /** diff --git a/sdk/node/src/generate/futures/futuresprivate/model_stop_orders_event.ts b/sdk/node/src/generate/futures/futuresprivate/model_stop_orders_event.ts index 5745466c..45769081 100644 --- a/sdk/node/src/generate/futures/futuresprivate/model_stop_orders_event.ts +++ b/sdk/node/src/generate/futures/futuresprivate/model_stop_orders_event.ts @@ -19,7 +19,7 @@ export class StopOrdersEvent implements Response { */ orderId: string; /** - * Order price + * Order Price */ orderPrice: string; /** @@ -47,7 +47,7 @@ export class StopOrdersEvent implements Response { */ stopPriceType: string; /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) */ symbol: string; /** @@ -150,13 +150,13 @@ export namespace StopOrdersEvent { */ DOWN = 'down', /** - * Triggers when the price reaches or goes above the stopPrice + * Triggers when the price reaches or goes above the stopPrice. */ UP = 'up', } export enum TypeEnum { /** - * the order is in the order book(maker order) + * the order is in the order book (maker order) */ OPEN = 'open', /** diff --git a/sdk/node/src/generate/futures/futurespublic/api_futures_public.ts b/sdk/node/src/generate/futures/futurespublic/api_futures_public.ts index 58ac1b66..a0a46e4d 100644 --- a/sdk/node/src/generate/futures/futurespublic/api_futures_public.ts +++ b/sdk/node/src/generate/futures/futurespublic/api_futures_public.ts @@ -38,7 +38,7 @@ export interface FuturesPublicWS { /** * execution Match execution data. * For each order executed, the system will send you the match messages in the format as following. - * push frequency: realtime + * push frequency: real-time */ execution(symbol: string, callback: ExecutionEventCallback): Promise; @@ -58,8 +58,8 @@ export interface FuturesPublicWS { /** * orderbookIncrement Orderbook - Increment - * The system will return the increment change orderbook data(All depth), If there is no change in the market, data will not be pushed - * push frequency: realtime + * The system will return the increment change orderbook data (all depth). If there is no change in the market, data will not be pushed. + * push frequency: real-time */ orderbookIncrement(symbol: string, callback: OrderbookIncrementEventCallback): Promise; @@ -72,29 +72,29 @@ export interface FuturesPublicWS { /** * orderbookLevel5 Orderbook - Level5 - * The system will return the 5 best ask/bid orders data, If there is no change in the market, data will not be pushed + * The system will return the 5 best ask/bid orders data. If there is no change in the market, data will not be pushed * push frequency: 100ms */ orderbookLevel5(symbol: string, callback: OrderbookLevel5EventCallback): Promise; /** * symbolSnapshot Symbol Snapshot - * Get symbol\'s snapshot. + * Get symbol snapshot. * push frequency: 5000ms */ symbolSnapshot(symbol: string, callback: SymbolSnapshotEventCallback): Promise; /** * tickerV1 Get Ticker(not recommended) - * Subscribe this topic to get the realtime push of BBO changes.It is not recommended to use this topic any more. For real-time ticker information, please subscribe /contractMarket/tickerV2:{symbol}. - * push frequency: realtime + * Subscribe to this topic to get real-time pushes on BBO changes. It is not recommended to use this topic any more. For real-time ticker information, please subscribe /contractMarket/tickerV2:{symbol}. + * push frequency: real-time */ tickerV1(symbol: string, callback: TickerV1EventCallback): Promise; /** * tickerV2 Get Ticker V2 - * Subscribe this topic to get the realtime push of BBO changes. After subscription, when there are changes in the order book(Not necessarily ask1/bid1 changes), the system will push the real-time ticker symbol information to you. - * push frequency: realtime + * Subscribe to this topic to get real-time pushes of BBO changes. After subscription, when there are changes in the order book (not necessarily ask1/bid1 changes), the system will push the real-time ticker symbol information to you. + * push frequency: real-time */ tickerV2(symbol: string, callback: TickerV2EventCallback): Promise; diff --git a/sdk/node/src/generate/futures/futurespublic/model_instrument_event.ts b/sdk/node/src/generate/futures/futurespublic/model_instrument_event.ts index 359ebf45..5852ff7b 100644 --- a/sdk/node/src/generate/futures/futurespublic/model_instrument_event.ts +++ b/sdk/node/src/generate/futures/futurespublic/model_instrument_event.ts @@ -7,7 +7,7 @@ import { Response } from '@internal/interfaces/serializable'; export class InstrumentEvent implements Response { /** - * Granularity (predicted funding rate: 1-min granularity: 60000; Funding rate: 8-hours granularity: 28800000. ) + * Granularity (predicted funding rate: 1-min granularity: 60000; Funding rate: 8-hours granularity: 28800000.) */ granularity: number; /** diff --git a/sdk/node/src/generate/futures/market/api_market.template b/sdk/node/src/generate/futures/market/api_market.template index f3575606..832d5cee 100644 --- a/sdk/node/src/generate/futures/market/api_market.template +++ b/sdk/node/src/generate/futures/market/api_market.template @@ -78,6 +78,8 @@ describe('Auto Test', ()=> { expect(result.mmrLimit).toEqual(expect.anything()); expect(result.mmrLevConstant).toEqual(expect.anything()); expect(result.supportCross).toEqual(expect.anything()); + expect(result.buyLimit).toEqual(expect.anything()); + expect(result.sellLimit).toEqual(expect.anything()); console.log(resp); }); }) @@ -161,7 +163,7 @@ describe('Auto Test', ()=> { * /api/v1/level2/depth{size} */ let builder = GetPartOrderBookReq.builder(); - builder.setSymbol(?).setSize(?); + builder.setSize(?).setSymbol(?); let req = builder.build(); let resp = api.getPartOrderBook(req); return resp.then(result => { @@ -280,7 +282,7 @@ describe('Auto Test', ()=> { test('get24hrStats request test', ()=> { /** * get24hrStats - * Get 24hr Stats + * Get 24hr stats * /api/v1/trade-statistics */ let resp = api.get24hrStats(); diff --git a/sdk/node/src/generate/futures/market/api_market.test.ts b/sdk/node/src/generate/futures/market/api_market.test.ts index 0b29de43..279f3d18 100644 --- a/sdk/node/src/generate/futures/market/api_market.test.ts +++ b/sdk/node/src/generate/futures/market/api_market.test.ts @@ -49,7 +49,7 @@ describe('Auto Test', () => { * /api/v1/contracts/{symbol} */ let data = - '{\n "code": "200000",\n "data": {\n "symbol": "XBTUSDM",\n "rootSymbol": "XBT",\n "type": "FFWCSX",\n "firstOpenDate": 1552638575000,\n "expireDate": null,\n "settleDate": null,\n "baseCurrency": "XBT",\n "quoteCurrency": "USD",\n "settleCurrency": "XBT",\n "maxOrderQty": 10000000,\n "maxPrice": 1000000.0,\n "lotSize": 1,\n "tickSize": 0.1,\n "indexPriceTickSize": 0.1,\n "multiplier": -1.0,\n "initialMargin": 0.014,\n "maintainMargin": 0.007,\n "maxRiskLimit": 1,\n "minRiskLimit": 1,\n "riskStep": 0,\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": false,\n "isInverse": true,\n "markMethod": "FairPrice",\n "fairMethod": "FundingRate",\n "fundingBaseSymbol": ".XBTINT8H",\n "fundingQuoteSymbol": ".USDINT8H",\n "fundingRateSymbol": ".XBTUSDMFPI8H",\n "indexSymbol": ".BXBT",\n "settlementSymbol": null,\n "status": "Open",\n "fundingFeeRate": 1.75E-4,\n "predictedFundingFeeRate": 1.76E-4,\n "fundingRateGranularity": 28800000,\n "openInterest": "61725904",\n "turnoverOf24h": 209.56303473,\n "volumeOf24h": 1.4354731E7,\n "markPrice": 68336.7,\n "indexPrice": 68335.29,\n "lastTradePrice": 68349.3,\n "nextFundingRateTime": 17402942,\n "maxLeverage": 75,\n "sourceExchanges": [\n "kraken",\n "bitstamp",\n "crypto"\n ],\n "premiumsSymbol1M": ".XBTUSDMPI",\n "premiumsSymbol8H": ".XBTUSDMPI8H",\n "fundingBaseSymbol1M": ".XBTINT",\n "fundingQuoteSymbol1M": ".USDINT",\n "lowPrice": 67436.7,\n "highPrice": 69471.8,\n "priceChgPct": 0.0097,\n "priceChg": 658.7,\n "k": 2645000.0,\n "m": 1640000.0,\n "f": 1.3,\n "mmrLimit": 0.3,\n "mmrLevConstant": 75.0,\n "supportCross": true\n }\n}'; + '{\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}'; let commonResp = RestResponse.fromJson(data); let resp = GetSymbolResp.fromObject(commonResp.data); if (commonResp.data !== null) { @@ -157,7 +157,7 @@ describe('Auto Test', () => { * Get Part OrderBook * /api/v1/level2/depth{size} */ - let data = '{"symbol": "XBTUSDM", "size": "20"}'; + let data = '{"size": "20", "symbol": "XBTUSDM"}'; let req = GetPartOrderBookReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, @@ -375,7 +375,7 @@ describe('Auto Test', () => { test('get24hrStats request test', () => { /** * get24hrStats - * Get 24hr Stats + * Get 24hr stats * /api/v1/trade-statistics */ }); @@ -383,7 +383,7 @@ describe('Auto Test', () => { test('get24hrStats response test', () => { /** * get24hrStats - * Get 24hr Stats + * Get 24hr stats * /api/v1/trade-statistics */ }); diff --git a/sdk/node/src/generate/futures/market/api_market.ts b/sdk/node/src/generate/futures/market/api_market.ts index 492213ff..69d72e48 100644 --- a/sdk/node/src/generate/futures/market/api_market.ts +++ b/sdk/node/src/generate/futures/market/api_market.ts @@ -32,209 +32,209 @@ import { GetKlinesResp } from './model_get_klines_resp'; export interface MarketAPI { /** * getSymbol Get Symbol - * 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. + * 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. * Documentation: https://www.kucoin.com/docs-new/api-3470221 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ getSymbol(req: GetSymbolReq): Promise; /** * getAllSymbols Get All Symbols - * 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. + * 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. * Documentation: https://www.kucoin.com/docs-new/api-3470220 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ getAllSymbols(): Promise; /** * getTicker Get Ticker - * 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. + * 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. * Documentation: https://www.kucoin.com/docs-new/api-3470222 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getTicker(req: GetTickerReq): Promise; /** * getAllTickers Get All Tickers - * 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. + * 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. * Documentation: https://www.kucoin.com/docs-new/api-3470223 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getAllTickers(): Promise; /** * getFullOrderBook Get Full OrderBook - * 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 up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook. + * 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. * Documentation: https://www.kucoin.com/docs-new/api-3470224 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ getFullOrderBook(req: GetFullOrderBookReq): Promise; /** * getPartOrderBook Get Part OrderBook - * Description: Query for part orderbook depth data. (aggregated by price) You are recommended to request via this endpoint as the system reponse would be faster and cosume less traffic. + * 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. * Documentation: https://www.kucoin.com/docs-new/api-3470225 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getPartOrderBook(req: GetPartOrderBookReq): Promise; /** * getTradeHistory Get Trade History - * Description: Request via this endpoint to get the trade history of the specified symbol, the returned quantity is the last 100 transaction records. + * Description: Request the trade history of the specified symbol via this endpoint. The returned quantity is the last 100 transaction records. * Documentation: https://www.kucoin.com/docs-new/api-3470232 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getTradeHistory(req: GetTradeHistoryReq): Promise; /** * getKlines Get Klines - * Description: Get the Kline of the symbol. Data are returned in grouped buckets based on requested type. For each query, the system would return at most 500 pieces of data. To obtain more data, please page the data by time. + * 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. * Documentation: https://www.kucoin.com/docs-new/api-3470234 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ getKlines(req: GetKlinesReq): Promise; /** * getMarkPrice Get Mark Price - * Description: Get current mark price + * Description: Get the current mark price (Update snapshots once per second, real-time query). * Documentation: https://www.kucoin.com/docs-new/api-3470233 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ getMarkPrice(req: GetMarkPriceReq): Promise; /** * getSpotIndexPrice Get Spot Index Price - * Description: Get Spot Index Price + * Description: Get Spot Index Price (Update snapshots once per second, and there is a 5s cache when querying). * Documentation: https://www.kucoin.com/docs-new/api-3470231 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getSpotIndexPrice(req: GetSpotIndexPriceReq): Promise; /** * getInterestRateIndex Get Interest Rate Index - * Description: Get interest rate Index. + * Description: Get interest rate Index (real-time query). * Documentation: https://www.kucoin.com/docs-new/api-3470226 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getInterestRateIndex(req: GetInterestRateIndexReq): Promise; /** * getPremiumIndex Get Premium Index - * Description: Submit request to get premium index. + * Description: Submit request to get premium index (Update snapshots once per second, real-time query). * Documentation: https://www.kucoin.com/docs-new/api-3470227 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ getPremiumIndex(req: GetPremiumIndexReq): Promise; /** - * get24hrStats Get 24hr Stats + * get24hrStats Get 24hr stats * Description: Get the statistics of the platform futures trading volume in the last 24 hours. * Documentation: https://www.kucoin.com/docs-new/api-3470228 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ get24hrStats(): Promise; @@ -242,15 +242,15 @@ export interface MarketAPI { * getServerTime Get Server Time * Description: Get the API server time. This is the Unix timestamp. * Documentation: https://www.kucoin.com/docs-new/api-3470229 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getServerTime(): Promise; @@ -258,47 +258,47 @@ export interface MarketAPI { * getServiceStatus Get Service Status * Description: Get the service status. * Documentation: https://www.kucoin.com/docs-new/api-3470230 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 4 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 4 | + * +-----------------------+---------+ */ getServiceStatus(): Promise; /** * getPublicToken Get Public Token - Futures - * 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 + * 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 * Documentation: https://www.kucoin.com/docs-new/api-3470297 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ getPublicToken(): Promise; /** * getPrivateToken Get Private Token - Futures - * 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 + * 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 * Documentation: https://www.kucoin.com/docs-new/api-3470296 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ getPrivateToken(): Promise; } diff --git a/sdk/node/src/generate/futures/market/model_get_all_symbols_data.ts b/sdk/node/src/generate/futures/market/model_get_all_symbols_data.ts index 30a74895..7446f70d 100644 --- a/sdk/node/src/generate/futures/market/model_get_all_symbols_data.ts +++ b/sdk/node/src/generate/futures/market/model_get_all_symbols_data.ts @@ -15,22 +15,22 @@ export class GetAllSymbolsData implements Serializable { rootSymbol: string; /** - * Type of the contract + * Type of contract */ type: GetAllSymbolsData.TypeEnum; /** - * First Open Date(millisecond) + * First Open Date (milliseconds) */ firstOpenDate: number; /** - * Expiration date(millisecond). Null means it will never expire + * Expiration date (milliseconds) Null means it will never expire */ expireDate?: number; /** - * Settlement date(millisecond). Null indicates that automatic settlement is not supported + * Settlement date (milliseconds) Null indicates that automatic settlement is not supported */ settleDate?: number; @@ -150,12 +150,12 @@ export class GetAllSymbolsData implements Serializable { markMethod: GetAllSymbolsData.MarkMethodEnum; /** - * Fair price marking method, The Futures contract is null + * Fair price marking method; the Futures contract is null */ fairMethod: GetAllSymbolsData.FairMethodEnum; /** - * Ticker symbol of the based currency + * Ticker symbol of the base currency */ fundingBaseSymbol: string; @@ -175,7 +175,7 @@ export class GetAllSymbolsData implements Serializable { indexSymbol: string; /** - * Settlement Symbol + * Settlement symbol */ settlementSymbol: string; @@ -195,12 +195,12 @@ export class GetAllSymbolsData implements Serializable { predictedFundingFeeRate: number; /** - * Funding interval(millisecond) + * Funding interval (milliseconds) */ fundingRateGranularity: number; /** - * Open interest + * Open interest (unit: lots) */ openInterest: string; @@ -230,7 +230,7 @@ export class GetAllSymbolsData implements Serializable { lastTradePrice: number; /** - * Next funding rate time(millisecond) + * Next funding rate time (milliseconds) */ nextFundingRateTime: number; @@ -245,22 +245,22 @@ export class GetAllSymbolsData implements Serializable { sourceExchanges: Array; /** - * Premium index symbol(1 minute) + * Premium index symbol (1 minute) */ premiumsSymbol1M: string; /** - * Premium index symbol(8 hours) + * Premium index symbol (8 hours) */ premiumsSymbol8H: string; /** - * Base currency interest rate symbol(1 minute) + * Base currency interest rate symbol (1 minute) */ fundingBaseSymbol1M: string; /** - * Quote currency interest rate symbol(1 minute) + * Quote currency interest rate symbol (1 minute) */ fundingQuoteSymbol1M: string; @@ -275,7 +275,7 @@ export class GetAllSymbolsData implements Serializable { highPrice: number; /** - * 24-hour price change% + * 24-hour % price change */ priceChgPct: number; @@ -314,6 +314,16 @@ export class GetAllSymbolsData implements Serializable { */ supportCross: boolean; + /** + * The current maximum buying price allowed + */ + buyLimit: number; + + /** + * The current minimum selling price allowed + */ + sellLimit: number; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -438,6 +448,10 @@ export class GetAllSymbolsData implements Serializable { this.mmrLevConstant = null; // @ts-ignore this.supportCross = null; + // @ts-ignore + this.buyLimit = null; + // @ts-ignore + this.sellLimit = null; } /** * Convert the object to a JSON string. @@ -462,7 +476,7 @@ export class GetAllSymbolsData implements Serializable { export namespace GetAllSymbolsData { export enum TypeEnum { /** - * Standardized swap contracts standard financial futures on swap, expiration swap funding rate + * Standardized swap contracts, standard financial futures on swaps, expiration swap funding rates */ FFWCSX = 'FFWCSX', /** @@ -472,7 +486,7 @@ export namespace GetAllSymbolsData { } export enum MarkMethodEnum { /** - * Fair Price + * FairPrice */ FAIRPRICE = 'FairPrice', } @@ -492,7 +506,7 @@ export namespace GetAllSymbolsData { */ OPEN = 'Open', /** - * Setting + * Settling */ BEINGSETTLED = 'BeingSettled', /** diff --git a/sdk/node/src/generate/futures/market/model_get_all_symbols_resp.ts b/sdk/node/src/generate/futures/market/model_get_all_symbols_resp.ts index 78aa0207..b54f037e 100644 --- a/sdk/node/src/generate/futures/market/model_get_all_symbols_resp.ts +++ b/sdk/node/src/generate/futures/market/model_get_all_symbols_resp.ts @@ -7,7 +7,7 @@ import { Response } from '@internal/interfaces/serializable'; export class GetAllSymbolsResp implements Response { /** - * the list of all contracts + * List of all contracts */ @Type(() => GetAllSymbolsData) data: Array; diff --git a/sdk/node/src/generate/futures/market/model_get_all_tickers_data.ts b/sdk/node/src/generate/futures/market/model_get_all_tickers_data.ts index 9106c7a0..9cd72f01 100644 --- a/sdk/node/src/generate/futures/market/model_get_all_tickers_data.ts +++ b/sdk/node/src/generate/futures/market/model_get_all_tickers_data.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetAllTickersData implements Serializable { /** - * Sequence number, used to judge whether the messages pushed by Websocket is continuous. + * Sequence number, used to judge whether the messages pushed by Websocket are continuous. */ sequence: number; @@ -20,7 +20,7 @@ export class GetAllTickersData implements Serializable { side: GetAllTickersData.SideEnum; /** - * 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. + * 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. */ size: number; @@ -55,7 +55,7 @@ export class GetAllTickersData implements Serializable { bestAskSize: number; /** - * Filled time(nanosecond) + * Filled time (nanoseconds) */ ts: number; diff --git a/sdk/node/src/generate/futures/market/model_get_full_order_book_req.ts b/sdk/node/src/generate/futures/market/model_get_full_order_book_req.ts index 6b51b772..a3b7ca84 100644 --- a/sdk/node/src/generate/futures/market/model_get_full_order_book_req.ts +++ b/sdk/node/src/generate/futures/market/model_get_full_order_book_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetFullOrderBookReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; @@ -26,7 +26,7 @@ export class GetFullOrderBookReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; }): GetFullOrderBookReq { @@ -60,7 +60,7 @@ export class GetFullOrderBookReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetFullOrderBookReqBuilder { this.obj.symbol = value; diff --git a/sdk/node/src/generate/futures/market/model_get_full_order_book_resp.ts b/sdk/node/src/generate/futures/market/model_get_full_order_book_resp.ts index 5694e9c2..1f2e2b5e 100644 --- a/sdk/node/src/generate/futures/market/model_get_full_order_book_resp.ts +++ b/sdk/node/src/generate/futures/market/model_get_full_order_book_resp.ts @@ -11,7 +11,7 @@ export class GetFullOrderBookResp implements Response { sequence: number; /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; @@ -26,7 +26,7 @@ export class GetFullOrderBookResp implements Response { asks: Array>; /** - * Timestamp(nanosecond) + * Timestamp (nanoseconds) */ ts: number; diff --git a/sdk/node/src/generate/futures/market/model_get_interest_rate_index_data_list.ts b/sdk/node/src/generate/futures/market/model_get_interest_rate_index_data_list.ts index d0b94f1f..1651793b 100644 --- a/sdk/node/src/generate/futures/market/model_get_interest_rate_index_data_list.ts +++ b/sdk/node/src/generate/futures/market/model_get_interest_rate_index_data_list.ts @@ -5,17 +5,17 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetInterestRateIndexDataList implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; /** - * Granularity (milisecond) + * Granularity (milliseconds) */ granularity: number; /** - * Timestamp(milisecond) + * Timestamp (milliseconds) */ timePoint: number; diff --git a/sdk/node/src/generate/futures/market/model_get_interest_rate_index_req.ts b/sdk/node/src/generate/futures/market/model_get_interest_rate_index_req.ts index 3593766e..9ee03905 100644 --- a/sdk/node/src/generate/futures/market/model_get_interest_rate_index_req.ts +++ b/sdk/node/src/generate/futures/market/model_get_interest_rate_index_req.ts @@ -5,22 +5,22 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetInterestRateIndexReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** - * This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + * This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. */ reverse?: boolean = true; @@ -30,12 +30,12 @@ export class GetInterestRateIndexReq implements Serializable { offset?: number; /** - * 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 + * 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. */ forward?: boolean = true; /** - * Max record count. The default record count is 10, The maximum length cannot exceed 100 + * Max. record count. The default record count is 10; the maximum length cannot exceed 100 */ maxCount?: number = 10; @@ -56,19 +56,19 @@ export class GetInterestRateIndexReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** - * This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + * This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. */ reverse?: boolean; /** @@ -76,11 +76,11 @@ export class GetInterestRateIndexReq implements Serializable { */ offset?: number; /** - * 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 + * 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. */ forward?: boolean; /** - * Max record count. The default record count is 10, The maximum length cannot exceed 100 + * Max. record count. The default record count is 10; the maximum length cannot exceed 100 */ maxCount?: number; }): GetInterestRateIndexReq { @@ -132,7 +132,7 @@ export class GetInterestRateIndexReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetInterestRateIndexReqBuilder { this.obj.symbol = value; @@ -140,7 +140,7 @@ export class GetInterestRateIndexReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetInterestRateIndexReqBuilder { this.obj.startAt = value; @@ -148,7 +148,7 @@ export class GetInterestRateIndexReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetInterestRateIndexReqBuilder { this.obj.endAt = value; @@ -156,7 +156,7 @@ export class GetInterestRateIndexReqBuilder { } /** - * This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + * This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. */ setReverse(value: boolean): GetInterestRateIndexReqBuilder { this.obj.reverse = value; @@ -172,7 +172,7 @@ export class GetInterestRateIndexReqBuilder { } /** - * 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 + * 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. */ setForward(value: boolean): GetInterestRateIndexReqBuilder { this.obj.forward = value; @@ -180,7 +180,7 @@ export class GetInterestRateIndexReqBuilder { } /** - * Max record count. The default record count is 10, The maximum length cannot exceed 100 + * Max. record count. The default record count is 10; the maximum length cannot exceed 100 */ setMaxCount(value: number): GetInterestRateIndexReqBuilder { this.obj.maxCount = value; diff --git a/sdk/node/src/generate/futures/market/model_get_klines_req.ts b/sdk/node/src/generate/futures/market/model_get_klines_req.ts index 22f2b10e..a9f9b467 100644 --- a/sdk/node/src/generate/futures/market/model_get_klines_req.ts +++ b/sdk/node/src/generate/futures/market/model_get_klines_req.ts @@ -5,22 +5,22 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetKlinesReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Type of candlestick patterns(minute) + * Type of candlestick patterns (minutes) */ granularity?: GetKlinesReq.GranularityEnum; /** - * Start time (milisecond) + * Start time (milliseconds) */ from?: number; /** - * End time (milisecond) + * End time (milliseconds) */ to?: number; @@ -41,19 +41,19 @@ export class GetKlinesReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Type of candlestick patterns(minute) + * Type of candlestick patterns (minutes) */ granularity?: GetKlinesReq.GranularityEnum; /** - * Start time (milisecond) + * Start time (milliseconds) */ from?: number; /** - * End time (milisecond) + * End time (milliseconds) */ to?: number; }): GetKlinesReq { @@ -139,7 +139,7 @@ export class GetKlinesReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetKlinesReqBuilder { this.obj.symbol = value; @@ -147,7 +147,7 @@ export class GetKlinesReqBuilder { } /** - * Type of candlestick patterns(minute) + * Type of candlestick patterns (minutes) */ setGranularity(value: GetKlinesReq.GranularityEnum): GetKlinesReqBuilder { this.obj.granularity = value; @@ -155,7 +155,7 @@ export class GetKlinesReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setFrom(value: number): GetKlinesReqBuilder { this.obj.from = value; @@ -163,7 +163,7 @@ export class GetKlinesReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setTo(value: number): GetKlinesReqBuilder { this.obj.to = value; diff --git a/sdk/node/src/generate/futures/market/model_get_mark_price_req.ts b/sdk/node/src/generate/futures/market/model_get_mark_price_req.ts index 6c1194dc..939526bd 100644 --- a/sdk/node/src/generate/futures/market/model_get_mark_price_req.ts +++ b/sdk/node/src/generate/futures/market/model_get_mark_price_req.ts @@ -6,7 +6,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetMarkPriceReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ @Reflect.metadata('path', 'symbol') symbol?: string; @@ -28,7 +28,7 @@ export class GetMarkPriceReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; }): GetMarkPriceReq { @@ -62,7 +62,7 @@ export class GetMarkPriceReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetMarkPriceReqBuilder { this.obj.symbol = value; diff --git a/sdk/node/src/generate/futures/market/model_get_mark_price_resp.ts b/sdk/node/src/generate/futures/market/model_get_mark_price_resp.ts index ef679ebf..a676199b 100644 --- a/sdk/node/src/generate/futures/market/model_get_mark_price_resp.ts +++ b/sdk/node/src/generate/futures/market/model_get_mark_price_resp.ts @@ -6,17 +6,17 @@ import { Response } from '@internal/interfaces/serializable'; export class GetMarkPriceResp implements Response { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; /** - * Granularity (milisecond) + * Granularity (milliseconds) */ granularity: number; /** - * Time point (milisecond) + * Time point (milliseconds) */ timePoint: number; diff --git a/sdk/node/src/generate/futures/market/model_get_part_order_book_req.ts b/sdk/node/src/generate/futures/market/model_get_part_order_book_req.ts index e3c82d8d..5ea43ab8 100644 --- a/sdk/node/src/generate/futures/market/model_get_part_order_book_req.ts +++ b/sdk/node/src/generate/futures/market/model_get_part_order_book_req.ts @@ -5,17 +5,17 @@ import 'reflect-metadata'; import { Serializable } from '@internal/interfaces/serializable'; export class GetPartOrderBookReq implements Serializable { - /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - */ - symbol?: string; - /** * Get the depth layer, optional value: 20, 100 */ @Reflect.metadata('path', 'size') size?: string; + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + symbol?: string; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -32,18 +32,18 @@ export class GetPartOrderBookReq implements Serializable { * Creates a new instance of the `GetPartOrderBookReq` class with the given data. */ static create(data: { - /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - */ - symbol?: string; /** * Get the depth layer, optional value: 20, 100 */ size?: string; + /** + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + */ + symbol?: string; }): GetPartOrderBookReq { let obj = new GetPartOrderBookReq(); - obj.symbol = data.symbol; obj.size = data.size; + obj.symbol = data.symbol; return obj; } @@ -72,18 +72,18 @@ export class GetPartOrderBookReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Get the depth layer, optional value: 20, 100 */ - setSymbol(value: string): GetPartOrderBookReqBuilder { - this.obj.symbol = value; + setSize(value: string): GetPartOrderBookReqBuilder { + this.obj.size = value; return this; } /** - * Get the depth layer, optional value: 20, 100 + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ - setSize(value: string): GetPartOrderBookReqBuilder { - this.obj.size = value; + setSymbol(value: string): GetPartOrderBookReqBuilder { + this.obj.symbol = value; return this; } diff --git a/sdk/node/src/generate/futures/market/model_get_part_order_book_resp.ts b/sdk/node/src/generate/futures/market/model_get_part_order_book_resp.ts index 0a7e85b5..2d185f4f 100644 --- a/sdk/node/src/generate/futures/market/model_get_part_order_book_resp.ts +++ b/sdk/node/src/generate/futures/market/model_get_part_order_book_resp.ts @@ -11,7 +11,7 @@ export class GetPartOrderBookResp implements Response { sequence: number; /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; @@ -26,7 +26,7 @@ export class GetPartOrderBookResp implements Response { asks: Array>; /** - * Timestamp(nanosecond) + * Timestamp (nanoseconds) */ ts: number; diff --git a/sdk/node/src/generate/futures/market/model_get_premium_index_data_list.ts b/sdk/node/src/generate/futures/market/model_get_premium_index_data_list.ts index 9b17d084..feb505e6 100644 --- a/sdk/node/src/generate/futures/market/model_get_premium_index_data_list.ts +++ b/sdk/node/src/generate/futures/market/model_get_premium_index_data_list.ts @@ -5,17 +5,17 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetPremiumIndexDataList implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; /** - * Granularity(milisecond) + * Granularity (milliseconds) */ granularity: number; /** - * Timestamp(milisecond) + * Timestamp (milliseconds) */ timePoint: number; diff --git a/sdk/node/src/generate/futures/market/model_get_premium_index_req.ts b/sdk/node/src/generate/futures/market/model_get_premium_index_req.ts index f1d26c0b..7f1796b8 100644 --- a/sdk/node/src/generate/futures/market/model_get_premium_index_req.ts +++ b/sdk/node/src/generate/futures/market/model_get_premium_index_req.ts @@ -5,22 +5,22 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetPremiumIndexReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** - * This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + * This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. */ reverse?: boolean = true; @@ -30,12 +30,12 @@ export class GetPremiumIndexReq implements Serializable { offset?: number; /** - * 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 + * 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. */ forward?: boolean = true; /** - * Max record count. The default record count is 10, The maximum length cannot exceed 100 + * Max. record count. The default record count is 10; the maximum length cannot exceed 100 */ maxCount?: number = 10; @@ -56,19 +56,19 @@ export class GetPremiumIndexReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** - * This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + * This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. */ reverse?: boolean; /** @@ -76,11 +76,11 @@ export class GetPremiumIndexReq implements Serializable { */ offset?: number; /** - * 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 + * 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. */ forward?: boolean; /** - * Max record count. The default record count is 10, The maximum length cannot exceed 100 + * Max. record count. The default record count is 10; the maximum length cannot exceed 100 */ maxCount?: number; }): GetPremiumIndexReq { @@ -132,7 +132,7 @@ export class GetPremiumIndexReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetPremiumIndexReqBuilder { this.obj.symbol = value; @@ -140,7 +140,7 @@ export class GetPremiumIndexReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetPremiumIndexReqBuilder { this.obj.startAt = value; @@ -148,7 +148,7 @@ export class GetPremiumIndexReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetPremiumIndexReqBuilder { this.obj.endAt = value; @@ -156,7 +156,7 @@ export class GetPremiumIndexReqBuilder { } /** - * This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + * This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. */ setReverse(value: boolean): GetPremiumIndexReqBuilder { this.obj.reverse = value; @@ -172,7 +172,7 @@ export class GetPremiumIndexReqBuilder { } /** - * 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 + * 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. */ setForward(value: boolean): GetPremiumIndexReqBuilder { this.obj.forward = value; @@ -180,7 +180,7 @@ export class GetPremiumIndexReqBuilder { } /** - * Max record count. The default record count is 10, The maximum length cannot exceed 100 + * Max. record count. The default record count is 10; the maximum length cannot exceed 100 */ setMaxCount(value: number): GetPremiumIndexReqBuilder { this.obj.maxCount = value; diff --git a/sdk/node/src/generate/futures/market/model_get_private_token_instance_servers.ts b/sdk/node/src/generate/futures/market/model_get_private_token_instance_servers.ts index 03e243fd..05e01871 100644 --- a/sdk/node/src/generate/futures/market/model_get_private_token_instance_servers.ts +++ b/sdk/node/src/generate/futures/market/model_get_private_token_instance_servers.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetPrivateTokenInstanceServers implements Serializable { /** - * Websocket domain URL, It is recommended to use a dynamic URL as the URL may change + * Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. */ endpoint: string; @@ -20,12 +20,12 @@ export class GetPrivateTokenInstanceServers implements Serializable { protocol: GetPrivateTokenInstanceServers.ProtocolEnum; /** - * Recommended ping interval(millisecond) + * Recommended ping interval (milliseconds) */ pingInterval: number; /** - * Heartbeat timeout(millisecond) + * Heartbeat timeout (milliseconds) */ pingTimeout: number; @@ -67,7 +67,7 @@ export class GetPrivateTokenInstanceServers implements Serializable { export namespace GetPrivateTokenInstanceServers { export enum ProtocolEnum { /** - * websocket + * Websocket */ WEBSOCKET = 'websocket', } diff --git a/sdk/node/src/generate/futures/market/model_get_private_token_resp.ts b/sdk/node/src/generate/futures/market/model_get_private_token_resp.ts index 9e6aebc6..8c6acd84 100644 --- a/sdk/node/src/generate/futures/market/model_get_private_token_resp.ts +++ b/sdk/node/src/generate/futures/market/model_get_private_token_resp.ts @@ -7,7 +7,7 @@ import { Response } from '@internal/interfaces/serializable'; export class GetPrivateTokenResp implements Response { /** - * The token required to establish a websocket connection + * The token required to establish a Websocket connection */ token: string; diff --git a/sdk/node/src/generate/futures/market/model_get_public_token_instance_servers.ts b/sdk/node/src/generate/futures/market/model_get_public_token_instance_servers.ts index 2abc3132..2f3cafce 100644 --- a/sdk/node/src/generate/futures/market/model_get_public_token_instance_servers.ts +++ b/sdk/node/src/generate/futures/market/model_get_public_token_instance_servers.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetPublicTokenInstanceServers implements Serializable { /** - * Websocket domain URL, It is recommended to use a dynamic URL as the URL may change + * Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. */ endpoint: string; @@ -20,12 +20,12 @@ export class GetPublicTokenInstanceServers implements Serializable { protocol: GetPublicTokenInstanceServers.ProtocolEnum; /** - * Recommended ping interval(millisecond) + * Recommended ping interval (milliseconds) */ pingInterval: number; /** - * Heartbeat timeout(millisecond) + * Heartbeat timeout (milliseconds) */ pingTimeout: number; @@ -67,7 +67,7 @@ export class GetPublicTokenInstanceServers implements Serializable { export namespace GetPublicTokenInstanceServers { export enum ProtocolEnum { /** - * websocket + * Websocket */ WEBSOCKET = 'websocket', } diff --git a/sdk/node/src/generate/futures/market/model_get_public_token_resp.ts b/sdk/node/src/generate/futures/market/model_get_public_token_resp.ts index e7d4b332..d91bb5cf 100644 --- a/sdk/node/src/generate/futures/market/model_get_public_token_resp.ts +++ b/sdk/node/src/generate/futures/market/model_get_public_token_resp.ts @@ -7,7 +7,7 @@ import { Response } from '@internal/interfaces/serializable'; export class GetPublicTokenResp implements Response { /** - * The token required to establish a websocket connection + * The token required to establish a Websocket connection */ token: string; diff --git a/sdk/node/src/generate/futures/market/model_get_server_time_resp.ts b/sdk/node/src/generate/futures/market/model_get_server_time_resp.ts index 1427322c..c679bbbc 100644 --- a/sdk/node/src/generate/futures/market/model_get_server_time_resp.ts +++ b/sdk/node/src/generate/futures/market/model_get_server_time_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class GetServerTimeResp implements Response { /** - * ServerTime(millisecond) + * ServerTime (milliseconds) */ data: number; diff --git a/sdk/node/src/generate/futures/market/model_get_service_status_resp.ts b/sdk/node/src/generate/futures/market/model_get_service_status_resp.ts index ed2d071c..87062e8c 100644 --- a/sdk/node/src/generate/futures/market/model_get_service_status_resp.ts +++ b/sdk/node/src/generate/futures/market/model_get_service_status_resp.ts @@ -11,7 +11,7 @@ export class GetServiceStatusResp implements Response { msg: string; /** - * Status of service: open:normal transaction, close:Stop Trading/Maintenance, cancelonly:can only cancel the order but not place order + * Status of service: open: normal transaction; close: Stop Trading/Maintenance; cancelonly: can only cancel the order but not place order */ status: GetServiceStatusResp.StatusEnum; diff --git a/sdk/node/src/generate/futures/market/model_get_spot_index_price_data_list.ts b/sdk/node/src/generate/futures/market/model_get_spot_index_price_data_list.ts index c45394bb..9f9e1c4d 100644 --- a/sdk/node/src/generate/futures/market/model_get_spot_index_price_data_list.ts +++ b/sdk/node/src/generate/futures/market/model_get_spot_index_price_data_list.ts @@ -6,17 +6,17 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetSpotIndexPriceDataList implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; /** - * Granularity (milisecond) + * Granularity (milliseconds) */ granularity: number; /** - * Timestamp (milisecond) + * Timestamp (milliseconds) */ timePoint: number; diff --git a/sdk/node/src/generate/futures/market/model_get_spot_index_price_req.ts b/sdk/node/src/generate/futures/market/model_get_spot_index_price_req.ts index c1677318..d65850a4 100644 --- a/sdk/node/src/generate/futures/market/model_get_spot_index_price_req.ts +++ b/sdk/node/src/generate/futures/market/model_get_spot_index_price_req.ts @@ -5,22 +5,22 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetSpotIndexPriceReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** - * This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + * This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. */ reverse?: boolean = true; @@ -30,12 +30,12 @@ export class GetSpotIndexPriceReq implements Serializable { offset?: number; /** - * 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 + * 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. */ forward?: boolean = true; /** - * Max record count. The default record count is 10, The maximum length cannot exceed 100 + * Max. record count. The default record count is 10; the maximum length cannot exceed 100 */ maxCount?: number = 10; @@ -56,19 +56,19 @@ export class GetSpotIndexPriceReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** - * This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + * This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. */ reverse?: boolean; /** @@ -76,11 +76,11 @@ export class GetSpotIndexPriceReq implements Serializable { */ offset?: number; /** - * 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 + * 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. */ forward?: boolean; /** - * Max record count. The default record count is 10, The maximum length cannot exceed 100 + * Max. record count. The default record count is 10; the maximum length cannot exceed 100 */ maxCount?: number; }): GetSpotIndexPriceReq { @@ -132,7 +132,7 @@ export class GetSpotIndexPriceReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetSpotIndexPriceReqBuilder { this.obj.symbol = value; @@ -140,7 +140,7 @@ export class GetSpotIndexPriceReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetSpotIndexPriceReqBuilder { this.obj.startAt = value; @@ -148,7 +148,7 @@ export class GetSpotIndexPriceReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetSpotIndexPriceReqBuilder { this.obj.endAt = value; @@ -156,7 +156,7 @@ export class GetSpotIndexPriceReqBuilder { } /** - * This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + * This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. */ setReverse(value: boolean): GetSpotIndexPriceReqBuilder { this.obj.reverse = value; @@ -172,7 +172,7 @@ export class GetSpotIndexPriceReqBuilder { } /** - * 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 + * 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. */ setForward(value: boolean): GetSpotIndexPriceReqBuilder { this.obj.forward = value; @@ -180,7 +180,7 @@ export class GetSpotIndexPriceReqBuilder { } /** - * Max record count. The default record count is 10, The maximum length cannot exceed 100 + * Max. record count. The default record count is 10; the maximum length cannot exceed 100 */ setMaxCount(value: number): GetSpotIndexPriceReqBuilder { this.obj.maxCount = value; diff --git a/sdk/node/src/generate/futures/market/model_get_symbol_resp.ts b/sdk/node/src/generate/futures/market/model_get_symbol_resp.ts index d410fe4d..83dd4a9a 100644 --- a/sdk/node/src/generate/futures/market/model_get_symbol_resp.ts +++ b/sdk/node/src/generate/futures/market/model_get_symbol_resp.ts @@ -16,22 +16,22 @@ export class GetSymbolResp implements Response { rootSymbol: string; /** - * Type of the contract + * Type of contract */ type: GetSymbolResp.TypeEnum; /** - * First Open Date(millisecond) + * First Open Date (milliseconds) */ firstOpenDate: number; /** - * Expiration date(millisecond). Null means it will never expire + * Expiration date (milliseconds) Null means it will never expire */ expireDate: number; /** - * Settlement date(millisecond). Null indicates that automatic settlement is not supported + * Settlement date (milliseconds) Null indicates that automatic settlement is not supported */ settleDate: number; @@ -151,12 +151,12 @@ export class GetSymbolResp implements Response { markMethod: GetSymbolResp.MarkMethodEnum; /** - * Fair price marking method, The Futures contract is null + * Fair price marking method; the Futures contract is null */ fairMethod: GetSymbolResp.FairMethodEnum; /** - * Ticker symbol of the based currency + * Ticker symbol of the base currency */ fundingBaseSymbol: string; @@ -176,7 +176,7 @@ export class GetSymbolResp implements Response { indexSymbol: string; /** - * Settlement Symbol + * Settlement symbol */ settlementSymbol: string; @@ -196,12 +196,12 @@ export class GetSymbolResp implements Response { predictedFundingFeeRate: number; /** - * Funding interval(millisecond) + * Funding interval (milliseconds) */ fundingRateGranularity: number; /** - * Open interest + * Open interest (unit: lots) */ openInterest: string; @@ -231,7 +231,7 @@ export class GetSymbolResp implements Response { lastTradePrice: number; /** - * Next funding rate time(millisecond) + * Next funding rate time (milliseconds) */ nextFundingRateTime: number; @@ -246,22 +246,22 @@ export class GetSymbolResp implements Response { sourceExchanges: Array; /** - * Premium index symbol(1 minute) + * Premium index symbol (1 minute) */ premiumsSymbol1M: string; /** - * Premium index symbol(8 hours) + * Premium index symbol (8 hours) */ premiumsSymbol8H: string; /** - * Base currency interest rate symbol(1 minute) + * Base currency interest rate symbol (1 minute) */ fundingBaseSymbol1M: string; /** - * Quote currency interest rate symbol(1 minute) + * Quote currency interest rate symbol (1 minute) */ fundingQuoteSymbol1M: string; @@ -276,7 +276,7 @@ export class GetSymbolResp implements Response { highPrice: number; /** - * 24-hour price change% + * 24-hour % price change */ priceChgPct: number; @@ -315,6 +315,16 @@ export class GetSymbolResp implements Response { */ supportCross: boolean; + /** + * The current maximum buying price allowed + */ + buyLimit: number; + + /** + * The current minimum selling price allowed + */ + sellLimit: number; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -443,6 +453,10 @@ export class GetSymbolResp implements Response { this.mmrLevConstant = null; // @ts-ignore this.supportCross = null; + // @ts-ignore + this.buyLimit = null; + // @ts-ignore + this.sellLimit = null; } /** * common response @@ -477,7 +491,7 @@ export class GetSymbolResp implements Response { export namespace GetSymbolResp { export enum TypeEnum { /** - * Standardized swap contracts standard financial futures on swap, expiration swap funding rate + * Standardized swap contracts, standard financial futures on swaps, expiration swap funding rates */ FFWCSX = 'FFWCSX', /** @@ -487,7 +501,7 @@ export namespace GetSymbolResp { } export enum MarkMethodEnum { /** - * Fair Price + * FairPrice */ FAIRPRICE = 'FairPrice', } @@ -507,7 +521,7 @@ export namespace GetSymbolResp { */ OPEN = 'Open', /** - * Setting + * Settling */ BEINGSETTLED = 'BeingSettled', /** diff --git a/sdk/node/src/generate/futures/market/model_get_ticker_req.ts b/sdk/node/src/generate/futures/market/model_get_ticker_req.ts index d843e52e..8c0e79b0 100644 --- a/sdk/node/src/generate/futures/market/model_get_ticker_req.ts +++ b/sdk/node/src/generate/futures/market/model_get_ticker_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetTickerReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; @@ -26,7 +26,7 @@ export class GetTickerReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; }): GetTickerReq { @@ -60,7 +60,7 @@ export class GetTickerReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetTickerReqBuilder { this.obj.symbol = value; diff --git a/sdk/node/src/generate/futures/market/model_get_ticker_resp.ts b/sdk/node/src/generate/futures/market/model_get_ticker_resp.ts index 51930708..7d607f11 100644 --- a/sdk/node/src/generate/futures/market/model_get_ticker_resp.ts +++ b/sdk/node/src/generate/futures/market/model_get_ticker_resp.ts @@ -6,17 +6,17 @@ import { Response } from '@internal/interfaces/serializable'; export class GetTickerResp implements Response { /** - * Sequence number, used to judge whether the messages pushed by Websocket is continuous. + * Sequence number, used to judge whether the messages pushed by Websocket are continuous. */ sequence: number; /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; /** - * 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. + * 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. */ side: GetTickerResp.SideEnum; @@ -56,7 +56,7 @@ export class GetTickerResp implements Response { bestAskSize: number; /** - * Filled time(nanosecond) + * Filled time (nanoseconds) */ ts: number; diff --git a/sdk/node/src/generate/futures/market/model_get_trade_history_data.ts b/sdk/node/src/generate/futures/market/model_get_trade_history_data.ts index f829ea31..5cf61296 100644 --- a/sdk/node/src/generate/futures/market/model_get_trade_history_data.ts +++ b/sdk/node/src/generate/futures/market/model_get_trade_history_data.ts @@ -30,7 +30,7 @@ export class GetTradeHistoryData implements Serializable { takerOrderId: string; /** - * Filled timestamp(nanosecond) + * Filled timestamp (nanosecond) */ ts: number; @@ -45,7 +45,7 @@ export class GetTradeHistoryData implements Serializable { price: string; /** - * 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. + * 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. */ side: GetTradeHistoryData.SideEnum; diff --git a/sdk/node/src/generate/futures/market/model_get_trade_history_req.ts b/sdk/node/src/generate/futures/market/model_get_trade_history_req.ts index 250b25b2..ccc8cb13 100644 --- a/sdk/node/src/generate/futures/market/model_get_trade_history_req.ts +++ b/sdk/node/src/generate/futures/market/model_get_trade_history_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetTradeHistoryReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; @@ -26,7 +26,7 @@ export class GetTradeHistoryReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; }): GetTradeHistoryReq { @@ -60,7 +60,7 @@ export class GetTradeHistoryReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetTradeHistoryReqBuilder { this.obj.symbol = value; diff --git a/sdk/node/src/generate/futures/order/api_order.test.ts b/sdk/node/src/generate/futures/order/api_order.test.ts index b7abad58..e79c2f92 100644 --- a/sdk/node/src/generate/futures/order/api_order.test.ts +++ b/sdk/node/src/generate/futures/order/api_order.test.ts @@ -389,7 +389,7 @@ describe('Auto Test', () => { * /api/v1/orders */ let data = - '{"status": "done", "symbol": "example_string_default_value", "side": "buy", "type": "limit", "startAt": 123456, "endAt": 123456, "currentPage": 123456, "pageSize": 123456}'; + '{"status": "done", "symbol": "example_string_default_value", "side": "buy", "type": "limit", "startAt": 123456, "endAt": 123456, "currentPage": 1, "pageSize": 50}'; let req = GetOrderListReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, @@ -561,7 +561,7 @@ describe('Auto Test', () => { * /api/v1/fills */ let data = - '{\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": "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 "settleCurrency": "USDT",\n "fee": "0.04045854",\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 "settleCurrency": "USDT",\n "fee": "0.040467",\n "orderType": "market",\n "displayType": "market",\n "tradeType": "trade",\n "subTradeType": null,\n "tradeTime": 1729155587944000000,\n "createdAt": 1729155588104\n }\n ]\n }\n}'; + '{\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}'; let commonResp = RestResponse.fromJson(data); let resp = GetTradeHistoryResp.fromObject(commonResp.data); if (commonResp.data !== null) { diff --git a/sdk/node/src/generate/futures/order/api_order.ts b/sdk/node/src/generate/futures/order/api_order.ts index 66450e51..b7fb9326 100644 --- a/sdk/node/src/generate/futures/order/api_order.ts +++ b/sdk/node/src/generate/futures/order/api_order.ts @@ -41,17 +41,17 @@ import { GetRecentClosedOrdersResp } from './model_get_recent_closed_orders_resp export interface OrderAPI { /** * addOrder Add Order - * Description: Place 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. + * 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. * Documentation: https://www.kucoin.com/docs-new/api-3470235 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ addOrder(req: AddOrderReq): Promise; @@ -59,15 +59,15 @@ export interface OrderAPI { * addOrderTest Add Order Test * Description: Place order to the futures trading system just for validation * Documentation: https://www.kucoin.com/docs-new/api-3470238 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ addOrderTest(req: AddOrderTestReq): Promise; @@ -75,15 +75,15 @@ export interface OrderAPI { * batchAddOrders Batch Add Orders * 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. * Documentation: https://www.kucoin.com/docs-new/api-3470236 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 20 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+---------+ */ batchAddOrders(req: BatchAddOrdersReq): Promise; @@ -91,15 +91,15 @@ export interface OrderAPI { * addTPSLOrder Add Take Profit And Stop Loss Order * 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. * Documentation: https://www.kucoin.com/docs-new/api-3470237 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ addTPSLOrder(req: AddTPSLOrderReq): Promise; @@ -107,15 +107,15 @@ export interface OrderAPI { * cancelOrderById Cancel Order By OrderId * Description: Cancel order by system generated orderId. * Documentation: https://www.kucoin.com/docs-new/api-3470239 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ cancelOrderById(req: CancelOrderByIdReq): Promise; @@ -123,15 +123,15 @@ export interface OrderAPI { * cancelOrderByClientOid Cancel Order By ClientOid * Description: Cancel order by client defined orderId. * Documentation: https://www.kucoin.com/docs-new/api-3470240 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ cancelOrderByClientOid(req: CancelOrderByClientOidReq): Promise; @@ -139,15 +139,15 @@ export interface OrderAPI { * batchCancelOrders Batch Cancel Orders * Description: Cancel a bach of orders by client defined orderId or system generated orderId * Documentation: https://www.kucoin.com/docs-new/api-3470241 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 20 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+---------+ */ batchCancelOrders(req: BatchCancelOrdersReq): Promise; @@ -155,15 +155,15 @@ export interface OrderAPI { * cancelAllOrdersV3 Cancel All Orders * Description: Cancel all open orders (excluding stop orders). The response is a list of orderIDs of the canceled orders. * Documentation: https://www.kucoin.com/docs-new/api-3470242 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ cancelAllOrdersV3(req: CancelAllOrdersV3Req): Promise; @@ -171,15 +171,15 @@ export interface OrderAPI { * cancelAllStopOrders Cancel All Stop orders * 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\'. * Documentation: https://www.kucoin.com/docs-new/api-3470243 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 15 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+---------+ */ cancelAllStopOrders(req: CancelAllStopOrdersReq): Promise; @@ -187,31 +187,31 @@ export interface OrderAPI { * getOrderByOrderId Get Order By OrderId * Description: Get a single order by order id (including a stop order). * Documentation: https://www.kucoin.com/docs-new/api-3470245 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getOrderByOrderId(req: GetOrderByOrderIdReq): Promise; /** * getOrderByClientOid Get Order By ClientOid - * Description: Get a single order by client order id (including a stop order). + * Description: Get a single order by client order ID (including a stop order). * Documentation: https://www.kucoin.com/docs-new/api-3470352 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getOrderByClientOid(req: GetOrderByClientOidReq): Promise; @@ -219,15 +219,15 @@ export interface OrderAPI { * getOrderList Get Order List * Description: List your current orders. * Documentation: https://www.kucoin.com/docs-new/api-3470244 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getOrderList(req: GetOrderListReq): Promise; @@ -235,15 +235,15 @@ export interface OrderAPI { * getRecentClosedOrders Get Recent Closed Orders * 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. * Documentation: https://www.kucoin.com/docs-new/api-3470246 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getRecentClosedOrders(req: GetRecentClosedOrdersReq): Promise; @@ -251,47 +251,47 @@ export interface OrderAPI { * getStopOrderList Get Stop Order List * Description: Get the un-triggered stop orders list. Stop orders that have been triggered can be queried through the general order interface * Documentation: https://www.kucoin.com/docs-new/api-3470247 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 6 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 6 | + * +-----------------------+---------+ */ getStopOrderList(req: GetStopOrderListReq): Promise; /** * getOpenOrderValue Get Open Order Value - * Description: You can query this endpoint to get the the total number and value of the all your active orders. + * Description: You can query this endpoint to get the total number and value of all your active orders. * Documentation: https://www.kucoin.com/docs-new/api-3470250 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ getOpenOrderValue(req: GetOpenOrderValueReq): Promise; /** * getRecentTradeHistory Get Recent Trade History - * Description: Get a list of recent 1000 fills in the last 24 hours. If you need to get your recent traded order history with low latency, you may query this endpoint. + * 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. * Documentation: https://www.kucoin.com/docs-new/api-3470249 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | NULL | + * +-----------------------+---------+ */ getRecentTradeHistory(req: GetRecentTradeHistoryReq): Promise; @@ -299,15 +299,15 @@ export interface OrderAPI { * getTradeHistory Get Trade History * 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. * Documentation: https://www.kucoin.com/docs-new/api-3470248 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getTradeHistory(req: GetTradeHistoryReq): Promise; @@ -316,15 +316,15 @@ export interface OrderAPI { * cancelAllOrdersV1 Cancel All Orders - V1 * Description: Cancel all open orders (excluding stop orders). The response is a list of orderIDs of the canceled orders. * Documentation: https://www.kucoin.com/docs-new/api-3470362 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 200 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 200 | + * +-----------------------+---------+ */ cancelAllOrdersV1(req: CancelAllOrdersV1Req): Promise; } diff --git a/sdk/node/src/generate/futures/order/model_add_order_req.ts b/sdk/node/src/generate/futures/order/model_add_order_req.ts index a2f08766..2d511409 100644 --- a/sdk/node/src/generate/futures/order/model_add_order_req.ts +++ b/sdk/node/src/generate/futures/order/model_add_order_req.ts @@ -5,17 +5,17 @@ import { Serializable } from '@internal/interfaces/serializable'; export class AddOrderReq implements Serializable { /** - * 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(-) + * 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 (-). */ clientOid: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddOrderReq.SideEnum; /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; @@ -25,17 +25,17 @@ export class AddOrderReq implements Serializable { leverage: number; /** - * specify if the order is an \'limit\' order or \'market\' order + * Specify if the order is a \'limit\' order or \'market\' order */ type?: AddOrderReq.TypeEnum = AddOrderReq.TypeEnum.LIMIT; /** - * remark for the order, length cannot exceed 100 utf8 characters + * Remark for the order: Length cannot exceed 100 utf8 characters */ remark?: string; /** - * Either \'down\' or \'up\'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. + * Either \'down\' or \'up\'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. */ stop?: AddOrderReq.StopEnum; @@ -45,7 +45,7 @@ export class AddOrderReq implements Serializable { stopPriceType?: AddOrderReq.StopPriceTypeEnum; /** - * Need to be defined if stop is specified. + * Needs to be defined if stop is specified. */ stopPrice?: string; @@ -60,12 +60,12 @@ export class AddOrderReq implements Serializable { closeOrder?: boolean = false; /** - * 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. + * 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. */ forceHold?: boolean = false; /** - * [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. + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported. */ stp?: AddOrderReq.StpEnum; @@ -80,7 +80,7 @@ export class AddOrderReq implements Serializable { price?: string; /** - * **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. + * **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. */ size?: number; @@ -90,32 +90,32 @@ export class AddOrderReq implements Serializable { timeInForce?: AddOrderReq.TimeInForceEnum = AddOrderReq.TimeInForceEnum.GOOD_TILL_CANCELED; /** - * 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. + * 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. */ postOnly?: boolean = false; /** - * Optional for type is \'limit\' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. + * Optional for type is \'limit\' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. */ hidden?: boolean = false; /** - * 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. + * 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. */ iceberg?: boolean = false; /** - * 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. + * 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. */ visibleSize?: string; /** - * **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 + * **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. */ qty?: string; /** - * **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 + * **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. */ valueQty?: string; @@ -145,15 +145,15 @@ export class AddOrderReq implements Serializable { */ static create(data: { /** - * 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(-) + * 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 (-). */ clientOid: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddOrderReq.SideEnum; /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; /** @@ -161,15 +161,15 @@ export class AddOrderReq implements Serializable { */ leverage: number; /** - * specify if the order is an \'limit\' order or \'market\' order + * Specify if the order is a \'limit\' order or \'market\' order */ type?: AddOrderReq.TypeEnum; /** - * remark for the order, length cannot exceed 100 utf8 characters + * Remark for the order: Length cannot exceed 100 utf8 characters */ remark?: string; /** - * Either \'down\' or \'up\'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. + * Either \'down\' or \'up\'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. */ stop?: AddOrderReq.StopEnum; /** @@ -177,7 +177,7 @@ export class AddOrderReq implements Serializable { */ stopPriceType?: AddOrderReq.StopPriceTypeEnum; /** - * Need to be defined if stop is specified. + * Needs to be defined if stop is specified. */ stopPrice?: string; /** @@ -189,11 +189,11 @@ export class AddOrderReq implements Serializable { */ closeOrder?: boolean; /** - * 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. + * 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. */ forceHold?: boolean; /** - * [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. + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported. */ stp?: AddOrderReq.StpEnum; /** @@ -205,7 +205,7 @@ export class AddOrderReq implements Serializable { */ price?: string; /** - * **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. + * **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. */ size?: number; /** @@ -213,27 +213,27 @@ export class AddOrderReq implements Serializable { */ timeInForce?: AddOrderReq.TimeInForceEnum; /** - * 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. + * 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. */ postOnly?: boolean; /** - * Optional for type is \'limit\' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. + * Optional for type is \'limit\' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. */ hidden?: boolean; /** - * 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. + * 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. */ iceberg?: boolean; /** - * 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. + * 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. */ visibleSize?: string; /** - * **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 + * **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. */ qty?: string; /** - * **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 + * **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. */ valueQty?: string; }): AddOrderReq { @@ -347,7 +347,7 @@ export namespace AddOrderReq { */ DOWN = 'down', /** - * Triggers when the price reaches or goes above the stopPrice + * Triggers when the price reaches or goes above the stopPrice. */ UP = 'up', } @@ -357,11 +357,11 @@ export namespace AddOrderReq { */ TRADE_PRICE = 'TP', /** - * MP for mark price, The mark price can be obtained through relevant OPEN API for index services + * MP for mark price. The mark price can be obtained through relevant OPEN API for index services. */ MARK_PRICE = 'MP', /** - * IP for index price, The index price can be obtained through relevant OPEN API for index services + * IP for index price. The index price can be obtained through relevant OPEN API for index services. */ INDEX_PRICE = 'IP', } @@ -391,11 +391,11 @@ export namespace AddOrderReq { } export enum TimeInForceEnum { /** - * order remains open on the order book until canceled. This is the default type if the field is left empty. + * Order remains open on the order book until canceled. This is the default type if the field is left empty. */ GOOD_TILL_CANCELED = 'GTC', /** - * being matched or not, the remaining size of the order will be instantly canceled instead of entering the order book. + * Being matched or not, the remaining size of the order will be instantly canceled instead of entering the order book. */ IMMEDIATE_OR_CANCEL = 'IOC', } @@ -406,7 +406,7 @@ export class AddOrderReqBuilder { this.obj = obj; } /** - * 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(-) + * 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 (-). */ setClientOid(value: string): AddOrderReqBuilder { this.obj.clientOid = value; @@ -414,7 +414,7 @@ export class AddOrderReqBuilder { } /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ setSide(value: AddOrderReq.SideEnum): AddOrderReqBuilder { this.obj.side = value; @@ -422,7 +422,7 @@ export class AddOrderReqBuilder { } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): AddOrderReqBuilder { this.obj.symbol = value; @@ -438,7 +438,7 @@ export class AddOrderReqBuilder { } /** - * specify if the order is an \'limit\' order or \'market\' order + * Specify if the order is a \'limit\' order or \'market\' order */ setType(value: AddOrderReq.TypeEnum): AddOrderReqBuilder { this.obj.type = value; @@ -446,7 +446,7 @@ export class AddOrderReqBuilder { } /** - * remark for the order, length cannot exceed 100 utf8 characters + * Remark for the order: Length cannot exceed 100 utf8 characters */ setRemark(value: string): AddOrderReqBuilder { this.obj.remark = value; @@ -454,7 +454,7 @@ export class AddOrderReqBuilder { } /** - * Either \'down\' or \'up\'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. + * Either \'down\' or \'up\'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. */ setStop(value: AddOrderReq.StopEnum): AddOrderReqBuilder { this.obj.stop = value; @@ -470,7 +470,7 @@ export class AddOrderReqBuilder { } /** - * Need to be defined if stop is specified. + * Needs to be defined if stop is specified. */ setStopPrice(value: string): AddOrderReqBuilder { this.obj.stopPrice = value; @@ -494,7 +494,7 @@ export class AddOrderReqBuilder { } /** - * 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. + * 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. */ setForceHold(value: boolean): AddOrderReqBuilder { this.obj.forceHold = value; @@ -502,7 +502,7 @@ export class AddOrderReqBuilder { } /** - * [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. + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported. */ setStp(value: AddOrderReq.StpEnum): AddOrderReqBuilder { this.obj.stp = value; @@ -526,7 +526,7 @@ export class AddOrderReqBuilder { } /** - * **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. + * **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. */ setSize(value: number): AddOrderReqBuilder { this.obj.size = value; @@ -542,7 +542,7 @@ export class AddOrderReqBuilder { } /** - * 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. + * 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. */ setPostOnly(value: boolean): AddOrderReqBuilder { this.obj.postOnly = value; @@ -550,7 +550,7 @@ export class AddOrderReqBuilder { } /** - * Optional for type is \'limit\' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. + * Optional for type is \'limit\' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. */ setHidden(value: boolean): AddOrderReqBuilder { this.obj.hidden = value; @@ -558,7 +558,7 @@ export class AddOrderReqBuilder { } /** - * 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. + * 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. */ setIceberg(value: boolean): AddOrderReqBuilder { this.obj.iceberg = value; @@ -566,7 +566,7 @@ export class AddOrderReqBuilder { } /** - * 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. + * 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. */ setVisibleSize(value: string): AddOrderReqBuilder { this.obj.visibleSize = value; @@ -574,7 +574,7 @@ export class AddOrderReqBuilder { } /** - * **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 + * **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. */ setQty(value: string): AddOrderReqBuilder { this.obj.qty = value; @@ -582,7 +582,7 @@ export class AddOrderReqBuilder { } /** - * **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 + * **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. */ setValueQty(value: string): AddOrderReqBuilder { this.obj.valueQty = value; diff --git a/sdk/node/src/generate/futures/order/model_add_order_resp.ts b/sdk/node/src/generate/futures/order/model_add_order_resp.ts index f05bffb9..cbce9010 100644 --- a/sdk/node/src/generate/futures/order/model_add_order_resp.ts +++ b/sdk/node/src/generate/futures/order/model_add_order_resp.ts @@ -6,12 +6,12 @@ import { Response } from '@internal/interfaces/serializable'; export class AddOrderResp implements Response { /** - * The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + * The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. */ orderId: string; /** - * The user self-defined order id. + * The user self-defined order ID. */ clientOid: string; diff --git a/sdk/node/src/generate/futures/order/model_add_order_test_req.ts b/sdk/node/src/generate/futures/order/model_add_order_test_req.ts index 83fb99ca..88c77acd 100644 --- a/sdk/node/src/generate/futures/order/model_add_order_test_req.ts +++ b/sdk/node/src/generate/futures/order/model_add_order_test_req.ts @@ -106,7 +106,7 @@ export class AddOrderTestReq implements Serializable { iceberg?: boolean = false; /** - * 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. + * 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. */ visibleSize?: string; @@ -228,7 +228,7 @@ export class AddOrderTestReq implements Serializable { */ iceberg?: boolean; /** - * 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. + * 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. */ visibleSize?: string; /** @@ -569,7 +569,7 @@ export class AddOrderTestReqBuilder { } /** - * 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. + * 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. */ setVisibleSize(value: string): AddOrderTestReqBuilder { this.obj.visibleSize = value; diff --git a/sdk/node/src/generate/futures/order/model_add_tpsl_order_req.ts b/sdk/node/src/generate/futures/order/model_add_tpsl_order_req.ts index 04e4ba63..414b1f59 100644 --- a/sdk/node/src/generate/futures/order/model_add_tpsl_order_req.ts +++ b/sdk/node/src/generate/futures/order/model_add_tpsl_order_req.ts @@ -96,7 +96,7 @@ export class AddTPSLOrderReq implements Serializable { iceberg?: boolean = false; /** - * 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. + * 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. */ visibleSize?: string; @@ -220,7 +220,7 @@ export class AddTPSLOrderReq implements Serializable { */ iceberg?: boolean; /** - * 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. + * 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. */ visibleSize?: string; /** @@ -543,7 +543,7 @@ export class AddTPSLOrderReqBuilder { } /** - * 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. + * 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. */ setVisibleSize(value: string): AddTPSLOrderReqBuilder { this.obj.visibleSize = value; diff --git a/sdk/node/src/generate/futures/order/model_batch_add_orders_item.ts b/sdk/node/src/generate/futures/order/model_batch_add_orders_item.ts index 7c42e479..d9544283 100644 --- a/sdk/node/src/generate/futures/order/model_batch_add_orders_item.ts +++ b/sdk/node/src/generate/futures/order/model_batch_add_orders_item.ts @@ -27,7 +27,7 @@ export class BatchAddOrdersItem implements Serializable { /** * specify if the order is an \'limit\' order or \'market\' order */ - type: BatchAddOrdersItem.TypeEnum = BatchAddOrdersItem.TypeEnum.LIMIT; + type?: BatchAddOrdersItem.TypeEnum = BatchAddOrdersItem.TypeEnum.LIMIT; /** * remark for the order, length cannot exceed 100 utf8 characters @@ -132,8 +132,6 @@ export class BatchAddOrdersItem implements Serializable { this.symbol = null; // @ts-ignore this.leverage = null; - // @ts-ignore - this.type = null; } /** * Creates a new instance of the `BatchAddOrdersItem` class. @@ -166,7 +164,7 @@ export class BatchAddOrdersItem implements Serializable { /** * specify if the order is an \'limit\' order or \'market\' order */ - type: BatchAddOrdersItem.TypeEnum; + type?: BatchAddOrdersItem.TypeEnum; /** * remark for the order, length cannot exceed 100 utf8 characters */ diff --git a/sdk/node/src/generate/futures/order/model_cancel_all_orders_v1_req.ts b/sdk/node/src/generate/futures/order/model_cancel_all_orders_v1_req.ts index 3e9c9e1d..476982c1 100644 --- a/sdk/node/src/generate/futures/order/model_cancel_all_orders_v1_req.ts +++ b/sdk/node/src/generate/futures/order/model_cancel_all_orders_v1_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class CancelAllOrdersV1Req implements Serializable { /** - * 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) + * 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) */ symbol?: string; @@ -26,7 +26,7 @@ export class CancelAllOrdersV1Req implements Serializable { */ static create(data: { /** - * 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) + * 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) */ symbol?: string; }): CancelAllOrdersV1Req { @@ -60,7 +60,7 @@ export class CancelAllOrdersV1ReqBuilder { this.obj = obj; } /** - * 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) + * 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) */ setSymbol(value: string): CancelAllOrdersV1ReqBuilder { this.obj.symbol = value; diff --git a/sdk/node/src/generate/futures/order/model_cancel_all_orders_v1_resp.ts b/sdk/node/src/generate/futures/order/model_cancel_all_orders_v1_resp.ts index feea49fd..afab2826 100644 --- a/sdk/node/src/generate/futures/order/model_cancel_all_orders_v1_resp.ts +++ b/sdk/node/src/generate/futures/order/model_cancel_all_orders_v1_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class CancelAllOrdersV1Resp implements Response { /** - * Unique ID of the cancelled order + * Unique ID of the canceled order */ cancelledOrderIds: Array; diff --git a/sdk/node/src/generate/futures/order/model_get_open_order_value_req.ts b/sdk/node/src/generate/futures/order/model_get_open_order_value_req.ts index 38bd410d..110c109f 100644 --- a/sdk/node/src/generate/futures/order/model_get_open_order_value_req.ts +++ b/sdk/node/src/generate/futures/order/model_get_open_order_value_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetOpenOrderValueReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; @@ -26,7 +26,7 @@ export class GetOpenOrderValueReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; }): GetOpenOrderValueReq { @@ -60,7 +60,7 @@ export class GetOpenOrderValueReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetOpenOrderValueReqBuilder { this.obj.symbol = value; diff --git a/sdk/node/src/generate/futures/order/model_get_open_order_value_resp.ts b/sdk/node/src/generate/futures/order/model_get_open_order_value_resp.ts index b14d265b..2a36f65a 100644 --- a/sdk/node/src/generate/futures/order/model_get_open_order_value_resp.ts +++ b/sdk/node/src/generate/futures/order/model_get_open_order_value_resp.ts @@ -6,27 +6,27 @@ import { Response } from '@internal/interfaces/serializable'; export class GetOpenOrderValueResp implements Response { /** - * Total number of the unexecuted buy orders + * Total number of unexecuted buy orders */ openOrderBuySize: number; /** - * Total number of the unexecuted sell orders + * Total number of unexecuted sell orders */ openOrderSellSize: number; /** - * Value of all the unexecuted buy orders + * Value of all unexecuted buy orders */ openOrderBuyCost: string; /** - * Value of all the unexecuted sell orders + * Value of all unexecuted sell orders */ openOrderSellCost: string; /** - * settlement currency + * Settlement currency */ settleCurrency: string; diff --git a/sdk/node/src/generate/futures/order/model_get_order_by_client_oid_req.ts b/sdk/node/src/generate/futures/order/model_get_order_by_client_oid_req.ts index cd05ed55..9cc73532 100644 --- a/sdk/node/src/generate/futures/order/model_get_order_by_client_oid_req.ts +++ b/sdk/node/src/generate/futures/order/model_get_order_by_client_oid_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetOrderByClientOidReq implements Serializable { /** - * The user self-defined order id. + * The user self-defined order ID. */ clientOid?: string; @@ -26,7 +26,7 @@ export class GetOrderByClientOidReq implements Serializable { */ static create(data: { /** - * The user self-defined order id. + * The user self-defined order ID. */ clientOid?: string; }): GetOrderByClientOidReq { @@ -60,7 +60,7 @@ export class GetOrderByClientOidReqBuilder { this.obj = obj; } /** - * The user self-defined order id. + * The user self-defined order ID. */ setClientOid(value: string): GetOrderByClientOidReqBuilder { this.obj.clientOid = value; diff --git a/sdk/node/src/generate/futures/order/model_get_order_by_client_oid_resp.ts b/sdk/node/src/generate/futures/order/model_get_order_by_client_oid_resp.ts index 079b1055..1dbea7c0 100644 --- a/sdk/node/src/generate/futures/order/model_get_order_by_client_oid_resp.ts +++ b/sdk/node/src/generate/futures/order/model_get_order_by_client_oid_resp.ts @@ -11,7 +11,7 @@ export class GetOrderByClientOidResp implements Response { id: string; /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; @@ -26,7 +26,7 @@ export class GetOrderByClientOidResp implements Response { side: GetOrderByClientOidResp.SideEnum; /** - * Order price + * Order Price */ price: string; @@ -51,7 +51,7 @@ export class GetOrderByClientOidResp implements Response { dealSize: number; /** - * [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. + * [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported. */ stp: GetOrderByClientOidResp.StpEnum; @@ -101,7 +101,7 @@ export class GetOrderByClientOidResp implements Response { leverage: string; /** - * A mark to forcely hold the funds for an order + * A mark to force-hold the funds for an order */ forceHold: boolean; @@ -116,7 +116,7 @@ export class GetOrderByClientOidResp implements Response { visibleSize: number; /** - * Unique order id created by users to identify their orders + * Unique order ID created by users to identify their orders */ clientOid: string; @@ -126,7 +126,7 @@ export class GetOrderByClientOidResp implements Response { remark: string; /** - * tag order source + * Tag order source */ tags: string; @@ -141,12 +141,12 @@ export class GetOrderByClientOidResp implements Response { cancelExist: boolean; /** - * Time the order created + * Order creation time */ createdAt: number; /** - * last update time + * Last update time */ updatedAt: number; @@ -156,12 +156,12 @@ export class GetOrderByClientOidResp implements Response { endAt: number; /** - * Order create time in nanosecond + * Order creation time in nanoseconds */ orderTime: number; /** - * settlement currency + * Settlement currency */ settleCurrency: string; @@ -171,7 +171,7 @@ export class GetOrderByClientOidResp implements Response { marginMode: GetOrderByClientOidResp.MarginModeEnum; /** - * 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 + * 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 */ avgDealPrice: string; @@ -355,11 +355,11 @@ export namespace GetOrderByClientOidResp { */ TRADE_PRICE = 'TP', /** - * MP for mark price, The mark price can be obtained through relevant OPEN API for index services + * MP for mark price. The mark price can be obtained through relevant OPEN API for index services. */ MARK_PRICE = 'MP', /** - * IP for index price, The index price can be obtained through relevant OPEN API for index services + * IP for index price. The index price can be obtained through relevant OPEN API for index services. */ INDEX_PRICE = 'IP', } diff --git a/sdk/node/src/generate/futures/order/model_get_order_list_req.ts b/sdk/node/src/generate/futures/order/model_get_order_list_req.ts index 6ea9125c..e8aa8f41 100644 --- a/sdk/node/src/generate/futures/order/model_get_order_list_req.ts +++ b/sdk/node/src/generate/futures/order/model_get_order_list_req.ts @@ -20,7 +20,7 @@ export class GetOrderListReq implements Serializable { side?: GetOrderListReq.SideEnum; /** - * limit, market, limit_stop or market_stop + * Order Type */ type?: GetOrderListReq.TypeEnum; @@ -37,12 +37,12 @@ export class GetOrderListReq implements Serializable { /** * Current request page, The default currentPage is 1 */ - currentPage?: number; + currentPage?: number = 1; /** * pageSize, The default pageSize is 50, The maximum cannot exceed 1000 */ - pageSize?: number; + pageSize?: number = 50; /** * Private constructor, please use the corresponding static methods to construct the object. @@ -73,7 +73,7 @@ export class GetOrderListReq implements Serializable { */ side?: GetOrderListReq.SideEnum; /** - * limit, market, limit_stop or market_stop + * Order Type */ type?: GetOrderListReq.TypeEnum; /** @@ -100,8 +100,16 @@ export class GetOrderListReq implements Serializable { obj.type = data.type; obj.startAt = data.startAt; obj.endAt = data.endAt; - obj.currentPage = data.currentPage; - obj.pageSize = data.pageSize; + if (data.currentPage) { + obj.currentPage = data.currentPage; + } else { + obj.currentPage = 1; + } + if (data.pageSize) { + obj.pageSize = data.pageSize; + } else { + obj.pageSize = 50; + } return obj; } @@ -148,13 +156,29 @@ export namespace GetOrderListReq { } export enum TypeEnum { /** - * + * Limit order */ LIMIT = 'limit', /** - * + * Market order */ MARKET = 'market', + /** + * Stop limit order + */ + LIMIT_STOP = 'limit_stop', + /** + * Stop market order + */ + MARKET_STOP = 'market_stop', + /** + * Oco limit order + */ + OCO_LIMIT = 'oco_limit', + /** + * Oco stop order + */ + OCO_STOP = 'oco_stop', } } @@ -187,7 +211,7 @@ export class GetOrderListReqBuilder { } /** - * limit, market, limit_stop or market_stop + * Order Type */ setType(value: GetOrderListReq.TypeEnum): GetOrderListReqBuilder { this.obj.type = value; diff --git a/sdk/node/src/generate/futures/order/model_get_recent_trade_history_data.ts b/sdk/node/src/generate/futures/order/model_get_recent_trade_history_data.ts index 2ac2880e..019cd55a 100644 --- a/sdk/node/src/generate/futures/order/model_get_recent_trade_history_data.ts +++ b/sdk/node/src/generate/futures/order/model_get_recent_trade_history_data.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetRecentTradeHistoryData implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; @@ -25,7 +25,7 @@ export class GetRecentTradeHistoryData implements Serializable { side: GetRecentTradeHistoryData.SideEnum; /** - * Liquidity- taker or maker + * Liquidity-taker or -maker */ liquidity: GetRecentTradeHistoryData.LiquidityEnum; @@ -70,7 +70,7 @@ export class GetRecentTradeHistoryData implements Serializable { feeRate: string; /** - * Fixed fees(Deprecated field, no actual use of the value field) + * Fixed fees (Deprecated field, no actual use of the value field) */ fixFee: string; @@ -80,7 +80,7 @@ export class GetRecentTradeHistoryData implements Serializable { feeCurrency: string; /** - * trade time in nanosecond + * Trade time in nanoseconds */ tradeTime: number; @@ -120,7 +120,7 @@ export class GetRecentTradeHistoryData implements Serializable { tradeType: GetRecentTradeHistoryData.TradeTypeEnum; /** - * Time the order created + * Order creation time */ createdAt: number; @@ -262,7 +262,7 @@ export namespace GetRecentTradeHistoryData { */ TRADE = 'trade', /** - * Partially filled and cancelled orders + * Partially filled and canceled orders */ CANCEL = 'cancel', /** diff --git a/sdk/node/src/generate/futures/order/model_get_recent_trade_history_req.ts b/sdk/node/src/generate/futures/order/model_get_recent_trade_history_req.ts index 25f1a815..505f8e8f 100644 --- a/sdk/node/src/generate/futures/order/model_get_recent_trade_history_req.ts +++ b/sdk/node/src/generate/futures/order/model_get_recent_trade_history_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetRecentTradeHistoryReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; @@ -26,7 +26,7 @@ export class GetRecentTradeHistoryReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; }): GetRecentTradeHistoryReq { @@ -60,7 +60,7 @@ export class GetRecentTradeHistoryReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetRecentTradeHistoryReqBuilder { this.obj.symbol = value; diff --git a/sdk/node/src/generate/futures/order/model_get_trade_history_items.ts b/sdk/node/src/generate/futures/order/model_get_trade_history_items.ts index 9661c5f3..e999bf16 100644 --- a/sdk/node/src/generate/futures/order/model_get_trade_history_items.ts +++ b/sdk/node/src/generate/futures/order/model_get_trade_history_items.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetTradeHistoryItems implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; @@ -25,7 +25,7 @@ export class GetTradeHistoryItems implements Serializable { side: GetTradeHistoryItems.SideEnum; /** - * Liquidity- taker or maker + * Liquidity-taker or -maker */ liquidity: GetTradeHistoryItems.LiquidityEnum; @@ -70,7 +70,7 @@ export class GetTradeHistoryItems implements Serializable { feeRate: string; /** - * Fixed fees(Deprecated field, no actual use of the value field) + * Fixed fees (Deprecated field, no actual use of the value field) */ fixFee: string; @@ -80,7 +80,7 @@ export class GetTradeHistoryItems implements Serializable { feeCurrency: string; /** - * trade time in nanosecond + * Trade time in nanoseconds */ tradeTime: number; @@ -95,17 +95,17 @@ export class GetTradeHistoryItems implements Serializable { marginMode: GetTradeHistoryItems.MarginModeEnum; /** - * Settle Currency + * Settle currency */ settleCurrency: string; /** - * Order Type + * Order type */ displayType: GetTradeHistoryItems.DisplayTypeEnum; /** - * + * Trading fee */ fee: string; @@ -120,10 +120,20 @@ export class GetTradeHistoryItems implements Serializable { tradeType: GetTradeHistoryItems.TradeTypeEnum; /** - * Time the order created + * Order creation time */ createdAt: number; + /** + * Opening tax fee (Only KYC users in some regions have this parameter) + */ + openFeeTaxPay: string; + + /** + * Close tax fee (Only KYC users in some regions have this parameter) + */ + closeFeeTaxPay: string; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -176,6 +186,10 @@ export class GetTradeHistoryItems implements Serializable { this.tradeType = null; // @ts-ignore this.createdAt = null; + // @ts-ignore + this.openFeeTaxPay = null; + // @ts-ignore + this.closeFeeTaxPay = null; } /** * Convert the object to a JSON string. @@ -220,29 +234,29 @@ export namespace GetTradeHistoryItems { } export enum MarginModeEnum { /** - * Isolated Margin + * Isolated margin */ ISOLATED = 'ISOLATED', /** - * Cross Margin + * Cross margin */ CROSS = 'CROSS', } export enum DisplayTypeEnum { /** - * Limit order + * limit order */ LIMIT = 'limit', /** - * Market order + * market order */ MARKET = 'market', /** - * Stop limit order + * stop limit order */ LIMIT_STOP = 'limit_stop', /** - * Stop Market order + * stop market order */ MARKET_STOP = 'market_stop', } diff --git a/sdk/node/src/generate/futures/order/model_get_trade_history_req.ts b/sdk/node/src/generate/futures/order/model_get_trade_history_req.ts index c63abadb..04561c9c 100644 --- a/sdk/node/src/generate/futures/order/model_get_trade_history_req.ts +++ b/sdk/node/src/generate/futures/order/model_get_trade_history_req.ts @@ -5,12 +5,12 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetTradeHistoryReq implements Serializable { /** - * List fills for a specific order only (If you specify orderId, other parameters can be ignored) + * List fills for a specific order only (if you specify orderId, other parameters can be ignored) */ orderId?: string; /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; @@ -25,27 +25,27 @@ export class GetTradeHistoryReq implements Serializable { type?: GetTradeHistoryReq.TypeEnum; /** - * Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all type when empty + * Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all types when empty */ tradeTypes?: string; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** - * Current request page, The default currentPage is 1 + * Current request page. The default currentPage is 1 */ currentPage?: number = 1; /** - * pageSize, The default pageSize is 50, The maximum cannot exceed 1000 + * pageSize, The default pageSize is 50; the maximum cannot exceed 1000 */ pageSize?: number = 50; @@ -66,11 +66,11 @@ export class GetTradeHistoryReq implements Serializable { */ static create(data: { /** - * List fills for a specific order only (If you specify orderId, other parameters can be ignored) + * List fills for a specific order only (if you specify orderId, other parameters can be ignored) */ orderId?: string; /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** @@ -82,23 +82,23 @@ export class GetTradeHistoryReq implements Serializable { */ type?: GetTradeHistoryReq.TypeEnum; /** - * Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all type when empty + * Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all types when empty */ tradeTypes?: string; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** - * Current request page, The default currentPage is 1 + * Current request page. The default currentPage is 1 */ currentPage?: number; /** - * pageSize, The default pageSize is 50, The maximum cannot exceed 1000 + * pageSize, The default pageSize is 50; the maximum cannot exceed 1000 */ pageSize?: number; }): GetTradeHistoryReq { @@ -179,7 +179,7 @@ export class GetTradeHistoryReqBuilder { this.obj = obj; } /** - * List fills for a specific order only (If you specify orderId, other parameters can be ignored) + * List fills for a specific order only (if you specify orderId, other parameters can be ignored) */ setOrderId(value: string): GetTradeHistoryReqBuilder { this.obj.orderId = value; @@ -187,7 +187,7 @@ export class GetTradeHistoryReqBuilder { } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetTradeHistoryReqBuilder { this.obj.symbol = value; @@ -211,7 +211,7 @@ export class GetTradeHistoryReqBuilder { } /** - * Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all type when empty + * Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all types when empty */ setTradeTypes(value: string): GetTradeHistoryReqBuilder { this.obj.tradeTypes = value; @@ -219,7 +219,7 @@ export class GetTradeHistoryReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetTradeHistoryReqBuilder { this.obj.startAt = value; @@ -227,7 +227,7 @@ export class GetTradeHistoryReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetTradeHistoryReqBuilder { this.obj.endAt = value; @@ -235,7 +235,7 @@ export class GetTradeHistoryReqBuilder { } /** - * Current request page, The default currentPage is 1 + * Current request page. The default currentPage is 1 */ setCurrentPage(value: number): GetTradeHistoryReqBuilder { this.obj.currentPage = value; @@ -243,7 +243,7 @@ export class GetTradeHistoryReqBuilder { } /** - * pageSize, The default pageSize is 50, The maximum cannot exceed 1000 + * pageSize, The default pageSize is 50; the maximum cannot exceed 1000 */ setPageSize(value: number): GetTradeHistoryReqBuilder { this.obj.pageSize = value; diff --git a/sdk/node/src/generate/futures/positions/api_positions.template b/sdk/node/src/generate/futures/positions/api_positions.template index 238c1a21..c2faa7a5 100644 --- a/sdk/node/src/generate/futures/positions/api_positions.template +++ b/sdk/node/src/generate/futures/positions/api_positions.template @@ -196,8 +196,7 @@ describe('Auto Test', ()=> { let req = builder.build(); let resp = api.modifyMarginLeverage(req); return resp.then(result => { - expect(result.symbol).toEqual(expect.anything()); - expect(result.leverage).toEqual(expect.anything()); + expect(result.data).toEqual(expect.anything()); console.log(resp); }); }) diff --git a/sdk/node/src/generate/futures/positions/api_positions.test.ts b/sdk/node/src/generate/futures/positions/api_positions.test.ts index 40c57a46..7b945934 100644 --- a/sdk/node/src/generate/futures/positions/api_positions.test.ts +++ b/sdk/node/src/generate/futures/positions/api_positions.test.ts @@ -207,7 +207,7 @@ describe('Auto Test', () => { * /api/v1/history-positions */ let data = - '{\n "code": "200000",\n "data": {\n "currentPage": 1,\n "pageSize": 10,\n "totalNum": 3,\n "totalPage": 1,\n "items": [\n {\n "closeId": "500000000027312193",\n "userId": "633559791e1cbc0001f319bc",\n "symbol": "XBTUSDTM",\n "settleCurrency": "USDT",\n "leverage": "0.0",\n "type": "CLOSE_SHORT",\n "pnl": "-3.79237944",\n "realisedGrossCost": "3.795",\n "withdrawPnl": "0.0",\n "tradeFee": "0.078657",\n "fundingFee": "0.08127756",\n "openTime": 1727073653603,\n "closeTime": 1729155587945,\n "openPrice": "63650.0",\n "closePrice": "67445.0",\n "marginMode": "ISOLATED"\n },\n {\n "closeId": "500000000026809668",\n "userId": "633559791e1cbc0001f319bc",\n "symbol": "SUIUSDTM",\n "settleCurrency": "USDT",\n "leverage": "0.0",\n "type": "LIQUID_SHORT",\n "pnl": "-1.10919296",\n "realisedGrossCost": "1.11297635",\n "withdrawPnl": "0.0",\n "tradeFee": "0.00200295",\n "fundingFee": "0.00578634",\n "openTime": 1726473389296,\n "closeTime": 1728738683541,\n "openPrice": "1.1072",\n "closePrice": "2.22017635",\n "marginMode": "ISOLATED"\n },\n {\n "closeId": "500000000026819355",\n "userId": "633559791e1cbc0001f319bc",\n "symbol": "XBTUSDTM",\n "settleCurrency": "USDT",\n "leverage": "0.0",\n "type": "LIQUID_SHORT",\n "pnl": "-5.941896296",\n "realisedGrossCost": "5.86937042",\n "withdrawPnl": "0.0",\n "tradeFee": "0.074020096",\n "fundingFee": "0.00149422",\n "openTime": 1726490775358,\n "closeTime": 1727061049859,\n "openPrice": "58679.6",\n "closePrice": "64548.97042",\n "marginMode": "ISOLATED"\n }\n ]\n }\n}'; + '{\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}'; let commonResp = RestResponse.fromJson(data); let resp = GetPositionsHistoryResp.fromObject(commonResp.data); if (commonResp.data !== null) { @@ -298,8 +298,7 @@ describe('Auto Test', () => { * Modify Cross Margin Leverage * /api/v2/changeCrossUserLeverage */ - let data = - '{\n "code": "200000",\n "data": {\n "symbol": "XBTUSDTM",\n "leverage": "3"\n }\n}'; + let data = '{\n "code": "200000",\n "data": true\n}'; let commonResp = RestResponse.fromJson(data); let resp = ModifyMarginLeverageResp.fromObject(commonResp.data); if (commonResp.data !== null) { diff --git a/sdk/node/src/generate/futures/positions/api_positions.ts b/sdk/node/src/generate/futures/positions/api_positions.ts index dc6194e6..cd9327c1 100644 --- a/sdk/node/src/generate/futures/positions/api_positions.ts +++ b/sdk/node/src/generate/futures/positions/api_positions.ts @@ -35,15 +35,15 @@ export interface PositionsAPI { * getMarginMode Get Margin Mode * Description: This interface can query the margin mode of the current symbol. * Documentation: https://www.kucoin.com/docs-new/api-3470259 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getMarginMode(req: GetMarginModeReq): Promise; @@ -51,15 +51,15 @@ export interface PositionsAPI { * switchMarginMode Switch Margin Mode * Description: This interface can modify the margin mode of the current symbol. * Documentation: https://www.kucoin.com/docs-new/api-3470262 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ switchMarginMode(req: SwitchMarginModeReq): Promise; @@ -67,15 +67,15 @@ export interface PositionsAPI { * getMaxOpenSize Get Max Open Size * Description: Get Maximum Open Position Size. * Documentation: https://www.kucoin.com/docs-new/api-3470251 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getMaxOpenSize(req: GetMaxOpenSizeReq): Promise; @@ -83,15 +83,15 @@ export interface PositionsAPI { * getPositionDetails Get Position Details * Description: Get the position details of a specified position. * Documentation: https://www.kucoin.com/docs-new/api-3470252 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getPositionDetails(req: GetPositionDetailsReq): Promise; @@ -99,15 +99,15 @@ export interface PositionsAPI { * getPositionList Get Position List * Description: Get the position details of a specified position. * Documentation: https://www.kucoin.com/docs-new/api-3470253 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getPositionList(req: GetPositionListReq): Promise; @@ -115,15 +115,15 @@ export interface PositionsAPI { * getPositionsHistory Get Positions History * Description: This interface can query position history information records. * Documentation: https://www.kucoin.com/docs-new/api-3470254 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getPositionsHistory(req: GetPositionsHistoryReq): Promise; @@ -131,15 +131,15 @@ export interface PositionsAPI { * getMaxWithdrawMargin Get Max Withdraw Margin * Description: This interface can query the maximum amount of margin that the current position supports withdrawal. * Documentation: https://www.kucoin.com/docs-new/api-3470258 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ getMaxWithdrawMargin(req: GetMaxWithdrawMarginReq): Promise; @@ -147,15 +147,15 @@ export interface PositionsAPI { * getCrossMarginLeverage Get Cross Margin Leverage * Description: This interface can query the current symbol’s cross-margin leverage multiple. * Documentation: https://www.kucoin.com/docs-new/api-3470260 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getCrossMarginLeverage(req: GetCrossMarginLeverageReq): Promise; @@ -163,15 +163,15 @@ export interface PositionsAPI { * modifyMarginLeverage Modify Cross Margin Leverage * Description: This interface can modify the current symbol’s cross-margin leverage multiple. * Documentation: https://www.kucoin.com/docs-new/api-3470261 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ modifyMarginLeverage(req: ModifyMarginLeverageReq): Promise; @@ -179,15 +179,15 @@ export interface PositionsAPI { * addIsolatedMargin Add Isolated Margin * Description: Add Isolated Margin Manually. * Documentation: https://www.kucoin.com/docs-new/api-3470257 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 4 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 4 | + * +-----------------------+---------+ */ addIsolatedMargin(req: AddIsolatedMarginReq): Promise; @@ -195,31 +195,31 @@ export interface PositionsAPI { * removeIsolatedMargin Remove Isolated Margin * Description: Remove Isolated Margin Manually. * Documentation: https://www.kucoin.com/docs-new/api-3470256 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ removeIsolatedMargin(req: RemoveIsolatedMarginReq): Promise; /** * getIsolatedMarginRiskLimit Get Isolated Margin Risk Limit - * Description: This interface can be used to obtain information about risk limit level of a specific contract(Only valid for isolated Margin). + * Description: This interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin). * Documentation: https://www.kucoin.com/docs-new/api-3470263 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getIsolatedMarginRiskLimit( req: GetIsolatedMarginRiskLimitReq, @@ -227,17 +227,17 @@ export interface PositionsAPI { /** * modifyIsolatedMarginRiskLimt Modify Isolated Margin Risk Limit - * Description: This interface can be used to obtain information about risk limit level of a specific contract(Only valid for isolated Margin). + * Description: This interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin). * Documentation: https://www.kucoin.com/docs-new/api-3470264 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ modifyIsolatedMarginRiskLimt( req: ModifyIsolatedMarginRiskLimtReq, @@ -248,15 +248,15 @@ export interface PositionsAPI { * modifyAutoDepositStatus Modify Isolated Margin Auto-Deposit Status * Description: This endpoint is only applicable to isolated margin and is no longer recommended. It is recommended to use cross margin instead. * Documentation: https://www.kucoin.com/docs-new/api-3470255 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | FUTURES | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | FUTURES | - * | API-RATE-LIMIT-POOL | FUTURES | - * | API-RATE-LIMIT | 4 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | FUTURES | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | FUTURES | + * | API-RATE-LIMIT-POOL | FUTURES | + * | API-RATE-LIMIT-WEIGHT | 4 | + * +-----------------------+---------+ */ modifyAutoDepositStatus(req: ModifyAutoDepositStatusReq): Promise; } diff --git a/sdk/node/src/generate/futures/positions/model_get_isolated_margin_risk_limit_data.ts b/sdk/node/src/generate/futures/positions/model_get_isolated_margin_risk_limit_data.ts index 3b3ed494..f62a987f 100644 --- a/sdk/node/src/generate/futures/positions/model_get_isolated_margin_risk_limit_data.ts +++ b/sdk/node/src/generate/futures/positions/model_get_isolated_margin_risk_limit_data.ts @@ -5,17 +5,17 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetIsolatedMarginRiskLimitData implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; /** - * level + * Level */ level: number; /** - * Upper limit USDT(includes) + * Upper limit USDT (included) */ maxRiskLimit: number; @@ -25,7 +25,7 @@ export class GetIsolatedMarginRiskLimitData implements Serializable { minRiskLimit: number; /** - * Max leverage + * Max. leverage */ maxLeverage: number; diff --git a/sdk/node/src/generate/futures/positions/model_get_isolated_margin_risk_limit_req.ts b/sdk/node/src/generate/futures/positions/model_get_isolated_margin_risk_limit_req.ts index f2f5568e..d17e0c05 100644 --- a/sdk/node/src/generate/futures/positions/model_get_isolated_margin_risk_limit_req.ts +++ b/sdk/node/src/generate/futures/positions/model_get_isolated_margin_risk_limit_req.ts @@ -6,7 +6,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetIsolatedMarginRiskLimitReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ @Reflect.metadata('path', 'symbol') symbol?: string; @@ -28,7 +28,7 @@ export class GetIsolatedMarginRiskLimitReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; }): GetIsolatedMarginRiskLimitReq { @@ -62,7 +62,7 @@ export class GetIsolatedMarginRiskLimitReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetIsolatedMarginRiskLimitReqBuilder { this.obj.symbol = value; diff --git a/sdk/node/src/generate/futures/positions/model_get_max_open_size_req.ts b/sdk/node/src/generate/futures/positions/model_get_max_open_size_req.ts index 79388690..98bf6ce7 100644 --- a/sdk/node/src/generate/futures/positions/model_get_max_open_size_req.ts +++ b/sdk/node/src/generate/futures/positions/model_get_max_open_size_req.ts @@ -5,12 +5,12 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetMaxOpenSizeReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Order price + * Order Price */ price?: string; @@ -36,11 +36,11 @@ export class GetMaxOpenSizeReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol?: string; /** - * Order price + * Order Price */ price?: string; /** @@ -80,7 +80,7 @@ export class GetMaxOpenSizeReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): GetMaxOpenSizeReqBuilder { this.obj.symbol = value; @@ -88,7 +88,7 @@ export class GetMaxOpenSizeReqBuilder { } /** - * Order price + * Order Price */ setPrice(value: string): GetMaxOpenSizeReqBuilder { this.obj.price = value; diff --git a/sdk/node/src/generate/futures/positions/model_get_max_open_size_resp.ts b/sdk/node/src/generate/futures/positions/model_get_max_open_size_resp.ts index f89bf71c..5a2712bc 100644 --- a/sdk/node/src/generate/futures/positions/model_get_max_open_size_resp.ts +++ b/sdk/node/src/generate/futures/positions/model_get_max_open_size_resp.ts @@ -6,17 +6,17 @@ import { Response } from '@internal/interfaces/serializable'; export class GetMaxOpenSizeResp implements Response { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; /** - * Maximum buy size + * Maximum buy size (unit: lot) */ maxBuyOpenSize: number; /** - * Maximum buy size + * Maximum buy size (unit: lot) */ maxSellOpenSize: number; diff --git a/sdk/node/src/generate/futures/positions/model_get_positions_history_items.ts b/sdk/node/src/generate/futures/positions/model_get_positions_history_items.ts index f15a47ec..41e0d88f 100644 --- a/sdk/node/src/generate/futures/positions/model_get_positions_history_items.ts +++ b/sdk/node/src/generate/futures/positions/model_get_positions_history_items.ts @@ -84,6 +84,36 @@ export class GetPositionsHistoryItems implements Serializable { */ marginMode: GetPositionsHistoryItems.MarginModeEnum; + /** + * + */ + realisedGrossCostNew: string; + + /** + * Tax + */ + tax: string; + + /** + * + */ + roe?: string; + + /** + * + */ + liquidAmount: string; + + /** + * + */ + liquidPrice: string; + + /** + * Position side + */ + side: string; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -120,6 +150,16 @@ export class GetPositionsHistoryItems implements Serializable { this.closePrice = null; // @ts-ignore this.marginMode = null; + // @ts-ignore + this.realisedGrossCostNew = null; + // @ts-ignore + this.tax = null; + // @ts-ignore + this.liquidAmount = null; + // @ts-ignore + this.liquidPrice = null; + // @ts-ignore + this.side = null; } /** * Convert the object to a JSON string. diff --git a/sdk/node/src/generate/futures/positions/model_modify_isolated_margin_risk_limt_req.ts b/sdk/node/src/generate/futures/positions/model_modify_isolated_margin_risk_limt_req.ts index e790a40d..c157c7be 100644 --- a/sdk/node/src/generate/futures/positions/model_modify_isolated_margin_risk_limt_req.ts +++ b/sdk/node/src/generate/futures/positions/model_modify_isolated_margin_risk_limt_req.ts @@ -5,12 +5,12 @@ import { Serializable } from '@internal/interfaces/serializable'; export class ModifyIsolatedMarginRiskLimtReq implements Serializable { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; /** - * level + * Level */ level: number; @@ -36,11 +36,11 @@ export class ModifyIsolatedMarginRiskLimtReq implements Serializable { */ static create(data: { /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ symbol: string; /** - * level + * Level */ level: number; }): ModifyIsolatedMarginRiskLimtReq { @@ -75,7 +75,7 @@ export class ModifyIsolatedMarginRiskLimtReqBuilder { this.obj = obj; } /** - * Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + * Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) */ setSymbol(value: string): ModifyIsolatedMarginRiskLimtReqBuilder { this.obj.symbol = value; @@ -83,7 +83,7 @@ export class ModifyIsolatedMarginRiskLimtReqBuilder { } /** - * level + * Level */ setLevel(value: number): ModifyIsolatedMarginRiskLimtReqBuilder { this.obj.level = value; diff --git a/sdk/node/src/generate/futures/positions/model_modify_isolated_margin_risk_limt_resp.ts b/sdk/node/src/generate/futures/positions/model_modify_isolated_margin_risk_limt_resp.ts index 8c4b0edf..65b06032 100644 --- a/sdk/node/src/generate/futures/positions/model_modify_isolated_margin_risk_limt_resp.ts +++ b/sdk/node/src/generate/futures/positions/model_modify_isolated_margin_risk_limt_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class ModifyIsolatedMarginRiskLimtResp implements Response { /** - * To adjust the level will cancel the open order, the response can only indicate whether the submit of the adjustment request is successful or not. + * Adjusting the level will result in the cancellation of any open orders. The response will indicate only whether the adjustment request was successfully submitted. */ data: boolean; diff --git a/sdk/node/src/generate/futures/positions/model_modify_margin_leverage_resp.ts b/sdk/node/src/generate/futures/positions/model_modify_margin_leverage_resp.ts index 0ca7db46..11a98736 100644 --- a/sdk/node/src/generate/futures/positions/model_modify_margin_leverage_resp.ts +++ b/sdk/node/src/generate/futures/positions/model_modify_margin_leverage_resp.ts @@ -8,21 +8,14 @@ export class ModifyMarginLeverageResp implements Response { /** * */ - symbol: string; - - /** - * - */ - leverage: string; + data: boolean; /** * Private constructor, please use the corresponding static methods to construct the object. */ private constructor() { // @ts-ignore - this.symbol = null; - // @ts-ignore - this.leverage = null; + this.data = null; } /** * common response @@ -38,7 +31,7 @@ export class ModifyMarginLeverageResp implements Response { * Convert the object to a JSON string. */ toJson(): string { - return JSON.stringify(instanceToPlain(this)); + return JSON.stringify(instanceToPlain(this.data)); } /** * Create an object from a JSON string. @@ -50,6 +43,6 @@ export class ModifyMarginLeverageResp implements Response { * Create an object from Js Object. */ static fromObject(jsonObject: Object): ModifyMarginLeverageResp { - return plainToClassFromExist(new ModifyMarginLeverageResp(), jsonObject); + return plainToClassFromExist(new ModifyMarginLeverageResp(), { data: jsonObject }); } } diff --git a/sdk/node/src/generate/margin/credit/api_credit.template b/sdk/node/src/generate/margin/credit/api_credit.template index f01de6a8..b1c54273 100644 --- a/sdk/node/src/generate/margin/credit/api_credit.template +++ b/sdk/node/src/generate/margin/credit/api_credit.template @@ -76,7 +76,7 @@ describe('Auto Test', ()=> { * /api/v3/purchase/orders */ let builder = GetPurchaseOrdersReq.builder(); - builder.setCurrency(?).setStatus(?).setPurchaseOrderNo(?).setCurrentPage(?).setPageSize(?); + builder.setStatus(?).setCurrency(?).setPurchaseOrderNo(?).setCurrentPage(?).setPageSize(?); let req = builder.build(); let resp = api.getPurchaseOrders(req); return resp.then(result => { @@ -112,7 +112,7 @@ describe('Auto Test', ()=> { * /api/v3/redeem/orders */ let builder = GetRedeemOrdersReq.builder(); - builder.setCurrency(?).setStatus(?).setRedeemOrderNo(?).setCurrentPage(?).setPageSize(?); + builder.setStatus(?).setCurrency(?).setRedeemOrderNo(?).setCurrentPage(?).setPageSize(?); let req = builder.build(); let resp = api.getRedeemOrders(req); return resp.then(result => { diff --git a/sdk/node/src/generate/margin/credit/api_credit.test.ts b/sdk/node/src/generate/margin/credit/api_credit.test.ts index 6e60c107..466d3575 100644 --- a/sdk/node/src/generate/margin/credit/api_credit.test.ts +++ b/sdk/node/src/generate/margin/credit/api_credit.test.ts @@ -146,7 +146,7 @@ describe('Auto Test', () => { * /api/v3/purchase/orders */ let data = - '{"currency": "BTC", "status": "DONE", "purchaseOrderNo": "example_string_default_value", "currentPage": 1, "pageSize": 50}'; + '{"status": "DONE", "currency": "BTC", "purchaseOrderNo": "example_string_default_value", "currentPage": 1, "pageSize": 50}'; let req = GetPurchaseOrdersReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, @@ -210,7 +210,7 @@ describe('Auto Test', () => { * /api/v3/redeem/orders */ let data = - '{"currency": "BTC", "status": "DONE", "redeemOrderNo": "example_string_default_value", "currentPage": 1, "pageSize": 50}'; + '{"status": "DONE", "currency": "BTC", "redeemOrderNo": "example_string_default_value", "currentPage": 1, "pageSize": 50}'; let req = GetRedeemOrdersReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, diff --git a/sdk/node/src/generate/margin/credit/api_credit.ts b/sdk/node/src/generate/margin/credit/api_credit.ts index c465ee65..159a00af 100644 --- a/sdk/node/src/generate/margin/credit/api_credit.ts +++ b/sdk/node/src/generate/margin/credit/api_credit.ts @@ -21,15 +21,15 @@ export interface CreditAPI { * getLoanMarket Get Loan Market * Description: This API endpoint is used to get the information about the currencies available for lending. * Documentation: https://www.kucoin.com/docs-new/api-3470212 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ getLoanMarket(req: GetLoanMarketReq): Promise; @@ -37,15 +37,15 @@ export interface CreditAPI { * getLoanMarketInterestRate Get Loan Market Interest Rate * Description: This API endpoint is used to get the interest rates of the margin lending market over the past 7 days. * Documentation: https://www.kucoin.com/docs-new/api-3470215 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 5 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+--------+ */ getLoanMarketInterestRate( req: GetLoanMarketInterestRateReq, @@ -55,63 +55,63 @@ export interface CreditAPI { * purchase Purchase * Description: Invest credit in the market and earn interest * Documentation: https://www.kucoin.com/docs-new/api-3470216 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 15 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+---------+ */ purchase(req: PurchaseReq): Promise; /** * modifyPurchase Modify Purchase - * Description: This API endpoint is used to update the interest rates of subscription orders, which will take effect at the beginning of the next hour.,Please ensure that the funds are in the main(funding) account + * Description: This API endpoint is used to update the interest rates of subscription orders, which will take effect at the beginning of the next hour. Please ensure that the funds are in the main (funding) account. * Documentation: https://www.kucoin.com/docs-new/api-3470217 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ modifyPurchase(req: ModifyPurchaseReq): Promise; /** * getPurchaseOrders Get Purchase Orders - * Description: This API endpoint provides pagination query for the purchase orders. + * Description: This API endpoint provides a pagination query for the purchase orders. * Documentation: https://www.kucoin.com/docs-new/api-3470213 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ getPurchaseOrders(req: GetPurchaseOrdersReq): Promise; /** * redeem Redeem - * Description: Redeem your loan order + * Description: Redeem your loan order. * Documentation: https://www.kucoin.com/docs-new/api-3470218 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 15 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+---------+ */ redeem(req: RedeemReq): Promise; @@ -119,15 +119,15 @@ export interface CreditAPI { * getRedeemOrders Get Redeem Orders * Description: This API endpoint provides pagination query for the redeem orders. * Documentation: https://www.kucoin.com/docs-new/api-3470214 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ getRedeemOrders(req: GetRedeemOrdersReq): Promise; } diff --git a/sdk/node/src/generate/margin/credit/model_get_loan_market_data.ts b/sdk/node/src/generate/margin/credit/model_get_loan_market_data.ts index df5b55de..639722dc 100644 --- a/sdk/node/src/generate/margin/credit/model_get_loan_market_data.ts +++ b/sdk/node/src/generate/margin/credit/model_get_loan_market_data.ts @@ -55,7 +55,7 @@ export class GetLoanMarketData implements Serializable { marketInterestRate?: string; /** - * Whether to allow automatic purchase: true: on, false: off + * Whether to allow automatic purchase: True: on; false: off */ autoPurchaseEnable?: boolean; diff --git a/sdk/node/src/generate/margin/credit/model_get_purchase_orders_items.ts b/sdk/node/src/generate/margin/credit/model_get_purchase_orders_items.ts index 87c563d5..a3699985 100644 --- a/sdk/node/src/generate/margin/credit/model_get_purchase_orders_items.ts +++ b/sdk/node/src/generate/margin/credit/model_get_purchase_orders_items.ts @@ -10,7 +10,7 @@ export class GetPurchaseOrdersItems implements Serializable { currency: string; /** - * Purchase order id + * Purchase order ID */ purchaseOrderNo: string; diff --git a/sdk/node/src/generate/margin/credit/model_get_purchase_orders_req.ts b/sdk/node/src/generate/margin/credit/model_get_purchase_orders_req.ts index 7a4f0614..4cb6eb8f 100644 --- a/sdk/node/src/generate/margin/credit/model_get_purchase_orders_req.ts +++ b/sdk/node/src/generate/margin/credit/model_get_purchase_orders_req.ts @@ -5,17 +5,17 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetPurchaseOrdersReq implements Serializable { /** - * currency + * DONE-completed; PENDING-settling */ - currency?: string; + status?: GetPurchaseOrdersReq.StatusEnum; /** - * DONE-completed; PENDING-settling + * Currency */ - status?: GetPurchaseOrdersReq.StatusEnum; + currency?: string; /** - * + * Purchase order ID */ purchaseOrderNo?: string; @@ -25,7 +25,7 @@ export class GetPurchaseOrdersReq implements Serializable { currentPage?: number = 1; /** - * Page size; 1<=pageSize<=100; default is 50 + * Page size; 1<=pageSize<=50; default is 50 */ pageSize?: number = 50; @@ -45,16 +45,16 @@ export class GetPurchaseOrdersReq implements Serializable { * Creates a new instance of the `GetPurchaseOrdersReq` class with the given data. */ static create(data: { - /** - * currency - */ - currency?: string; /** * DONE-completed; PENDING-settling */ status?: GetPurchaseOrdersReq.StatusEnum; /** - * + * Currency + */ + currency?: string; + /** + * Purchase order ID */ purchaseOrderNo?: string; /** @@ -62,13 +62,13 @@ export class GetPurchaseOrdersReq implements Serializable { */ currentPage?: number; /** - * Page size; 1<=pageSize<=100; default is 50 + * Page size; 1<=pageSize<=50; default is 50 */ pageSize?: number; }): GetPurchaseOrdersReq { let obj = new GetPurchaseOrdersReq(); - obj.currency = data.currency; obj.status = data.status; + obj.currency = data.currency; obj.purchaseOrderNo = data.purchaseOrderNo; if (data.currentPage) { obj.currentPage = data.currentPage; @@ -106,11 +106,11 @@ export class GetPurchaseOrdersReq implements Serializable { export namespace GetPurchaseOrdersReq { export enum StatusEnum { /** - * + * completed */ DONE = 'DONE', /** - * + * settling */ PENDING = 'PENDING', } @@ -121,23 +121,23 @@ export class GetPurchaseOrdersReqBuilder { this.obj = obj; } /** - * currency + * DONE-completed; PENDING-settling */ - setCurrency(value: string): GetPurchaseOrdersReqBuilder { - this.obj.currency = value; + setStatus(value: GetPurchaseOrdersReq.StatusEnum): GetPurchaseOrdersReqBuilder { + this.obj.status = value; return this; } /** - * DONE-completed; PENDING-settling + * Currency */ - setStatus(value: GetPurchaseOrdersReq.StatusEnum): GetPurchaseOrdersReqBuilder { - this.obj.status = value; + setCurrency(value: string): GetPurchaseOrdersReqBuilder { + this.obj.currency = value; return this; } /** - * + * Purchase order ID */ setPurchaseOrderNo(value: string): GetPurchaseOrdersReqBuilder { this.obj.purchaseOrderNo = value; @@ -153,7 +153,7 @@ export class GetPurchaseOrdersReqBuilder { } /** - * Page size; 1<=pageSize<=100; default is 50 + * Page size; 1<=pageSize<=50; default is 50 */ setPageSize(value: number): GetPurchaseOrdersReqBuilder { this.obj.pageSize = value; diff --git a/sdk/node/src/generate/margin/credit/model_get_purchase_orders_resp.ts b/sdk/node/src/generate/margin/credit/model_get_purchase_orders_resp.ts index 5af6b1f3..71da725f 100644 --- a/sdk/node/src/generate/margin/credit/model_get_purchase_orders_resp.ts +++ b/sdk/node/src/generate/margin/credit/model_get_purchase_orders_resp.ts @@ -22,7 +22,7 @@ export class GetPurchaseOrdersResp implements Response { totalNum: number; /** - * Total Page + * Total Pages */ totalPage: number; diff --git a/sdk/node/src/generate/margin/credit/model_get_redeem_orders_items.ts b/sdk/node/src/generate/margin/credit/model_get_redeem_orders_items.ts index 519e40cb..4eba8a77 100644 --- a/sdk/node/src/generate/margin/credit/model_get_redeem_orders_items.ts +++ b/sdk/node/src/generate/margin/credit/model_get_redeem_orders_items.ts @@ -10,12 +10,12 @@ export class GetRedeemOrdersItems implements Serializable { currency: string; /** - * Purchase order id + * Purchase order ID */ purchaseOrderNo: string; /** - * Redeem order id + * Redeem order ID */ redeemOrderNo: string; diff --git a/sdk/node/src/generate/margin/credit/model_get_redeem_orders_req.ts b/sdk/node/src/generate/margin/credit/model_get_redeem_orders_req.ts index 0b7e5e7e..629dfb35 100644 --- a/sdk/node/src/generate/margin/credit/model_get_redeem_orders_req.ts +++ b/sdk/node/src/generate/margin/credit/model_get_redeem_orders_req.ts @@ -5,17 +5,17 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetRedeemOrdersReq implements Serializable { /** - * currency + * DONE-completed; PENDING-settling */ - currency?: string; + status?: GetRedeemOrdersReq.StatusEnum; /** - * DONE-completed; PENDING-settling + * currency */ - status?: GetRedeemOrdersReq.StatusEnum; + currency?: string; /** - * Redeem order id + * Redeem order ID */ redeemOrderNo?: string; @@ -25,7 +25,7 @@ export class GetRedeemOrdersReq implements Serializable { currentPage?: number = 1; /** - * Page size; 1<=pageSize<=100; default is 50 + * Page size; 1<=pageSize<=50; default is 50 */ pageSize?: number = 50; @@ -45,16 +45,16 @@ export class GetRedeemOrdersReq implements Serializable { * Creates a new instance of the `GetRedeemOrdersReq` class with the given data. */ static create(data: { - /** - * currency - */ - currency?: string; /** * DONE-completed; PENDING-settling */ status?: GetRedeemOrdersReq.StatusEnum; /** - * Redeem order id + * currency + */ + currency?: string; + /** + * Redeem order ID */ redeemOrderNo?: string; /** @@ -62,13 +62,13 @@ export class GetRedeemOrdersReq implements Serializable { */ currentPage?: number; /** - * Page size; 1<=pageSize<=100; default is 50 + * Page size; 1<=pageSize<=50; default is 50 */ pageSize?: number; }): GetRedeemOrdersReq { let obj = new GetRedeemOrdersReq(); - obj.currency = data.currency; obj.status = data.status; + obj.currency = data.currency; obj.redeemOrderNo = data.redeemOrderNo; if (data.currentPage) { obj.currentPage = data.currentPage; @@ -106,11 +106,11 @@ export class GetRedeemOrdersReq implements Serializable { export namespace GetRedeemOrdersReq { export enum StatusEnum { /** - * + * completed */ DONE = 'DONE', /** - * + * settling */ PENDING = 'PENDING', } @@ -121,23 +121,23 @@ export class GetRedeemOrdersReqBuilder { this.obj = obj; } /** - * currency + * DONE-completed; PENDING-settling */ - setCurrency(value: string): GetRedeemOrdersReqBuilder { - this.obj.currency = value; + setStatus(value: GetRedeemOrdersReq.StatusEnum): GetRedeemOrdersReqBuilder { + this.obj.status = value; return this; } /** - * DONE-completed; PENDING-settling + * currency */ - setStatus(value: GetRedeemOrdersReq.StatusEnum): GetRedeemOrdersReqBuilder { - this.obj.status = value; + setCurrency(value: string): GetRedeemOrdersReqBuilder { + this.obj.currency = value; return this; } /** - * Redeem order id + * Redeem order ID */ setRedeemOrderNo(value: string): GetRedeemOrdersReqBuilder { this.obj.redeemOrderNo = value; @@ -153,7 +153,7 @@ export class GetRedeemOrdersReqBuilder { } /** - * Page size; 1<=pageSize<=100; default is 50 + * Page size; 1<=pageSize<=50; default is 50 */ setPageSize(value: number): GetRedeemOrdersReqBuilder { this.obj.pageSize = value; diff --git a/sdk/node/src/generate/margin/credit/model_get_redeem_orders_resp.ts b/sdk/node/src/generate/margin/credit/model_get_redeem_orders_resp.ts index 324b44f9..1886914b 100644 --- a/sdk/node/src/generate/margin/credit/model_get_redeem_orders_resp.ts +++ b/sdk/node/src/generate/margin/credit/model_get_redeem_orders_resp.ts @@ -22,7 +22,7 @@ export class GetRedeemOrdersResp implements Response { totalNum: number; /** - * Total Page + * Total Pages */ totalPage: number; diff --git a/sdk/node/src/generate/margin/credit/model_modify_purchase_req.ts b/sdk/node/src/generate/margin/credit/model_modify_purchase_req.ts index f2ecc19d..0e173503 100644 --- a/sdk/node/src/generate/margin/credit/model_modify_purchase_req.ts +++ b/sdk/node/src/generate/margin/credit/model_modify_purchase_req.ts @@ -15,7 +15,7 @@ export class ModifyPurchaseReq implements Serializable { interestRate: string; /** - * Purchase order id + * Purchase order ID */ purchaseOrderNo: string; @@ -51,7 +51,7 @@ export class ModifyPurchaseReq implements Serializable { */ interestRate: string; /** - * Purchase order id + * Purchase order ID */ purchaseOrderNo: string; }): ModifyPurchaseReq { @@ -103,7 +103,7 @@ export class ModifyPurchaseReqBuilder { } /** - * Purchase order id + * Purchase order ID */ setPurchaseOrderNo(value: string): ModifyPurchaseReqBuilder { this.obj.purchaseOrderNo = value; diff --git a/sdk/node/src/generate/margin/credit/model_purchase_req.ts b/sdk/node/src/generate/margin/credit/model_purchase_req.ts index 33887b77..7e4bce72 100644 --- a/sdk/node/src/generate/margin/credit/model_purchase_req.ts +++ b/sdk/node/src/generate/margin/credit/model_purchase_req.ts @@ -10,12 +10,12 @@ export class PurchaseReq implements Serializable { currency: string; /** - * purchase amount + * Purchase amount */ size: string; /** - * purchase interest rate + * Purchase interest rate */ interestRate: string; @@ -47,11 +47,11 @@ export class PurchaseReq implements Serializable { */ currency: string; /** - * purchase amount + * Purchase amount */ size: string; /** - * purchase interest rate + * Purchase interest rate */ interestRate: string; }): PurchaseReq { @@ -95,7 +95,7 @@ export class PurchaseReqBuilder { } /** - * purchase amount + * Purchase amount */ setSize(value: string): PurchaseReqBuilder { this.obj.size = value; @@ -103,7 +103,7 @@ export class PurchaseReqBuilder { } /** - * purchase interest rate + * Purchase interest rate */ setInterestRate(value: string): PurchaseReqBuilder { this.obj.interestRate = value; diff --git a/sdk/node/src/generate/margin/credit/model_purchase_resp.ts b/sdk/node/src/generate/margin/credit/model_purchase_resp.ts index 8661afa2..f0a92b86 100644 --- a/sdk/node/src/generate/margin/credit/model_purchase_resp.ts +++ b/sdk/node/src/generate/margin/credit/model_purchase_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class PurchaseResp implements Response { /** - * Purchase order id + * Purchase order ID */ orderNo: string; diff --git a/sdk/node/src/generate/margin/credit/model_redeem_req.ts b/sdk/node/src/generate/margin/credit/model_redeem_req.ts index adb6d22d..5ed3b4bc 100644 --- a/sdk/node/src/generate/margin/credit/model_redeem_req.ts +++ b/sdk/node/src/generate/margin/credit/model_redeem_req.ts @@ -15,7 +15,7 @@ export class RedeemReq implements Serializable { size: string; /** - * Purchase order id + * Purchase order ID */ purchaseOrderNo: string; @@ -51,7 +51,7 @@ export class RedeemReq implements Serializable { */ size: string; /** - * Purchase order id + * Purchase order ID */ purchaseOrderNo: string; }): RedeemReq { @@ -103,7 +103,7 @@ export class RedeemReqBuilder { } /** - * Purchase order id + * Purchase order ID */ setPurchaseOrderNo(value: string): RedeemReqBuilder { this.obj.purchaseOrderNo = value; diff --git a/sdk/node/src/generate/margin/credit/model_redeem_resp.ts b/sdk/node/src/generate/margin/credit/model_redeem_resp.ts index be407a3a..686ba185 100644 --- a/sdk/node/src/generate/margin/credit/model_redeem_resp.ts +++ b/sdk/node/src/generate/margin/credit/model_redeem_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class RedeemResp implements Response { /** - * Redeem order id + * Redeem order ID */ orderNo: string; diff --git a/sdk/node/src/generate/margin/debit/api_debit.template b/sdk/node/src/generate/margin/debit/api_debit.template index e19c667b..26547787 100644 --- a/sdk/node/src/generate/margin/debit/api_debit.template +++ b/sdk/node/src/generate/margin/debit/api_debit.template @@ -85,7 +85,7 @@ describe('Auto Test', ()=> { test('getInterestHistory request test', ()=> { /** * getInterestHistory - * Get Interest History + * Get Interest History. * /api/v3/margin/interest */ let builder = GetInterestHistoryReq.builder(); diff --git a/sdk/node/src/generate/margin/debit/api_debit.test.ts b/sdk/node/src/generate/margin/debit/api_debit.test.ts index 0a4a4ef7..bbf3faf6 100644 --- a/sdk/node/src/generate/margin/debit/api_debit.test.ts +++ b/sdk/node/src/generate/margin/debit/api_debit.test.ts @@ -143,7 +143,7 @@ describe('Auto Test', () => { test('getInterestHistory request test', () => { /** * getInterestHistory - * Get Interest History + * Get Interest History. * /api/v3/margin/interest */ let data = @@ -158,7 +158,7 @@ describe('Auto Test', () => { test('getInterestHistory response test', () => { /** * getInterestHistory - * Get Interest History + * Get Interest History. * /api/v3/margin/interest */ let data = diff --git a/sdk/node/src/generate/margin/debit/api_debit.ts b/sdk/node/src/generate/margin/debit/api_debit.ts index dfd364ce..4ce46223 100644 --- a/sdk/node/src/generate/margin/debit/api_debit.ts +++ b/sdk/node/src/generate/margin/debit/api_debit.ts @@ -19,31 +19,31 @@ export interface DebitAPI { * borrow Borrow * Description: This API endpoint is used to initiate an application for cross or isolated margin borrowing. * Documentation: https://www.kucoin.com/docs-new/api-3470206 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 15 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+---------+ */ borrow(req: BorrowReq): Promise; /** * getBorrowHistory Get Borrow History - * Description: This API endpoint is used to get the borrowing orders for cross and isolated margin accounts + * Description: This API endpoint is used to get the borrowing orders for cross and isolated margin accounts. * Documentation: https://www.kucoin.com/docs-new/api-3470207 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 15 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+---------+ */ getBorrowHistory(req: GetBorrowHistoryReq): Promise; @@ -51,47 +51,47 @@ export interface DebitAPI { * repay Repay * Description: This API endpoint is used to initiate an application for cross or isolated margin repayment. * Documentation: https://www.kucoin.com/docs-new/api-3470210 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ repay(req: RepayReq): Promise; /** * getRepayHistory Get Repay History - * Description: This API endpoint is used to get the borrowing orders for cross and isolated margin accounts + * Description: This API endpoint is used to get the borrowing orders for cross and isolated margin accounts. * Documentation: https://www.kucoin.com/docs-new/api-3470208 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 15 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+---------+ */ getRepayHistory(req: GetRepayHistoryReq): Promise; /** - * getInterestHistory Get Interest History - * Description: Request via this endpoint to get the interest records of the cross/isolated margin lending. + * getInterestHistory Get Interest History. + * Description: Request the interest records of the cross/isolated margin lending via this endpoint. * Documentation: https://www.kucoin.com/docs-new/api-3470209 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 20 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+---------+ */ getInterestHistory(req: GetInterestHistoryReq): Promise; @@ -99,15 +99,15 @@ export interface DebitAPI { * modifyLeverage Modify Leverage * Description: This endpoint allows modifying the leverage multiplier for cross margin or isolated margin. * Documentation: https://www.kucoin.com/docs-new/api-3470211 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 8 | + * +-----------------------+---------+ */ modifyLeverage(req: ModifyLeverageReq): Promise; } diff --git a/sdk/node/src/generate/margin/debit/model_borrow_resp.ts b/sdk/node/src/generate/margin/debit/model_borrow_resp.ts index f8866e8e..4a385cd0 100644 --- a/sdk/node/src/generate/margin/debit/model_borrow_resp.ts +++ b/sdk/node/src/generate/margin/debit/model_borrow_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class BorrowResp implements Response { /** - * Borrow Order Id + * Borrow Order ID */ orderNo: string; diff --git a/sdk/node/src/generate/margin/debit/model_get_borrow_history_items.ts b/sdk/node/src/generate/margin/debit/model_get_borrow_history_items.ts index 9ccd66ae..6253c6e7 100644 --- a/sdk/node/src/generate/margin/debit/model_get_borrow_history_items.ts +++ b/sdk/node/src/generate/margin/debit/model_get_borrow_history_items.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetBorrowHistoryItems implements Serializable { /** - * Borrow Order Id + * Borrow Order ID */ orderNo: string; @@ -35,7 +35,7 @@ export class GetBorrowHistoryItems implements Serializable { status: GetBorrowHistoryItems.StatusEnum; /** - * borrow time + * Borrow time */ createdTime: number; diff --git a/sdk/node/src/generate/margin/debit/model_get_borrow_history_req.ts b/sdk/node/src/generate/margin/debit/model_get_borrow_history_req.ts index 06e9ede9..53fcae41 100644 --- a/sdk/node/src/generate/margin/debit/model_get_borrow_history_req.ts +++ b/sdk/node/src/generate/margin/debit/model_get_borrow_history_req.ts @@ -20,7 +20,7 @@ export class GetBorrowHistoryReq implements Serializable { symbol?: string; /** - * Borrow Order Id + * Borrow Order ID */ orderNo?: string; @@ -73,7 +73,7 @@ export class GetBorrowHistoryReq implements Serializable { */ symbol?: string; /** - * Borrow Order Id + * Borrow Order ID */ orderNo?: string; /** @@ -166,7 +166,7 @@ export class GetBorrowHistoryReqBuilder { } /** - * Borrow Order Id + * Borrow Order ID */ setOrderNo(value: string): GetBorrowHistoryReqBuilder { this.obj.orderNo = value; diff --git a/sdk/node/src/generate/margin/debit/model_get_borrow_history_resp.ts b/sdk/node/src/generate/margin/debit/model_get_borrow_history_resp.ts index 52655aa5..66d667ad 100644 --- a/sdk/node/src/generate/margin/debit/model_get_borrow_history_resp.ts +++ b/sdk/node/src/generate/margin/debit/model_get_borrow_history_resp.ts @@ -27,7 +27,7 @@ export class GetBorrowHistoryResp implements Response { totalNum: number; /** - * total page + * total pages */ totalPage: number; diff --git a/sdk/node/src/generate/margin/debit/model_get_interest_history_resp.ts b/sdk/node/src/generate/margin/debit/model_get_interest_history_resp.ts index 728f82bb..8b32cd61 100644 --- a/sdk/node/src/generate/margin/debit/model_get_interest_history_resp.ts +++ b/sdk/node/src/generate/margin/debit/model_get_interest_history_resp.ts @@ -27,7 +27,7 @@ export class GetInterestHistoryResp implements Response { totalNum: number; /** - * total page + * total pages */ totalPage: number; diff --git a/sdk/node/src/generate/margin/debit/model_get_repay_history_items.ts b/sdk/node/src/generate/margin/debit/model_get_repay_history_items.ts index c06a35c7..32297530 100644 --- a/sdk/node/src/generate/margin/debit/model_get_repay_history_items.ts +++ b/sdk/node/src/generate/margin/debit/model_get_repay_history_items.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetRepayHistoryItems implements Serializable { /** - * Repay Order Id + * Repay order ID */ orderNo: string; diff --git a/sdk/node/src/generate/margin/debit/model_get_repay_history_req.ts b/sdk/node/src/generate/margin/debit/model_get_repay_history_req.ts index 8b640c30..bf503efc 100644 --- a/sdk/node/src/generate/margin/debit/model_get_repay_history_req.ts +++ b/sdk/node/src/generate/margin/debit/model_get_repay_history_req.ts @@ -20,7 +20,7 @@ export class GetRepayHistoryReq implements Serializable { symbol?: string; /** - * Repay Order Id + * Repay order ID */ orderNo?: string; @@ -73,7 +73,7 @@ export class GetRepayHistoryReq implements Serializable { */ symbol?: string; /** - * Repay Order Id + * Repay order ID */ orderNo?: string; /** @@ -166,7 +166,7 @@ export class GetRepayHistoryReqBuilder { } /** - * Repay Order Id + * Repay order ID */ setOrderNo(value: string): GetRepayHistoryReqBuilder { this.obj.orderNo = value; diff --git a/sdk/node/src/generate/margin/debit/model_get_repay_history_resp.ts b/sdk/node/src/generate/margin/debit/model_get_repay_history_resp.ts index 69a0c371..cd32f53e 100644 --- a/sdk/node/src/generate/margin/debit/model_get_repay_history_resp.ts +++ b/sdk/node/src/generate/margin/debit/model_get_repay_history_resp.ts @@ -27,7 +27,7 @@ export class GetRepayHistoryResp implements Response { totalNum: number; /** - * total page + * total pages */ totalPage: number; diff --git a/sdk/node/src/generate/margin/debit/model_repay_resp.ts b/sdk/node/src/generate/margin/debit/model_repay_resp.ts index bd6f41ea..267515fb 100644 --- a/sdk/node/src/generate/margin/debit/model_repay_resp.ts +++ b/sdk/node/src/generate/margin/debit/model_repay_resp.ts @@ -11,7 +11,7 @@ export class RepayResp implements Response { timestamp: number; /** - * Repay Order Id + * Repay order ID */ orderNo: string; diff --git a/sdk/node/src/generate/margin/marginprivate/api_margin_private.ts b/sdk/node/src/generate/margin/marginprivate/api_margin_private.ts index 43311e9d..0cab481e 100644 --- a/sdk/node/src/generate/margin/marginprivate/api_margin_private.ts +++ b/sdk/node/src/generate/margin/marginprivate/api_margin_private.ts @@ -13,14 +13,14 @@ import { WebSocketService } from '@internal/interfaces/websocket'; export interface MarginPrivateWS { /** * crossMarginPosition Get Cross Margin Position change - * The system will push the change event when the position status changes, Or push the current debt message periodically when there is a liability. + * The system will push the change event when the position status changes, or push the current debt message periodically when there is a liability. * push frequency: once every 4s */ crossMarginPosition(callback: CrossMarginPositionEventCallback): Promise; /** * isolatedMarginPosition Get Isolated Margin Position change - * The system will push the change event when the position status changes, Or push the current debt message periodically when there is a liability. + * The system will push the change event when the position status changes, or push the current debt message periodically when there is a liability. * push frequency: real time */ isolatedMarginPosition( diff --git a/sdk/node/src/generate/margin/marginprivate/model_cross_margin_position_event.ts b/sdk/node/src/generate/margin/marginprivate/model_cross_margin_position_event.ts index 78c322a3..2ba9b2f7 100644 --- a/sdk/node/src/generate/margin/marginprivate/model_cross_margin_position_event.ts +++ b/sdk/node/src/generate/margin/marginprivate/model_cross_margin_position_event.ts @@ -12,7 +12,7 @@ export class CrossMarginPositionEvent implements Response { */ debtRatio: number; /** - * Total asset in BTC (interest included) + * Total assets in BTC (interest included) */ totalAsset: number; /** @@ -111,7 +111,7 @@ export namespace CrossMarginPositionEvent { */ LIABILITY = 'LIABILITY', /** - * When all the liabilities is repaid and the position returns to “EFFECTIVE” status, the system will push this event. + * When all the liabilities are repaid and the position returns to “EFFECTIVE” status, the system will push this event. */ UNLIABILITY = 'UNLIABILITY', } diff --git a/sdk/node/src/generate/margin/marginpublic/api_margin_public.ts b/sdk/node/src/generate/margin/marginpublic/api_margin_public.ts index c5ef2f84..ba33a145 100644 --- a/sdk/node/src/generate/margin/marginpublic/api_margin_public.ts +++ b/sdk/node/src/generate/margin/marginpublic/api_margin_public.ts @@ -7,14 +7,14 @@ import { WebSocketService } from '@internal/interfaces/websocket'; export interface MarginPublicWS { /** * indexPrice Index Price - * Subscribe to this topic to get the index price for the margin trading. The following ticker symbols are supported: List of currently supported symbol. + * Subscribe to this topic to get the index price for margin trading. The following ticker symbols are supported: List of currently supported symbols. * push frequency: once every 1s */ indexPrice(symbol: Array, callback: IndexPriceEventCallback): Promise; /** * markPrice Mark Price - * Subscribe to this topic to get the mark price for margin trading.The following ticker symbols are supported: List of currently supported symbol + * Subscribe to this topic to get the mark price for margin trading. The following ticker symbols are supported: List of currently supported symbols * push frequency: once every 1s */ markPrice(symbol: Array, callback: MarkPriceEventCallback): Promise; diff --git a/sdk/node/src/generate/margin/market/api_market.template b/sdk/node/src/generate/margin/market/api_market.template index 31c47a74..413c6cdd 100644 --- a/sdk/node/src/generate/margin/market/api_market.template +++ b/sdk/node/src/generate/margin/market/api_market.template @@ -22,22 +22,6 @@ describe('Auto Test', ()=> { }); }) - test('getMarginConfig request test', ()=> { - /** - * getMarginConfig - * Get Margin Config - * /api/v1/margin/config - */ - let resp = api.getMarginConfig(); - return resp.then(result => { - expect(result.currencyList).toEqual(expect.anything()); - expect(result.maxLeverage).toEqual(expect.anything()); - expect(result.warningDebtRatio).toEqual(expect.anything()); - expect(result.liqDebtRatio).toEqual(expect.anything()); - console.log(resp); - }); - }) - test('getETFInfo request test', ()=> { /** * getETFInfo @@ -54,19 +38,6 @@ describe('Auto Test', ()=> { }); }) - test('getMarkPriceList request test', ()=> { - /** - * getMarkPriceList - * Get Mark Price List - * /api/v3/mark-price/all-symbols - */ - let resp = api.getMarkPriceList(); - return resp.then(result => { - expect(result.data).toEqual(expect.anything()); - console.log(resp); - }); - }) - test('getMarkPriceDetail request test', ()=> { /** * getMarkPriceDetail @@ -85,6 +56,35 @@ describe('Auto Test', ()=> { }); }) + test('getMarginConfig request test', ()=> { + /** + * getMarginConfig + * Get Margin Config + * /api/v1/margin/config + */ + let resp = api.getMarginConfig(); + return resp.then(result => { + expect(result.currencyList).toEqual(expect.anything()); + expect(result.maxLeverage).toEqual(expect.anything()); + expect(result.warningDebtRatio).toEqual(expect.anything()); + expect(result.liqDebtRatio).toEqual(expect.anything()); + console.log(resp); + }); + }) + + test('getMarkPriceList request test', ()=> { + /** + * getMarkPriceList + * Get Mark Price List + * /api/v3/mark-price/all-symbols + */ + let resp = api.getMarkPriceList(); + return resp.then(result => { + expect(result.data).toEqual(expect.anything()); + console.log(resp); + }); + }) + test('getIsolatedMarginSymbols request test', ()=> { /** * getIsolatedMarginSymbols diff --git a/sdk/node/src/generate/margin/market/api_market.test.ts b/sdk/node/src/generate/margin/market/api_market.test.ts index c987ca46..723df324 100644 --- a/sdk/node/src/generate/margin/market/api_market.test.ts +++ b/sdk/node/src/generate/margin/market/api_market.test.ts @@ -4,9 +4,9 @@ import { GetMarkPriceListResp } from './model_get_mark_price_list_resp'; import { GetIsolatedMarginSymbolsResp } from './model_get_isolated_margin_symbols_resp'; import { GetCrossMarginSymbolsReq } from './model_get_cross_margin_symbols_req'; import { GetMarkPriceDetailResp } from './model_get_mark_price_detail_resp'; +import { GetMarginConfigResp } from './model_get_margin_config_resp'; import { GetETFInfoResp } from './model_get_etf_info_resp'; import { GetETFInfoReq } from './model_get_etf_info_req'; -import { GetMarginConfigResp } from './model_get_margin_config_resp'; import { RestResponse } from '@model/common'; describe('Auto Test', () => { @@ -41,21 +41,6 @@ describe('Auto Test', () => { console.log(resp); } }); - test('getMarginConfig request test', () => { - /** - * getMarginConfig - * Get Margin Config - * /api/v1/margin/config - */ - }); - - test('getMarginConfig response test', () => { - /** - * getMarginConfig - * Get Margin Config - * /api/v1/margin/config - */ - }); test('getETFInfo request test', () => { /** * getETFInfo @@ -87,21 +72,6 @@ describe('Auto Test', () => { console.log(resp); } }); - test('getMarkPriceList request test', () => { - /** - * getMarkPriceList - * Get Mark Price List - * /api/v3/mark-price/all-symbols - */ - }); - - test('getMarkPriceList response test', () => { - /** - * getMarkPriceList - * Get Mark Price List - * /api/v3/mark-price/all-symbols - */ - }); test('getMarkPriceDetail request test', () => { /** * getMarkPriceDetail @@ -133,6 +103,36 @@ describe('Auto Test', () => { console.log(resp); } }); + test('getMarginConfig request test', () => { + /** + * getMarginConfig + * Get Margin Config + * /api/v1/margin/config + */ + }); + + test('getMarginConfig response test', () => { + /** + * getMarginConfig + * Get Margin Config + * /api/v1/margin/config + */ + }); + test('getMarkPriceList request test', () => { + /** + * getMarkPriceList + * Get Mark Price List + * /api/v3/mark-price/all-symbols + */ + }); + + test('getMarkPriceList response test', () => { + /** + * getMarkPriceList + * Get Mark Price List + * /api/v3/mark-price/all-symbols + */ + }); test('getIsolatedMarginSymbols request test', () => { /** * getIsolatedMarginSymbols diff --git a/sdk/node/src/generate/margin/market/api_market.ts b/sdk/node/src/generate/margin/market/api_market.ts index 3ef20655..ff620beb 100644 --- a/sdk/node/src/generate/margin/market/api_market.ts +++ b/sdk/node/src/generate/margin/market/api_market.ts @@ -7,104 +7,104 @@ import { GetMarkPriceListResp } from './model_get_mark_price_list_resp'; import { GetIsolatedMarginSymbolsResp } from './model_get_isolated_margin_symbols_resp'; import { GetCrossMarginSymbolsReq } from './model_get_cross_margin_symbols_req'; import { GetMarkPriceDetailResp } from './model_get_mark_price_detail_resp'; +import { GetMarginConfigResp } from './model_get_margin_config_resp'; import { GetETFInfoResp } from './model_get_etf_info_resp'; import { GetETFInfoReq } from './model_get_etf_info_req'; -import { GetMarginConfigResp } from './model_get_margin_config_resp'; export interface MarketAPI { /** * getCrossMarginSymbols Get Symbols - Cross Margin * Description: This endpoint allows querying the configuration of cross margin symbol. * Documentation: https://www.kucoin.com/docs-new/api-3470189 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ */ getCrossMarginSymbols(req: GetCrossMarginSymbolsReq): Promise; - /** - * getMarginConfig Get Margin Config - * Description: Request via this endpoint to get the configure info of the cross margin. - * Documentation: https://www.kucoin.com/docs-new/api-3470190 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 25 | - * +---------------------+--------+ - */ - getMarginConfig(): Promise; - /** * getETFInfo Get ETF Info - * Description: This interface returns leveraged token information + * Description: This interface returns leveraged token information. * Documentation: https://www.kucoin.com/docs-new/api-3470191 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ */ getETFInfo(req: GetETFInfoReq): Promise; - /** - * getMarkPriceList Get Mark Price List - * Description: This endpoint returns the current Mark price for all margin trading pairs. - * Documentation: https://www.kucoin.com/docs-new/api-3470192 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 10 | - * +---------------------+--------+ - */ - getMarkPriceList(): Promise; - /** * getMarkPriceDetail Get Mark Price Detail * Description: This endpoint returns the current Mark price for specified margin trading pairs. * Documentation: https://www.kucoin.com/docs-new/api-3470193 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 2 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+--------+ */ getMarkPriceDetail(req: GetMarkPriceDetailReq): Promise; + /** + * getMarginConfig Get Margin Config + * Description: Request the configure info of the cross margin via this endpoint. + * Documentation: https://www.kucoin.com/docs-new/api-3470190 + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 25 | + * +-----------------------+--------+ + */ + getMarginConfig(): Promise; + + /** + * getMarkPriceList Get Mark Price List + * Description: This endpoint returns the current Mark price for all margin trading pairs. + * Documentation: https://www.kucoin.com/docs-new/api-3470192 + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+--------+ + */ + getMarkPriceList(): Promise; + /** * getIsolatedMarginSymbols Get Symbols - Isolated Margin * Description: This endpoint allows querying the configuration of isolated margin symbol. * Documentation: https://www.kucoin.com/docs-new/api-3470194 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ */ getIsolatedMarginSymbols(): Promise; } @@ -124,50 +124,50 @@ export class MarketAPIImpl implements MarketAPI { ); } - getMarginConfig(): Promise { + getETFInfo(req: GetETFInfoReq): Promise { return this.transport.call( 'spot', false, 'GET', - '/api/v1/margin/config', - null, - GetMarginConfigResp, + '/api/v3/etf/info', + req, + GetETFInfoResp, false, ); } - getETFInfo(req: GetETFInfoReq): Promise { + getMarkPriceDetail(req: GetMarkPriceDetailReq): Promise { return this.transport.call( 'spot', false, 'GET', - '/api/v3/etf/info', + '/api/v1/mark-price/{symbol}/current', req, - GetETFInfoResp, + GetMarkPriceDetailResp, false, ); } - getMarkPriceList(): Promise { + getMarginConfig(): Promise { return this.transport.call( 'spot', false, 'GET', - '/api/v3/mark-price/all-symbols', + '/api/v1/margin/config', null, - GetMarkPriceListResp, + GetMarginConfigResp, false, ); } - getMarkPriceDetail(req: GetMarkPriceDetailReq): Promise { + getMarkPriceList(): Promise { return this.transport.call( 'spot', false, 'GET', - '/api/v1/mark-price/{symbol}/current', - req, - GetMarkPriceDetailResp, + '/api/v3/mark-price/all-symbols', + null, + GetMarkPriceListResp, false, ); } diff --git a/sdk/node/src/generate/margin/market/model_get_cross_margin_symbols_items.ts b/sdk/node/src/generate/margin/market/model_get_cross_margin_symbols_items.ts index 849aefa3..754972a1 100644 --- a/sdk/node/src/generate/margin/market/model_get_cross_margin_symbols_items.ts +++ b/sdk/node/src/generate/margin/market/model_get_cross_margin_symbols_items.ts @@ -10,12 +10,12 @@ export class GetCrossMarginSymbolsItems implements Serializable { symbol: string; /** - * symbol name + * Symbol name */ name: string; /** - * Whether trading is enabled: true for enabled, false for disabled + * Whether trading is enabled: True for enabled; false for disabled */ enableTrading: boolean; @@ -25,12 +25,12 @@ export class GetCrossMarginSymbolsItems implements Serializable { market: string; /** - * Base currency,e.g. BTC. + * Base currency, e.g. BTC. */ baseCurrency: string; /** - * Quote currency,e.g. USDT. + * Quote currency, e.g. USDT. */ quoteCurrency: string; @@ -40,7 +40,7 @@ export class GetCrossMarginSymbolsItems implements Serializable { baseIncrement: string; /** - * The minimum order quantity requried to place an order. + * The minimum order quantity required to place an order. */ baseMinSize: string; @@ -65,7 +65,7 @@ export class GetCrossMarginSymbolsItems implements Serializable { quoteMaxSize: string; /** - * Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. specifies the min order price as well as the price increment.This also applies to quote currency. + * Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. Specifies the min. order price as well as the price increment.This also applies to quote currency. */ priceIncrement: string; @@ -75,12 +75,12 @@ export class GetCrossMarginSymbolsItems implements Serializable { feeCurrency: string; /** - * Threshold for price portection + * Threshold for price protection */ priceLimitRate: string; /** - * the minimum trading amounts + * The minimum trading amounts */ minFunds: string; diff --git a/sdk/node/src/generate/margin/market/model_get_etf_info_req.ts b/sdk/node/src/generate/margin/market/model_get_etf_info_req.ts index 384b2b06..9b9ca918 100644 --- a/sdk/node/src/generate/margin/market/model_get_etf_info_req.ts +++ b/sdk/node/src/generate/margin/market/model_get_etf_info_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetETFInfoReq implements Serializable { /** - * ETF Currency, if empty query all currencies + * ETF Currency: If empty, query all currencies */ currency?: string; @@ -26,7 +26,7 @@ export class GetETFInfoReq implements Serializable { */ static create(data: { /** - * ETF Currency, if empty query all currencies + * ETF Currency: If empty, query all currencies */ currency?: string; }): GetETFInfoReq { @@ -60,7 +60,7 @@ export class GetETFInfoReqBuilder { this.obj = obj; } /** - * ETF Currency, if empty query all currencies + * ETF Currency: If empty, query all currencies */ setCurrency(value: string): GetETFInfoReqBuilder { this.obj.currency = value; diff --git a/sdk/node/src/generate/margin/market/model_get_isolated_margin_symbols_data.ts b/sdk/node/src/generate/margin/market/model_get_isolated_margin_symbols_data.ts index 0adeb910..82d87219 100644 --- a/sdk/node/src/generate/margin/market/model_get_isolated_margin_symbols_data.ts +++ b/sdk/node/src/generate/margin/market/model_get_isolated_margin_symbols_data.ts @@ -10,22 +10,22 @@ export class GetIsolatedMarginSymbolsData implements Serializable { symbol: string; /** - * symbol name + * Symbol name */ symbolName: string; /** - * Base currency,e.g. BTC. + * Base currency, e.g. BTC. */ baseCurrency: string; /** - * Quote currency,e.g. USDT. + * Quote currency, e.g. USDT. */ quoteCurrency: string; /** - * Max leverage of this symbol + * Max. leverage of this symbol */ maxLeverage: number; diff --git a/sdk/node/src/generate/margin/market/model_get_margin_config_resp.ts b/sdk/node/src/generate/margin/market/model_get_margin_config_resp.ts index 3ef26489..ed26cba1 100644 --- a/sdk/node/src/generate/margin/market/model_get_margin_config_resp.ts +++ b/sdk/node/src/generate/margin/market/model_get_margin_config_resp.ts @@ -11,7 +11,7 @@ export class GetMarginConfigResp implements Response { currencyList: Array; /** - * Max leverage available + * Max. leverage available */ maxLeverage: number; diff --git a/sdk/node/src/generate/margin/order/api_order.template b/sdk/node/src/generate/margin/order/api_order.template index b0525988..64554123 100644 --- a/sdk/node/src/generate/margin/order/api_order.template +++ b/sdk/node/src/generate/margin/order/api_order.template @@ -165,7 +165,7 @@ describe('Auto Test', ()=> { * /api/v3/hf/margin/orders/{orderId} */ let builder = GetOrderByOrderIdReq.builder(); - builder.setSymbol(?).setOrderId(?); + builder.setOrderId(?).setSymbol(?); let req = builder.build(); let resp = api.getOrderByOrderId(req); return resp.then(result => { @@ -217,7 +217,7 @@ describe('Auto Test', ()=> { * /api/v3/hf/margin/orders/client-order/{clientOid} */ let builder = GetOrderByClientOidReq.builder(); - builder.setSymbol(?).setClientOid(?); + builder.setClientOid(?).setSymbol(?); let req = builder.build(); let resp = api.getOrderByClientOid(req); return resp.then(result => { diff --git a/sdk/node/src/generate/margin/order/api_order.test.ts b/sdk/node/src/generate/margin/order/api_order.test.ts index ab82bbc9..01e11a6f 100644 --- a/sdk/node/src/generate/margin/order/api_order.test.ts +++ b/sdk/node/src/generate/margin/order/api_order.test.ts @@ -313,7 +313,7 @@ describe('Auto Test', () => { * Get Order By OrderId * /api/v3/hf/margin/orders/{orderId} */ - let data = '{"symbol": "BTC-USDT", "orderId": "671667306afcdb000723107f"}'; + let data = '{"orderId": "671667306afcdb000723107f", "symbol": "BTC-USDT"}'; let req = GetOrderByOrderIdReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, @@ -344,7 +344,7 @@ describe('Auto Test', () => { * Get Order By ClientOid * /api/v3/hf/margin/orders/client-order/{clientOid} */ - let data = '{"symbol": "BTC-USDT", "clientOid": "5c52e11203aa677f33e493fb"}'; + let data = '{"clientOid": "5c52e11203aa677f33e493fb", "symbol": "BTC-USDT"}'; let req = GetOrderByClientOidReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, diff --git a/sdk/node/src/generate/margin/order/api_order.ts b/sdk/node/src/generate/margin/order/api_order.ts index e153fe13..f919073e 100644 --- a/sdk/node/src/generate/margin/order/api_order.ts +++ b/sdk/node/src/generate/margin/order/api_order.ts @@ -31,129 +31,129 @@ import { GetSymbolsWithOpenOrderResp } from './model_get_symbols_with_open_order export interface OrderAPI { /** * addOrder Add Order - * Description: Place order to the Cross-margin or Isolated-margin 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. + * Description: Place order in the Cross-margin or Isolated-margin 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. * Documentation: https://www.kucoin.com/docs-new/api-3470204 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ addOrder(req: AddOrderReq): Promise; /** * addOrderTest Add Order Test - * Description: Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. + * Description: Order test endpoint: This endpoint’s request and return parameters are identical to the order endpoint, and can be used to verify whether the signature is correct, among other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. * Documentation: https://www.kucoin.com/docs-new/api-3470205 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ addOrderTest(req: AddOrderTestReq): Promise; /** * cancelOrderByOrderId Cancel Order By OrderId - * Description: This endpoint can be used to cancel a margin order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + * Description: This endpoint can be used to cancel a margin order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. * Documentation: https://www.kucoin.com/docs-new/api-3470195 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ cancelOrderByOrderId(req: CancelOrderByOrderIdReq): Promise; /** * cancelOrderByClientOid Cancel Order By ClientOid - * Description: This endpoint can be used to cancel a margin order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + * Description: This endpoint can be used to cancel a margin order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. * Documentation: https://www.kucoin.com/docs-new/api-3470201 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ cancelOrderByClientOid(req: CancelOrderByClientOidReq): Promise; /** * cancelAllOrdersBySymbol Cancel All Orders By Symbol - * Description: This interface can cancel all open Margin orders by symbol This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + * Description: This interface can cancel all open Margin orders by symbol. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. * Documentation: https://www.kucoin.com/docs-new/api-3470197 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ cancelAllOrdersBySymbol(req: CancelAllOrdersBySymbolReq): Promise; /** * getSymbolsWithOpenOrder Get Symbols With Open Order - * Description: This interface can query all Margin symbol that has active orders + * Description: This interface can query all Margin symbols that have active orders. * Documentation: https://www.kucoin.com/docs-new/api-3470196 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | NULL | + * +-----------------------+---------+ */ getSymbolsWithOpenOrder(req: GetSymbolsWithOpenOrderReq): Promise; /** * getOpenOrders Get Open Orders - * Description: This interface is to obtain all Margin active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. + * Description: This interface is to obtain all Margin active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. * Documentation: https://www.kucoin.com/docs-new/api-3470198 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 4 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 4 | + * +-----------------------+---------+ */ getOpenOrders(req: GetOpenOrdersReq): Promise; /** * getClosedOrders Get Closed Orders - * Description: This interface is to obtain all Margin closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. + * Description: This interface is to obtain all Margin closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. * Documentation: https://www.kucoin.com/docs-new/api-3470199 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ getClosedOrders(req: GetClosedOrdersReq): Promise; @@ -161,81 +161,81 @@ export interface OrderAPI { * getTradeHistory Get Trade History * Description: This endpoint can be used to obtain a list of the latest Margin transaction details. The returned data is sorted in descending order according to the latest update time of the order. * Documentation: https://www.kucoin.com/docs-new/api-3470200 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getTradeHistory(req: GetTradeHistoryReq): Promise; /** * getOrderByOrderId Get Order By OrderId - * Description: This endpoint can be used to obtain information for a single Margin order using the order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. + * Description: This endpoint can be used to obtain information for a single Margin order using the order ID. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. * Documentation: https://www.kucoin.com/docs-new/api-3470202 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getOrderByOrderId(req: GetOrderByOrderIdReq): Promise; /** * getOrderByClientOid Get Order By ClientOid - * Description: This endpoint can be used to obtain information for a single Margin order using the client order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. + * Description: This endpoint can be used to obtain information for a single Margin order using the client order ID. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. * Documentation: https://www.kucoin.com/docs-new/api-3470203 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ getOrderByClientOid(req: GetOrderByClientOidReq): Promise; /** * @deprecated * addOrderV1 Add Order - V1 - * Description: Place order to the Cross-margin or Isolated-margin 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. + * Description: Place order in the Cross-margin or Isolated-margin 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. * Documentation: https://www.kucoin.com/docs-new/api-3470312 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ addOrderV1(req: AddOrderV1Req): Promise; /** * @deprecated * addOrderTestV1 Add Order Test - V1 - * Description: Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. + * Description: Order test endpoint: This endpoint’s request and return parameters are identical to the order endpoint, and can be used to verify whether the signature is correct, among other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. * Documentation: https://www.kucoin.com/docs-new/api-3470313 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | MARGIN | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | MARGIN | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ addOrderTestV1(req: AddOrderTestV1Req): Promise; } diff --git a/sdk/node/src/generate/margin/order/model_add_order_req.ts b/sdk/node/src/generate/margin/order/model_add_order_req.ts index 0f1bfb4a..8e3d56a8 100644 --- a/sdk/node/src/generate/margin/order/model_add_order_req.ts +++ b/sdk/node/src/generate/margin/order/model_add_order_req.ts @@ -5,12 +5,12 @@ import { Serializable } from '@internal/interfaces/serializable'; export class AddOrderReq implements Serializable { /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ clientOid: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddOrderReq.SideEnum; @@ -20,7 +20,7 @@ export class AddOrderReq implements Serializable { symbol: string; /** - * specify if the order is an \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + * Specify if the order is a \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. */ type?: AddOrderReq.TypeEnum = AddOrderReq.TypeEnum.LIMIT; @@ -35,7 +35,7 @@ export class AddOrderReq implements Serializable { price?: string; /** - * Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ size?: string; @@ -65,7 +65,7 @@ export class AddOrderReq implements Serializable { visibleSize?: string; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT */ cancelAfter?: number; @@ -75,7 +75,7 @@ export class AddOrderReq implements Serializable { funds?: string; /** - * true - isolated margin ,false - cross margin. defult as false + * True - isolated margin; false - cross margin. Default is false */ isIsolated?: boolean = false; @@ -85,7 +85,7 @@ export class AddOrderReq implements Serializable { autoBorrow?: boolean = false; /** - * AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + * AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. */ autoRepay?: boolean = false; @@ -113,11 +113,11 @@ export class AddOrderReq implements Serializable { */ static create(data: { /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ clientOid: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddOrderReq.SideEnum; /** @@ -125,7 +125,7 @@ export class AddOrderReq implements Serializable { */ symbol: string; /** - * specify if the order is an \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + * Specify if the order is a \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. */ type?: AddOrderReq.TypeEnum; /** @@ -137,7 +137,7 @@ export class AddOrderReq implements Serializable { */ price?: string; /** - * Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ size?: string; /** @@ -161,7 +161,7 @@ export class AddOrderReq implements Serializable { */ visibleSize?: string; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT */ cancelAfter?: number; /** @@ -169,7 +169,7 @@ export class AddOrderReq implements Serializable { */ funds?: string; /** - * true - isolated margin ,false - cross margin. defult as false + * True - isolated margin; false - cross margin. Default is false */ isIsolated?: boolean; /** @@ -177,7 +177,7 @@ export class AddOrderReq implements Serializable { */ autoBorrow?: boolean; /** - * AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + * AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. */ autoRepay?: boolean; }): AddOrderReq { @@ -318,7 +318,7 @@ export class AddOrderReqBuilder { this.obj = obj; } /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ setClientOid(value: string): AddOrderReqBuilder { this.obj.clientOid = value; @@ -326,7 +326,7 @@ export class AddOrderReqBuilder { } /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ setSide(value: AddOrderReq.SideEnum): AddOrderReqBuilder { this.obj.side = value; @@ -342,7 +342,7 @@ export class AddOrderReqBuilder { } /** - * specify if the order is an \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + * Specify if the order is a \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. */ setType(value: AddOrderReq.TypeEnum): AddOrderReqBuilder { this.obj.type = value; @@ -366,7 +366,7 @@ export class AddOrderReqBuilder { } /** - * Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ setSize(value: string): AddOrderReqBuilder { this.obj.size = value; @@ -414,7 +414,7 @@ export class AddOrderReqBuilder { } /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT */ setCancelAfter(value: number): AddOrderReqBuilder { this.obj.cancelAfter = value; @@ -430,7 +430,7 @@ export class AddOrderReqBuilder { } /** - * true - isolated margin ,false - cross margin. defult as false + * True - isolated margin; false - cross margin. Default is false */ setIsIsolated(value: boolean): AddOrderReqBuilder { this.obj.isIsolated = value; @@ -446,7 +446,7 @@ export class AddOrderReqBuilder { } /** - * AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + * AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. */ setAutoRepay(value: boolean): AddOrderReqBuilder { this.obj.autoRepay = value; diff --git a/sdk/node/src/generate/margin/order/model_add_order_resp.ts b/sdk/node/src/generate/margin/order/model_add_order_resp.ts index 7032ff23..1a884ffc 100644 --- a/sdk/node/src/generate/margin/order/model_add_order_resp.ts +++ b/sdk/node/src/generate/margin/order/model_add_order_resp.ts @@ -6,12 +6,12 @@ import { Response } from '@internal/interfaces/serializable'; export class AddOrderResp implements Response { /** - * The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + * The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. */ orderId: string; /** - * Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow. + * Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow. */ loanApplyId: string; @@ -21,7 +21,7 @@ export class AddOrderResp implements Response { borrowSize: string; /** - * The user self-defined order id. + * The user self-defined order ID. */ clientOid: string; diff --git a/sdk/node/src/generate/margin/order/model_add_order_test_req.ts b/sdk/node/src/generate/margin/order/model_add_order_test_req.ts index 4a0a3374..5d4484a8 100644 --- a/sdk/node/src/generate/margin/order/model_add_order_test_req.ts +++ b/sdk/node/src/generate/margin/order/model_add_order_test_req.ts @@ -5,12 +5,12 @@ import { Serializable } from '@internal/interfaces/serializable'; export class AddOrderTestReq implements Serializable { /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ clientOid: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddOrderTestReq.SideEnum; @@ -20,7 +20,7 @@ export class AddOrderTestReq implements Serializable { symbol: string; /** - * specify if the order is an \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + * Specify if the order is a \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. */ type?: AddOrderTestReq.TypeEnum = AddOrderTestReq.TypeEnum.LIMIT; @@ -35,7 +35,7 @@ export class AddOrderTestReq implements Serializable { price?: string; /** - * Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ size?: string; @@ -65,7 +65,7 @@ export class AddOrderTestReq implements Serializable { visibleSize?: string; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT */ cancelAfter?: number; @@ -75,7 +75,7 @@ export class AddOrderTestReq implements Serializable { funds?: string; /** - * true - isolated margin ,false - cross margin. defult as false + * True - isolated margin; false - cross margin. Default is false */ isIsolated?: boolean = false; @@ -85,7 +85,7 @@ export class AddOrderTestReq implements Serializable { autoBorrow?: boolean = false; /** - * AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + * AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. */ autoRepay?: boolean = false; @@ -113,11 +113,11 @@ export class AddOrderTestReq implements Serializable { */ static create(data: { /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ clientOid: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddOrderTestReq.SideEnum; /** @@ -125,7 +125,7 @@ export class AddOrderTestReq implements Serializable { */ symbol: string; /** - * specify if the order is an \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + * Specify if the order is a \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. */ type?: AddOrderTestReq.TypeEnum; /** @@ -137,7 +137,7 @@ export class AddOrderTestReq implements Serializable { */ price?: string; /** - * Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ size?: string; /** @@ -161,7 +161,7 @@ export class AddOrderTestReq implements Serializable { */ visibleSize?: string; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT */ cancelAfter?: number; /** @@ -169,7 +169,7 @@ export class AddOrderTestReq implements Serializable { */ funds?: string; /** - * true - isolated margin ,false - cross margin. defult as false + * True - isolated margin; false - cross margin. Default is false */ isIsolated?: boolean; /** @@ -177,7 +177,7 @@ export class AddOrderTestReq implements Serializable { */ autoBorrow?: boolean; /** - * AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + * AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. */ autoRepay?: boolean; }): AddOrderTestReq { @@ -318,7 +318,7 @@ export class AddOrderTestReqBuilder { this.obj = obj; } /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ setClientOid(value: string): AddOrderTestReqBuilder { this.obj.clientOid = value; @@ -326,7 +326,7 @@ export class AddOrderTestReqBuilder { } /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ setSide(value: AddOrderTestReq.SideEnum): AddOrderTestReqBuilder { this.obj.side = value; @@ -342,7 +342,7 @@ export class AddOrderTestReqBuilder { } /** - * specify if the order is an \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + * Specify if the order is a \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. */ setType(value: AddOrderTestReq.TypeEnum): AddOrderTestReqBuilder { this.obj.type = value; @@ -366,7 +366,7 @@ export class AddOrderTestReqBuilder { } /** - * Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ setSize(value: string): AddOrderTestReqBuilder { this.obj.size = value; @@ -414,7 +414,7 @@ export class AddOrderTestReqBuilder { } /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT */ setCancelAfter(value: number): AddOrderTestReqBuilder { this.obj.cancelAfter = value; @@ -430,7 +430,7 @@ export class AddOrderTestReqBuilder { } /** - * true - isolated margin ,false - cross margin. defult as false + * True - isolated margin; false - cross margin. Default is false */ setIsIsolated(value: boolean): AddOrderTestReqBuilder { this.obj.isIsolated = value; @@ -446,7 +446,7 @@ export class AddOrderTestReqBuilder { } /** - * AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + * AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. */ setAutoRepay(value: boolean): AddOrderTestReqBuilder { this.obj.autoRepay = value; diff --git a/sdk/node/src/generate/margin/order/model_add_order_test_resp.ts b/sdk/node/src/generate/margin/order/model_add_order_test_resp.ts index c8892b9e..9b2f1606 100644 --- a/sdk/node/src/generate/margin/order/model_add_order_test_resp.ts +++ b/sdk/node/src/generate/margin/order/model_add_order_test_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class AddOrderTestResp implements Response { /** - * The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + * The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. */ orderId: string; @@ -21,7 +21,7 @@ export class AddOrderTestResp implements Response { borrowSize: number; /** - * The user self-defined order id. + * The user self-defined order ID. */ clientOid: string; diff --git a/sdk/node/src/generate/margin/order/model_add_order_test_v1_req.ts b/sdk/node/src/generate/margin/order/model_add_order_test_v1_req.ts index fcd62fc8..9007e0bd 100644 --- a/sdk/node/src/generate/margin/order/model_add_order_test_v1_req.ts +++ b/sdk/node/src/generate/margin/order/model_add_order_test_v1_req.ts @@ -5,12 +5,12 @@ import { Serializable } from '@internal/interfaces/serializable'; export class AddOrderTestV1Req implements Serializable { /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ clientOid: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddOrderTestV1Req.SideEnum; @@ -20,7 +20,7 @@ export class AddOrderTestV1Req implements Serializable { symbol: string; /** - * specify if the order is an \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + * Specify if the order is a \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. */ type?: AddOrderTestV1Req.TypeEnum = AddOrderTestV1Req.TypeEnum.LIMIT; @@ -35,7 +35,7 @@ export class AddOrderTestV1Req implements Serializable { price?: string; /** - * Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ size?: string; @@ -65,7 +65,7 @@ export class AddOrderTestV1Req implements Serializable { visibleSize?: string; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT */ cancelAfter?: number; @@ -80,7 +80,7 @@ export class AddOrderTestV1Req implements Serializable { autoBorrow?: boolean = false; /** - * AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + * AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. */ autoRepay?: boolean = false; @@ -113,11 +113,11 @@ export class AddOrderTestV1Req implements Serializable { */ static create(data: { /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ clientOid: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddOrderTestV1Req.SideEnum; /** @@ -125,7 +125,7 @@ export class AddOrderTestV1Req implements Serializable { */ symbol: string; /** - * specify if the order is an \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + * Specify if the order is a \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. */ type?: AddOrderTestV1Req.TypeEnum; /** @@ -137,7 +137,7 @@ export class AddOrderTestV1Req implements Serializable { */ price?: string; /** - * Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ size?: string; /** @@ -161,7 +161,7 @@ export class AddOrderTestV1Req implements Serializable { */ visibleSize?: string; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT */ cancelAfter?: number; /** @@ -173,7 +173,7 @@ export class AddOrderTestV1Req implements Serializable { */ autoBorrow?: boolean; /** - * AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + * AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. */ autoRepay?: boolean; /** @@ -328,7 +328,7 @@ export class AddOrderTestV1ReqBuilder { this.obj = obj; } /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ setClientOid(value: string): AddOrderTestV1ReqBuilder { this.obj.clientOid = value; @@ -336,7 +336,7 @@ export class AddOrderTestV1ReqBuilder { } /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ setSide(value: AddOrderTestV1Req.SideEnum): AddOrderTestV1ReqBuilder { this.obj.side = value; @@ -352,7 +352,7 @@ export class AddOrderTestV1ReqBuilder { } /** - * specify if the order is an \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + * Specify if the order is a \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. */ setType(value: AddOrderTestV1Req.TypeEnum): AddOrderTestV1ReqBuilder { this.obj.type = value; @@ -376,7 +376,7 @@ export class AddOrderTestV1ReqBuilder { } /** - * Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ setSize(value: string): AddOrderTestV1ReqBuilder { this.obj.size = value; @@ -424,7 +424,7 @@ export class AddOrderTestV1ReqBuilder { } /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT */ setCancelAfter(value: number): AddOrderTestV1ReqBuilder { this.obj.cancelAfter = value; @@ -448,7 +448,7 @@ export class AddOrderTestV1ReqBuilder { } /** - * AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + * AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. */ setAutoRepay(value: boolean): AddOrderTestV1ReqBuilder { this.obj.autoRepay = value; diff --git a/sdk/node/src/generate/margin/order/model_add_order_test_v1_resp.ts b/sdk/node/src/generate/margin/order/model_add_order_test_v1_resp.ts index 9385bff0..4da327d9 100644 --- a/sdk/node/src/generate/margin/order/model_add_order_test_v1_resp.ts +++ b/sdk/node/src/generate/margin/order/model_add_order_test_v1_resp.ts @@ -6,12 +6,12 @@ import { Response } from '@internal/interfaces/serializable'; export class AddOrderTestV1Resp implements Response { /** - * The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + * The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. */ orderId: string; /** - * Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow. + * Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow. */ loanApplyId: string; diff --git a/sdk/node/src/generate/margin/order/model_add_order_v1_req.ts b/sdk/node/src/generate/margin/order/model_add_order_v1_req.ts index 36147a59..85da4a90 100644 --- a/sdk/node/src/generate/margin/order/model_add_order_v1_req.ts +++ b/sdk/node/src/generate/margin/order/model_add_order_v1_req.ts @@ -5,12 +5,12 @@ import { Serializable } from '@internal/interfaces/serializable'; export class AddOrderV1Req implements Serializable { /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ clientOid: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddOrderV1Req.SideEnum; @@ -20,7 +20,7 @@ export class AddOrderV1Req implements Serializable { symbol: string; /** - * specify if the order is an \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + * Specify if the order is a \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. */ type?: AddOrderV1Req.TypeEnum = AddOrderV1Req.TypeEnum.LIMIT; @@ -35,7 +35,7 @@ export class AddOrderV1Req implements Serializable { price?: string; /** - * Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ size?: string; @@ -65,7 +65,7 @@ export class AddOrderV1Req implements Serializable { visibleSize?: string; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT */ cancelAfter?: number; @@ -80,7 +80,7 @@ export class AddOrderV1Req implements Serializable { autoBorrow?: boolean = false; /** - * AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + * AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. */ autoRepay?: boolean = false; @@ -113,11 +113,11 @@ export class AddOrderV1Req implements Serializable { */ static create(data: { /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ clientOid: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddOrderV1Req.SideEnum; /** @@ -125,7 +125,7 @@ export class AddOrderV1Req implements Serializable { */ symbol: string; /** - * specify if the order is an \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + * Specify if the order is a \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. */ type?: AddOrderV1Req.TypeEnum; /** @@ -137,7 +137,7 @@ export class AddOrderV1Req implements Serializable { */ price?: string; /** - * Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ size?: string; /** @@ -161,7 +161,7 @@ export class AddOrderV1Req implements Serializable { */ visibleSize?: string; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT */ cancelAfter?: number; /** @@ -173,7 +173,7 @@ export class AddOrderV1Req implements Serializable { */ autoBorrow?: boolean; /** - * AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + * AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. */ autoRepay?: boolean; /** @@ -328,7 +328,7 @@ export class AddOrderV1ReqBuilder { this.obj = obj; } /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ setClientOid(value: string): AddOrderV1ReqBuilder { this.obj.clientOid = value; @@ -336,7 +336,7 @@ export class AddOrderV1ReqBuilder { } /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ setSide(value: AddOrderV1Req.SideEnum): AddOrderV1ReqBuilder { this.obj.side = value; @@ -352,7 +352,7 @@ export class AddOrderV1ReqBuilder { } /** - * specify if the order is an \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + * Specify if the order is a \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. */ setType(value: AddOrderV1Req.TypeEnum): AddOrderV1ReqBuilder { this.obj.type = value; @@ -376,7 +376,7 @@ export class AddOrderV1ReqBuilder { } /** - * Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ setSize(value: string): AddOrderV1ReqBuilder { this.obj.size = value; @@ -424,7 +424,7 @@ export class AddOrderV1ReqBuilder { } /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT */ setCancelAfter(value: number): AddOrderV1ReqBuilder { this.obj.cancelAfter = value; @@ -448,7 +448,7 @@ export class AddOrderV1ReqBuilder { } /** - * AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + * AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. */ setAutoRepay(value: boolean): AddOrderV1ReqBuilder { this.obj.autoRepay = value; diff --git a/sdk/node/src/generate/margin/order/model_add_order_v1_resp.ts b/sdk/node/src/generate/margin/order/model_add_order_v1_resp.ts index fd9d1f00..4d71f3ea 100644 --- a/sdk/node/src/generate/margin/order/model_add_order_v1_resp.ts +++ b/sdk/node/src/generate/margin/order/model_add_order_v1_resp.ts @@ -6,12 +6,12 @@ import { Response } from '@internal/interfaces/serializable'; export class AddOrderV1Resp implements Response { /** - * The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + * The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. */ orderId: string; /** - * Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow. + * Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow. */ loanApplyId: string; diff --git a/sdk/node/src/generate/margin/order/model_cancel_order_by_client_oid_req.ts b/sdk/node/src/generate/margin/order/model_cancel_order_by_client_oid_req.ts index 2f6a0e8c..54c48110 100644 --- a/sdk/node/src/generate/margin/order/model_cancel_order_by_client_oid_req.ts +++ b/sdk/node/src/generate/margin/order/model_cancel_order_by_client_oid_req.ts @@ -6,7 +6,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class CancelOrderByClientOidReq implements Serializable { /** - * Client Order Id,unique identifier created by the user + * Client Order Id, unique identifier created by the user */ @Reflect.metadata('path', 'clientOid') clientOid?: string; @@ -33,7 +33,7 @@ export class CancelOrderByClientOidReq implements Serializable { */ static create(data: { /** - * Client Order Id,unique identifier created by the user + * Client Order Id, unique identifier created by the user */ clientOid?: string; /** @@ -72,7 +72,7 @@ export class CancelOrderByClientOidReqBuilder { this.obj = obj; } /** - * Client Order Id,unique identifier created by the user + * Client Order Id, unique identifier created by the user */ setClientOid(value: string): CancelOrderByClientOidReqBuilder { this.obj.clientOid = value; diff --git a/sdk/node/src/generate/margin/order/model_cancel_order_by_client_oid_resp.ts b/sdk/node/src/generate/margin/order/model_cancel_order_by_client_oid_resp.ts index a624c3bd..61f8717f 100644 --- a/sdk/node/src/generate/margin/order/model_cancel_order_by_client_oid_resp.ts +++ b/sdk/node/src/generate/margin/order/model_cancel_order_by_client_oid_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class CancelOrderByClientOidResp implements Response { /** - * Client Order Id,unique identifier created by the user + * Client Order Id, unique identifier created by the user */ clientOid: string; diff --git a/sdk/node/src/generate/margin/order/model_cancel_order_by_order_id_resp.ts b/sdk/node/src/generate/margin/order/model_cancel_order_by_order_id_resp.ts index a6f086af..0d365df3 100644 --- a/sdk/node/src/generate/margin/order/model_cancel_order_by_order_id_resp.ts +++ b/sdk/node/src/generate/margin/order/model_cancel_order_by_order_id_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class CancelOrderByOrderIdResp implements Response { /** - * order id + * Order id */ orderId: string; diff --git a/sdk/node/src/generate/margin/order/model_get_closed_orders_items.ts b/sdk/node/src/generate/margin/order/model_get_closed_orders_items.ts index 5b10596c..b4f7bf6f 100644 --- a/sdk/node/src/generate/margin/order/model_get_closed_orders_items.ts +++ b/sdk/node/src/generate/margin/order/model_get_closed_orders_items.ts @@ -20,7 +20,7 @@ export class GetClosedOrdersItems implements Serializable { opType: string; /** - * Specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ type: GetClosedOrdersItems.TypeEnum; @@ -30,12 +30,12 @@ export class GetClosedOrdersItems implements Serializable { side: string; /** - * Order price + * Order Price */ price: string; /** - * Order size + * Order Size */ size: string; @@ -60,7 +60,7 @@ export class GetClosedOrdersItems implements Serializable { fee: string; /** - * currency used to calculate trading fee + * Currency used to calculate trading fee */ feeCurrency: string; @@ -90,17 +90,17 @@ export class GetClosedOrdersItems implements Serializable { timeInForce: GetClosedOrdersItems.TimeInForceEnum; /** - * Whether its a postOnly order. + * Whether it’s a postOnly order. */ postOnly: boolean; /** - * Whether its a hidden order. + * Whether it’s a hidden order. */ hidden: boolean; /** - * Whether its a iceberg order. + * Whether it’s a iceberg order. */ iceberg: boolean; @@ -120,7 +120,7 @@ export class GetClosedOrdersItems implements Serializable { channel: string; /** - * Client Order Id,unique identifier created by the user + * Client Order Id, unique identifier created by the user */ clientOid: string; @@ -155,7 +155,7 @@ export class GetClosedOrdersItems implements Serializable { tradeType: string; /** - * Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook + * Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook */ inOrderBook: boolean; @@ -180,12 +180,12 @@ export class GetClosedOrdersItems implements Serializable { remainFunds: string; /** - * Users in some regions need query this field + * Users in some regions have this field */ tax: string; /** - * Order status: true-The status of the order isactive; false-The status of the order is done + * Order status: true-The status of the order is active; false-The status of the order is done */ active: boolean; diff --git a/sdk/node/src/generate/margin/order/model_get_closed_orders_req.ts b/sdk/node/src/generate/margin/order/model_get_closed_orders_req.ts index e6081c4e..6ad9d90a 100644 --- a/sdk/node/src/generate/margin/order/model_get_closed_orders_req.ts +++ b/sdk/node/src/generate/margin/order/model_get_closed_orders_req.ts @@ -15,32 +15,32 @@ export class GetClosedOrdersReq implements Serializable { tradeType?: GetClosedOrdersReq.TradeTypeEnum; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side?: GetClosedOrdersReq.SideEnum; /** - * specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ type?: GetClosedOrdersReq.TypeEnum; /** - * The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + * The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. */ lastId?: number; /** - * Default20,Max100 + * Default20, Max100 */ limit?: number = 20; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; @@ -69,27 +69,27 @@ export class GetClosedOrdersReq implements Serializable { */ tradeType?: GetClosedOrdersReq.TradeTypeEnum; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side?: GetClosedOrdersReq.SideEnum; /** - * specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ type?: GetClosedOrdersReq.TypeEnum; /** - * The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + * The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. */ lastId?: number; /** - * Default20,Max100 + * Default20, Max100 */ limit?: number; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; }): GetClosedOrdersReq { @@ -183,7 +183,7 @@ export class GetClosedOrdersReqBuilder { } /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ setSide(value: GetClosedOrdersReq.SideEnum): GetClosedOrdersReqBuilder { this.obj.side = value; @@ -191,7 +191,7 @@ export class GetClosedOrdersReqBuilder { } /** - * specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ setType(value: GetClosedOrdersReq.TypeEnum): GetClosedOrdersReqBuilder { this.obj.type = value; @@ -199,7 +199,7 @@ export class GetClosedOrdersReqBuilder { } /** - * The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + * The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. */ setLastId(value: number): GetClosedOrdersReqBuilder { this.obj.lastId = value; @@ -207,7 +207,7 @@ export class GetClosedOrdersReqBuilder { } /** - * Default20,Max100 + * Default20, Max100 */ setLimit(value: number): GetClosedOrdersReqBuilder { this.obj.limit = value; @@ -215,7 +215,7 @@ export class GetClosedOrdersReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetClosedOrdersReqBuilder { this.obj.startAt = value; @@ -223,7 +223,7 @@ export class GetClosedOrdersReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetClosedOrdersReqBuilder { this.obj.endAt = value; diff --git a/sdk/node/src/generate/margin/order/model_get_closed_orders_resp.ts b/sdk/node/src/generate/margin/order/model_get_closed_orders_resp.ts index c3b60e26..dfb12f39 100644 --- a/sdk/node/src/generate/margin/order/model_get_closed_orders_resp.ts +++ b/sdk/node/src/generate/margin/order/model_get_closed_orders_resp.ts @@ -7,7 +7,7 @@ import { Response } from '@internal/interfaces/serializable'; export class GetClosedOrdersResp implements Response { /** - * The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + * The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. */ lastId: number; diff --git a/sdk/node/src/generate/margin/order/model_get_open_orders_data.ts b/sdk/node/src/generate/margin/order/model_get_open_orders_data.ts index a4de11d4..1522c9f8 100644 --- a/sdk/node/src/generate/margin/order/model_get_open_orders_data.ts +++ b/sdk/node/src/generate/margin/order/model_get_open_orders_data.ts @@ -20,7 +20,7 @@ export class GetOpenOrdersData implements Serializable { opType: string; /** - * Specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ type: GetOpenOrdersData.TypeEnum; @@ -30,12 +30,12 @@ export class GetOpenOrdersData implements Serializable { side: GetOpenOrdersData.SideEnum; /** - * Order price + * Order Price */ price: string; /** - * Order size + * Order Size */ size: string; @@ -55,12 +55,12 @@ export class GetOpenOrdersData implements Serializable { dealFunds: string; /** - * trading fee + * Trading fee */ fee: string; /** - * currency used to calculate trading fee + * Currency used to calculate trading fee */ feeCurrency: string; @@ -90,17 +90,17 @@ export class GetOpenOrdersData implements Serializable { timeInForce: GetOpenOrdersData.TimeInForceEnum; /** - * Whether its a postOnly order. + * Whether it’s a postOnly order. */ postOnly: boolean; /** - * Whether its a hidden order. + * Whether it’s a hidden order. */ hidden: boolean; /** - * Whether its a iceberg order. + * Whether it’s a iceberg order. */ iceberg: boolean; @@ -120,7 +120,7 @@ export class GetOpenOrdersData implements Serializable { channel: string; /** - * Client Order Id,unique identifier created by the user + * Client Order Id, unique identifier created by the user */ clientOid: string; @@ -155,7 +155,7 @@ export class GetOpenOrdersData implements Serializable { tradeType: string; /** - * Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook + * Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook */ inOrderBook: boolean; @@ -180,12 +180,12 @@ export class GetOpenOrdersData implements Serializable { remainFunds: string; /** - * Users in some regions need query this field + * Users in some regions have this field */ tax: string; /** - * Order status: true-The status of the order isactive; false-The status of the order is done + * Order status: true-The status of the order is active; false-The status of the order is done */ active: boolean; diff --git a/sdk/node/src/generate/margin/order/model_get_order_by_client_oid_req.ts b/sdk/node/src/generate/margin/order/model_get_order_by_client_oid_req.ts index fb9a0ebc..07438d78 100644 --- a/sdk/node/src/generate/margin/order/model_get_order_by_client_oid_req.ts +++ b/sdk/node/src/generate/margin/order/model_get_order_by_client_oid_req.ts @@ -6,15 +6,15 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetOrderByClientOidReq implements Serializable { /** - * symbol + * Client Order Id, unique identifier created by the user */ - symbol?: string; + @Reflect.metadata('path', 'clientOid') + clientOid?: string; /** - * Client Order Id,unique identifier created by the user + * symbol */ - @Reflect.metadata('path', 'clientOid') - clientOid?: string; + symbol?: string; /** * Private constructor, please use the corresponding static methods to construct the object. @@ -33,17 +33,17 @@ export class GetOrderByClientOidReq implements Serializable { */ static create(data: { /** - * symbol + * Client Order Id, unique identifier created by the user */ - symbol?: string; + clientOid?: string; /** - * Client Order Id,unique identifier created by the user + * symbol */ - clientOid?: string; + symbol?: string; }): GetOrderByClientOidReq { let obj = new GetOrderByClientOidReq(); - obj.symbol = data.symbol; obj.clientOid = data.clientOid; + obj.symbol = data.symbol; return obj; } @@ -72,18 +72,18 @@ export class GetOrderByClientOidReqBuilder { this.obj = obj; } /** - * symbol + * Client Order Id, unique identifier created by the user */ - setSymbol(value: string): GetOrderByClientOidReqBuilder { - this.obj.symbol = value; + setClientOid(value: string): GetOrderByClientOidReqBuilder { + this.obj.clientOid = value; return this; } /** - * Client Order Id,unique identifier created by the user + * symbol */ - setClientOid(value: string): GetOrderByClientOidReqBuilder { - this.obj.clientOid = value; + setSymbol(value: string): GetOrderByClientOidReqBuilder { + this.obj.symbol = value; return this; } diff --git a/sdk/node/src/generate/margin/order/model_get_order_by_client_oid_resp.ts b/sdk/node/src/generate/margin/order/model_get_order_by_client_oid_resp.ts index 201152ba..d7f64d5d 100644 --- a/sdk/node/src/generate/margin/order/model_get_order_by_client_oid_resp.ts +++ b/sdk/node/src/generate/margin/order/model_get_order_by_client_oid_resp.ts @@ -21,7 +21,7 @@ export class GetOrderByClientOidResp implements Response { opType: string; /** - * Specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ type: GetOrderByClientOidResp.TypeEnum; @@ -31,12 +31,12 @@ export class GetOrderByClientOidResp implements Response { side: GetOrderByClientOidResp.SideEnum; /** - * Order price + * Order Price */ price: string; /** - * Order size + * Order Size */ size: string; @@ -61,7 +61,7 @@ export class GetOrderByClientOidResp implements Response { fee: string; /** - * currency used to calculate trading fee + * Currency used to calculate trading fee */ feeCurrency: string; @@ -91,17 +91,17 @@ export class GetOrderByClientOidResp implements Response { timeInForce: GetOrderByClientOidResp.TimeInForceEnum; /** - * Whether its a postOnly order. + * Whether it’s a postOnly order. */ postOnly: boolean; /** - * Whether its a hidden order. + * Whether it’s a hidden order. */ hidden: boolean; /** - * Whether its a iceberg order. + * Whether it’s a iceberg order. */ iceberg: boolean; @@ -121,7 +121,7 @@ export class GetOrderByClientOidResp implements Response { channel: string; /** - * Client Order Id,unique identifier created by the user + * Client Order Id, unique identifier created by the user */ clientOid: string; @@ -156,7 +156,7 @@ export class GetOrderByClientOidResp implements Response { tradeType: string; /** - * Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook + * Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook */ inOrderBook: boolean; @@ -181,12 +181,12 @@ export class GetOrderByClientOidResp implements Response { remainFunds: string; /** - * Users in some regions need query this field + * Users in some regions have this field */ tax: string; /** - * Order status: true-The status of the order isactive; false-The status of the order is done + * Order status: true-The status of the order is active; false-The status of the order is done */ active: boolean; diff --git a/sdk/node/src/generate/margin/order/model_get_order_by_order_id_req.ts b/sdk/node/src/generate/margin/order/model_get_order_by_order_id_req.ts index 34a0759f..35c22f0a 100644 --- a/sdk/node/src/generate/margin/order/model_get_order_by_order_id_req.ts +++ b/sdk/node/src/generate/margin/order/model_get_order_by_order_id_req.ts @@ -5,17 +5,17 @@ import 'reflect-metadata'; import { Serializable } from '@internal/interfaces/serializable'; export class GetOrderByOrderIdReq implements Serializable { - /** - * symbol - */ - symbol?: string; - /** * The unique order id generated by the trading system */ @Reflect.metadata('path', 'orderId') orderId?: string; + /** + * symbol + */ + symbol?: string; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -32,18 +32,18 @@ export class GetOrderByOrderIdReq implements Serializable { * Creates a new instance of the `GetOrderByOrderIdReq` class with the given data. */ static create(data: { - /** - * symbol - */ - symbol?: string; /** * The unique order id generated by the trading system */ orderId?: string; + /** + * symbol + */ + symbol?: string; }): GetOrderByOrderIdReq { let obj = new GetOrderByOrderIdReq(); - obj.symbol = data.symbol; obj.orderId = data.orderId; + obj.symbol = data.symbol; return obj; } @@ -72,18 +72,18 @@ export class GetOrderByOrderIdReqBuilder { this.obj = obj; } /** - * symbol + * The unique order id generated by the trading system */ - setSymbol(value: string): GetOrderByOrderIdReqBuilder { - this.obj.symbol = value; + setOrderId(value: string): GetOrderByOrderIdReqBuilder { + this.obj.orderId = value; return this; } /** - * The unique order id generated by the trading system + * symbol */ - setOrderId(value: string): GetOrderByOrderIdReqBuilder { - this.obj.orderId = value; + setSymbol(value: string): GetOrderByOrderIdReqBuilder { + this.obj.symbol = value; return this; } diff --git a/sdk/node/src/generate/margin/order/model_get_order_by_order_id_resp.ts b/sdk/node/src/generate/margin/order/model_get_order_by_order_id_resp.ts index 7282eac5..f364c02e 100644 --- a/sdk/node/src/generate/margin/order/model_get_order_by_order_id_resp.ts +++ b/sdk/node/src/generate/margin/order/model_get_order_by_order_id_resp.ts @@ -21,7 +21,7 @@ export class GetOrderByOrderIdResp implements Response { opType: string; /** - * Specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ type: GetOrderByOrderIdResp.TypeEnum; @@ -31,12 +31,12 @@ export class GetOrderByOrderIdResp implements Response { side: GetOrderByOrderIdResp.SideEnum; /** - * Order price + * Order Price */ price: string; /** - * Order size + * Order Size */ size: string; @@ -61,7 +61,7 @@ export class GetOrderByOrderIdResp implements Response { fee: string; /** - * currency used to calculate trading fee + * Currency used to calculate trading fee */ feeCurrency: string; @@ -91,17 +91,17 @@ export class GetOrderByOrderIdResp implements Response { timeInForce: GetOrderByOrderIdResp.TimeInForceEnum; /** - * Whether its a postOnly order. + * Whether it’s a postOnly order. */ postOnly: boolean; /** - * Whether its a hidden order. + * Whether it’s a hidden order. */ hidden: boolean; /** - * Whether its a iceberg order. + * Whether it’s a iceberg order. */ iceberg: boolean; @@ -121,7 +121,7 @@ export class GetOrderByOrderIdResp implements Response { channel: string; /** - * Client Order Id,unique identifier created by the user + * Client Order Id, unique identifier created by the user */ clientOid: string; @@ -156,7 +156,7 @@ export class GetOrderByOrderIdResp implements Response { tradeType: string; /** - * Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook + * Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook */ inOrderBook: boolean; @@ -181,12 +181,12 @@ export class GetOrderByOrderIdResp implements Response { remainFunds: string; /** - * Users in some regions need query this field + * Users in some regions have this field */ tax: string; /** - * Order status: true-The status of the order isactive; false-The status of the order is done + * Order status: true-The status of the order is active; false-The status of the order is done */ active: boolean; diff --git a/sdk/node/src/generate/margin/order/model_get_trade_history_items.ts b/sdk/node/src/generate/margin/order/model_get_trade_history_items.ts index d1e1f17b..5857c5d9 100644 --- a/sdk/node/src/generate/margin/order/model_get_trade_history_items.ts +++ b/sdk/node/src/generate/margin/order/model_get_trade_history_items.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetTradeHistoryItems implements Serializable { /** - * Id of transaction detail + * ID of transaction detail */ id: number; @@ -15,7 +15,7 @@ export class GetTradeHistoryItems implements Serializable { symbol: string; /** - * Trade Id, symbol latitude increment + * Trade ID, symbol latitude increment */ tradeId: number; @@ -25,7 +25,7 @@ export class GetTradeHistoryItems implements Serializable { orderId: string; /** - * Counterparty order Id + * Counterparty order ID */ counterOrderId: string; @@ -45,12 +45,12 @@ export class GetTradeHistoryItems implements Serializable { forceTaker: boolean; /** - * Order price + * Order Price */ price: string; /** - * Order size + * Order Size */ size: string; @@ -70,7 +70,7 @@ export class GetTradeHistoryItems implements Serializable { feeRate: string; /** - * currency used to calculate trading fee + * Currency used to calculate trading fee */ feeCurrency: string; @@ -85,17 +85,17 @@ export class GetTradeHistoryItems implements Serializable { tradeType: string; /** - * Users in some regions need query this field + * Users in some regions have this field */ tax: string; /** - * Tax Rate, Users in some regions need query this field + * Tax Rate: Users in some regions must query this field */ taxRate: string; /** - * Specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ type: GetTradeHistoryItems.TypeEnum; diff --git a/sdk/node/src/generate/margin/order/model_get_trade_history_req.ts b/sdk/node/src/generate/margin/order/model_get_trade_history_req.ts index 5de76f66..826ef9bb 100644 --- a/sdk/node/src/generate/margin/order/model_get_trade_history_req.ts +++ b/sdk/node/src/generate/margin/order/model_get_trade_history_req.ts @@ -15,37 +15,37 @@ export class GetTradeHistoryReq implements Serializable { tradeType?: GetTradeHistoryReq.TradeTypeEnum; /** - * The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters) + * The unique order id generated by the trading system (If orderId is specified, please ignore the other query parameters) */ orderId?: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side?: GetTradeHistoryReq.SideEnum; /** - * specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ type?: GetTradeHistoryReq.TypeEnum; /** - * The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + * The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. */ lastId?: number; /** - * Default100,Max200 + * Default20, Max100 */ limit?: number = 20; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; @@ -74,31 +74,31 @@ export class GetTradeHistoryReq implements Serializable { */ tradeType?: GetTradeHistoryReq.TradeTypeEnum; /** - * The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters) + * The unique order id generated by the trading system (If orderId is specified, please ignore the other query parameters) */ orderId?: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side?: GetTradeHistoryReq.SideEnum; /** - * specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ type?: GetTradeHistoryReq.TypeEnum; /** - * The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + * The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. */ lastId?: number; /** - * Default100,Max200 + * Default20, Max100 */ limit?: number; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; }): GetTradeHistoryReq { @@ -193,7 +193,7 @@ export class GetTradeHistoryReqBuilder { } /** - * The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters) + * The unique order id generated by the trading system (If orderId is specified, please ignore the other query parameters) */ setOrderId(value: string): GetTradeHistoryReqBuilder { this.obj.orderId = value; @@ -201,7 +201,7 @@ export class GetTradeHistoryReqBuilder { } /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ setSide(value: GetTradeHistoryReq.SideEnum): GetTradeHistoryReqBuilder { this.obj.side = value; @@ -209,7 +209,7 @@ export class GetTradeHistoryReqBuilder { } /** - * specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ setType(value: GetTradeHistoryReq.TypeEnum): GetTradeHistoryReqBuilder { this.obj.type = value; @@ -217,7 +217,7 @@ export class GetTradeHistoryReqBuilder { } /** - * The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + * The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. */ setLastId(value: number): GetTradeHistoryReqBuilder { this.obj.lastId = value; @@ -225,7 +225,7 @@ export class GetTradeHistoryReqBuilder { } /** - * Default100,Max200 + * Default20, Max100 */ setLimit(value: number): GetTradeHistoryReqBuilder { this.obj.limit = value; @@ -233,7 +233,7 @@ export class GetTradeHistoryReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetTradeHistoryReqBuilder { this.obj.startAt = value; @@ -241,7 +241,7 @@ export class GetTradeHistoryReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetTradeHistoryReqBuilder { this.obj.endAt = value; diff --git a/sdk/node/src/generate/margin/order/model_get_trade_history_resp.ts b/sdk/node/src/generate/margin/order/model_get_trade_history_resp.ts index 9942d242..ca4a58ca 100644 --- a/sdk/node/src/generate/margin/order/model_get_trade_history_resp.ts +++ b/sdk/node/src/generate/margin/order/model_get_trade_history_resp.ts @@ -13,7 +13,7 @@ export class GetTradeHistoryResp implements Response { items: Array; /** - * The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + * The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. */ lastId: number; diff --git a/sdk/node/src/generate/margin/risklimit/api_risk_limit.ts b/sdk/node/src/generate/margin/risklimit/api_risk_limit.ts index 0b440d8e..304bbf38 100644 --- a/sdk/node/src/generate/margin/risklimit/api_risk_limit.ts +++ b/sdk/node/src/generate/margin/risklimit/api_risk_limit.ts @@ -7,17 +7,17 @@ import { GetMarginRiskLimitReq } from './model_get_margin_risk_limit_req'; export interface RiskLimitAPI { /** * getMarginRiskLimit Get Margin Risk Limit - * Description: Request via this endpoint to get the Configure and Risk limit info of the margin. + * Description: Request Configure and Risk limit info of the margin via this endpoint. * Documentation: https://www.kucoin.com/docs-new/api-3470219 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 20 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+---------+ */ getMarginRiskLimit(req: GetMarginRiskLimitReq): Promise; } diff --git a/sdk/node/src/generate/margin/risklimit/model_get_margin_risk_limit_data.ts b/sdk/node/src/generate/margin/risklimit/model_get_margin_risk_limit_data.ts index 8f8bdbb9..8789cd62 100644 --- a/sdk/node/src/generate/margin/risklimit/model_get_margin_risk_limit_data.ts +++ b/sdk/node/src/generate/margin/risklimit/model_get_margin_risk_limit_data.ts @@ -40,7 +40,7 @@ export class GetMarginRiskLimitData implements Serializable { marginCoefficient?: string; /** - * CROSS MARGIN RESPONSES, Currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 + * CROSS MARGIN RESPONSES, Currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 */ precision?: number; @@ -50,7 +50,7 @@ export class GetMarginRiskLimitData implements Serializable { borrowMinAmount?: string; /** - * CROSS MARGIN RESPONSES, Minimum unit for borrowing, the borrowed amount must be an integer multiple of this value + * CROSS MARGIN RESPONSES, Minimum unit for borrowing; the borrowed amount must be an integer multiple of this value */ borrowMinUnit?: string; @@ -95,12 +95,12 @@ export class GetMarginRiskLimitData implements Serializable { quoteMaxHoldAmount?: string; /** - * ISOLATED MARGIN RESPONSES, Base currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 + * ISOLATED MARGIN RESPONSES, Base currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 */ basePrecision?: number; /** - * ISOLATED MARGIN RESPONSES, Quote currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 + * ISOLATED MARGIN RESPONSES, Quote currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 */ quotePrecision?: number; diff --git a/sdk/node/src/generate/margin/risklimit/model_get_margin_risk_limit_req.ts b/sdk/node/src/generate/margin/risklimit/model_get_margin_risk_limit_req.ts index 18100143..f64cfa54 100644 --- a/sdk/node/src/generate/margin/risklimit/model_get_margin_risk_limit_req.ts +++ b/sdk/node/src/generate/margin/risklimit/model_get_margin_risk_limit_req.ts @@ -5,17 +5,17 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetMarginRiskLimitReq implements Serializable { /** - * true-isolated, false-cross + * True-isolated, false-cross */ isIsolated?: boolean; /** - * currency, This field is only required for cross margin + * Currency: This field is only required for cross margin */ currency?: string; /** - * symbol, This field is only required for isolated margin + * Symbol: This field is only required for isolated margin */ symbol?: string; @@ -36,15 +36,15 @@ export class GetMarginRiskLimitReq implements Serializable { */ static create(data: { /** - * true-isolated, false-cross + * True-isolated, false-cross */ isIsolated?: boolean; /** - * currency, This field is only required for cross margin + * Currency: This field is only required for cross margin */ currency?: string; /** - * symbol, This field is only required for isolated margin + * Symbol: This field is only required for isolated margin */ symbol?: string; }): GetMarginRiskLimitReq { @@ -80,7 +80,7 @@ export class GetMarginRiskLimitReqBuilder { this.obj = obj; } /** - * true-isolated, false-cross + * True-isolated, false-cross */ setIsIsolated(value: boolean): GetMarginRiskLimitReqBuilder { this.obj.isIsolated = value; @@ -88,7 +88,7 @@ export class GetMarginRiskLimitReqBuilder { } /** - * currency, This field is only required for cross margin + * Currency: This field is only required for cross margin */ setCurrency(value: string): GetMarginRiskLimitReqBuilder { this.obj.currency = value; @@ -96,7 +96,7 @@ export class GetMarginRiskLimitReqBuilder { } /** - * symbol, This field is only required for isolated margin + * Symbol: This field is only required for isolated margin */ setSymbol(value: string): GetMarginRiskLimitReqBuilder { this.obj.symbol = value; diff --git a/sdk/node/src/generate/spot/index.ts b/sdk/node/src/generate/spot/index.ts index 83bb3259..bdd82fbc 100644 --- a/sdk/node/src/generate/spot/index.ts +++ b/sdk/node/src/generate/spot/index.ts @@ -86,6 +86,9 @@ export namespace Spot { export type GetOcoOrderListItems = ORDER.GetOcoOrderListItems; export type GetOcoOrderListReq = ORDER.GetOcoOrderListReq; export type GetOcoOrderListResp = ORDER.GetOcoOrderListResp; + export type GetOpenOrdersByPageItems = ORDER.GetOpenOrdersByPageItems; + export type GetOpenOrdersByPageReq = ORDER.GetOpenOrdersByPageReq; + export type GetOpenOrdersByPageResp = ORDER.GetOpenOrdersByPageResp; export type GetOpenOrdersData = ORDER.GetOpenOrdersData; export type GetOpenOrdersReq = ORDER.GetOpenOrdersReq; export type GetOpenOrdersResp = ORDER.GetOpenOrdersResp; @@ -101,10 +104,8 @@ export namespace Spot { export type GetOrdersListOldReq = ORDER.GetOrdersListOldReq; export type GetOrdersListOldResp = ORDER.GetOrdersListOldResp; export type GetRecentOrdersListOldData = ORDER.GetRecentOrdersListOldData; - export type GetRecentOrdersListOldReq = ORDER.GetRecentOrdersListOldReq; export type GetRecentOrdersListOldResp = ORDER.GetRecentOrdersListOldResp; export type GetRecentTradeHistoryOldData = ORDER.GetRecentTradeHistoryOldData; - export type GetRecentTradeHistoryOldReq = ORDER.GetRecentTradeHistoryOldReq; export type GetRecentTradeHistoryOldResp = ORDER.GetRecentTradeHistoryOldResp; export type GetStopOrderByClientOidData = ORDER.GetStopOrderByClientOidData; export type GetStopOrderByClientOidReq = ORDER.GetStopOrderByClientOidReq; @@ -131,6 +132,7 @@ export namespace Spot { export type AccountRelationContext = SPOTPRIVATE.AccountRelationContext; export type OrderV1Event = SPOTPRIVATE.OrderV1Event; export type OrderV2Event = SPOTPRIVATE.OrderV2Event; + export type StopOrderEvent = SPOTPRIVATE.StopOrderEvent; } export namespace Market { export type Get24hrStatsReq = MARKET.Get24hrStatsReq; @@ -146,6 +148,11 @@ export namespace Spot { export type GetAnnouncementsItems = MARKET.GetAnnouncementsItems; export type GetAnnouncementsReq = MARKET.GetAnnouncementsReq; export type GetAnnouncementsResp = MARKET.GetAnnouncementsResp; + export type GetCallAuctionInfoReq = MARKET.GetCallAuctionInfoReq; + export type GetCallAuctionInfoResp = MARKET.GetCallAuctionInfoResp; + export type GetCallAuctionPartOrderBookReq = MARKET.GetCallAuctionPartOrderBookReq; + export type GetCallAuctionPartOrderBookResp = MARKET.GetCallAuctionPartOrderBookResp; + export type GetClientIPAddressResp = MARKET.GetClientIPAddressResp; export type GetCurrencyChains = MARKET.GetCurrencyChains; export type GetCurrencyReq = MARKET.GetCurrencyReq; export type GetCurrencyResp = MARKET.GetCurrencyResp; @@ -174,6 +181,8 @@ export namespace Spot { } export namespace SpotPublic { export type AllTickersEvent = SPOTPUBLIC.AllTickersEvent; + export type CallAuctionInfoEvent = SPOTPUBLIC.CallAuctionInfoEvent; + export type CallAuctionOrderbookLevel50Event = SPOTPUBLIC.CallAuctionOrderbookLevel50Event; export type KlinesEvent = SPOTPUBLIC.KlinesEvent; export type MarketSnapshotData = SPOTPUBLIC.MarketSnapshotData; export type MarketSnapshotDataMarketChange1h = SPOTPUBLIC.MarketSnapshotDataMarketChange1h; @@ -184,7 +193,6 @@ export namespace Spot { export type OrderbookIncrementChanges = SPOTPUBLIC.OrderbookIncrementChanges; export type OrderbookIncrementEvent = SPOTPUBLIC.OrderbookIncrementEvent; export type OrderbookLevel1Event = SPOTPUBLIC.OrderbookLevel1Event; - export type OrderbookLevel50Changes = SPOTPUBLIC.OrderbookLevel50Changes; export type OrderbookLevel50Event = SPOTPUBLIC.OrderbookLevel50Event; export type OrderbookLevel5Event = SPOTPUBLIC.OrderbookLevel5Event; export type SymbolSnapshotData = SPOTPUBLIC.SymbolSnapshotData; diff --git a/sdk/node/src/generate/spot/market/api_market.template b/sdk/node/src/generate/spot/market/api_market.template index ad48166a..c97f3347 100644 --- a/sdk/node/src/generate/spot/market/api_market.template +++ b/sdk/node/src/generate/spot/market/api_market.template @@ -94,6 +94,13 @@ describe('Auto Test', ()=> { expect(result.makerFeeCoefficient).toEqual(expect.anything()); expect(result.takerFeeCoefficient).toEqual(expect.anything()); expect(result.st).toEqual(expect.anything()); + expect(result.callauctionIsEnabled).toEqual(expect.anything()); + expect(result.callauctionPriceFloor).toEqual(expect.anything()); + expect(result.callauctionPriceCeiling).toEqual(expect.anything()); + expect(result.callauctionFirstStageStartTime).toEqual(expect.anything()); + expect(result.callauctionSecondStageStartTime).toEqual(expect.anything()); + expect(result.callauctionThirdStageStartTime).toEqual(expect.anything()); + expect(result.tradingStartTime).toEqual(expect.anything()); console.log(resp); }); }) @@ -221,6 +228,48 @@ describe('Auto Test', ()=> { }); }) + test('getCallAuctionPartOrderBook request test', ()=> { + /** + * getCallAuctionPartOrderBook + * Get Call Auction Part OrderBook + * /api/v1/market/orderbook/callauction/level2_{size} + */ + let builder = GetCallAuctionPartOrderBookReq.builder(); + builder.setSymbol(?).setSize(?); + let req = builder.build(); + let resp = api.getCallAuctionPartOrderBook(req); + return resp.then(result => { + expect(result.time).toEqual(expect.anything()); + expect(result.sequence).toEqual(expect.anything()); + expect(result.bids).toEqual(expect.anything()); + expect(result.asks).toEqual(expect.anything()); + console.log(resp); + }); + }) + + test('getCallAuctionInfo request test', ()=> { + /** + * getCallAuctionInfo + * Get Call Auction Info + * /api/v1/market/callauctionData + */ + let builder = GetCallAuctionInfoReq.builder(); + builder.setSymbol(?); + let req = builder.build(); + let resp = api.getCallAuctionInfo(req); + return resp.then(result => { + expect(result.symbol).toEqual(expect.anything()); + expect(result.estimatedPrice).toEqual(expect.anything()); + expect(result.estimatedSize).toEqual(expect.anything()); + expect(result.sellOrderRangeLowPrice).toEqual(expect.anything()); + expect(result.sellOrderRangeHighPrice).toEqual(expect.anything()); + expect(result.buyOrderRangeLowPrice).toEqual(expect.anything()); + expect(result.buyOrderRangeHighPrice).toEqual(expect.anything()); + expect(result.time).toEqual(expect.anything()); + console.log(resp); + }); + }) + test('getFiatPrice request test', ()=> { /** * getFiatPrice @@ -1176,6 +1225,19 @@ describe('Auto Test', ()=> { }); }) + test('getClientIPAddress request test', ()=> { + /** + * getClientIPAddress + * Get Client IP Address + * /api/v1/my-ip + */ + let resp = api.getClientIPAddress(); + return resp.then(result => { + expect(result.data).toEqual(expect.anything()); + console.log(resp); + }); + }) + test('getServerTime request test', ()=> { /** * getServerTime diff --git a/sdk/node/src/generate/spot/market/api_market.test.ts b/sdk/node/src/generate/spot/market/api_market.test.ts index e0ed0a91..5730d3ff 100644 --- a/sdk/node/src/generate/spot/market/api_market.test.ts +++ b/sdk/node/src/generate/spot/market/api_market.test.ts @@ -3,7 +3,10 @@ import { GetTradeHistoryResp } from './model_get_trade_history_resp'; import { Get24hrStatsReq } from './model_get24hr_stats_req'; import { GetServiceStatusResp } from './model_get_service_status_resp'; import { GetAllSymbolsReq } from './model_get_all_symbols_req'; +import { GetCallAuctionPartOrderBookReq } from './model_get_call_auction_part_order_book_req'; +import { GetCallAuctionPartOrderBookResp } from './model_get_call_auction_part_order_book_resp'; import { GetTickerReq } from './model_get_ticker_req'; +import { GetClientIPAddressResp } from './model_get_client_ip_address_resp'; import { GetPrivateTokenResp } from './model_get_private_token_resp'; import { GetFiatPriceResp } from './model_get_fiat_price_resp'; import { GetPartOrderBookReq } from './model_get_part_order_book_req'; @@ -16,6 +19,8 @@ import { GetAllSymbolsResp } from './model_get_all_symbols_resp'; import { GetPublicTokenResp } from './model_get_public_token_resp'; import { GetTradeHistoryReq } from './model_get_trade_history_req'; import { GetMarketListResp } from './model_get_market_list_resp'; +import { GetCallAuctionInfoResp } from './model_get_call_auction_info_resp'; +import { GetCallAuctionInfoReq } from './model_get_call_auction_info_req'; import { GetCurrencyReq } from './model_get_currency_req'; import { GetAllCurrenciesResp } from './model_get_all_currencies_resp'; import { Get24hrStatsResp } from './model_get24hr_stats_resp'; @@ -129,7 +134,7 @@ describe('Auto Test', () => { * /api/v2/symbols/{symbol} */ let data = - '{"code":"200000","data":{"symbol":"BTC-USDT","name":"BTC-USDT","baseCurrency":"BTC","quoteCurrency":"USDT","feeCurrency":"USDT","market":"USDS","baseMinSize":"0.00001","quoteMinSize":"0.1","baseMaxSize":"10000000000","quoteMaxSize":"99999999","baseIncrement":"0.00000001","quoteIncrement":"0.000001","priceIncrement":"0.1","priceLimitRate":"0.1","minFunds":"0.1","isMarginEnabled":true,"enableTrading":true,"feeCategory":1,"makerFeeCoefficient":"1.00","takerFeeCoefficient":"1.00","st":false}}'; + '{\n "code": "200000",\n "data": {\n "symbol": "BTC-USDT",\n "name": "BTC-USDT",\n "baseCurrency": "BTC",\n "quoteCurrency": "USDT",\n "feeCurrency": "USDT",\n "market": "USDS",\n "baseMinSize": "0.00001",\n "quoteMinSize": "0.1",\n "baseMaxSize": "10000000000",\n "quoteMaxSize": "99999999",\n "baseIncrement": "0.00000001",\n "quoteIncrement": "0.000001",\n "priceIncrement": "0.1",\n "priceLimitRate": "0.1",\n "minFunds": "0.1",\n "isMarginEnabled": true,\n "enableTrading": true,\n "feeCategory": 1,\n "makerFeeCoefficient": "1.00",\n "takerFeeCoefficient": "1.00",\n "st": false,\n "callauctionIsEnabled": false,\n "callauctionPriceFloor": null,\n "callauctionPriceCeiling": null,\n "callauctionFirstStageStartTime": null,\n "callauctionSecondStageStartTime": null,\n "callauctionThirdStageStartTime": null,\n "tradingStartTime": null\n }\n}'; let commonResp = RestResponse.fromJson(data); let resp = GetSymbolResp.fromObject(commonResp.data); if (commonResp.data !== null) { @@ -160,7 +165,7 @@ describe('Auto Test', () => { * /api/v2/symbols */ let data = - '{\n "code": "200000",\n "data": [\n {\n "symbol": "BTC-USDT",\n "name": "BTC-USDT",\n "baseCurrency": "BTC",\n "quoteCurrency": "USDT",\n "feeCurrency": "USDT",\n "market": "USDS",\n "baseMinSize": "0.00001",\n "quoteMinSize": "0.1",\n "baseMaxSize": "10000000000",\n "quoteMaxSize": "99999999",\n "baseIncrement": "0.00000001",\n "quoteIncrement": "0.000001",\n "priceIncrement": "0.1",\n "priceLimitRate": "0.1",\n "minFunds": "0.1",\n "isMarginEnabled": true,\n "enableTrading": true,\n "feeCategory": 1,\n "makerFeeCoefficient": "1.00",\n "takerFeeCoefficient": "1.00",\n "st": false\n }\n ]\n}'; + '{\n "code": "200000",\n "data": [\n {\n "symbol": "BTC-USDT",\n "name": "BTC-USDT",\n "baseCurrency": "BTC",\n "quoteCurrency": "USDT",\n "feeCurrency": "USDT",\n "market": "USDS",\n "baseMinSize": "0.00001",\n "quoteMinSize": "0.1",\n "baseMaxSize": "10000000000",\n "quoteMaxSize": "99999999",\n "baseIncrement": "0.00000001",\n "quoteIncrement": "0.000001",\n "priceIncrement": "0.1",\n "priceLimitRate": "0.1",\n "minFunds": "0.1",\n "isMarginEnabled": true,\n "enableTrading": true,\n "feeCategory": 1,\n "makerFeeCoefficient": "1.00",\n "takerFeeCoefficient": "1.00",\n "st": false,\n "callauctionIsEnabled": false,\n "callauctionPriceFloor": null,\n "callauctionPriceCeiling": null,\n "callauctionFirstStageStartTime": null,\n "callauctionSecondStageStartTime": null,\n "callauctionThirdStageStartTime": null,\n "tradingStartTime": null\n }\n ]\n}'; let commonResp = RestResponse.fromJson(data); let resp = GetAllSymbolsResp.fromObject(commonResp.data); if (commonResp.data !== null) { @@ -341,6 +346,68 @@ describe('Auto Test', () => { console.log(resp); } }); + test('getCallAuctionPartOrderBook request test', () => { + /** + * getCallAuctionPartOrderBook + * Get Call Auction Part OrderBook + * /api/v1/market/orderbook/callauction/level2_{size} + */ + let data = '{"symbol": "BTC-USDT", "size": "20"}'; + let req = GetCallAuctionPartOrderBookReq.fromJson(data); + expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( + false, + ); + console.log(req); + }); + + test('getCallAuctionPartOrderBook response test', () => { + /** + * getCallAuctionPartOrderBook + * Get Call Auction Part OrderBook + * /api/v1/market/orderbook/callauction/level2_{size} + */ + let data = + '{\n "code": "200000",\n "data": {\n "time": 1729176273859,\n "sequence": "14610502970",\n "bids": [\n [\n "66976.4",\n "0.69109872"\n ],\n [\n "66976.3",\n "0.14377"\n ]\n ],\n "asks": [\n [\n "66976.5",\n "0.05408199"\n ],\n [\n "66976.8",\n "0.0005"\n ]\n ]\n }\n}'; + let commonResp = RestResponse.fromJson(data); + let resp = GetCallAuctionPartOrderBookResp.fromObject(commonResp.data); + if (commonResp.data !== null) { + expect( + Object.values(resp).every((value) => value === null || value === undefined), + ).toBe(false); + console.log(resp); + } + }); + test('getCallAuctionInfo request test', () => { + /** + * getCallAuctionInfo + * Get Call Auction Info + * /api/v1/market/callauctionData + */ + let data = '{"symbol": "BTC-USDT"}'; + let req = GetCallAuctionInfoReq.fromJson(data); + expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( + false, + ); + console.log(req); + }); + + test('getCallAuctionInfo response test', () => { + /** + * getCallAuctionInfo + * Get Call Auction Info + * /api/v1/market/callauctionData + */ + let data = + '{\n "code": "200000",\n "data": {\n "symbol": "BTC-USDT",\n "estimatedPrice": "0.17",\n "estimatedSize": "0.03715004",\n "sellOrderRangeLowPrice": "1.788",\n "sellOrderRangeHighPrice": "2.788",\n "buyOrderRangeLowPrice": "1.788",\n "buyOrderRangeHighPrice": "2.788",\n "time": 1550653727731\n }\n}'; + let commonResp = RestResponse.fromJson(data); + let resp = GetCallAuctionInfoResp.fromObject(commonResp.data); + if (commonResp.data !== null) { + expect( + Object.values(resp).every((value) => value === null || value === undefined), + ).toBe(false); + console.log(resp); + } + }); test('getFiatPrice request test', () => { /** * getFiatPrice @@ -418,6 +485,21 @@ describe('Auto Test', () => { * /api/v1/markets */ }); + test('getClientIPAddress request test', () => { + /** + * getClientIPAddress + * Get Client IP Address + * /api/v1/my-ip + */ + }); + + test('getClientIPAddress response test', () => { + /** + * getClientIPAddress + * Get Client IP Address + * /api/v1/my-ip + */ + }); test('getServerTime request test', () => { /** * getServerTime diff --git a/sdk/node/src/generate/spot/market/api_market.ts b/sdk/node/src/generate/spot/market/api_market.ts index 00c2e9c5..b89b729d 100644 --- a/sdk/node/src/generate/spot/market/api_market.ts +++ b/sdk/node/src/generate/spot/market/api_market.ts @@ -6,7 +6,10 @@ import { GetTradeHistoryResp } from './model_get_trade_history_resp'; import { Get24hrStatsReq } from './model_get24hr_stats_req'; import { GetServiceStatusResp } from './model_get_service_status_resp'; import { GetAllSymbolsReq } from './model_get_all_symbols_req'; +import { GetCallAuctionPartOrderBookReq } from './model_get_call_auction_part_order_book_req'; +import { GetCallAuctionPartOrderBookResp } from './model_get_call_auction_part_order_book_resp'; import { GetTickerReq } from './model_get_ticker_req'; +import { GetClientIPAddressResp } from './model_get_client_ip_address_resp'; import { GetPrivateTokenResp } from './model_get_private_token_resp'; import { GetFiatPriceResp } from './model_get_fiat_price_resp'; import { GetPartOrderBookReq } from './model_get_part_order_book_req'; @@ -19,6 +22,8 @@ import { GetAllSymbolsResp } from './model_get_all_symbols_resp'; import { GetPublicTokenResp } from './model_get_public_token_resp'; import { GetTradeHistoryReq } from './model_get_trade_history_req'; import { GetMarketListResp } from './model_get_market_list_resp'; +import { GetCallAuctionInfoResp } from './model_get_call_auction_info_resp'; +import { GetCallAuctionInfoReq } from './model_get_call_auction_info_req'; import { GetCurrencyReq } from './model_get_currency_req'; import { GetAllCurrenciesResp } from './model_get_all_currencies_resp'; import { Get24hrStatsResp } from './model_get24hr_stats_resp'; @@ -36,47 +41,47 @@ export interface MarketAPI { * getAnnouncements Get Announcements * Description: This interface can obtain the latest news announcements, and the default page search is for announcements within a month. * Documentation: https://www.kucoin.com/docs-new/api-3470157 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 20 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+--------+ */ getAnnouncements(req: GetAnnouncementsReq): Promise; /** * getCurrency Get Currency - * Description: Request via this endpoint to get the currency details of a specified currency + * Description: Request the currency details of a specified currency via this endpoint. * Documentation: https://www.kucoin.com/docs-new/api-3470155 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ */ getCurrency(req: GetCurrencyReq): Promise; /** * getAllCurrencies Get All Currencies - * Description: Request via this endpoint to get the currency list.Not all currencies currently can be used for trading. + * Description: Request a currency list via this endpoint. Not all currencies can currently be used for trading. * Documentation: https://www.kucoin.com/docs-new/api-3470152 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ */ getAllCurrencies(): Promise; @@ -84,31 +89,31 @@ export interface MarketAPI { * getSymbol Get Symbol * Description: Request via this endpoint to get detail currency pairs for trading. If you want to get the market information of the trading symbol, please use Get All Tickers. * Documentation: https://www.kucoin.com/docs-new/api-3470159 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 4 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 4 | + * +-----------------------+--------+ */ getSymbol(req: GetSymbolReq): Promise; /** * getAllSymbols Get All Symbols - * Description: Request via this endpoint to get a list of available currency pairs for trading. If you want to get the market information of the trading symbol, please use Get All Tickers. + * Description: Request a list of available currency pairs for trading via this endpoint. If you want to get the market information of the trading symbol, please use Get All Tickers. * Documentation: https://www.kucoin.com/docs-new/api-3470154 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 4 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 4 | + * +-----------------------+--------+ */ getAllSymbols(req: GetAllSymbolsReq): Promise; @@ -116,31 +121,31 @@ export interface MarketAPI { * getTicker Get Ticker * Description: Request via this endpoint to get Level 1 Market Data. The returned value includes the best bid price and size, the best ask price and size as well as the last traded price and the last traded size. * Documentation: https://www.kucoin.com/docs-new/api-3470160 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 2 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+--------+ */ getTicker(req: GetTickerReq): Promise; /** * getAllTickers Get All Tickers - * Description: Request market tickers for all the trading pairs in the market (including 24h volume), takes a snapshot every 2 seconds. On the rare occasion that we will change the currency name, if you still want the changed symbol name, you can use the symbolName field instead of the symbol field via “Get all tickers” endpoint. + * Description: Request market tickers for all the trading pairs in the market (including 24h volume); takes a snapshot every 2 seconds. On the rare occasion that we change the currency name, if you still want the changed symbol name, you can use the symbolName field instead of the symbol field via “Get all tickers” endpoint. * Documentation: https://www.kucoin.com/docs-new/api-3470167 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 15 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+--------+ */ getAllTickers(): Promise; @@ -148,15 +153,15 @@ export interface MarketAPI { * getTradeHistory Get Trade History * Description: Request via this endpoint to get the trade history of the specified symbol, the returned quantity is the last 100 transaction records. * Documentation: https://www.kucoin.com/docs-new/api-3470162 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ */ getTradeHistory(req: GetTradeHistoryReq): Promise; @@ -164,15 +169,15 @@ export interface MarketAPI { * getKlines Get Klines * Description: Get the Kline of the symbol. Data are returned in grouped buckets based on requested type. For each query, the system would return at most 1500 pieces of data. To obtain more data, please page the data by time. * Documentation: https://www.kucoin.com/docs-new/api-3470163 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ */ getKlines(req: GetKlinesReq): Promise; @@ -180,15 +185,15 @@ export interface MarketAPI { * getPartOrderBook Get Part OrderBook * Description: Query for part orderbook depth data. (aggregated by price) You are recommended to request via this endpoint as the system reponse would be faster and cosume less traffic. * Documentation: https://www.kucoin.com/docs-new/api-3470165 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 2 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+--------+ */ getPartOrderBook(req: GetPartOrderBookReq): Promise; @@ -196,31 +201,65 @@ export interface MarketAPI { * getFullOrderBook Get Full OrderBook * 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 up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook. * Documentation: https://www.kucoin.com/docs-new/api-3470164 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ getFullOrderBook(req: GetFullOrderBookReq): Promise; + /** + * getCallAuctionPartOrderBook Get Call Auction Part OrderBook + * Description: Query for call auction 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. + * Documentation: https://www.kucoin.com/docs-new/api-3471564 + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+--------+ + */ + getCallAuctionPartOrderBook( + req: GetCallAuctionPartOrderBookReq, + ): Promise; + + /** + * getCallAuctionInfo Get Call Auction Info + * Description: Get call auction data. This interface will return the following information for the specified symbol during the call auction phase: estimated transaction price, estimated transaction quantity, bid price range, and ask price range. + * Documentation: https://www.kucoin.com/docs-new/api-3471565 + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+--------+ + */ + getCallAuctionInfo(req: GetCallAuctionInfoReq): Promise; + /** * getFiatPrice Get Fiat Price - * Description: Request via this endpoint to get the fiat price of the currencies for the available trading pairs. + * Description: Request the fiat price of the currencies for the available trading pairs via this endpoint. * Documentation: https://www.kucoin.com/docs-new/api-3470153 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ */ getFiatPrice(req: GetFiatPriceReq): Promise; @@ -228,95 +267,111 @@ export interface MarketAPI { * get24hrStats Get 24hr Stats * Description: Request via this endpoint to get the statistics of the specified ticker in the last 24 hours. * Documentation: https://www.kucoin.com/docs-new/api-3470161 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 15 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 15 | + * +-----------------------+--------+ */ get24hrStats(req: Get24hrStatsReq): Promise; /** * getMarketList Get Market List - * Description: Request via this endpoint to get the transaction currency for the entire trading market. + * Description: Request via this endpoint the transaction currency for the entire trading market. * Documentation: https://www.kucoin.com/docs-new/api-3470166 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ */ getMarketList(): Promise; + /** + * getClientIPAddress Get Client IP Address + * Description: Get the server time. + * Documentation: https://www.kucoin.com/docs-new/api-3471123 + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 0 | + * +-----------------------+--------+ + */ + getClientIPAddress(): Promise; + /** * getServerTime Get Server Time * Description: Get the server time. * Documentation: https://www.kucoin.com/docs-new/api-3470156 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ */ getServerTime(): Promise; /** * getServiceStatus Get Service Status - * Description: Get the service status + * Description: Get the service status. * Documentation: https://www.kucoin.com/docs-new/api-3470158 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 3 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+--------+ */ getServiceStatus(): Promise; /** * getPublicToken Get Public Token - Spot/Margin - * Description: This interface can obtain the token required for websocket to establish a Spot/Margin 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 + * Description: This interface can obtain the token required for Websocket to establish a Spot/Margin 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 * Documentation: https://www.kucoin.com/docs-new/api-3470294 - * +---------------------+--------+ - * | Extra API Info | Value | - * +---------------------+--------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PUBLIC | - * | API-PERMISSION | NULL | - * | API-RATE-LIMIT-POOL | PUBLIC | - * | API-RATE-LIMIT | 10 | - * +---------------------+--------+ + * +-----------------------+--------+ + * | Extra API Info | Value | + * +-----------------------+--------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PUBLIC | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+--------+ */ getPublicToken(): Promise; /** * getPrivateToken Get Private Token - Spot/Margin - * Description: This interface can obtain the token required for websocket to establish a Spot/Margin 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 + * Description: This interface can obtain the token required for Websocket to establish a Spot/Margin 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 * Documentation: https://www.kucoin.com/docs-new/api-3470295 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ getPrivateToken(): Promise; } @@ -456,6 +511,32 @@ export class MarketAPIImpl implements MarketAPI { ); } + getCallAuctionPartOrderBook( + req: GetCallAuctionPartOrderBookReq, + ): Promise { + return this.transport.call( + 'spot', + false, + 'GET', + '/api/v1/market/orderbook/callauction/level2_{size}', + req, + GetCallAuctionPartOrderBookResp, + false, + ); + } + + getCallAuctionInfo(req: GetCallAuctionInfoReq): Promise { + return this.transport.call( + 'spot', + false, + 'GET', + '/api/v1/market/callauctionData', + req, + GetCallAuctionInfoResp, + false, + ); + } + getFiatPrice(req: GetFiatPriceReq): Promise { return this.transport.call( 'spot', @@ -492,6 +573,18 @@ export class MarketAPIImpl implements MarketAPI { ); } + getClientIPAddress(): Promise { + return this.transport.call( + 'spot', + false, + 'GET', + '/api/v1/my-ip', + null, + GetClientIPAddressResp, + false, + ); + } + getServerTime(): Promise { return this.transport.call( 'spot', diff --git a/sdk/node/src/generate/spot/market/export.template b/sdk/node/src/generate/spot/market/export.template index e1fcbff5..acaebd8e 100644 --- a/sdk/node/src/generate/spot/market/export.template +++ b/sdk/node/src/generate/spot/market/export.template @@ -12,6 +12,11 @@ export type GetAllTickersTicker = MARKET.GetAllTickersTicker; export type GetAnnouncementsItems = MARKET.GetAnnouncementsItems; export type GetAnnouncementsReq = MARKET.GetAnnouncementsReq; export type GetAnnouncementsResp = MARKET.GetAnnouncementsResp; +export type GetCallAuctionInfoReq = MARKET.GetCallAuctionInfoReq; +export type GetCallAuctionInfoResp = MARKET.GetCallAuctionInfoResp; +export type GetCallAuctionPartOrderBookReq = MARKET.GetCallAuctionPartOrderBookReq; +export type GetCallAuctionPartOrderBookResp = MARKET.GetCallAuctionPartOrderBookResp; +export type GetClientIPAddressResp = MARKET.GetClientIPAddressResp; export type GetCurrencyChains = MARKET.GetCurrencyChains; export type GetCurrencyReq = MARKET.GetCurrencyReq; export type GetCurrencyResp = MARKET.GetCurrencyResp; diff --git a/sdk/node/src/generate/spot/market/index.ts b/sdk/node/src/generate/spot/market/index.ts index 74a4ce2f..a0bec06a 100644 --- a/sdk/node/src/generate/spot/market/index.ts +++ b/sdk/node/src/generate/spot/market/index.ts @@ -11,6 +11,11 @@ export * from './model_get_all_tickers_ticker'; export * from './model_get_announcements_items'; export * from './model_get_announcements_req'; export * from './model_get_announcements_resp'; +export * from './model_get_call_auction_info_req'; +export * from './model_get_call_auction_info_resp'; +export * from './model_get_call_auction_part_order_book_req'; +export * from './model_get_call_auction_part_order_book_resp'; +export * from './model_get_client_ip_address_resp'; export * from './model_get_currency_chains'; export * from './model_get_currency_req'; export * from './model_get_currency_resp'; diff --git a/sdk/node/src/generate/spot/market/model_get_all_currencies_data.ts b/sdk/node/src/generate/spot/market/model_get_all_currencies_data.ts index 74bea19d..0d26876b 100644 --- a/sdk/node/src/generate/spot/market/model_get_all_currencies_data.ts +++ b/sdk/node/src/generate/spot/market/model_get_all_currencies_data.ts @@ -11,12 +11,12 @@ export class GetAllCurrenciesData implements Serializable { currency: string; /** - * Currency name, will change after renaming + * Currency name; will change after renaming */ name: string; /** - * Full name of a currency, will change after renaming + * Full currency name; will change after renaming */ fullName: string; @@ -36,17 +36,17 @@ export class GetAllCurrenciesData implements Serializable { contractAddress: string; /** - * Support margin or not + * Margin support or not */ isMarginEnabled: boolean; /** - * Support debit or not + * Debit support or not */ isDebitEnabled: boolean; /** - * chain list + * Chain list */ @Type(() => GetAllCurrenciesDataChains) chains: Array; diff --git a/sdk/node/src/generate/spot/market/model_get_all_currencies_data_chains.ts b/sdk/node/src/generate/spot/market/model_get_all_currencies_data_chains.ts index 72163028..aefa6094 100644 --- a/sdk/node/src/generate/spot/market/model_get_all_currencies_data_chains.ts +++ b/sdk/node/src/generate/spot/market/model_get_all_currencies_data_chains.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetAllCurrenciesDataChains implements Serializable { /** - * chain name of currency + * Chain name of currency */ chainName: string; @@ -20,7 +20,7 @@ export class GetAllCurrenciesDataChains implements Serializable { depositMinSize: string; /** - * withdraw fee rate + * Withdraw fee rate */ withdrawFeeRate: string; @@ -30,12 +30,12 @@ export class GetAllCurrenciesDataChains implements Serializable { withdrawalMinFee: string; /** - * Support withdrawal or not + * Withdrawal support or not */ isWithdrawEnabled: boolean; /** - * Support deposit or not + * Deposit support or not */ isDepositEnabled: boolean; @@ -70,22 +70,22 @@ export class GetAllCurrenciesDataChains implements Serializable { maxDeposit: string; /** - * whether memo/tag is needed + * Need for memo/tag or not */ needTag: boolean; /** - * chain id of currency + * Chain id of currency */ chainId: string; /** - * deposit fee rate (some currencies have this param, the default is empty) + * Deposit fee rate (some currencies have this param; the default is empty) */ depositFeeRate?: string; /** - * withdraw max fee(some currencies have this param, the default is empty) + * Withdraw max. fee (some currencies have this param; the default is empty) */ withdrawMaxFee?: string; diff --git a/sdk/node/src/generate/spot/market/model_get_all_symbols_data.ts b/sdk/node/src/generate/spot/market/model_get_all_symbols_data.ts index b51786e1..d36f6ed8 100644 --- a/sdk/node/src/generate/spot/market/model_get_all_symbols_data.ts +++ b/sdk/node/src/generate/spot/market/model_get_all_symbols_data.ts @@ -5,22 +5,22 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetAllSymbolsData implements Serializable { /** - * unique code of a symbol, it would not change after renaming + * Unique code of a symbol; it will not change after renaming */ symbol: string; /** - * Name of trading pairs, it would change after renaming + * Name of trading pairs, it will change after renaming */ name: string; /** - * Base currency,e.g. BTC. + * Base currency, e.g. BTC. */ baseCurrency: string; /** - * Quote currency,e.g. USDT. + * Quote currency, e.g. USDT. */ quoteCurrency: string; @@ -35,7 +35,7 @@ export class GetAllSymbolsData implements Serializable { market: string; /** - * The minimum order quantity requried to place an order. + * The minimum order quantity required to place an order. */ baseMinSize: string; @@ -65,17 +65,17 @@ export class GetAllSymbolsData implements Serializable { quoteIncrement: string; /** - * Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. specifies the min order price as well as the price increment.This also applies to quote currency. + * Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. Specifies the min. order price as well as the price increment.This also applies to quote currency. */ priceIncrement: string; /** - * Threshold for price portection + * Threshold for price protection */ priceLimitRate: string; /** - * the minimum trading amounts + * The minimum trading amounts */ minFunds: string; @@ -105,10 +105,45 @@ export class GetAllSymbolsData implements Serializable { takerFeeCoefficient: string; /** - * Whether it is an [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol + * Whether it is a [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol */ st: boolean; + /** + * The [call auction](https://www.kucoin.com/support/40999744334105) status returns true/false + */ + callauctionIsEnabled: boolean; + + /** + * The lowest price declared in the call auction + */ + callauctionPriceFloor: string; + + /** + * The highest bid price in the call auction + */ + callauctionPriceCeiling: string; + + /** + * The first phase of the call auction starts at (Allow add orders, allow cancel orders) + */ + callauctionFirstStageStartTime: number; + + /** + * The second phase of the call auction starts at (Allow add orders, don\'t allow cancel orders) + */ + callauctionSecondStageStartTime: number; + + /** + * The third phase of the call auction starts at (Don\'t allow add orders, don\'t allow cancel orders) + */ + callauctionThirdStageStartTime: number; + + /** + * Official opening time (end time of the third phase of call auction) + */ + tradingStartTime: number; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -155,6 +190,20 @@ export class GetAllSymbolsData implements Serializable { this.takerFeeCoefficient = null; // @ts-ignore this.st = null; + // @ts-ignore + this.callauctionIsEnabled = null; + // @ts-ignore + this.callauctionPriceFloor = null; + // @ts-ignore + this.callauctionPriceCeiling = null; + // @ts-ignore + this.callauctionFirstStageStartTime = null; + // @ts-ignore + this.callauctionSecondStageStartTime = null; + // @ts-ignore + this.callauctionThirdStageStartTime = null; + // @ts-ignore + this.tradingStartTime = null; } /** * Convert the object to a JSON string. diff --git a/sdk/node/src/generate/spot/market/model_get_all_tickers_ticker.ts b/sdk/node/src/generate/spot/market/model_get_all_tickers_ticker.ts index e7e00f0c..8cee7d9f 100644 --- a/sdk/node/src/generate/spot/market/model_get_all_tickers_ticker.ts +++ b/sdk/node/src/generate/spot/market/model_get_all_tickers_ticker.ts @@ -10,7 +10,7 @@ export class GetAllTickersTicker implements Serializable { symbol: string; /** - * Name of trading pairs, it would change after renaming + * Name of trading pairs, it will change after renaming */ symbolName: string; @@ -158,21 +158,21 @@ export class GetAllTickersTicker implements Serializable { export namespace GetAllTickersTicker { export enum TakerCoefficientEnum { /** - * the taker fee coefficient is 1 + * The taker fee coefficient is 1 */ _1 = '1', /** - * no fee + * No fee */ _0 = '0', } export enum MakerCoefficientEnum { /** - * the maker fee coefficient is 1 + * The maker fee coefficient is 1 */ _1 = '1', /** - * no fee + * No fee */ _0 = '0', } diff --git a/sdk/node/src/generate/spot/market/model_get_call_auction_info_req.ts b/sdk/node/src/generate/spot/market/model_get_call_auction_info_req.ts new file mode 100644 index 00000000..ff467c3c --- /dev/null +++ b/sdk/node/src/generate/spot/market/model_get_call_auction_info_req.ts @@ -0,0 +1,76 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +import { instanceToPlain, plainToClassFromExist } from 'class-transformer'; +import { Serializable } from '@internal/interfaces/serializable'; + +export class GetCallAuctionInfoReq implements Serializable { + /** + * symbol + */ + symbol?: string; + + /** + * Private constructor, please use the corresponding static methods to construct the object. + */ + private constructor() {} + /** + * Creates a new instance of the `GetCallAuctionInfoReq` class. + * The builder pattern allows step-by-step construction of a `GetCallAuctionInfoReq` object. + */ + static builder(): GetCallAuctionInfoReqBuilder { + return new GetCallAuctionInfoReqBuilder(new GetCallAuctionInfoReq()); + } + + /** + * Creates a new instance of the `GetCallAuctionInfoReq` class with the given data. + */ + static create(data: { + /** + * symbol + */ + symbol?: string; + }): GetCallAuctionInfoReq { + let obj = new GetCallAuctionInfoReq(); + obj.symbol = data.symbol; + return obj; + } + + /** + * Convert the object to a JSON string. + */ + toJson(): string { + return JSON.stringify(instanceToPlain(this)); + } + /** + * Create an object from a JSON string. + */ + static fromJson(input: string): GetCallAuctionInfoReq { + return this.fromObject(JSON.parse(input)); + } + /** + * Create an object from Js Object. + */ + static fromObject(jsonObject: Object): GetCallAuctionInfoReq { + return plainToClassFromExist(new GetCallAuctionInfoReq(), jsonObject); + } +} + +export class GetCallAuctionInfoReqBuilder { + constructor(readonly obj: GetCallAuctionInfoReq) { + this.obj = obj; + } + /** + * symbol + */ + setSymbol(value: string): GetCallAuctionInfoReqBuilder { + this.obj.symbol = value; + return this; + } + + /** + * Get the final object. + */ + build(): GetCallAuctionInfoReq { + return this.obj; + } +} diff --git a/sdk/node/src/generate/spot/market/model_get_call_auction_info_resp.ts b/sdk/node/src/generate/spot/market/model_get_call_auction_info_resp.ts new file mode 100644 index 00000000..9ea5765e --- /dev/null +++ b/sdk/node/src/generate/spot/market/model_get_call_auction_info_resp.ts @@ -0,0 +1,97 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +import { instanceToPlain, Exclude, plainToClassFromExist } from 'class-transformer'; +import { RestResponse } from '@model/common'; +import { Response } from '@internal/interfaces/serializable'; + +export class GetCallAuctionInfoResp implements Response { + /** + * Symbol + */ + symbol: string; + + /** + * Estimated price + */ + estimatedPrice: string; + + /** + * Estimated size + */ + estimatedSize: string; + + /** + * Sell ​​order minimum price + */ + sellOrderRangeLowPrice: string; + + /** + * Sell ​​order maximum price + */ + sellOrderRangeHighPrice: string; + + /** + * Buy order minimum price + */ + buyOrderRangeLowPrice: string; + + /** + * Buy ​​order maximum price + */ + buyOrderRangeHighPrice: string; + + /** + * Timestamp (ms) + */ + time: number; + + /** + * Private constructor, please use the corresponding static methods to construct the object. + */ + private constructor() { + // @ts-ignore + this.symbol = null; + // @ts-ignore + this.estimatedPrice = null; + // @ts-ignore + this.estimatedSize = null; + // @ts-ignore + this.sellOrderRangeLowPrice = null; + // @ts-ignore + this.sellOrderRangeHighPrice = null; + // @ts-ignore + this.buyOrderRangeLowPrice = null; + // @ts-ignore + this.buyOrderRangeHighPrice = null; + // @ts-ignore + this.time = null; + } + /** + * common response + */ + @Exclude() + commonResponse?: RestResponse; + + setCommonResponse(response: RestResponse): void { + this.commonResponse = response; + } + + /** + * Convert the object to a JSON string. + */ + toJson(): string { + return JSON.stringify(instanceToPlain(this)); + } + /** + * Create an object from a JSON string. + */ + static fromJson(input: string): GetCallAuctionInfoResp { + return this.fromObject(JSON.parse(input)); + } + /** + * Create an object from Js Object. + */ + static fromObject(jsonObject: Object): GetCallAuctionInfoResp { + return plainToClassFromExist(new GetCallAuctionInfoResp(), jsonObject); + } +} diff --git a/sdk/node/src/generate/spot/market/model_get_call_auction_part_order_book_req.ts b/sdk/node/src/generate/spot/market/model_get_call_auction_part_order_book_req.ts new file mode 100644 index 00000000..acd108a6 --- /dev/null +++ b/sdk/node/src/generate/spot/market/model_get_call_auction_part_order_book_req.ts @@ -0,0 +1,96 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +import { instanceToPlain, plainToClassFromExist } from 'class-transformer'; +import 'reflect-metadata'; +import { Serializable } from '@internal/interfaces/serializable'; + +export class GetCallAuctionPartOrderBookReq implements Serializable { + /** + * symbol + */ + symbol?: string; + + /** + * Get the depth layer, optional value: 20, 100 + */ + @Reflect.metadata('path', 'size') + size?: string; + + /** + * Private constructor, please use the corresponding static methods to construct the object. + */ + private constructor() {} + /** + * Creates a new instance of the `GetCallAuctionPartOrderBookReq` class. + * The builder pattern allows step-by-step construction of a `GetCallAuctionPartOrderBookReq` object. + */ + static builder(): GetCallAuctionPartOrderBookReqBuilder { + return new GetCallAuctionPartOrderBookReqBuilder(new GetCallAuctionPartOrderBookReq()); + } + + /** + * Creates a new instance of the `GetCallAuctionPartOrderBookReq` class with the given data. + */ + static create(data: { + /** + * symbol + */ + symbol?: string; + /** + * Get the depth layer, optional value: 20, 100 + */ + size?: string; + }): GetCallAuctionPartOrderBookReq { + let obj = new GetCallAuctionPartOrderBookReq(); + obj.symbol = data.symbol; + obj.size = data.size; + return obj; + } + + /** + * Convert the object to a JSON string. + */ + toJson(): string { + return JSON.stringify(instanceToPlain(this)); + } + /** + * Create an object from a JSON string. + */ + static fromJson(input: string): GetCallAuctionPartOrderBookReq { + return this.fromObject(JSON.parse(input)); + } + /** + * Create an object from Js Object. + */ + static fromObject(jsonObject: Object): GetCallAuctionPartOrderBookReq { + return plainToClassFromExist(new GetCallAuctionPartOrderBookReq(), jsonObject); + } +} + +export class GetCallAuctionPartOrderBookReqBuilder { + constructor(readonly obj: GetCallAuctionPartOrderBookReq) { + this.obj = obj; + } + /** + * symbol + */ + setSymbol(value: string): GetCallAuctionPartOrderBookReqBuilder { + this.obj.symbol = value; + return this; + } + + /** + * Get the depth layer, optional value: 20, 100 + */ + setSize(value: string): GetCallAuctionPartOrderBookReqBuilder { + this.obj.size = value; + return this; + } + + /** + * Get the final object. + */ + build(): GetCallAuctionPartOrderBookReq { + return this.obj; + } +} diff --git a/sdk/node/src/generate/spot/market/model_get_call_auction_part_order_book_resp.ts b/sdk/node/src/generate/spot/market/model_get_call_auction_part_order_book_resp.ts new file mode 100644 index 00000000..a0c3061b --- /dev/null +++ b/sdk/node/src/generate/spot/market/model_get_call_auction_part_order_book_resp.ts @@ -0,0 +1,69 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +import { instanceToPlain, Exclude, plainToClassFromExist } from 'class-transformer'; +import { RestResponse } from '@model/common'; +import { Response } from '@internal/interfaces/serializable'; + +export class GetCallAuctionPartOrderBookResp implements Response { + /** + * Timestamp (milliseconds) + */ + time: number; + + /** + * Sequence number + */ + sequence: string; + + /** + * bids, from high to low + */ + bids: Array>; + + /** + * asks, from low to high + */ + asks: Array>; + + /** + * Private constructor, please use the corresponding static methods to construct the object. + */ + private constructor() { + // @ts-ignore + this.time = null; + // @ts-ignore + this.sequence = null; + // @ts-ignore + this.bids = null; + // @ts-ignore + this.asks = null; + } + /** + * common response + */ + @Exclude() + commonResponse?: RestResponse; + + setCommonResponse(response: RestResponse): void { + this.commonResponse = response; + } + + /** + * Convert the object to a JSON string. + */ + toJson(): string { + return JSON.stringify(instanceToPlain(this)); + } + /** + * Create an object from a JSON string. + */ + static fromJson(input: string): GetCallAuctionPartOrderBookResp { + return this.fromObject(JSON.parse(input)); + } + /** + * Create an object from Js Object. + */ + static fromObject(jsonObject: Object): GetCallAuctionPartOrderBookResp { + return plainToClassFromExist(new GetCallAuctionPartOrderBookResp(), jsonObject); + } +} diff --git a/sdk/node/src/generate/spot/market/model_get_client_ip_address_resp.ts b/sdk/node/src/generate/spot/market/model_get_client_ip_address_resp.ts new file mode 100644 index 00000000..bdc769e5 --- /dev/null +++ b/sdk/node/src/generate/spot/market/model_get_client_ip_address_resp.ts @@ -0,0 +1,48 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +import { instanceToPlain, Exclude, plainToClassFromExist } from 'class-transformer'; +import { RestResponse } from '@model/common'; +import { Response } from '@internal/interfaces/serializable'; + +export class GetClientIPAddressResp implements Response { + /** + * + */ + data: string; + + /** + * Private constructor, please use the corresponding static methods to construct the object. + */ + private constructor() { + // @ts-ignore + this.data = null; + } + /** + * common response + */ + @Exclude() + commonResponse?: RestResponse; + + setCommonResponse(response: RestResponse): void { + this.commonResponse = response; + } + + /** + * Convert the object to a JSON string. + */ + toJson(): string { + return JSON.stringify(instanceToPlain(this.data)); + } + /** + * Create an object from a JSON string. + */ + static fromJson(input: string): GetClientIPAddressResp { + return this.fromObject(JSON.parse(input)); + } + /** + * Create an object from Js Object. + */ + static fromObject(jsonObject: Object): GetClientIPAddressResp { + return plainToClassFromExist(new GetClientIPAddressResp(), { data: jsonObject }); + } +} diff --git a/sdk/node/src/generate/spot/market/model_get_currency_chains.ts b/sdk/node/src/generate/spot/market/model_get_currency_chains.ts index 1bbe3455..f2748d01 100644 --- a/sdk/node/src/generate/spot/market/model_get_currency_chains.ts +++ b/sdk/node/src/generate/spot/market/model_get_currency_chains.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetCurrencyChains implements Serializable { /** - * chain name of currency + * Chain name of currency */ chainName: string; @@ -20,7 +20,7 @@ export class GetCurrencyChains implements Serializable { depositMinSize: string; /** - * withdraw fee rate + * Withdraw fee rate */ withdrawFeeRate: string; @@ -30,12 +30,12 @@ export class GetCurrencyChains implements Serializable { withdrawalMinFee: string; /** - * Support withdrawal or not + * Withdrawal support or not */ isWithdrawEnabled: boolean; /** - * Support deposit or not + * Deposit support or not */ isDepositEnabled: boolean; @@ -70,12 +70,12 @@ export class GetCurrencyChains implements Serializable { maxDeposit: string; /** - * whether memo/tag is needed + * Need for memo/tag or not */ needTag: boolean; /** - * chain id of currency + * Chain id of currency */ chainId: string; diff --git a/sdk/node/src/generate/spot/market/model_get_currency_req.ts b/sdk/node/src/generate/spot/market/model_get_currency_req.ts index 1166dd47..525fd875 100644 --- a/sdk/node/src/generate/spot/market/model_get_currency_req.ts +++ b/sdk/node/src/generate/spot/market/model_get_currency_req.ts @@ -12,7 +12,7 @@ export class GetCurrencyReq implements Serializable { currency?: string; /** - * Support for querying the chain of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20. This only apply for multi-chain currency, and there is no need for single chain currency. + * Support for querying the chain of currency, e.g. the available values for USDT are OMNI, ERC20, TRC20. This only applies to multi-chain currencies; no need for single-chain currencies. */ chain?: string; @@ -37,7 +37,7 @@ export class GetCurrencyReq implements Serializable { */ currency?: string; /** - * Support for querying the chain of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20. This only apply for multi-chain currency, and there is no need for single chain currency. + * Support for querying the chain of currency, e.g. the available values for USDT are OMNI, ERC20, TRC20. This only applies to multi-chain currencies; no need for single-chain currencies. */ chain?: string; }): GetCurrencyReq { @@ -80,7 +80,7 @@ export class GetCurrencyReqBuilder { } /** - * Support for querying the chain of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20. This only apply for multi-chain currency, and there is no need for single chain currency. + * Support for querying the chain of currency, e.g. the available values for USDT are OMNI, ERC20, TRC20. This only applies to multi-chain currencies; no need for single-chain currencies. */ setChain(value: string): GetCurrencyReqBuilder { this.obj.chain = value; diff --git a/sdk/node/src/generate/spot/market/model_get_currency_resp.ts b/sdk/node/src/generate/spot/market/model_get_currency_resp.ts index 9d8e2cde..b1c6797f 100644 --- a/sdk/node/src/generate/spot/market/model_get_currency_resp.ts +++ b/sdk/node/src/generate/spot/market/model_get_currency_resp.ts @@ -12,12 +12,12 @@ export class GetCurrencyResp implements Response { currency: string; /** - * Currency name, will change after renaming + * Currency name; will change after renaming */ name: string; /** - * Full name of a currency, will change after renaming + * Full currency name; will change after renaming */ fullName: string; @@ -37,17 +37,17 @@ export class GetCurrencyResp implements Response { contractAddress: string; /** - * Support margin or not + * Margin support or not */ isMarginEnabled: boolean; /** - * Support debit or not + * Debit support or not */ isDebitEnabled: boolean; /** - * chain list + * Chain list */ @Type(() => GetCurrencyChains) chains: Array; diff --git a/sdk/node/src/generate/spot/market/model_get_fiat_price_req.ts b/sdk/node/src/generate/spot/market/model_get_fiat_price_req.ts index d6445d61..85295299 100644 --- a/sdk/node/src/generate/spot/market/model_get_fiat_price_req.ts +++ b/sdk/node/src/generate/spot/market/model_get_fiat_price_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetFiatPriceReq implements Serializable { /** - * Ticker symbol of a base currency,eg.USD,EUR. Default is USD + * Ticker symbol of a base currency, e.g. USD, EUR. Default is USD */ base?: string = 'USD'; @@ -31,7 +31,7 @@ export class GetFiatPriceReq implements Serializable { */ static create(data: { /** - * Ticker symbol of a base currency,eg.USD,EUR. Default is USD + * Ticker symbol of a base currency, e.g. USD, EUR. Default is USD */ base?: string; /** @@ -74,7 +74,7 @@ export class GetFiatPriceReqBuilder { this.obj = obj; } /** - * Ticker symbol of a base currency,eg.USD,EUR. Default is USD + * Ticker symbol of a base currency, e.g. USD, EUR. Default is USD */ setBase(value: string): GetFiatPriceReqBuilder { this.obj.base = value; diff --git a/sdk/node/src/generate/spot/market/model_get_private_token_instance_servers.ts b/sdk/node/src/generate/spot/market/model_get_private_token_instance_servers.ts index 03e243fd..05e01871 100644 --- a/sdk/node/src/generate/spot/market/model_get_private_token_instance_servers.ts +++ b/sdk/node/src/generate/spot/market/model_get_private_token_instance_servers.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetPrivateTokenInstanceServers implements Serializable { /** - * Websocket domain URL, It is recommended to use a dynamic URL as the URL may change + * Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. */ endpoint: string; @@ -20,12 +20,12 @@ export class GetPrivateTokenInstanceServers implements Serializable { protocol: GetPrivateTokenInstanceServers.ProtocolEnum; /** - * Recommended ping interval(millisecond) + * Recommended ping interval (milliseconds) */ pingInterval: number; /** - * Heartbeat timeout(millisecond) + * Heartbeat timeout (milliseconds) */ pingTimeout: number; @@ -67,7 +67,7 @@ export class GetPrivateTokenInstanceServers implements Serializable { export namespace GetPrivateTokenInstanceServers { export enum ProtocolEnum { /** - * websocket + * Websocket */ WEBSOCKET = 'websocket', } diff --git a/sdk/node/src/generate/spot/market/model_get_private_token_resp.ts b/sdk/node/src/generate/spot/market/model_get_private_token_resp.ts index 9e6aebc6..8c6acd84 100644 --- a/sdk/node/src/generate/spot/market/model_get_private_token_resp.ts +++ b/sdk/node/src/generate/spot/market/model_get_private_token_resp.ts @@ -7,7 +7,7 @@ import { Response } from '@internal/interfaces/serializable'; export class GetPrivateTokenResp implements Response { /** - * The token required to establish a websocket connection + * The token required to establish a Websocket connection */ token: string; diff --git a/sdk/node/src/generate/spot/market/model_get_public_token_instance_servers.ts b/sdk/node/src/generate/spot/market/model_get_public_token_instance_servers.ts index 2abc3132..2f3cafce 100644 --- a/sdk/node/src/generate/spot/market/model_get_public_token_instance_servers.ts +++ b/sdk/node/src/generate/spot/market/model_get_public_token_instance_servers.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetPublicTokenInstanceServers implements Serializable { /** - * Websocket domain URL, It is recommended to use a dynamic URL as the URL may change + * Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. */ endpoint: string; @@ -20,12 +20,12 @@ export class GetPublicTokenInstanceServers implements Serializable { protocol: GetPublicTokenInstanceServers.ProtocolEnum; /** - * Recommended ping interval(millisecond) + * Recommended ping interval (milliseconds) */ pingInterval: number; /** - * Heartbeat timeout(millisecond) + * Heartbeat timeout (milliseconds) */ pingTimeout: number; @@ -67,7 +67,7 @@ export class GetPublicTokenInstanceServers implements Serializable { export namespace GetPublicTokenInstanceServers { export enum ProtocolEnum { /** - * websocket + * Websocket */ WEBSOCKET = 'websocket', } diff --git a/sdk/node/src/generate/spot/market/model_get_public_token_resp.ts b/sdk/node/src/generate/spot/market/model_get_public_token_resp.ts index e7d4b332..d91bb5cf 100644 --- a/sdk/node/src/generate/spot/market/model_get_public_token_resp.ts +++ b/sdk/node/src/generate/spot/market/model_get_public_token_resp.ts @@ -7,7 +7,7 @@ import { Response } from '@internal/interfaces/serializable'; export class GetPublicTokenResp implements Response { /** - * The token required to establish a websocket connection + * The token required to establish a Websocket connection */ token: string; diff --git a/sdk/node/src/generate/spot/market/model_get_server_time_resp.ts b/sdk/node/src/generate/spot/market/model_get_server_time_resp.ts index 1427322c..c679bbbc 100644 --- a/sdk/node/src/generate/spot/market/model_get_server_time_resp.ts +++ b/sdk/node/src/generate/spot/market/model_get_server_time_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class GetServerTimeResp implements Response { /** - * ServerTime(millisecond) + * ServerTime (milliseconds) */ data: number; diff --git a/sdk/node/src/generate/spot/market/model_get_service_status_resp.ts b/sdk/node/src/generate/spot/market/model_get_service_status_resp.ts index 6a094a61..b4ec776a 100644 --- a/sdk/node/src/generate/spot/market/model_get_service_status_resp.ts +++ b/sdk/node/src/generate/spot/market/model_get_service_status_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class GetServiceStatusResp implements Response { /** - * Status of service: open:normal transaction, close:Stop Trading/Maintenance, cancelonly:can only cancel the order but not place order + * Status of service: open: normal transaction; close: Stop Trading/Maintenance; cancelonly: can only cancel the order but not place order */ status: GetServiceStatusResp.StatusEnum; diff --git a/sdk/node/src/generate/spot/market/model_get_symbol_resp.ts b/sdk/node/src/generate/spot/market/model_get_symbol_resp.ts index 831c6684..3d9dbfaa 100644 --- a/sdk/node/src/generate/spot/market/model_get_symbol_resp.ts +++ b/sdk/node/src/generate/spot/market/model_get_symbol_resp.ts @@ -76,7 +76,7 @@ export class GetSymbolResp implements Response { priceLimitRate: string; /** - * the minimum trading amounts + * The minimum trading amounts */ minFunds: string; @@ -106,10 +106,45 @@ export class GetSymbolResp implements Response { takerFeeCoefficient: string; /** - * + * Whether it is a [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol */ st: boolean; + /** + * The [call auction](https://www.kucoin.com/support/40999744334105) status returns true/false + */ + callauctionIsEnabled: boolean; + + /** + * The lowest price declared in the call auction + */ + callauctionPriceFloor: string; + + /** + * The highest bid price in the call auction + */ + callauctionPriceCeiling: string; + + /** + * The first phase of the call auction starts at (Allow add orders, allow cancel orders) + */ + callauctionFirstStageStartTime: number; + + /** + * The second phase of the call auction starts at (Allow add orders, don\'t allow cancel orders) + */ + callauctionSecondStageStartTime: number; + + /** + * The third phase of the call auction starts at (Don\'t allow add orders, don\'t allow cancel orders) + */ + callauctionThirdStageStartTime: number; + + /** + * Official opening time (end time of the third phase of call auction) + */ + tradingStartTime: number; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -156,6 +191,20 @@ export class GetSymbolResp implements Response { this.takerFeeCoefficient = null; // @ts-ignore this.st = null; + // @ts-ignore + this.callauctionIsEnabled = null; + // @ts-ignore + this.callauctionPriceFloor = null; + // @ts-ignore + this.callauctionPriceCeiling = null; + // @ts-ignore + this.callauctionFirstStageStartTime = null; + // @ts-ignore + this.callauctionSecondStageStartTime = null; + // @ts-ignore + this.callauctionThirdStageStartTime = null; + // @ts-ignore + this.tradingStartTime = null; } /** * common response diff --git a/sdk/node/src/generate/spot/order/api_order.template b/sdk/node/src/generate/spot/order/api_order.template index a5a66089..b779cc23 100644 --- a/sdk/node/src/generate/spot/order/api_order.template +++ b/sdk/node/src/generate/spot/order/api_order.template @@ -12,7 +12,7 @@ describe('Auto Test', ()=> { * /api/v1/hf/orders */ let builder = AddOrderReq.builder(); - builder.setClientOid(?).setSide(?).setSymbol(?).setType(?).setRemark(?).setStp(?).setPrice(?).setSize(?).setTimeInForce(?).setPostOnly(?).setHidden(?).setIceberg(?).setVisibleSize(?).setTags(?).setCancelAfter(?).setFunds(?); + builder.setClientOid(?).setSide(?).setSymbol(?).setType(?).setRemark(?).setStp(?).setPrice(?).setSize(?).setTimeInForce(?).setPostOnly(?).setHidden(?).setIceberg(?).setVisibleSize(?).setTags(?).setCancelAfter(?).setFunds(?).setAllowMaxTimeWindow(?).setClientTimestamp(?); let req = builder.build(); let resp = api.addOrder(req); return resp.then(result => { @@ -29,7 +29,7 @@ describe('Auto Test', ()=> { * /api/v1/hf/orders/sync */ let builder = AddOrderSyncReq.builder(); - builder.setClientOid(?).setSide(?).setSymbol(?).setType(?).setRemark(?).setStp(?).setPrice(?).setSize(?).setTimeInForce(?).setPostOnly(?).setHidden(?).setIceberg(?).setVisibleSize(?).setTags(?).setCancelAfter(?).setFunds(?); + builder.setClientOid(?).setSide(?).setSymbol(?).setType(?).setRemark(?).setStp(?).setPrice(?).setSize(?).setTimeInForce(?).setPostOnly(?).setHidden(?).setIceberg(?).setVisibleSize(?).setTags(?).setCancelAfter(?).setFunds(?).setAllowMaxTimeWindow(?).setClientTimestamp(?); let req = builder.build(); let resp = api.addOrderSync(req); return resp.then(result => { @@ -53,7 +53,7 @@ describe('Auto Test', ()=> { * /api/v1/hf/orders/test */ let builder = AddOrderTestReq.builder(); - builder.setClientOid(?).setSide(?).setSymbol(?).setType(?).setRemark(?).setStp(?).setPrice(?).setSize(?).setTimeInForce(?).setPostOnly(?).setHidden(?).setIceberg(?).setVisibleSize(?).setTags(?).setCancelAfter(?).setFunds(?); + builder.setClientOid(?).setSide(?).setSymbol(?).setType(?).setRemark(?).setStp(?).setPrice(?).setSize(?).setTimeInForce(?).setPostOnly(?).setHidden(?).setIceberg(?).setVisibleSize(?).setTags(?).setCancelAfter(?).setFunds(?).setAllowMaxTimeWindow(?).setClientTimestamp(?); let req = builder.build(); let resp = api.addOrderTest(req); return resp.then(result => { @@ -118,7 +118,7 @@ describe('Auto Test', ()=> { * /api/v1/hf/orders/sync/{orderId} */ let builder = CancelOrderByOrderIdSyncReq.builder(); - builder.setOrderId(?).setSymbol(?); + builder.setSymbol(?).setOrderId(?); let req = builder.build(); let resp = api.cancelOrderByOrderIdSync(req); return resp.then(result => { @@ -155,7 +155,7 @@ describe('Auto Test', ()=> { * /api/v1/hf/orders/sync/client-order/{clientOid} */ let builder = CancelOrderByClientOidSyncReq.builder(); - builder.setClientOid(?).setSymbol(?); + builder.setSymbol(?).setClientOid(?); let req = builder.build(); let resp = api.cancelOrderByClientOidSync(req); return resp.then(result => { @@ -360,6 +360,26 @@ describe('Auto Test', ()=> { }); }) + test('getOpenOrdersByPage request test', ()=> { + /** + * getOpenOrdersByPage + * Get Open Orders By Page + * /api/v1/hf/orders/active/page + */ + let builder = GetOpenOrdersByPageReq.builder(); + builder.setSymbol(?).setPageNum(?).setPageSize(?); + let req = builder.build(); + let resp = api.getOpenOrdersByPage(req); + return resp.then(result => { + expect(result.currentPage).toEqual(expect.anything()); + expect(result.pageSize).toEqual(expect.anything()); + expect(result.totalNum).toEqual(expect.anything()); + expect(result.totalPage).toEqual(expect.anything()); + expect(result.items).toEqual(expect.anything()); + console.log(resp); + }); + }) + test('getClosedOrders request test', ()=> { /** * getClosedOrders @@ -439,7 +459,6 @@ describe('Auto Test', ()=> { let resp = api.addStopOrder(req); return resp.then(result => { expect(result.orderId).toEqual(expect.anything()); - expect(result.clientOid).toEqual(expect.anything()); console.log(resp); }); }) @@ -775,7 +794,7 @@ describe('Auto Test', ()=> { * /api/v1/orders/{orderId} */ let builder = CancelOrderByOrderIdOldReq.builder(); - builder.setSymbol(?).setOrderId(?); + builder.setOrderId(?); let req = builder.build(); let resp = api.cancelOrderByOrderIdOld(req); return resp.then(result => { @@ -791,7 +810,7 @@ describe('Auto Test', ()=> { * /api/v1/order/client-order/{clientOid} */ let builder = CancelOrderByClientOidOldReq.builder(); - builder.setSymbol(?).setClientOid(?); + builder.setClientOid(?); let req = builder.build(); let resp = api.cancelOrderByClientOidOld(req); return resp.then(result => { @@ -844,10 +863,7 @@ describe('Auto Test', ()=> { * Get Recent Orders List - Old * /api/v1/limit/orders */ - let builder = GetRecentOrdersListOldReq.builder(); - builder.setCurrentPage(?).setPageSize(?); - let req = builder.build(); - let resp = api.getRecentOrdersListOld(req); + let resp = api.getRecentOrdersListOld(); return resp.then(result => { expect(result.data).toEqual(expect.anything()); console.log(resp); @@ -895,6 +911,9 @@ describe('Auto Test', ()=> { expect(result.cancelExist).toEqual(expect.anything()); expect(result.createdAt).toEqual(expect.anything()); expect(result.tradeType).toEqual(expect.anything()); + expect(result.tax).toEqual(expect.anything()); + expect(result.taxRate).toEqual(expect.anything()); + expect(result.taxCurrency).toEqual(expect.anything()); console.log(resp); }); }) @@ -940,6 +959,9 @@ describe('Auto Test', ()=> { expect(result.cancelExist).toEqual(expect.anything()); expect(result.createdAt).toEqual(expect.anything()); expect(result.tradeType).toEqual(expect.anything()); + expect(result.tax).toEqual(expect.anything()); + expect(result.taxRate).toEqual(expect.anything()); + expect(result.taxCurrency).toEqual(expect.anything()); console.log(resp); }); }) @@ -970,10 +992,7 @@ describe('Auto Test', ()=> { * Get Recent Trade History - Old * /api/v1/limit/fills */ - let builder = GetRecentTradeHistoryOldReq.builder(); - builder.setCurrentPage(?).setPageSize(?); - let req = builder.build(); - let resp = api.getRecentTradeHistoryOld(req); + let resp = api.getRecentTradeHistoryOld(); return resp.then(result => { expect(result.data).toEqual(expect.anything()); console.log(resp); diff --git a/sdk/node/src/generate/spot/order/api_order.test.ts b/sdk/node/src/generate/spot/order/api_order.test.ts index ee61bbfd..c2b48518 100644 --- a/sdk/node/src/generate/spot/order/api_order.test.ts +++ b/sdk/node/src/generate/spot/order/api_order.test.ts @@ -55,6 +55,7 @@ import { SetDCPReq } from './model_set_dcp_req'; import { CancelOcoOrderByOrderIdReq } from './model_cancel_oco_order_by_order_id_req'; import { CancelOrderByOrderIdOldResp } from './model_cancel_order_by_order_id_old_resp'; import { CancelAllOrdersResp } from './model_cancel_all_orders_resp'; +import { GetOpenOrdersByPageReq } from './model_get_open_orders_by_page_req'; import { CancelOrderByClientOidSyncResp } from './model_cancel_order_by_client_oid_sync_resp'; import { CancelOcoOrderByOrderIdResp } from './model_cancel_oco_order_by_order_id_resp'; import { GetOpenOrdersResp } from './model_get_open_orders_resp'; @@ -66,13 +67,13 @@ import { GetOcoOrderByOrderIdReq } from './model_get_oco_order_by_order_id_req'; import { GetOcoOrderDetailByOrderIdReq } from './model_get_oco_order_detail_by_order_id_req'; import { GetDCPResp } from './model_get_dcp_resp'; import { CancelPartialOrderResp } from './model_cancel_partial_order_resp'; +import { GetOpenOrdersByPageResp } from './model_get_open_orders_by_page_resp'; import { CancelAllOrdersBySymbolResp } from './model_cancel_all_orders_by_symbol_resp'; import { GetOcoOrderListResp } from './model_get_oco_order_list_resp'; import { AddOrderSyncResp } from './model_add_order_sync_resp'; import { BatchAddOrdersOldReq } from './model_batch_add_orders_old_req'; import { GetOpenOrdersReq } from './model_get_open_orders_req'; import { GetStopOrdersListReq } from './model_get_stop_orders_list_req'; -import { GetRecentTradeHistoryOldReq } from './model_get_recent_trade_history_old_req'; import { AddOrderOldResp } from './model_add_order_old_resp'; import { BatchCancelStopOrderResp } from './model_batch_cancel_stop_order_resp'; import { GetTradeHistoryReq } from './model_get_trade_history_req'; @@ -83,7 +84,6 @@ import { CancelOrderByClientOidResp } from './model_cancel_order_by_client_oid_r import { CancelOrderByOrderIdResp } from './model_cancel_order_by_order_id_resp'; import { CancelOrderByClientOidOldReq } from './model_cancel_order_by_client_oid_old_req'; import { CancelOcoOrderByClientOidResp } from './model_cancel_oco_order_by_client_oid_resp'; -import { GetRecentOrdersListOldReq } from './model_get_recent_orders_list_old_req'; import { GetOrderByClientOidReq } from './model_get_order_by_client_oid_req'; import { BatchAddOrdersResp } from './model_batch_add_orders_resp'; import { BatchAddOrdersReq } from './model_batch_add_orders_req'; @@ -291,7 +291,7 @@ describe('Auto Test', () => { * Cancel Order By OrderId Sync * /api/v1/hf/orders/sync/{orderId} */ - let data = '{"orderId": "671128ee365ccb0007534d45", "symbol": "BTC-USDT"}'; + let data = '{"symbol": "BTC-USDT", "orderId": "671128ee365ccb0007534d45"}'; let req = CancelOrderByOrderIdSyncReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, @@ -352,7 +352,7 @@ describe('Auto Test', () => { * Cancel Order By ClientOid Sync * /api/v1/hf/orders/sync/client-order/{clientOid} */ - let data = '{"clientOid": "5c52e11203aa677f33e493fb", "symbol": "BTC-USDT"}'; + let data = '{"symbol": "BTC-USDT", "clientOid": "5c52e11203aa677f33e493fb"}'; let req = CancelOrderByClientOidSyncReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, @@ -594,6 +594,37 @@ describe('Auto Test', () => { console.log(resp); } }); + test('getOpenOrdersByPage request test', () => { + /** + * getOpenOrdersByPage + * Get Open Orders By Page + * /api/v1/hf/orders/active/page + */ + let data = '{"symbol": "BTC-USDT", "pageNum": 1, "pageSize": 20}'; + let req = GetOpenOrdersByPageReq.fromJson(data); + expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( + false, + ); + console.log(req); + }); + + test('getOpenOrdersByPage response test', () => { + /** + * getOpenOrdersByPage + * Get Open Orders By Page + * /api/v1/hf/orders/active/page + */ + let data = + '{\n "code": "200000",\n "data": {\n "currentPage": 1,\n "pageSize": 20,\n "totalNum": 1,\n "totalPage": 1,\n "items": [\n {\n "id": "67c1437ea5226600071cc080",\n "symbol": "BTC-USDT",\n "opType": "DEAL",\n "type": "limit",\n "side": "buy",\n "price": "50000",\n "size": "0.00001",\n "funds": "0.5",\n "dealSize": "0",\n "dealFunds": "0",\n "fee": "0",\n "feeCurrency": "USDT",\n "stp": null,\n "timeInForce": "GTC",\n "postOnly": false,\n "hidden": false,\n "iceberg": false,\n "visibleSize": "0",\n "cancelAfter": 0,\n "channel": "API",\n "clientOid": "5c52e11203aa677f33e493fb",\n "remark": "order remarks",\n "tags": null,\n "cancelExist": false,\n "createdAt": 1740718974367,\n "lastUpdatedAt": 1741867658590,\n "tradeType": "TRADE",\n "inOrderBook": true,\n "cancelledSize": "0",\n "cancelledFunds": "0",\n "remainSize": "0.00001",\n "remainFunds": "0.5",\n "tax": "0",\n "active": true\n }\n ]\n }\n}'; + let commonResp = RestResponse.fromJson(data); + let resp = GetOpenOrdersByPageResp.fromObject(commonResp.data); + if (commonResp.data !== null) { + expect( + Object.values(resp).every((value) => value === null || value === undefined), + ).toBe(false); + console.log(resp); + } + }); test('getClosedOrders request test', () => { /** * getClosedOrders @@ -710,7 +741,7 @@ describe('Auto Test', () => { * /api/v1/stop-order */ let data = - '{"type": "limit", "symbol": "BTC-USDT", "side": "buy", "price": "50000", "size": "0.00001", "clientOid": "5c52e11203aa677f33e493fb", "remark": "order remarks"}'; + '{"type": "limit", "symbol": "BTC-USDT", "side": "buy", "price": "50000", "stopPrice": "50000", "size": "0.00001", "clientOid": "5c52e11203aa677f33e493fb", "remark": "order remarks"}'; let req = AddStopOrderReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, @@ -725,7 +756,7 @@ describe('Auto Test', () => { * /api/v1/stop-order */ let data = - '{"code":"200000","data":{"orderId":"670fd33bf9406e0007ab3945","clientOid":"5c52e11203aa677f33e493fb"}}'; + '{\n "code": "200000",\n "data": {\n "orderId": "670fd33bf9406e0007ab3945"\n }\n}'; let commonResp = RestResponse.fromJson(data); let resp = AddStopOrderResp.fromObject(commonResp.data); if (commonResp.data !== null) { @@ -836,7 +867,7 @@ describe('Auto Test', () => { * /api/v1/stop-order */ let data = - '{"symbol": "BTC-USDT", "orderId": "670fd33bf9406e0007ab3945", "newPrice": "30000", "newSize": "0.0001"}'; + '{"symbol": "example_string_default_value", "side": "example_string_default_value", "type": "limit", "tradeType": "example_string_default_value", "startAt": 123456, "endAt": 123456, "currentPage": 1, "orderIds": "example_string_default_value", "pageSize": 50, "stop": "example_string_default_value"}'; let req = GetStopOrdersListReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, @@ -851,7 +882,7 @@ describe('Auto Test', () => { * /api/v1/stop-order */ let data = - '{\n "code": "200000",\n "data": {\n "currentPage": 1,\n "pageSize": 50,\n "totalNum": 1,\n "totalPage": 1,\n "items": [\n {\n "id": "vs8hoo8kqjnklv4m0038lrfq",\n "symbol": "KCS-USDT",\n "userId": "60fe4956c43cbc0006562c2c",\n "status": "NEW",\n "type": "limit",\n "side": "buy",\n "price": "0.01000000000000000000",\n "size": "0.01000000000000000000",\n "funds": null,\n "stp": null,\n "timeInForce": "GTC",\n "cancelAfter": -1,\n "postOnly": false,\n "hidden": false,\n "iceberg": false,\n "visibleSize": null,\n "channel": "API",\n "clientOid": "404814a0fb4311eb9098acde48001122",\n "remark": null,\n "tags": null,\n "orderTime": 1628755183702150100,\n "domainId": "kucoin",\n "tradeSource": "USER",\n "tradeType": "TRADE",\n "feeCurrency": "USDT",\n "takerFeeRate": "0.00200000000000000000",\n "makerFeeRate": "0.00200000000000000000",\n "createdAt": 1628755183704,\n "stop": "loss",\n "stopTriggerTime": null,\n "stopPrice": "10.00000000000000000000"\n }\n ]\n }\n}'; + '{\n "code": "200000",\n "data": {\n "currentPage": 1,\n "pageSize": 50,\n "totalNum": 2,\n "totalPage": 1,\n "items": [\n {\n "id": "vs93gptvr9t2fsql003l8k5p",\n "symbol": "BTC-USDT",\n "userId": "633559791e1cbc0001f319bc",\n "status": "NEW",\n "type": "limit",\n "side": "buy",\n "price": "50000.00000000000000000000",\n "size": "0.00001000000000000000",\n "funds": null,\n "stp": null,\n "timeInForce": "GTC",\n "cancelAfter": -1,\n "postOnly": false,\n "hidden": false,\n "iceberg": false,\n "visibleSize": null,\n "channel": "API",\n "clientOid": "5c52e11203aa677f222233e493fb",\n "remark": "order remarks",\n "tags": null,\n "relatedNo": null,\n "orderTime": 1740626554883000024,\n "domainId": "kucoin",\n "tradeSource": "USER",\n "tradeType": "TRADE",\n "feeCurrency": "USDT",\n "takerFeeRate": "0.00100000000000000000",\n "makerFeeRate": "0.00100000000000000000",\n "createdAt": 1740626554884,\n "stop": "loss",\n "stopTriggerTime": null,\n "stopPrice": "60000.00000000000000000000",\n "limitPrice": null,\n "pop": null,\n "activateCondition": null\n }\n ]\n }\n}'; let commonResp = RestResponse.fromJson(data); let resp = GetStopOrdersListResp.fromObject(commonResp.data); if (commonResp.data !== null) { @@ -1276,7 +1307,7 @@ describe('Auto Test', () => { * Cancel Order By OrderId - Old * /api/v1/orders/{orderId} */ - let data = '{"symbol": "BTC-USDT", "orderId": "674a97dfef434f0007efc431"}'; + let data = '{"orderId": "674a97dfef434f0007efc431"}'; let req = CancelOrderByOrderIdOldReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, @@ -1307,7 +1338,7 @@ describe('Auto Test', () => { * Cancel Order By ClientOid - Old * /api/v1/order/client-order/{clientOid} */ - let data = '{"symbol": "BTC-USDT", "clientOid": "5c52e11203aa677f33e4923fb"}'; + let data = '{"clientOid": "5c52e11203aa677f331e493fb"}'; let req = CancelOrderByClientOidOldReq.fromJson(data); expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( false, @@ -1322,7 +1353,7 @@ describe('Auto Test', () => { * /api/v1/order/client-order/{clientOid} */ let data = - '{\n "code": "200000",\n "data": {\n "cancelledOrderId": "674a9a872033a50007e2790d",\n "clientOid": "5c52e11203aa677f33e4923fb",\n "cancelledOcoOrderIds": null\n }\n}'; + '{\n "code": "200000",\n "data": {\n "cancelledOrderId": "67c3252a63d25e0007f91de9",\n "clientOid": "5c52e11203aa677f331e493fb",\n "cancelledOcoOrderIds": null\n }\n}'; let commonResp = RestResponse.fromJson(data); let resp = CancelOrderByClientOidOldResp.fromObject(commonResp.data); if (commonResp.data !== null) { @@ -1401,12 +1432,6 @@ describe('Auto Test', () => { * Get Recent Orders List - Old * /api/v1/limit/orders */ - let data = '{"currentPage": 1, "pageSize": 50}'; - let req = GetRecentOrdersListOldReq.fromJson(data); - expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( - false, - ); - console.log(req); }); test('getRecentOrdersListOld response test', () => { @@ -1415,16 +1440,6 @@ describe('Auto Test', () => { * Get Recent Orders List - Old * /api/v1/limit/orders */ - let data = - '{\n "code": "200000",\n "data": [\n {\n "id": "674a9a872033a50007e2790d",\n "symbol": "BTC-USDT",\n "opType": "DEAL",\n "type": "limit",\n "side": "buy",\n "price": "50000",\n "size": "0.00001",\n "funds": "0",\n "dealFunds": "0",\n "dealSize": "0",\n "fee": "0",\n "feeCurrency": "USDT",\n "stp": "",\n "stop": "",\n "stopTriggered": false,\n "stopPrice": "0",\n "timeInForce": "GTC",\n "postOnly": false,\n "hidden": false,\n "iceberg": false,\n "visibleSize": "0",\n "cancelAfter": 0,\n "channel": "API",\n "clientOid": "5c52e11203aa677f33e4923fb",\n "remark": "order remarks",\n "tags": null,\n "isActive": false,\n "cancelExist": true,\n "createdAt": 1732942471752,\n "tradeType": "TRADE"\n }\n ]\n}'; - let commonResp = RestResponse.fromJson(data); - let resp = GetRecentOrdersListOldResp.fromObject(commonResp.data); - if (commonResp.data !== null) { - expect( - Object.values(resp).every((value) => value === null || value === undefined), - ).toBe(false); - console.log(resp); - } }); test('getOrderByOrderIdOld request test', () => { /** @@ -1526,12 +1541,6 @@ describe('Auto Test', () => { * Get Recent Trade History - Old * /api/v1/limit/fills */ - let data = '{"currentPage": 1, "pageSize": 50}'; - let req = GetRecentTradeHistoryOldReq.fromJson(data); - expect(Object.values(req).every((value) => value === null || value === undefined)).toBe( - false, - ); - console.log(req); }); test('getRecentTradeHistoryOld response test', () => { @@ -1540,15 +1549,5 @@ describe('Auto Test', () => { * Get Recent Trade History - Old * /api/v1/limit/fills */ - let data = - '{\n "code": "200000",\n "data": [\n {\n "symbol": "BTC-USDT",\n "tradeId": "11732720444522497",\n "orderId": "674aab24754b1e00077dbc69",\n "counterOrderId": "674aab1fb26bfb0007a18b67",\n "side": "buy",\n "liquidity": "taker",\n "forceTaker": false,\n "price": "96999.6",\n "size": "0.00001",\n "funds": "0.969996",\n "fee": "0.000969996",\n "feeRate": "0.001",\n "feeCurrency": "USDT",\n "stop": "",\n "tradeType": "TRADE",\n "type": "limit",\n "createdAt": 1732946724082\n }\n ]\n}'; - let commonResp = RestResponse.fromJson(data); - let resp = GetRecentTradeHistoryOldResp.fromObject(commonResp.data); - if (commonResp.data !== null) { - expect( - Object.values(resp).every((value) => value === null || value === undefined), - ).toBe(false); - console.log(resp); - } }); }); diff --git a/sdk/node/src/generate/spot/order/api_order.ts b/sdk/node/src/generate/spot/order/api_order.ts index 0d57c841..50b5c870 100644 --- a/sdk/node/src/generate/spot/order/api_order.ts +++ b/sdk/node/src/generate/spot/order/api_order.ts @@ -58,6 +58,7 @@ import { SetDCPReq } from './model_set_dcp_req'; import { CancelOcoOrderByOrderIdReq } from './model_cancel_oco_order_by_order_id_req'; import { CancelOrderByOrderIdOldResp } from './model_cancel_order_by_order_id_old_resp'; import { CancelAllOrdersResp } from './model_cancel_all_orders_resp'; +import { GetOpenOrdersByPageReq } from './model_get_open_orders_by_page_req'; import { CancelOrderByClientOidSyncResp } from './model_cancel_order_by_client_oid_sync_resp'; import { CancelOcoOrderByOrderIdResp } from './model_cancel_oco_order_by_order_id_resp'; import { GetOpenOrdersResp } from './model_get_open_orders_resp'; @@ -69,13 +70,13 @@ import { GetOcoOrderByOrderIdReq } from './model_get_oco_order_by_order_id_req'; import { GetOcoOrderDetailByOrderIdReq } from './model_get_oco_order_detail_by_order_id_req'; import { GetDCPResp } from './model_get_dcp_resp'; import { CancelPartialOrderResp } from './model_cancel_partial_order_resp'; +import { GetOpenOrdersByPageResp } from './model_get_open_orders_by_page_resp'; import { CancelAllOrdersBySymbolResp } from './model_cancel_all_orders_by_symbol_resp'; import { GetOcoOrderListResp } from './model_get_oco_order_list_resp'; import { AddOrderSyncResp } from './model_add_order_sync_resp'; import { BatchAddOrdersOldReq } from './model_batch_add_orders_old_req'; import { GetOpenOrdersReq } from './model_get_open_orders_req'; import { GetStopOrdersListReq } from './model_get_stop_orders_list_req'; -import { GetRecentTradeHistoryOldReq } from './model_get_recent_trade_history_old_req'; import { AddOrderOldResp } from './model_add_order_old_resp'; import { BatchCancelStopOrderResp } from './model_batch_cancel_stop_order_resp'; import { GetTradeHistoryReq } from './model_get_trade_history_req'; @@ -86,7 +87,6 @@ import { CancelOrderByClientOidResp } from './model_cancel_order_by_client_oid_r import { CancelOrderByOrderIdResp } from './model_cancel_order_by_order_id_resp'; import { CancelOrderByClientOidOldReq } from './model_cancel_order_by_client_oid_old_req'; import { CancelOcoOrderByClientOidResp } from './model_cancel_oco_order_by_client_oid_resp'; -import { GetRecentOrdersListOldReq } from './model_get_recent_orders_list_old_req'; import { GetOrderByClientOidReq } from './model_get_order_by_client_oid_req'; import { BatchAddOrdersResp } from './model_batch_add_orders_resp'; import { BatchAddOrdersReq } from './model_batch_add_orders_req'; @@ -100,31 +100,31 @@ export interface OrderAPI { * addOrder Add Order * Description: Place order to the Spot 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. * Documentation: https://www.kucoin.com/docs-new/api-3470188 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ addOrder(req: AddOrderReq): Promise; /** * addOrderSync Add Order Sync - * Description: Place order to the spot trading system The difference between this interface and \"Add order\" is that this interface will synchronously return the order information after the order matching is completed. For higher latency requirements, please select the \"Add order\" interface. If there is a requirement for returning data integrity, please select this interface + * Description: Place order in the spot trading system. The difference between this interface and \"Add order\" is that this interface will synchronously return the order information after the order matching is completed. For higher latency requirements, please select the \"Add order\" interface. If there is a requirement for returning data integrity, please select this interface. * Documentation: https://www.kucoin.com/docs-new/api-3470170 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ addOrderSync(req: AddOrderSyncReq): Promise; @@ -132,63 +132,63 @@ export interface OrderAPI { * addOrderTest Add Order Test * Description: Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. * Documentation: https://www.kucoin.com/docs-new/api-3470187 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ addOrderTest(req: AddOrderTestReq): Promise; /** * batchAddOrders Batch Add Orders - * Description: This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5orders can be placed simultaneously. The order types must be limit orders of the same trading pair + * Description: This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5 orders can be placed simultaneously. The order types must be limit orders of the same trading pair * Documentation: https://www.kucoin.com/docs-new/api-3470168 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ batchAddOrders(req: BatchAddOrdersReq): Promise; /** * batchAddOrdersSync Batch Add Orders Sync - * Description: This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5orders can be placed simultaneously. The order types must be limit orders of the same trading pair + * Description: This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5 orders can be placed simultaneously. The order types must be limit orders of the same trading pair * Documentation: https://www.kucoin.com/docs-new/api-3470169 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ batchAddOrdersSync(req: BatchAddOrdersSyncReq): Promise; /** * cancelOrderByOrderId Cancel Order By OrderId - * Description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + * Description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. * Documentation: https://www.kucoin.com/docs-new/api-3470174 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ cancelOrderByOrderId(req: CancelOrderByOrderIdReq): Promise; @@ -196,15 +196,15 @@ export interface OrderAPI { * cancelOrderByOrderIdSync Cancel Order By OrderId Sync * Description: This endpoint can be used to cancel a spot order by orderId. * Documentation: https://www.kucoin.com/docs-new/api-3470185 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ cancelOrderByOrderIdSync( req: CancelOrderByOrderIdSyncReq, @@ -214,15 +214,15 @@ export interface OrderAPI { * cancelOrderByClientOid Cancel Order By ClientOid * Description: This endpoint can be used to cancel a spot order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. * Documentation: https://www.kucoin.com/docs-new/api-3470184 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ cancelOrderByClientOid(req: CancelOrderByClientOidReq): Promise; @@ -230,15 +230,15 @@ export interface OrderAPI { * cancelOrderByClientOidSync Cancel Order By ClientOid Sync * Description: This endpoint can be used to cancel a spot order by orderId. * Documentation: https://www.kucoin.com/docs-new/api-3470186 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ cancelOrderByClientOidSync( req: CancelOrderByClientOidSyncReq, @@ -248,15 +248,15 @@ export interface OrderAPI { * cancelPartialOrder Cancel Partial Order * Description: This interface can cancel the specified quantity of the order according to the orderId. The order execution order is: price first, time first, this interface will not change the queue order * Documentation: https://www.kucoin.com/docs-new/api-3470183 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ cancelPartialOrder(req: CancelPartialOrderReq): Promise; @@ -264,15 +264,15 @@ export interface OrderAPI { * cancelAllOrdersBySymbol Cancel All Orders By Symbol * Description: This endpoint can cancel all spot orders for specific symbol. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. * Documentation: https://www.kucoin.com/docs-new/api-3470175 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ cancelAllOrdersBySymbol(req: CancelAllOrdersBySymbolReq): Promise; @@ -280,31 +280,31 @@ export interface OrderAPI { * cancelAllOrders Cancel All Orders * Description: This endpoint can cancel all spot orders for all symbol. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. * Documentation: https://www.kucoin.com/docs-new/api-3470176 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 30 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 30 | + * +-----------------------+---------+ */ cancelAllOrders(): Promise; /** * modifyOrder Modify Order - * Description: This interface can modify the price and quantity of the order according to orderId or clientOid. The implementation of this interface is: cancel the order and place a new order on the same trading pair, and return the modification result to the client synchronously When the quantity of the new order updated by the user is less than the filled quantity of this order, the order will be considered as completed, and the order will be cancelled, and no new order will be placed + * Description: This interface can modify the price and quantity of the order according to orderId or clientOid. The implementation of this interface is: Cancel the order and place a new order on the same trading pair, and return the modification result to the client synchronously. When the quantity of the new order updated by the user is less than the filled quantity of this order, the order will be considered as completed, and the order will be canceled, and no new order will be placed. * Documentation: https://www.kucoin.com/docs-new/api-3470171 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ modifyOrder(req: ModifyOrderReq): Promise; @@ -312,15 +312,15 @@ export interface OrderAPI { * getOrderByOrderId Get Order By OrderId * Description: This endpoint can be used to obtain information for a single Spot order using the order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. * Documentation: https://www.kucoin.com/docs-new/api-3470181 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getOrderByOrderId(req: GetOrderByOrderIdReq): Promise; @@ -328,15 +328,15 @@ export interface OrderAPI { * getOrderByClientOid Get Order By ClientOid * Description: This endpoint can be used to obtain information for a single Spot order using the client order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. * Documentation: https://www.kucoin.com/docs-new/api-3470182 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getOrderByClientOid(req: GetOrderByClientOidReq): Promise; @@ -344,15 +344,15 @@ export interface OrderAPI { * getSymbolsWithOpenOrder Get Symbols With Open Order * Description: This interface can query all spot symbol that has active orders * Documentation: https://www.kucoin.com/docs-new/api-3470177 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getSymbolsWithOpenOrder(): Promise; @@ -360,31 +360,47 @@ export interface OrderAPI { * getOpenOrders Get Open Orders * Description: This interface is to obtain all Spot active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. * Documentation: https://www.kucoin.com/docs-new/api-3470178 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getOpenOrders(req: GetOpenOrdersReq): Promise; + /** + * getOpenOrdersByPage Get Open Orders By Page + * Description: This interface is to obtain Spot active order (uncompleted order) lists by page. The returned data is sorted in descending order according to the create time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. + * Documentation: https://www.kucoin.com/docs-new/api-3471591 + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ + */ + getOpenOrdersByPage(req: GetOpenOrdersByPageReq): Promise; + /** * getClosedOrders Get Closed Orders * Description: This interface is to obtain all Spot closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. * Documentation: https://www.kucoin.com/docs-new/api-3470179 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getClosedOrders(req: GetClosedOrdersReq): Promise; @@ -392,47 +408,47 @@ export interface OrderAPI { * getTradeHistory Get Trade History * Description: This endpoint can be used to obtain a list of the latest Spot transaction details. The returned data is sorted in descending order according to the latest update time of the order. * Documentation: https://www.kucoin.com/docs-new/api-3470180 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getTradeHistory(req: GetTradeHistoryReq): Promise; /** * getDCP Get DCP - * Description: Get Disconnection Protect(Deadman Swich)Through this interface, you can query the settings of automatic order cancellation + * Description: Get Disconnection Protect (Deadman Switch). Through this interface, you can query the settings of automatic order cancellation. * Documentation: https://www.kucoin.com/docs-new/api-3470172 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getDCP(): Promise; /** * setDCP Set DCP - * Description: Set Disconnection Protect(Deadman Swich)Through this interface, Call this interface to automatically cancel all orders of the set trading pair after the specified time. If this interface is not called again for renewal or cancellation before the set time, the system will help the user to cancel the order of the corresponding trading pair. Otherwise it will not. + * Description: Set Disconnection Protect (Deadman Switch). Through this interface, call this interface to automatically cancel all orders of the set trading pair after the specified time. If this interface is not called again for renewal or cancellation before the set time, the system will help the user to cancel the order of the corresponding trading pair. Otherwise it will not. * Documentation: https://www.kucoin.com/docs-new/api-3470173 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ setDCP(req: SetDCPReq): Promise; @@ -441,15 +457,15 @@ export interface OrderAPI { * addStopOrder Add Stop Order * Description: Place stop order to the Spot 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. * Documentation: https://www.kucoin.com/docs-new/api-3470334 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 1 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 1 | + * +-----------------------+---------+ */ addStopOrder(req: AddStopOrderReq): Promise; @@ -458,15 +474,15 @@ export interface OrderAPI { * cancelStopOrderByClientOid Cancel Stop Order By ClientOid * Description: This endpoint can be used to cancel a spot stop order by clientOid. * Documentation: https://www.kucoin.com/docs-new/api-3470336 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 5 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+---------+ */ cancelStopOrderByClientOid( req: CancelStopOrderByClientOidReq, @@ -477,15 +493,15 @@ export interface OrderAPI { * cancelStopOrderByOrderId Cancel Stop Order By OrderId * Description: This endpoint can be used to cancel a spot stop order by orderId. * Documentation: https://www.kucoin.com/docs-new/api-3470335 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ cancelStopOrderByOrderId( req: CancelStopOrderByOrderIdReq, @@ -495,15 +511,15 @@ export interface OrderAPI { * batchCancelStopOrder Batch Cancel Stop Orders * Description: This endpoint can be used to cancel a spot stop orders by batch. * Documentation: https://www.kucoin.com/docs-new/api-3470337 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ batchCancelStopOrder(req: BatchCancelStopOrderReq): Promise; @@ -511,15 +527,15 @@ export interface OrderAPI { * getStopOrdersList Get Stop Orders List * Description: This interface is to obtain all Spot active stop order lists * Documentation: https://www.kucoin.com/docs-new/api-3470338 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 8 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 8 | + * +-----------------------+---------+ */ getStopOrdersList(req: GetStopOrdersListReq): Promise; @@ -527,15 +543,15 @@ export interface OrderAPI { * getStopOrderByOrderId Get Stop Order By OrderId * Description: This interface is to obtain Spot stop order details by orderId * Documentation: https://www.kucoin.com/docs-new/api-3470339 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ getStopOrderByOrderId(req: GetStopOrderByOrderIdReq): Promise; @@ -543,15 +559,15 @@ export interface OrderAPI { * getStopOrderByClientOid Get Stop Order By ClientOid * Description: This interface is to obtain Spot stop order details by orderId * Documentation: https://www.kucoin.com/docs-new/api-3470340 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ getStopOrderByClientOid(req: GetStopOrderByClientOidReq): Promise; @@ -560,32 +576,32 @@ export interface OrderAPI { * addOcoOrder Add OCO Order * Description: Place OCO order to the Spot trading system * Documentation: https://www.kucoin.com/docs-new/api-3470353 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ addOcoOrder(req: AddOcoOrderReq): Promise; /** * @deprecated * cancelOcoOrderByOrderId Cancel OCO Order By OrderId - * Description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + * Description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. * Documentation: https://www.kucoin.com/docs-new/api-3470354 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ cancelOcoOrderByOrderId(req: CancelOcoOrderByOrderIdReq): Promise; @@ -594,15 +610,15 @@ export interface OrderAPI { * cancelOcoOrderByClientOid Cancel OCO Order By ClientOid * Description: Request via this interface to cancel a stop order via the clientOid. You will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes. * Documentation: https://www.kucoin.com/docs-new/api-3470355 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ cancelOcoOrderByClientOid( req: CancelOcoOrderByClientOidReq, @@ -611,34 +627,34 @@ export interface OrderAPI { /** * @deprecated * batchCancelOcoOrders Batch Cancel OCO Order - * Description: This interface can batch cancel OCO orders through orderIds. You will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes. + * Description: This interface can batch cancel OCO orders through orderIds. You will receive canceledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes. * Documentation: https://www.kucoin.com/docs-new/api-3470356 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ batchCancelOcoOrders(req: BatchCancelOcoOrdersReq): Promise; /** * @deprecated * getOcoOrderByOrderId Get OCO Order By OrderId - * Description: Request via this interface to get a oco order information via the order ID. + * Description: Request via this interface an OCO order information via the order ID. * Documentation: https://www.kucoin.com/docs-new/api-3470357 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getOcoOrderByOrderId(req: GetOcoOrderByOrderIdReq): Promise; @@ -647,15 +663,15 @@ export interface OrderAPI { * getOcoOrderByClientOid Get OCO Order By ClientOid * Description: Request via this interface to get a oco order information via the client order ID. * Documentation: https://www.kucoin.com/docs-new/api-3470358 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getOcoOrderByClientOid(req: GetOcoOrderByClientOidReq): Promise; @@ -664,15 +680,15 @@ export interface OrderAPI { * getOcoOrderDetailByOrderId Get OCO Order Detail By OrderId * Description: Request via this interface to get a oco order detail via the order ID. * Documentation: https://www.kucoin.com/docs-new/api-3470359 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getOcoOrderDetailByOrderId( req: GetOcoOrderDetailByOrderIdReq, @@ -681,17 +697,17 @@ export interface OrderAPI { /** * @deprecated * getOcoOrderList Get OCO Order List - * Description: Request via this endpoint to get your current OCO order list. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. + * Description: Request your current OCO order list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. * Documentation: https://www.kucoin.com/docs-new/api-3470360 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getOcoOrderList(req: GetOcoOrderListReq): Promise; @@ -700,15 +716,15 @@ export interface OrderAPI { * addOrderOld Add Order - Old * Description: Place order to the Spot 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. * Documentation: https://www.kucoin.com/docs-new/api-3470333 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ addOrderOld(req: AddOrderOldReq): Promise; @@ -717,15 +733,15 @@ export interface OrderAPI { * addOrderTestOld Add Order Test - Old * Description: Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. * Documentation: https://www.kucoin.com/docs-new/api-3470341 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ addOrderTestOld(req: AddOrderTestOldReq): Promise; @@ -734,32 +750,32 @@ export interface OrderAPI { * batchAddOrdersOld Batch Add Orders - Old * Description: Request via this endpoint to place 5 orders at the same time. The order type must be a limit order of the same symbol. * Documentation: https://www.kucoin.com/docs-new/api-3470342 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ batchAddOrdersOld(req: BatchAddOrdersOldReq): Promise; /** * @deprecated * cancelOrderByOrderIdOld Cancel Order By OrderId - Old - * Description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + * Description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. * Documentation: https://www.kucoin.com/docs-new/api-3470343 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ cancelOrderByOrderIdOld(req: CancelOrderByOrderIdOldReq): Promise; @@ -767,15 +783,15 @@ export interface OrderAPI { * cancelOrderByClientOidOld Cancel Order By ClientOid - Old * Description: This endpoint can be used to cancel a spot order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. * Documentation: https://www.kucoin.com/docs-new/api-3470344 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ cancelOrderByClientOidOld( req: CancelOrderByClientOidOldReq, @@ -786,121 +802,119 @@ export interface OrderAPI { * batchCancelOrderOld Batch Cancel Order - Old * Description: Request via this endpoint to cancel all open orders. The response is a list of ids of the canceled orders. * Documentation: https://www.kucoin.com/docs-new/api-3470345 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | SPOT | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 20 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | SPOT | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+---------+ */ batchCancelOrderOld(req: BatchCancelOrderOldReq): Promise; /** * @deprecated * getOrdersListOld Get Orders List - Old - * Description: Request via this endpoint to get your current order list. The return value is the data after Pagination, sorted in descending order according to time. + * Description: Request your current order list via this endpoint. The return value is the data after Pagination, sorted in descending order according to time. * Documentation: https://www.kucoin.com/docs-new/api-3470346 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getOrdersListOld(req: GetOrdersListOldReq): Promise; /** * @deprecated * getRecentOrdersListOld Get Recent Orders List - Old - * Description: Request via this endpoint to get your current order list. The return value is the data after Pagination, sorted in descending order according to time. + * Description: Request your current order list via this endpoint. The return value is the data after Pagination, sorted in descending order according to time. * Documentation: https://www.kucoin.com/docs-new/api-3470347 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ - getRecentOrdersListOld(req: GetRecentOrdersListOldReq): Promise; + getRecentOrdersListOld(): Promise; /** * @deprecated * getOrderByOrderIdOld Get Order By OrderId - Old - * Description: Request via this endpoint to get a single order info by order ID. + * Description: Request a single order info by order ID via this endpoint. * Documentation: https://www.kucoin.com/docs-new/api-3470348 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 2 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 2 | + * +-----------------------+---------+ */ getOrderByOrderIdOld(req: GetOrderByOrderIdOldReq): Promise; /** * @deprecated * getOrderByClientOidOld Get Order By ClientOid - Old - * Description: Request via this interface to check the information of a single active order via clientOid. The system will prompt that the order does not exists if the order does not exist or has been settled. + * Description: Request via this interface to check the information of a single active order via clientOid. The system will send a prompt that the order does not exist if the order does not exist or has been settled. * Documentation: https://www.kucoin.com/docs-new/api-3470349 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 3 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 3 | + * +-----------------------+---------+ */ getOrderByClientOidOld(req: GetOrderByClientOidOldReq): Promise; /** * @deprecated * getTradeHistoryOld Get Trade History - Old - * Description: Request via this endpoint to get the recent fills. The return value is the data after Pagination, sorted in descending order according to time. + * Description: Request recent fills via this endpoint. The return value is the data after Pagination, sorted in descending order according to time. * Documentation: https://www.kucoin.com/docs-new/api-3470350 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 10 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ */ getTradeHistoryOld(req: GetTradeHistoryOldReq): Promise; /** * @deprecated * getRecentTradeHistoryOld Get Recent Trade History - Old - * Description: Request via this endpoint to get a list of 1000 fills in the last 24 hours. The return value is the data after Pagination, sorted in descending order according to time. + * Description: Request a list of 1000 fills in the last 24 hours via this endpoint. The return value is the data after Pagination, sorted in descending order according to time. * Documentation: https://www.kucoin.com/docs-new/api-3470351 - * +---------------------+---------+ - * | Extra API Info | Value | - * +---------------------+---------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | SPOT | - * | API-RATE-LIMIT | 20 | - * +---------------------+---------+ + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | SPOT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+---------+ */ - getRecentTradeHistoryOld( - req: GetRecentTradeHistoryOldReq, - ): Promise; + getRecentTradeHistoryOld(): Promise; } export class OrderAPIImpl implements OrderAPI { @@ -1114,6 +1128,18 @@ export class OrderAPIImpl implements OrderAPI { ); } + getOpenOrdersByPage(req: GetOpenOrdersByPageReq): Promise { + return this.transport.call( + 'spot', + false, + 'GET', + '/api/v1/hf/orders/active/page', + req, + GetOpenOrdersByPageResp, + false, + ); + } + getClosedOrders(req: GetClosedOrdersReq): Promise { return this.transport.call( 'spot', @@ -1222,7 +1248,7 @@ export class OrderAPIImpl implements OrderAPI { '/api/v1/stop-order', req, GetStopOrdersListResp, - true, + false, ); } @@ -1436,13 +1462,13 @@ export class OrderAPIImpl implements OrderAPI { ); } - getRecentOrdersListOld(req: GetRecentOrdersListOldReq): Promise { + getRecentOrdersListOld(): Promise { return this.transport.call( 'spot', false, 'GET', '/api/v1/limit/orders', - req, + null, GetRecentOrdersListOldResp, false, ); @@ -1484,15 +1510,13 @@ export class OrderAPIImpl implements OrderAPI { ); } - getRecentTradeHistoryOld( - req: GetRecentTradeHistoryOldReq, - ): Promise { + getRecentTradeHistoryOld(): Promise { return this.transport.call( 'spot', false, 'GET', '/api/v1/limit/fills', - req, + null, GetRecentTradeHistoryOldResp, false, ); diff --git a/sdk/node/src/generate/spot/order/export.template b/sdk/node/src/generate/spot/order/export.template index 2e26d6ae..e027acff 100644 --- a/sdk/node/src/generate/spot/order/export.template +++ b/sdk/node/src/generate/spot/order/export.template @@ -71,6 +71,9 @@ export type GetOcoOrderDetailByOrderIdResp = ORDER.GetOcoOrderDetailByOrderIdRes export type GetOcoOrderListItems = ORDER.GetOcoOrderListItems; export type GetOcoOrderListReq = ORDER.GetOcoOrderListReq; export type GetOcoOrderListResp = ORDER.GetOcoOrderListResp; +export type GetOpenOrdersByPageItems = ORDER.GetOpenOrdersByPageItems; +export type GetOpenOrdersByPageReq = ORDER.GetOpenOrdersByPageReq; +export type GetOpenOrdersByPageResp = ORDER.GetOpenOrdersByPageResp; export type GetOpenOrdersData = ORDER.GetOpenOrdersData; export type GetOpenOrdersReq = ORDER.GetOpenOrdersReq; export type GetOpenOrdersResp = ORDER.GetOpenOrdersResp; @@ -86,10 +89,8 @@ export type GetOrdersListOldItems = ORDER.GetOrdersListOldItems; export type GetOrdersListOldReq = ORDER.GetOrdersListOldReq; export type GetOrdersListOldResp = ORDER.GetOrdersListOldResp; export type GetRecentOrdersListOldData = ORDER.GetRecentOrdersListOldData; -export type GetRecentOrdersListOldReq = ORDER.GetRecentOrdersListOldReq; export type GetRecentOrdersListOldResp = ORDER.GetRecentOrdersListOldResp; export type GetRecentTradeHistoryOldData = ORDER.GetRecentTradeHistoryOldData; -export type GetRecentTradeHistoryOldReq = ORDER.GetRecentTradeHistoryOldReq; export type GetRecentTradeHistoryOldResp = ORDER.GetRecentTradeHistoryOldResp; export type GetStopOrderByClientOidData = ORDER.GetStopOrderByClientOidData; export type GetStopOrderByClientOidReq = ORDER.GetStopOrderByClientOidReq; diff --git a/sdk/node/src/generate/spot/order/index.ts b/sdk/node/src/generate/spot/order/index.ts index 7a0cc109..94f9968d 100644 --- a/sdk/node/src/generate/spot/order/index.ts +++ b/sdk/node/src/generate/spot/order/index.ts @@ -70,6 +70,9 @@ export * from './model_get_oco_order_detail_by_order_id_resp'; export * from './model_get_oco_order_list_items'; export * from './model_get_oco_order_list_req'; export * from './model_get_oco_order_list_resp'; +export * from './model_get_open_orders_by_page_items'; +export * from './model_get_open_orders_by_page_req'; +export * from './model_get_open_orders_by_page_resp'; export * from './model_get_open_orders_data'; export * from './model_get_open_orders_req'; export * from './model_get_open_orders_resp'; @@ -85,10 +88,8 @@ export * from './model_get_orders_list_old_items'; export * from './model_get_orders_list_old_req'; export * from './model_get_orders_list_old_resp'; export * from './model_get_recent_orders_list_old_data'; -export * from './model_get_recent_orders_list_old_req'; export * from './model_get_recent_orders_list_old_resp'; export * from './model_get_recent_trade_history_old_data'; -export * from './model_get_recent_trade_history_old_req'; export * from './model_get_recent_trade_history_old_resp'; export * from './model_get_stop_order_by_client_oid_data'; export * from './model_get_stop_order_by_client_oid_req'; diff --git a/sdk/node/src/generate/spot/order/model_add_order_req.ts b/sdk/node/src/generate/spot/order/model_add_order_req.ts index 6632a8f6..6305af69 100644 --- a/sdk/node/src/generate/spot/order/model_add_order_req.ts +++ b/sdk/node/src/generate/spot/order/model_add_order_req.ts @@ -75,15 +75,25 @@ export class AddOrderReq implements Serializable { tags?: string; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ - cancelAfter?: number; + cancelAfter?: number = -1; /** - * When **type** is market, select one out of two: size or funds + * When **type** is market, select one out of two: size or funds When placing a market order, the funds field refers to the funds for the priced asset (the asset name written latter) of the trading pair. The funds must be based on the quoteIncrement of the trading pair. The quoteIncrement represents the precision of the trading pair. The funds value for an order must be a multiple of quoteIncrement and must be between quoteMinSize and quoteMaxSize. */ funds?: string; + /** + * Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. + */ + allowMaxTimeWindow?: number; + + /** + * Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. + */ + clientTimestamp?: number; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -164,13 +174,21 @@ export class AddOrderReq implements Serializable { */ tags?: string; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ cancelAfter?: number; /** - * When **type** is market, select one out of two: size or funds + * When **type** is market, select one out of two: size or funds When placing a market order, the funds field refers to the funds for the priced asset (the asset name written latter) of the trading pair. The funds must be based on the quoteIncrement of the trading pair. The quoteIncrement represents the precision of the trading pair. The funds value for an order must be a multiple of quoteIncrement and must be between quoteMinSize and quoteMaxSize. */ funds?: string; + /** + * Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. + */ + allowMaxTimeWindow?: number; + /** + * Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. + */ + clientTimestamp?: number; }): AddOrderReq { let obj = new AddOrderReq(); obj.clientOid = data.clientOid; @@ -203,8 +221,14 @@ export class AddOrderReq implements Serializable { } obj.visibleSize = data.visibleSize; obj.tags = data.tags; - obj.cancelAfter = data.cancelAfter; + if (data.cancelAfter) { + obj.cancelAfter = data.cancelAfter; + } else { + obj.cancelAfter = -1; + } obj.funds = data.funds; + obj.allowMaxTimeWindow = data.allowMaxTimeWindow; + obj.clientTimestamp = data.clientTimestamp; return obj; } @@ -404,7 +428,7 @@ export class AddOrderReqBuilder { } /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ setCancelAfter(value: number): AddOrderReqBuilder { this.obj.cancelAfter = value; @@ -412,13 +436,29 @@ export class AddOrderReqBuilder { } /** - * When **type** is market, select one out of two: size or funds + * When **type** is market, select one out of two: size or funds When placing a market order, the funds field refers to the funds for the priced asset (the asset name written latter) of the trading pair. The funds must be based on the quoteIncrement of the trading pair. The quoteIncrement represents the precision of the trading pair. The funds value for an order must be a multiple of quoteIncrement and must be between quoteMinSize and quoteMaxSize. */ setFunds(value: string): AddOrderReqBuilder { this.obj.funds = value; return this; } + /** + * Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. + */ + setAllowMaxTimeWindow(value: number): AddOrderReqBuilder { + this.obj.allowMaxTimeWindow = value; + return this; + } + + /** + * Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. + */ + setClientTimestamp(value: number): AddOrderReqBuilder { + this.obj.clientTimestamp = value; + return this; + } + /** * Get the final object. */ diff --git a/sdk/node/src/generate/spot/order/model_add_order_sync_req.ts b/sdk/node/src/generate/spot/order/model_add_order_sync_req.ts index 0f6544d0..780cd7da 100644 --- a/sdk/node/src/generate/spot/order/model_add_order_sync_req.ts +++ b/sdk/node/src/generate/spot/order/model_add_order_sync_req.ts @@ -5,12 +5,12 @@ import { Serializable } from '@internal/interfaces/serializable'; export class AddOrderSyncReq implements Serializable { /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ clientOid?: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddOrderSyncReq.SideEnum; @@ -20,7 +20,7 @@ export class AddOrderSyncReq implements Serializable { symbol: string; /** - * specify if the order is an \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + * Specify if the order is a \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. */ type: AddOrderSyncReq.TypeEnum; @@ -40,7 +40,7 @@ export class AddOrderSyncReq implements Serializable { price?: string; /** - * Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ size?: string; @@ -75,15 +75,25 @@ export class AddOrderSyncReq implements Serializable { tags?: string; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ - cancelAfter?: number; + cancelAfter?: number = -1; /** * When **type** is market, select one out of two: size or funds */ funds?: string; + /** + * The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + */ + allowMaxTimeWindow?: number; + + /** + * Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + */ + clientTimestamp?: number; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -108,11 +118,11 @@ export class AddOrderSyncReq implements Serializable { */ static create(data: { /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ clientOid?: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: AddOrderSyncReq.SideEnum; /** @@ -120,7 +130,7 @@ export class AddOrderSyncReq implements Serializable { */ symbol: string; /** - * specify if the order is an \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + * Specify if the order is a \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. */ type: AddOrderSyncReq.TypeEnum; /** @@ -136,7 +146,7 @@ export class AddOrderSyncReq implements Serializable { */ price?: string; /** - * Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ size?: string; /** @@ -164,13 +174,21 @@ export class AddOrderSyncReq implements Serializable { */ tags?: string; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ cancelAfter?: number; /** * When **type** is market, select one out of two: size or funds */ funds?: string; + /** + * The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + */ + allowMaxTimeWindow?: number; + /** + * Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + */ + clientTimestamp?: number; }): AddOrderSyncReq { let obj = new AddOrderSyncReq(); obj.clientOid = data.clientOid; @@ -203,8 +221,14 @@ export class AddOrderSyncReq implements Serializable { } obj.visibleSize = data.visibleSize; obj.tags = data.tags; - obj.cancelAfter = data.cancelAfter; + if (data.cancelAfter) { + obj.cancelAfter = data.cancelAfter; + } else { + obj.cancelAfter = -1; + } obj.funds = data.funds; + obj.allowMaxTimeWindow = data.allowMaxTimeWindow; + obj.clientTimestamp = data.clientTimestamp; return obj; } @@ -292,7 +316,7 @@ export class AddOrderSyncReqBuilder { this.obj = obj; } /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ setClientOid(value: string): AddOrderSyncReqBuilder { this.obj.clientOid = value; @@ -300,7 +324,7 @@ export class AddOrderSyncReqBuilder { } /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ setSide(value: AddOrderSyncReq.SideEnum): AddOrderSyncReqBuilder { this.obj.side = value; @@ -316,7 +340,7 @@ export class AddOrderSyncReqBuilder { } /** - * specify if the order is an \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + * Specify if the order is a \'limit\' order or \'market\' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. */ setType(value: AddOrderSyncReq.TypeEnum): AddOrderSyncReqBuilder { this.obj.type = value; @@ -348,7 +372,7 @@ export class AddOrderSyncReqBuilder { } /** - * Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ setSize(value: string): AddOrderSyncReqBuilder { this.obj.size = value; @@ -404,7 +428,7 @@ export class AddOrderSyncReqBuilder { } /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ setCancelAfter(value: number): AddOrderSyncReqBuilder { this.obj.cancelAfter = value; @@ -419,6 +443,22 @@ export class AddOrderSyncReqBuilder { return this; } + /** + * The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + */ + setAllowMaxTimeWindow(value: number): AddOrderSyncReqBuilder { + this.obj.allowMaxTimeWindow = value; + return this; + } + + /** + * Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + */ + setClientTimestamp(value: number): AddOrderSyncReqBuilder { + this.obj.clientTimestamp = value; + return this; + } + /** * Get the final object. */ diff --git a/sdk/node/src/generate/spot/order/model_add_order_sync_resp.ts b/sdk/node/src/generate/spot/order/model_add_order_sync_resp.ts index 58451051..3b96d4f6 100644 --- a/sdk/node/src/generate/spot/order/model_add_order_sync_resp.ts +++ b/sdk/node/src/generate/spot/order/model_add_order_sync_resp.ts @@ -6,12 +6,12 @@ import { Response } from '@internal/interfaces/serializable'; export class AddOrderSyncResp implements Response { /** - * The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + * The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. */ orderId: string; /** - * The user self-defined order id. + * The user self-defined order ID. */ clientOid: string; @@ -21,17 +21,17 @@ export class AddOrderSyncResp implements Response { orderTime: number; /** - * original order size + * Original order size */ originSize: string; /** - * deal size + * Deal size */ dealSize: string; /** - * remain size + * Remain size */ remainSize: string; @@ -41,7 +41,7 @@ export class AddOrderSyncResp implements Response { canceledSize: string; /** - * Order Status. open:order is active; done:order has been completed + * Order Status. open: order is active; done: order has been completed */ status: AddOrderSyncResp.StatusEnum; diff --git a/sdk/node/src/generate/spot/order/model_add_order_test_req.ts b/sdk/node/src/generate/spot/order/model_add_order_test_req.ts index fb0c8bea..29fd36e3 100644 --- a/sdk/node/src/generate/spot/order/model_add_order_test_req.ts +++ b/sdk/node/src/generate/spot/order/model_add_order_test_req.ts @@ -75,15 +75,25 @@ export class AddOrderTestReq implements Serializable { tags?: string; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ - cancelAfter?: number; + cancelAfter?: number = -1; /** * When **type** is market, select one out of two: size or funds */ funds?: string; + /** + * Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. + */ + allowMaxTimeWindow?: number; + + /** + * Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. + */ + clientTimestamp?: number; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -164,13 +174,21 @@ export class AddOrderTestReq implements Serializable { */ tags?: string; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ cancelAfter?: number; /** * When **type** is market, select one out of two: size or funds */ funds?: string; + /** + * Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. + */ + allowMaxTimeWindow?: number; + /** + * Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. + */ + clientTimestamp?: number; }): AddOrderTestReq { let obj = new AddOrderTestReq(); obj.clientOid = data.clientOid; @@ -203,8 +221,14 @@ export class AddOrderTestReq implements Serializable { } obj.visibleSize = data.visibleSize; obj.tags = data.tags; - obj.cancelAfter = data.cancelAfter; + if (data.cancelAfter) { + obj.cancelAfter = data.cancelAfter; + } else { + obj.cancelAfter = -1; + } obj.funds = data.funds; + obj.allowMaxTimeWindow = data.allowMaxTimeWindow; + obj.clientTimestamp = data.clientTimestamp; return obj; } @@ -404,7 +428,7 @@ export class AddOrderTestReqBuilder { } /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ setCancelAfter(value: number): AddOrderTestReqBuilder { this.obj.cancelAfter = value; @@ -419,6 +443,22 @@ export class AddOrderTestReqBuilder { return this; } + /** + * Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. + */ + setAllowMaxTimeWindow(value: number): AddOrderTestReqBuilder { + this.obj.allowMaxTimeWindow = value; + return this; + } + + /** + * Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. + */ + setClientTimestamp(value: number): AddOrderTestReqBuilder { + this.obj.clientTimestamp = value; + return this; + } + /** * Get the final object. */ diff --git a/sdk/node/src/generate/spot/order/model_add_stop_order_req.ts b/sdk/node/src/generate/spot/order/model_add_stop_order_req.ts index 7058bf52..e4a90d07 100644 --- a/sdk/node/src/generate/spot/order/model_add_stop_order_req.ts +++ b/sdk/node/src/generate/spot/order/model_add_stop_order_req.ts @@ -70,9 +70,9 @@ export class AddStopOrderReq implements Serializable { visibleSize?: string; /** - * Cancel after n seconds,the order timing strategy is GTT when **type** is limit. + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ - cancelAfter?: number; + cancelAfter?: number = -1; /** * When **type** is market, select one out of two: size or funds @@ -167,7 +167,7 @@ export class AddStopOrderReq implements Serializable { */ visibleSize?: string; /** - * Cancel after n seconds,the order timing strategy is GTT when **type** is limit. + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ cancelAfter?: number; /** @@ -213,7 +213,11 @@ export class AddStopOrderReq implements Serializable { obj.iceberg = false; } obj.visibleSize = data.visibleSize; - obj.cancelAfter = data.cancelAfter; + if (data.cancelAfter) { + obj.cancelAfter = data.cancelAfter; + } else { + obj.cancelAfter = -1; + } obj.funds = data.funds; obj.stopPrice = data.stopPrice; obj.tradeType = data.tradeType; @@ -408,7 +412,7 @@ export class AddStopOrderReqBuilder { } /** - * Cancel after n seconds,the order timing strategy is GTT when **type** is limit. + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ setCancelAfter(value: number): AddStopOrderReqBuilder { this.obj.cancelAfter = value; diff --git a/sdk/node/src/generate/spot/order/model_add_stop_order_resp.ts b/sdk/node/src/generate/spot/order/model_add_stop_order_resp.ts index 2ef177e7..9f2c2107 100644 --- a/sdk/node/src/generate/spot/order/model_add_stop_order_resp.ts +++ b/sdk/node/src/generate/spot/order/model_add_stop_order_resp.ts @@ -10,19 +10,12 @@ export class AddStopOrderResp implements Response { */ orderId: string; - /** - * The user self-defined order id. - */ - clientOid: string; - /** * Private constructor, please use the corresponding static methods to construct the object. */ private constructor() { // @ts-ignore this.orderId = null; - // @ts-ignore - this.clientOid = null; } /** * common response diff --git a/sdk/node/src/generate/spot/order/model_batch_add_orders_data.ts b/sdk/node/src/generate/spot/order/model_batch_add_orders_data.ts index fad22242..79526f3a 100644 --- a/sdk/node/src/generate/spot/order/model_batch_add_orders_data.ts +++ b/sdk/node/src/generate/spot/order/model_batch_add_orders_data.ts @@ -5,12 +5,12 @@ import { Serializable } from '@internal/interfaces/serializable'; export class BatchAddOrdersData implements Serializable { /** - * The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + * The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. */ orderId?: string; /** - * The user self-defined order id. + * The user self-defined order ID. */ clientOid?: string; @@ -20,7 +20,7 @@ export class BatchAddOrdersData implements Serializable { success: boolean; /** - * error message + * Error message */ failMsg?: string; diff --git a/sdk/node/src/generate/spot/order/model_batch_add_orders_order_list.ts b/sdk/node/src/generate/spot/order/model_batch_add_orders_order_list.ts index e57ddb23..8261e96d 100644 --- a/sdk/node/src/generate/spot/order/model_batch_add_orders_order_list.ts +++ b/sdk/node/src/generate/spot/order/model_batch_add_orders_order_list.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class BatchAddOrdersOrderList implements Serializable { /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. */ clientOid?: string; @@ -15,7 +15,7 @@ export class BatchAddOrdersOrderList implements Serializable { symbol: string; /** - * Specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ type: BatchAddOrdersOrderList.TypeEnum; @@ -26,7 +26,7 @@ export class BatchAddOrdersOrderList implements Serializable { BatchAddOrdersOrderList.TimeInForceEnum.GTC; /** - * Specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: BatchAddOrdersOrderList.SideEnum; @@ -36,7 +36,7 @@ export class BatchAddOrdersOrderList implements Serializable { price: string; /** - * Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ size?: string; @@ -46,9 +46,9 @@ export class BatchAddOrdersOrderList implements Serializable { stp?: BatchAddOrdersOrderList.StpEnum; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ - cancelAfter?: number; + cancelAfter?: number = -1; /** * passive order labels, this is disabled when the order timing strategy is IOC or FOK @@ -85,6 +85,16 @@ export class BatchAddOrdersOrderList implements Serializable { */ funds?: string; + /** + * Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + */ + clientTimestamp?: number; + + /** + * The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + */ + allowMaxTimeWindow?: number; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -111,7 +121,7 @@ export class BatchAddOrdersOrderList implements Serializable { */ static create(data: { /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. */ clientOid?: string; /** @@ -119,7 +129,7 @@ export class BatchAddOrdersOrderList implements Serializable { */ symbol: string; /** - * Specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ type: BatchAddOrdersOrderList.TypeEnum; /** @@ -127,7 +137,7 @@ export class BatchAddOrdersOrderList implements Serializable { */ timeInForce?: BatchAddOrdersOrderList.TimeInForceEnum; /** - * Specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: BatchAddOrdersOrderList.SideEnum; /** @@ -135,7 +145,7 @@ export class BatchAddOrdersOrderList implements Serializable { */ price: string; /** - * Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ size?: string; /** @@ -143,7 +153,7 @@ export class BatchAddOrdersOrderList implements Serializable { */ stp?: BatchAddOrdersOrderList.StpEnum; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ cancelAfter?: number; /** @@ -174,6 +184,14 @@ export class BatchAddOrdersOrderList implements Serializable { * When **type** is market, select one out of two: size or funds */ funds?: string; + /** + * Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + */ + clientTimestamp?: number; + /** + * The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + */ + allowMaxTimeWindow?: number; }): BatchAddOrdersOrderList { let obj = new BatchAddOrdersOrderList(); obj.clientOid = data.clientOid; @@ -188,7 +206,11 @@ export class BatchAddOrdersOrderList implements Serializable { obj.price = data.price; obj.size = data.size; obj.stp = data.stp; - obj.cancelAfter = data.cancelAfter; + if (data.cancelAfter) { + obj.cancelAfter = data.cancelAfter; + } else { + obj.cancelAfter = -1; + } if (data.postOnly) { obj.postOnly = data.postOnly; } else { @@ -208,6 +230,8 @@ export class BatchAddOrdersOrderList implements Serializable { obj.tags = data.tags; obj.remark = data.remark; obj.funds = data.funds; + obj.clientTimestamp = data.clientTimestamp; + obj.allowMaxTimeWindow = data.allowMaxTimeWindow; return obj; } @@ -291,7 +315,7 @@ export class BatchAddOrdersOrderListBuilder { this.obj = obj; } /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. */ setClientOid(value: string): BatchAddOrdersOrderListBuilder { this.obj.clientOid = value; @@ -307,7 +331,7 @@ export class BatchAddOrdersOrderListBuilder { } /** - * Specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ setType(value: BatchAddOrdersOrderList.TypeEnum): BatchAddOrdersOrderListBuilder { this.obj.type = value; @@ -323,7 +347,7 @@ export class BatchAddOrdersOrderListBuilder { } /** - * Specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ setSide(value: BatchAddOrdersOrderList.SideEnum): BatchAddOrdersOrderListBuilder { this.obj.side = value; @@ -339,7 +363,7 @@ export class BatchAddOrdersOrderListBuilder { } /** - * Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ setSize(value: string): BatchAddOrdersOrderListBuilder { this.obj.size = value; @@ -355,7 +379,7 @@ export class BatchAddOrdersOrderListBuilder { } /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ setCancelAfter(value: number): BatchAddOrdersOrderListBuilder { this.obj.cancelAfter = value; @@ -418,6 +442,22 @@ export class BatchAddOrdersOrderListBuilder { return this; } + /** + * Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + */ + setClientTimestamp(value: number): BatchAddOrdersOrderListBuilder { + this.obj.clientTimestamp = value; + return this; + } + + /** + * The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + */ + setAllowMaxTimeWindow(value: number): BatchAddOrdersOrderListBuilder { + this.obj.allowMaxTimeWindow = value; + return this; + } + /** * Get the final object. */ diff --git a/sdk/node/src/generate/spot/order/model_batch_add_orders_sync_data.ts b/sdk/node/src/generate/spot/order/model_batch_add_orders_sync_data.ts index d2ed6ce7..80e5f71c 100644 --- a/sdk/node/src/generate/spot/order/model_batch_add_orders_sync_data.ts +++ b/sdk/node/src/generate/spot/order/model_batch_add_orders_sync_data.ts @@ -5,12 +5,12 @@ import { Serializable } from '@internal/interfaces/serializable'; export class BatchAddOrdersSyncData implements Serializable { /** - * The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + * The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. */ orderId?: string; /** - * The user self-defined order id. + * The user self-defined order ID. */ clientOid?: string; @@ -20,17 +20,17 @@ export class BatchAddOrdersSyncData implements Serializable { orderTime?: number; /** - * original order size + * Original order size */ originSize?: string; /** - * deal size + * Deal size */ dealSize?: string; /** - * remain size + * Remain size */ remainSize?: string; @@ -40,7 +40,7 @@ export class BatchAddOrdersSyncData implements Serializable { canceledSize?: string; /** - * Order Status. open:order is active; done:order has been completed + * Order Status. open: order is active; done: order has been completed */ status?: BatchAddOrdersSyncData.StatusEnum; @@ -55,7 +55,7 @@ export class BatchAddOrdersSyncData implements Serializable { success: boolean; /** - * error message + * Error message */ failMsg?: string; diff --git a/sdk/node/src/generate/spot/order/model_batch_add_orders_sync_order_list.ts b/sdk/node/src/generate/spot/order/model_batch_add_orders_sync_order_list.ts index aa72b516..58336a94 100644 --- a/sdk/node/src/generate/spot/order/model_batch_add_orders_sync_order_list.ts +++ b/sdk/node/src/generate/spot/order/model_batch_add_orders_sync_order_list.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class BatchAddOrdersSyncOrderList implements Serializable { /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. */ clientOid?: string; @@ -15,7 +15,7 @@ export class BatchAddOrdersSyncOrderList implements Serializable { symbol: string; /** - * Specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ type: BatchAddOrdersSyncOrderList.TypeEnum; @@ -26,7 +26,7 @@ export class BatchAddOrdersSyncOrderList implements Serializable { BatchAddOrdersSyncOrderList.TimeInForceEnum.GTC; /** - * Specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: BatchAddOrdersSyncOrderList.SideEnum; @@ -36,7 +36,7 @@ export class BatchAddOrdersSyncOrderList implements Serializable { price: string; /** - * Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ size?: string; @@ -46,9 +46,9 @@ export class BatchAddOrdersSyncOrderList implements Serializable { stp?: BatchAddOrdersSyncOrderList.StpEnum; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ - cancelAfter?: number; + cancelAfter?: number = -1; /** * passive order labels, this is disabled when the order timing strategy is IOC or FOK @@ -85,6 +85,16 @@ export class BatchAddOrdersSyncOrderList implements Serializable { */ funds?: string; + /** + * The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + */ + allowMaxTimeWindow?: number; + + /** + * Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + */ + clientTimestamp?: number; + /** * Private constructor, please use the corresponding static methods to construct the object. */ @@ -111,7 +121,7 @@ export class BatchAddOrdersSyncOrderList implements Serializable { */ static create(data: { /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. */ clientOid?: string; /** @@ -119,7 +129,7 @@ export class BatchAddOrdersSyncOrderList implements Serializable { */ symbol: string; /** - * Specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ type: BatchAddOrdersSyncOrderList.TypeEnum; /** @@ -127,7 +137,7 @@ export class BatchAddOrdersSyncOrderList implements Serializable { */ timeInForce?: BatchAddOrdersSyncOrderList.TimeInForceEnum; /** - * Specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side: BatchAddOrdersSyncOrderList.SideEnum; /** @@ -135,7 +145,7 @@ export class BatchAddOrdersSyncOrderList implements Serializable { */ price: string; /** - * Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ size?: string; /** @@ -143,7 +153,7 @@ export class BatchAddOrdersSyncOrderList implements Serializable { */ stp?: BatchAddOrdersSyncOrderList.StpEnum; /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ cancelAfter?: number; /** @@ -174,6 +184,14 @@ export class BatchAddOrdersSyncOrderList implements Serializable { * When **type** is market, select one out of two: size or funds */ funds?: string; + /** + * The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + */ + allowMaxTimeWindow?: number; + /** + * Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + */ + clientTimestamp?: number; }): BatchAddOrdersSyncOrderList { let obj = new BatchAddOrdersSyncOrderList(); obj.clientOid = data.clientOid; @@ -188,7 +206,11 @@ export class BatchAddOrdersSyncOrderList implements Serializable { obj.price = data.price; obj.size = data.size; obj.stp = data.stp; - obj.cancelAfter = data.cancelAfter; + if (data.cancelAfter) { + obj.cancelAfter = data.cancelAfter; + } else { + obj.cancelAfter = -1; + } if (data.postOnly) { obj.postOnly = data.postOnly; } else { @@ -208,6 +230,8 @@ export class BatchAddOrdersSyncOrderList implements Serializable { obj.tags = data.tags; obj.remark = data.remark; obj.funds = data.funds; + obj.allowMaxTimeWindow = data.allowMaxTimeWindow; + obj.clientTimestamp = data.clientTimestamp; return obj; } @@ -291,7 +315,7 @@ export class BatchAddOrdersSyncOrderListBuilder { this.obj = obj; } /** - * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. + * Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. */ setClientOid(value: string): BatchAddOrdersSyncOrderListBuilder { this.obj.clientOid = value; @@ -307,7 +331,7 @@ export class BatchAddOrdersSyncOrderListBuilder { } /** - * Specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ setType(value: BatchAddOrdersSyncOrderList.TypeEnum): BatchAddOrdersSyncOrderListBuilder { this.obj.type = value; @@ -325,7 +349,7 @@ export class BatchAddOrdersSyncOrderListBuilder { } /** - * Specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ setSide(value: BatchAddOrdersSyncOrderList.SideEnum): BatchAddOrdersSyncOrderListBuilder { this.obj.side = value; @@ -341,7 +365,7 @@ export class BatchAddOrdersSyncOrderListBuilder { } /** - * Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + * Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds */ setSize(value: string): BatchAddOrdersSyncOrderListBuilder { this.obj.size = value; @@ -357,7 +381,7 @@ export class BatchAddOrdersSyncOrderListBuilder { } /** - * Cancel after n seconds,the order timing strategy is GTT + * Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 */ setCancelAfter(value: number): BatchAddOrdersSyncOrderListBuilder { this.obj.cancelAfter = value; @@ -420,6 +444,22 @@ export class BatchAddOrdersSyncOrderListBuilder { return this; } + /** + * The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + */ + setAllowMaxTimeWindow(value: number): BatchAddOrdersSyncOrderListBuilder { + this.obj.allowMaxTimeWindow = value; + return this; + } + + /** + * Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + */ + setClientTimestamp(value: number): BatchAddOrdersSyncOrderListBuilder { + this.obj.clientTimestamp = value; + return this; + } + /** * Get the final object. */ diff --git a/sdk/node/src/generate/spot/order/model_batch_cancel_oco_orders_req.ts b/sdk/node/src/generate/spot/order/model_batch_cancel_oco_orders_req.ts index 602a5109..064c299e 100644 --- a/sdk/node/src/generate/spot/order/model_batch_cancel_oco_orders_req.ts +++ b/sdk/node/src/generate/spot/order/model_batch_cancel_oco_orders_req.ts @@ -5,12 +5,12 @@ import { Serializable } from '@internal/interfaces/serializable'; export class BatchCancelOcoOrdersReq implements Serializable { /** - * Specify the order id, there can be multiple orders, separated by commas. If not passed, all oco orders will be canceled by default. + * Specify the order ID; there can be multiple orders, separated by commas. If not passed, all OCO orders will be canceled by default. */ orderIds?: string; /** - * trading pair. If not passed, the oco orders of all symbols will be canceled by default. + * Trading pair. If not passed, the OCO orders of all symbols will be canceled by default. */ symbol?: string; @@ -31,11 +31,11 @@ export class BatchCancelOcoOrdersReq implements Serializable { */ static create(data: { /** - * Specify the order id, there can be multiple orders, separated by commas. If not passed, all oco orders will be canceled by default. + * Specify the order ID; there can be multiple orders, separated by commas. If not passed, all OCO orders will be canceled by default. */ orderIds?: string; /** - * trading pair. If not passed, the oco orders of all symbols will be canceled by default. + * Trading pair. If not passed, the OCO orders of all symbols will be canceled by default. */ symbol?: string; }): BatchCancelOcoOrdersReq { @@ -70,7 +70,7 @@ export class BatchCancelOcoOrdersReqBuilder { this.obj = obj; } /** - * Specify the order id, there can be multiple orders, separated by commas. If not passed, all oco orders will be canceled by default. + * Specify the order ID; there can be multiple orders, separated by commas. If not passed, all OCO orders will be canceled by default. */ setOrderIds(value: string): BatchCancelOcoOrdersReqBuilder { this.obj.orderIds = value; @@ -78,7 +78,7 @@ export class BatchCancelOcoOrdersReqBuilder { } /** - * trading pair. If not passed, the oco orders of all symbols will be canceled by default. + * Trading pair. If not passed, the OCO orders of all symbols will be canceled by default. */ setSymbol(value: string): BatchCancelOcoOrdersReqBuilder { this.obj.symbol = value; diff --git a/sdk/node/src/generate/spot/order/model_batch_cancel_stop_order_req.ts b/sdk/node/src/generate/spot/order/model_batch_cancel_stop_order_req.ts index 5ab4a4c9..ac733c96 100644 --- a/sdk/node/src/generate/spot/order/model_batch_cancel_stop_order_req.ts +++ b/sdk/node/src/generate/spot/order/model_batch_cancel_stop_order_req.ts @@ -10,7 +10,7 @@ export class BatchCancelStopOrderReq implements Serializable { symbol?: string; /** - * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE + * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). */ tradeType?: string; @@ -40,7 +40,7 @@ export class BatchCancelStopOrderReq implements Serializable { */ symbol?: string; /** - * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE + * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). */ tradeType?: string; /** @@ -88,7 +88,7 @@ export class BatchCancelStopOrderReqBuilder { } /** - * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE + * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). */ setTradeType(value: string): BatchCancelStopOrderReqBuilder { this.obj.tradeType = value; diff --git a/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_old_req.ts b/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_old_req.ts index 94e672c0..f661a951 100644 --- a/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_old_req.ts +++ b/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_old_req.ts @@ -5,11 +5,6 @@ import 'reflect-metadata'; import { Serializable } from '@internal/interfaces/serializable'; export class CancelOrderByClientOidOldReq implements Serializable { - /** - * symbol - */ - symbol?: string; - /** * Client Order Id,unique identifier created by the user */ @@ -32,17 +27,12 @@ export class CancelOrderByClientOidOldReq implements Serializable { * Creates a new instance of the `CancelOrderByClientOidOldReq` class with the given data. */ static create(data: { - /** - * symbol - */ - symbol?: string; /** * Client Order Id,unique identifier created by the user */ clientOid?: string; }): CancelOrderByClientOidOldReq { let obj = new CancelOrderByClientOidOldReq(); - obj.symbol = data.symbol; obj.clientOid = data.clientOid; return obj; } @@ -71,14 +61,6 @@ export class CancelOrderByClientOidOldReqBuilder { constructor(readonly obj: CancelOrderByClientOidOldReq) { this.obj = obj; } - /** - * symbol - */ - setSymbol(value: string): CancelOrderByClientOidOldReqBuilder { - this.obj.symbol = value; - return this; - } - /** * Client Order Id,unique identifier created by the user */ diff --git a/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_old_resp.ts b/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_old_resp.ts index a0345d9a..4bf49768 100644 --- a/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_old_resp.ts +++ b/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_old_resp.ts @@ -11,14 +11,14 @@ export class CancelOrderByClientOidOldResp implements Response { clientOid: string; /** - * + * The unique order id generated by the trading system */ cancelledOrderId: string; /** * */ - cancelledOcoOrderIds: string; + cancelledOcoOrderIds: Array; /** * Private constructor, please use the corresponding static methods to construct the object. diff --git a/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_sync_req.ts b/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_sync_req.ts index d48e1efa..d885b6a5 100644 --- a/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_sync_req.ts +++ b/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_sync_req.ts @@ -6,15 +6,15 @@ import { Serializable } from '@internal/interfaces/serializable'; export class CancelOrderByClientOidSyncReq implements Serializable { /** - * Client Order Id,unique identifier created by the user + * symbol */ - @Reflect.metadata('path', 'clientOid') - clientOid?: string; + symbol?: string; /** - * symbol + * Client Order Id,unique identifier created by the user */ - symbol?: string; + @Reflect.metadata('path', 'clientOid') + clientOid?: string; /** * Private constructor, please use the corresponding static methods to construct the object. @@ -32,18 +32,18 @@ export class CancelOrderByClientOidSyncReq implements Serializable { * Creates a new instance of the `CancelOrderByClientOidSyncReq` class with the given data. */ static create(data: { - /** - * Client Order Id,unique identifier created by the user - */ - clientOid?: string; /** * symbol */ symbol?: string; + /** + * Client Order Id,unique identifier created by the user + */ + clientOid?: string; }): CancelOrderByClientOidSyncReq { let obj = new CancelOrderByClientOidSyncReq(); - obj.clientOid = data.clientOid; obj.symbol = data.symbol; + obj.clientOid = data.clientOid; return obj; } @@ -72,18 +72,18 @@ export class CancelOrderByClientOidSyncReqBuilder { this.obj = obj; } /** - * Client Order Id,unique identifier created by the user + * symbol */ - setClientOid(value: string): CancelOrderByClientOidSyncReqBuilder { - this.obj.clientOid = value; + setSymbol(value: string): CancelOrderByClientOidSyncReqBuilder { + this.obj.symbol = value; return this; } /** - * symbol + * Client Order Id,unique identifier created by the user */ - setSymbol(value: string): CancelOrderByClientOidSyncReqBuilder { - this.obj.symbol = value; + setClientOid(value: string): CancelOrderByClientOidSyncReqBuilder { + this.obj.clientOid = value; return this; } diff --git a/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_sync_resp.ts b/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_sync_resp.ts index af320ad2..d67fa309 100644 --- a/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_sync_resp.ts +++ b/sdk/node/src/generate/spot/order/model_cancel_order_by_client_oid_sync_resp.ts @@ -85,11 +85,11 @@ export class CancelOrderByClientOidSyncResp implements Response { export namespace CancelOrderByClientOidSyncResp { export enum StatusEnum { /** - * + * order is active */ OPEN = 'open', /** - * + * order has been completed */ DONE = 'done', } diff --git a/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_old_req.ts b/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_old_req.ts index 10e71c8f..82afaf30 100644 --- a/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_old_req.ts +++ b/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_old_req.ts @@ -5,11 +5,6 @@ import 'reflect-metadata'; import { Serializable } from '@internal/interfaces/serializable'; export class CancelOrderByOrderIdOldReq implements Serializable { - /** - * symbol - */ - symbol?: string; - /** * The unique order id generated by the trading system */ @@ -32,17 +27,12 @@ export class CancelOrderByOrderIdOldReq implements Serializable { * Creates a new instance of the `CancelOrderByOrderIdOldReq` class with the given data. */ static create(data: { - /** - * symbol - */ - symbol?: string; /** * The unique order id generated by the trading system */ orderId?: string; }): CancelOrderByOrderIdOldReq { let obj = new CancelOrderByOrderIdOldReq(); - obj.symbol = data.symbol; obj.orderId = data.orderId; return obj; } @@ -71,14 +61,6 @@ export class CancelOrderByOrderIdOldReqBuilder { constructor(readonly obj: CancelOrderByOrderIdOldReq) { this.obj = obj; } - /** - * symbol - */ - setSymbol(value: string): CancelOrderByOrderIdOldReqBuilder { - this.obj.symbol = value; - return this; - } - /** * The unique order id generated by the trading system */ diff --git a/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_resp.ts b/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_resp.ts index a6f086af..0d365df3 100644 --- a/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_resp.ts +++ b/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class CancelOrderByOrderIdResp implements Response { /** - * order id + * Order id */ orderId: string; diff --git a/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_sync_req.ts b/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_sync_req.ts index 10c1df38..d17c4f2f 100644 --- a/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_sync_req.ts +++ b/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_sync_req.ts @@ -6,15 +6,15 @@ import { Serializable } from '@internal/interfaces/serializable'; export class CancelOrderByOrderIdSyncReq implements Serializable { /** - * The unique order id generated by the trading system + * symbol */ - @Reflect.metadata('path', 'orderId') - orderId?: string; + symbol?: string; /** - * symbol + * The unique order id generated by the trading system */ - symbol?: string; + @Reflect.metadata('path', 'orderId') + orderId?: string; /** * Private constructor, please use the corresponding static methods to construct the object. @@ -32,18 +32,18 @@ export class CancelOrderByOrderIdSyncReq implements Serializable { * Creates a new instance of the `CancelOrderByOrderIdSyncReq` class with the given data. */ static create(data: { - /** - * The unique order id generated by the trading system - */ - orderId?: string; /** * symbol */ symbol?: string; + /** + * The unique order id generated by the trading system + */ + orderId?: string; }): CancelOrderByOrderIdSyncReq { let obj = new CancelOrderByOrderIdSyncReq(); - obj.orderId = data.orderId; obj.symbol = data.symbol; + obj.orderId = data.orderId; return obj; } @@ -72,18 +72,18 @@ export class CancelOrderByOrderIdSyncReqBuilder { this.obj = obj; } /** - * The unique order id generated by the trading system + * symbol */ - setOrderId(value: string): CancelOrderByOrderIdSyncReqBuilder { - this.obj.orderId = value; + setSymbol(value: string): CancelOrderByOrderIdSyncReqBuilder { + this.obj.symbol = value; return this; } /** - * symbol + * The unique order id generated by the trading system */ - setSymbol(value: string): CancelOrderByOrderIdSyncReqBuilder { - this.obj.symbol = value; + setOrderId(value: string): CancelOrderByOrderIdSyncReqBuilder { + this.obj.orderId = value; return this; } diff --git a/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_sync_resp.ts b/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_sync_resp.ts index 488a6766..7c012d88 100644 --- a/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_sync_resp.ts +++ b/sdk/node/src/generate/spot/order/model_cancel_order_by_order_id_sync_resp.ts @@ -85,11 +85,11 @@ export class CancelOrderByOrderIdSyncResp implements Response { export namespace CancelOrderByOrderIdSyncResp { export enum StatusEnum { /** - * + * order is active */ OPEN = 'open', /** - * + * order has been completed */ DONE = 'done', } diff --git a/sdk/node/src/generate/spot/order/model_cancel_stop_order_by_order_id_resp.ts b/sdk/node/src/generate/spot/order/model_cancel_stop_order_by_order_id_resp.ts index 226cd704..03a3ce3e 100644 --- a/sdk/node/src/generate/spot/order/model_cancel_stop_order_by_order_id_resp.ts +++ b/sdk/node/src/generate/spot/order/model_cancel_stop_order_by_order_id_resp.ts @@ -6,7 +6,7 @@ import { Response } from '@internal/interfaces/serializable'; export class CancelStopOrderByOrderIdResp implements Response { /** - * order id array + * order ID array */ cancelledOrderIds: Array; diff --git a/sdk/node/src/generate/spot/order/model_get_dcp_resp.ts b/sdk/node/src/generate/spot/order/model_get_dcp_resp.ts index d6a8374a..db46dc0f 100644 --- a/sdk/node/src/generate/spot/order/model_get_dcp_resp.ts +++ b/sdk/node/src/generate/spot/order/model_get_dcp_resp.ts @@ -6,12 +6,12 @@ import { Response } from '@internal/interfaces/serializable'; export class GetDCPResp implements Response { /** - * Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400 + * Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400 */ timeout?: number; /** - * List of trading pairs. Separated by commas, empty means all trading pairs + * List of trading pairs. Separated by commas; empty means all trading pairs */ symbols?: string; diff --git a/sdk/node/src/generate/spot/order/model_get_oco_order_by_order_id_resp.ts b/sdk/node/src/generate/spot/order/model_get_oco_order_by_order_id_resp.ts index 468c306b..35be7042 100644 --- a/sdk/node/src/generate/spot/order/model_get_oco_order_by_order_id_resp.ts +++ b/sdk/node/src/generate/spot/order/model_get_oco_order_by_order_id_resp.ts @@ -11,12 +11,12 @@ export class GetOcoOrderByOrderIdResp implements Response { symbol: string; /** - * Client Order Id + * Client Order ID */ clientOid: string; /** - * The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + * The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. */ orderId: string; @@ -26,7 +26,7 @@ export class GetOcoOrderByOrderIdResp implements Response { orderTime: number; /** - * Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELLED: Cancelled + * Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELED: Canceled */ status: GetOcoOrderByOrderIdResp.StatusEnum; @@ -90,8 +90,8 @@ export namespace GetOcoOrderByOrderIdResp { */ TRIGGERED = 'TRIGGERED', /** - * Cancelled + * Canceled */ - CANCELLED = 'CANCELLED', + CANCELED = 'CANCELLED', } } diff --git a/sdk/node/src/generate/spot/order/model_get_oco_order_list_items.ts b/sdk/node/src/generate/spot/order/model_get_oco_order_list_items.ts index c50a40a6..ad59b1be 100644 --- a/sdk/node/src/generate/spot/order/model_get_oco_order_list_items.ts +++ b/sdk/node/src/generate/spot/order/model_get_oco_order_list_items.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetOcoOrderListItems implements Serializable { /** - * The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + * The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. */ orderId: string; @@ -15,7 +15,7 @@ export class GetOcoOrderListItems implements Serializable { symbol: string; /** - * Client Order Id + * Client Order ID */ clientOid: string; @@ -25,7 +25,7 @@ export class GetOcoOrderListItems implements Serializable { orderTime: number; /** - * Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELLED: Cancelled + * Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELED: Canceled */ status: GetOcoOrderListItems.StatusEnum; @@ -79,8 +79,8 @@ export namespace GetOcoOrderListItems { */ TRIGGERED = 'TRIGGERED', /** - * Cancelled + * Canceled */ - CANCELLED = 'CANCELLED', + CANCELED = 'CANCELLED', } } diff --git a/sdk/node/src/generate/spot/order/model_get_open_orders_by_page_items.ts b/sdk/node/src/generate/spot/order/model_get_open_orders_by_page_items.ts new file mode 100644 index 00000000..16a3eb85 --- /dev/null +++ b/sdk/node/src/generate/spot/order/model_get_open_orders_by_page_items.ts @@ -0,0 +1,321 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +import { instanceToPlain, plainToClassFromExist } from 'class-transformer'; +import { Serializable } from '@internal/interfaces/serializable'; + +export class GetOpenOrdersByPageItems implements Serializable { + /** + * The unique order id generated by the trading system + */ + id: string; + + /** + * symbol + */ + symbol: string; + + /** + * + */ + opType: string; + + /** + * Specify if the order is an \'limit\' order or \'market\' order. + */ + type: GetOpenOrdersByPageItems.TypeEnum; + + /** + * Buy or sell + */ + side: GetOpenOrdersByPageItems.SideEnum; + + /** + * Order price + */ + price: string; + + /** + * Order size + */ + size: string; + + /** + * Order Funds + */ + funds: string; + + /** + * Number of filled transactions + */ + dealSize: string; + + /** + * Funds of filled transactions + */ + dealFunds: string; + + /** + * [Handling fees](https://www.kucoin.com/docs-new/api-5327739) + */ + fee: string; + + /** + * currency used to calculate trading fee + */ + feeCurrency: string; + + /** + * [Self Trade Prevention](https://www.kucoin.com/docs-new/api-5176570) + */ + stp?: GetOpenOrdersByPageItems.StpEnum; + + /** + * Time in force + */ + timeInForce: GetOpenOrdersByPageItems.TimeInForceEnum; + + /** + * Whether its a postOnly order. + */ + postOnly: boolean; + + /** + * Whether its a hidden order. + */ + hidden: boolean; + + /** + * Whether its a iceberg order. + */ + iceberg: boolean; + + /** + * Visible size of iceberg order in order book. + */ + visibleSize: string; + + /** + * A GTT timeInForce that expires in n seconds + */ + cancelAfter: number; + + /** + * + */ + channel: string; + + /** + * Client Order Id,unique identifier created by the user + */ + clientOid: string; + + /** + * Order placement remarks + */ + remark?: string; + + /** + * Order tag + */ + tags?: string; + + /** + * Whether there is a cancellation record for the order. + */ + cancelExist: boolean; + + /** + * + */ + createdAt: number; + + /** + * + */ + lastUpdatedAt: number; + + /** + * Trade type, redundancy param + */ + tradeType: string; + + /** + * Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook + */ + inOrderBook: boolean; + + /** + * Number of canceled transactions + */ + cancelledSize: string; + + /** + * Funds of canceled transactions + */ + cancelledFunds: string; + + /** + * Number of remain transactions + */ + remainSize: string; + + /** + * Funds of remain transactions + */ + remainFunds: string; + + /** + * Users in some regions need query this field + */ + tax: string; + + /** + * Order status: true-The status of the order isactive; false-The status of the order is done + */ + active: boolean; + + /** + * Private constructor, please use the corresponding static methods to construct the object. + */ + private constructor() { + // @ts-ignore + this.id = null; + // @ts-ignore + this.symbol = null; + // @ts-ignore + this.opType = null; + // @ts-ignore + this.type = null; + // @ts-ignore + this.side = null; + // @ts-ignore + this.price = null; + // @ts-ignore + this.size = null; + // @ts-ignore + this.funds = null; + // @ts-ignore + this.dealSize = null; + // @ts-ignore + this.dealFunds = null; + // @ts-ignore + this.fee = null; + // @ts-ignore + this.feeCurrency = null; + // @ts-ignore + this.timeInForce = null; + // @ts-ignore + this.postOnly = null; + // @ts-ignore + this.hidden = null; + // @ts-ignore + this.iceberg = null; + // @ts-ignore + this.visibleSize = null; + // @ts-ignore + this.cancelAfter = null; + // @ts-ignore + this.channel = null; + // @ts-ignore + this.clientOid = null; + // @ts-ignore + this.cancelExist = null; + // @ts-ignore + this.createdAt = null; + // @ts-ignore + this.lastUpdatedAt = null; + // @ts-ignore + this.tradeType = null; + // @ts-ignore + this.inOrderBook = null; + // @ts-ignore + this.cancelledSize = null; + // @ts-ignore + this.cancelledFunds = null; + // @ts-ignore + this.remainSize = null; + // @ts-ignore + this.remainFunds = null; + // @ts-ignore + this.tax = null; + // @ts-ignore + this.active = null; + } + /** + * Convert the object to a JSON string. + */ + toJson(): string { + return JSON.stringify(instanceToPlain(this)); + } + /** + * Create an object from a JSON string. + */ + static fromJson(input: string): GetOpenOrdersByPageItems { + return this.fromObject(JSON.parse(input)); + } + /** + * Create an object from Js Object. + */ + static fromObject(jsonObject: Object): GetOpenOrdersByPageItems { + return plainToClassFromExist(new GetOpenOrdersByPageItems(), jsonObject); + } +} + +export namespace GetOpenOrdersByPageItems { + export enum TypeEnum { + /** + * + */ + LIMIT = 'limit', + /** + * + */ + MARKET = 'market', + } + export enum SideEnum { + /** + * + */ + BUY = 'buy', + /** + * + */ + SELL = 'sell', + } + export enum StpEnum { + /** + * + */ + DC = 'DC', + /** + * + */ + CO = 'CO', + /** + * + */ + CN = 'CN', + /** + * + */ + CB = 'CB', + } + export enum TimeInForceEnum { + /** + * + */ + GTC = 'GTC', + /** + * + */ + GTT = 'GTT', + /** + * + */ + IOC = 'IOC', + /** + * + */ + FOK = 'FOK', + } +} diff --git a/sdk/node/src/generate/spot/order/model_get_open_orders_by_page_req.ts b/sdk/node/src/generate/spot/order/model_get_open_orders_by_page_req.ts new file mode 100644 index 00000000..a0851d85 --- /dev/null +++ b/sdk/node/src/generate/spot/order/model_get_open_orders_by_page_req.ts @@ -0,0 +1,120 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +import { instanceToPlain, plainToClassFromExist } from 'class-transformer'; +import { Serializable } from '@internal/interfaces/serializable'; + +export class GetOpenOrdersByPageReq implements Serializable { + /** + * Symbol + */ + symbol?: string; + + /** + * Current page + */ + pageNum?: number = 1; + + /** + * Size per page + */ + pageSize?: number = 20; + + /** + * Private constructor, please use the corresponding static methods to construct the object. + */ + private constructor() {} + /** + * Creates a new instance of the `GetOpenOrdersByPageReq` class. + * The builder pattern allows step-by-step construction of a `GetOpenOrdersByPageReq` object. + */ + static builder(): GetOpenOrdersByPageReqBuilder { + return new GetOpenOrdersByPageReqBuilder(new GetOpenOrdersByPageReq()); + } + + /** + * Creates a new instance of the `GetOpenOrdersByPageReq` class with the given data. + */ + static create(data: { + /** + * Symbol + */ + symbol?: string; + /** + * Current page + */ + pageNum?: number; + /** + * Size per page + */ + pageSize?: number; + }): GetOpenOrdersByPageReq { + let obj = new GetOpenOrdersByPageReq(); + obj.symbol = data.symbol; + if (data.pageNum) { + obj.pageNum = data.pageNum; + } else { + obj.pageNum = 1; + } + if (data.pageSize) { + obj.pageSize = data.pageSize; + } else { + obj.pageSize = 20; + } + return obj; + } + + /** + * Convert the object to a JSON string. + */ + toJson(): string { + return JSON.stringify(instanceToPlain(this)); + } + /** + * Create an object from a JSON string. + */ + static fromJson(input: string): GetOpenOrdersByPageReq { + return this.fromObject(JSON.parse(input)); + } + /** + * Create an object from Js Object. + */ + static fromObject(jsonObject: Object): GetOpenOrdersByPageReq { + return plainToClassFromExist(new GetOpenOrdersByPageReq(), jsonObject); + } +} + +export class GetOpenOrdersByPageReqBuilder { + constructor(readonly obj: GetOpenOrdersByPageReq) { + this.obj = obj; + } + /** + * Symbol + */ + setSymbol(value: string): GetOpenOrdersByPageReqBuilder { + this.obj.symbol = value; + return this; + } + + /** + * Current page + */ + setPageNum(value: number): GetOpenOrdersByPageReqBuilder { + this.obj.pageNum = value; + return this; + } + + /** + * Size per page + */ + setPageSize(value: number): GetOpenOrdersByPageReqBuilder { + this.obj.pageSize = value; + return this; + } + + /** + * Get the final object. + */ + build(): GetOpenOrdersByPageReq { + return this.obj; + } +} diff --git a/sdk/node/src/generate/spot/order/model_get_open_orders_by_page_resp.ts b/sdk/node/src/generate/spot/order/model_get_open_orders_by_page_resp.ts new file mode 100644 index 00000000..e6d9f350 --- /dev/null +++ b/sdk/node/src/generate/spot/order/model_get_open_orders_by_page_resp.ts @@ -0,0 +1,78 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +import { GetOpenOrdersByPageItems } from './model_get_open_orders_by_page_items'; +import { Type, instanceToPlain, Exclude, plainToClassFromExist } from 'class-transformer'; +import { RestResponse } from '@model/common'; +import { Response } from '@internal/interfaces/serializable'; + +export class GetOpenOrdersByPageResp implements Response { + /** + * + */ + currentPage: number; + + /** + * + */ + pageSize: number; + + /** + * + */ + totalNum: number; + + /** + * + */ + totalPage: number; + + /** + * + */ + @Type(() => GetOpenOrdersByPageItems) + items: Array; + + /** + * Private constructor, please use the corresponding static methods to construct the object. + */ + private constructor() { + // @ts-ignore + this.currentPage = null; + // @ts-ignore + this.pageSize = null; + // @ts-ignore + this.totalNum = null; + // @ts-ignore + this.totalPage = null; + // @ts-ignore + this.items = null; + } + /** + * common response + */ + @Exclude() + commonResponse?: RestResponse; + + setCommonResponse(response: RestResponse): void { + this.commonResponse = response; + } + + /** + * Convert the object to a JSON string. + */ + toJson(): string { + return JSON.stringify(instanceToPlain(this)); + } + /** + * Create an object from a JSON string. + */ + static fromJson(input: string): GetOpenOrdersByPageResp { + return this.fromObject(JSON.parse(input)); + } + /** + * Create an object from Js Object. + */ + static fromObject(jsonObject: Object): GetOpenOrdersByPageResp { + return plainToClassFromExist(new GetOpenOrdersByPageResp(), jsonObject); + } +} diff --git a/sdk/node/src/generate/spot/order/model_get_order_by_client_oid_old_req.ts b/sdk/node/src/generate/spot/order/model_get_order_by_client_oid_old_req.ts index 9c907f7b..28e8555f 100644 --- a/sdk/node/src/generate/spot/order/model_get_order_by_client_oid_old_req.ts +++ b/sdk/node/src/generate/spot/order/model_get_order_by_client_oid_old_req.ts @@ -6,7 +6,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetOrderByClientOidOldReq implements Serializable { /** - * Unique order id created by users to identify their orders + * Unique order ID created by users to identify their orders */ @Reflect.metadata('path', 'clientOid') clientOid?: string; @@ -28,7 +28,7 @@ export class GetOrderByClientOidOldReq implements Serializable { */ static create(data: { /** - * Unique order id created by users to identify their orders + * Unique order ID created by users to identify their orders */ clientOid?: string; }): GetOrderByClientOidOldReq { @@ -62,7 +62,7 @@ export class GetOrderByClientOidOldReqBuilder { this.obj = obj; } /** - * Unique order id created by users to identify their orders + * Unique order ID created by users to identify their orders */ setClientOid(value: string): GetOrderByClientOidOldReqBuilder { this.obj.clientOid = value; diff --git a/sdk/node/src/generate/spot/order/model_get_order_by_client_oid_old_resp.ts b/sdk/node/src/generate/spot/order/model_get_order_by_client_oid_old_resp.ts index 8626cc05..075e7578 100644 --- a/sdk/node/src/generate/spot/order/model_get_order_by_client_oid_old_resp.ts +++ b/sdk/node/src/generate/spot/order/model_get_order_by_client_oid_old_resp.ts @@ -155,6 +155,21 @@ export class GetOrderByClientOidOldResp implements Response { */ tradeType: string; + /** + * + */ + tax?: string; + + /** + * + */ + taxRate?: string; + + /** + * + */ + taxCurrency?: string; + /** * Private constructor, please use the corresponding static methods to construct the object. */ diff --git a/sdk/node/src/generate/spot/order/model_get_order_by_order_id_old_resp.ts b/sdk/node/src/generate/spot/order/model_get_order_by_order_id_old_resp.ts index ca9fafb8..d3abc43e 100644 --- a/sdk/node/src/generate/spot/order/model_get_order_by_order_id_old_resp.ts +++ b/sdk/node/src/generate/spot/order/model_get_order_by_order_id_old_resp.ts @@ -155,6 +155,21 @@ export class GetOrderByOrderIdOldResp implements Response { */ tradeType: string; + /** + * + */ + tax?: string; + + /** + * + */ + taxRate?: string; + + /** + * + */ + taxCurrency?: string; + /** * Private constructor, please use the corresponding static methods to construct the object. */ diff --git a/sdk/node/src/generate/spot/order/model_get_orders_list_old_items.ts b/sdk/node/src/generate/spot/order/model_get_orders_list_old_items.ts index d1a424c3..19b09380 100644 --- a/sdk/node/src/generate/spot/order/model_get_orders_list_old_items.ts +++ b/sdk/node/src/generate/spot/order/model_get_orders_list_old_items.ts @@ -154,6 +154,21 @@ export class GetOrdersListOldItems implements Serializable { */ tradeType: string; + /** + * + */ + tax?: string; + + /** + * + */ + taxRate?: string; + + /** + * + */ + taxCurrency?: string; + /** * Private constructor, please use the corresponding static methods to construct the object. */ diff --git a/sdk/node/src/generate/spot/order/model_get_orders_list_old_req.ts b/sdk/node/src/generate/spot/order/model_get_orders_list_old_req.ts index 64150279..dfae6285 100644 --- a/sdk/node/src/generate/spot/order/model_get_orders_list_old_req.ts +++ b/sdk/node/src/generate/spot/order/model_get_orders_list_old_req.ts @@ -5,37 +5,37 @@ import { Serializable } from '@internal/interfaces/serializable'; export class GetOrdersListOldReq implements Serializable { /** - * symbol + * Symbol */ symbol?: string; /** - * active or done(done as default), Only list orders with a specific status . + * Active or done (done as default); only list orders with a specific status. */ status?: GetOrdersListOldReq.StatusEnum = GetOrdersListOldReq.StatusEnum.DONE; /** - * buy or sell + * Buy or Sell */ side?: GetOrdersListOldReq.SideEnum; /** - * limit, market, limit_stop or market_stop + * Order type */ type?: GetOrdersListOldReq.TypeEnum; /** - * The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. + * The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. */ tradeType?: GetOrdersListOldReq.TradeTypeEnum = GetOrdersListOldReq.TradeTypeEnum.TRADE; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; @@ -66,31 +66,31 @@ export class GetOrdersListOldReq implements Serializable { */ static create(data: { /** - * symbol + * Symbol */ symbol?: string; /** - * active or done(done as default), Only list orders with a specific status . + * Active or done (done as default); only list orders with a specific status. */ status?: GetOrdersListOldReq.StatusEnum; /** - * buy or sell + * Buy or Sell */ side?: GetOrdersListOldReq.SideEnum; /** - * limit, market, limit_stop or market_stop + * Order type */ type?: GetOrdersListOldReq.TypeEnum; /** - * The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. + * The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. */ tradeType?: GetOrdersListOldReq.TradeTypeEnum; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** @@ -189,6 +189,14 @@ export namespace GetOrdersListOldReq { * market_stop */ MARKET_STOP = 'market_stop', + /** + * oco_limit + */ + OCO_LIMIT = 'oco_limit', + /** + * oco_stop + */ + OCO_STOP = 'oco_stop', } export enum TradeTypeEnum { /** @@ -211,7 +219,7 @@ export class GetOrdersListOldReqBuilder { this.obj = obj; } /** - * symbol + * Symbol */ setSymbol(value: string): GetOrdersListOldReqBuilder { this.obj.symbol = value; @@ -219,7 +227,7 @@ export class GetOrdersListOldReqBuilder { } /** - * active or done(done as default), Only list orders with a specific status . + * Active or done (done as default); only list orders with a specific status. */ setStatus(value: GetOrdersListOldReq.StatusEnum): GetOrdersListOldReqBuilder { this.obj.status = value; @@ -227,7 +235,7 @@ export class GetOrdersListOldReqBuilder { } /** - * buy or sell + * Buy or Sell */ setSide(value: GetOrdersListOldReq.SideEnum): GetOrdersListOldReqBuilder { this.obj.side = value; @@ -235,7 +243,7 @@ export class GetOrdersListOldReqBuilder { } /** - * limit, market, limit_stop or market_stop + * Order type */ setType(value: GetOrdersListOldReq.TypeEnum): GetOrdersListOldReqBuilder { this.obj.type = value; @@ -243,7 +251,7 @@ export class GetOrdersListOldReqBuilder { } /** - * The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. + * The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. */ setTradeType(value: GetOrdersListOldReq.TradeTypeEnum): GetOrdersListOldReqBuilder { this.obj.tradeType = value; @@ -251,7 +259,7 @@ export class GetOrdersListOldReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetOrdersListOldReqBuilder { this.obj.startAt = value; @@ -259,7 +267,7 @@ export class GetOrdersListOldReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetOrdersListOldReqBuilder { this.obj.endAt = value; diff --git a/sdk/node/src/generate/spot/order/model_get_recent_orders_list_old_data.ts b/sdk/node/src/generate/spot/order/model_get_recent_orders_list_old_data.ts index 9b044f36..0eb8489c 100644 --- a/sdk/node/src/generate/spot/order/model_get_recent_orders_list_old_data.ts +++ b/sdk/node/src/generate/spot/order/model_get_recent_orders_list_old_data.ts @@ -154,6 +154,21 @@ export class GetRecentOrdersListOldData implements Serializable { */ tradeType: string; + /** + * + */ + tax?: string; + + /** + * + */ + taxRate?: string; + + /** + * + */ + taxCurrency?: string; + /** * Private constructor, please use the corresponding static methods to construct the object. */ diff --git a/sdk/node/src/generate/spot/order/model_get_recent_orders_list_old_req.ts b/sdk/node/src/generate/spot/order/model_get_recent_orders_list_old_req.ts deleted file mode 100644 index 8b5096f3..00000000 --- a/sdk/node/src/generate/spot/order/model_get_recent_orders_list_old_req.ts +++ /dev/null @@ -1,102 +0,0 @@ -// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. - -import { instanceToPlain, plainToClassFromExist } from 'class-transformer'; -import { Serializable } from '@internal/interfaces/serializable'; - -export class GetRecentOrdersListOldReq implements Serializable { - /** - * Current request page. - */ - currentPage?: number = 1; - - /** - * Number of results per request. Minimum is 10, maximum is 500. - */ - pageSize?: number = 50; - - /** - * Private constructor, please use the corresponding static methods to construct the object. - */ - private constructor() {} - /** - * Creates a new instance of the `GetRecentOrdersListOldReq` class. - * The builder pattern allows step-by-step construction of a `GetRecentOrdersListOldReq` object. - */ - static builder(): GetRecentOrdersListOldReqBuilder { - return new GetRecentOrdersListOldReqBuilder(new GetRecentOrdersListOldReq()); - } - - /** - * Creates a new instance of the `GetRecentOrdersListOldReq` class with the given data. - */ - static create(data: { - /** - * Current request page. - */ - currentPage?: number; - /** - * Number of results per request. Minimum is 10, maximum is 500. - */ - pageSize?: number; - }): GetRecentOrdersListOldReq { - let obj = new GetRecentOrdersListOldReq(); - if (data.currentPage) { - obj.currentPage = data.currentPage; - } else { - obj.currentPage = 1; - } - if (data.pageSize) { - obj.pageSize = data.pageSize; - } else { - obj.pageSize = 50; - } - return obj; - } - - /** - * Convert the object to a JSON string. - */ - toJson(): string { - return JSON.stringify(instanceToPlain(this)); - } - /** - * Create an object from a JSON string. - */ - static fromJson(input: string): GetRecentOrdersListOldReq { - return this.fromObject(JSON.parse(input)); - } - /** - * Create an object from Js Object. - */ - static fromObject(jsonObject: Object): GetRecentOrdersListOldReq { - return plainToClassFromExist(new GetRecentOrdersListOldReq(), jsonObject); - } -} - -export class GetRecentOrdersListOldReqBuilder { - constructor(readonly obj: GetRecentOrdersListOldReq) { - this.obj = obj; - } - /** - * Current request page. - */ - setCurrentPage(value: number): GetRecentOrdersListOldReqBuilder { - this.obj.currentPage = value; - return this; - } - - /** - * Number of results per request. Minimum is 10, maximum is 500. - */ - setPageSize(value: number): GetRecentOrdersListOldReqBuilder { - this.obj.pageSize = value; - return this; - } - - /** - * Get the final object. - */ - build(): GetRecentOrdersListOldReq { - return this.obj; - } -} diff --git a/sdk/node/src/generate/spot/order/model_get_recent_trade_history_old_data.ts b/sdk/node/src/generate/spot/order/model_get_recent_trade_history_old_data.ts index 9dad07d2..99ca17b1 100644 --- a/sdk/node/src/generate/spot/order/model_get_recent_trade_history_old_data.ts +++ b/sdk/node/src/generate/spot/order/model_get_recent_trade_history_old_data.ts @@ -7,92 +7,142 @@ export class GetRecentTradeHistoryOldData implements Serializable { /** * */ - symbol?: string; + symbol: string; /** * */ - tradeId?: string; + tradeId: string; /** * */ - orderId?: string; + orderId: string; /** * */ - counterOrderId?: string; + counterOrderId: string; /** * */ - side?: string; + side: string; /** * */ - liquidity?: string; + liquidity: string; /** * */ - forceTaker?: boolean; + forceTaker: boolean; /** * */ - price?: string; + price: string; /** * */ - size?: string; + size: string; /** * */ - funds?: string; + funds: string; /** * */ - fee?: string; + fee: string; /** * */ - feeRate?: string; + feeRate: string; /** * */ - feeCurrency?: string; + feeCurrency: string; /** * */ - stop?: string; + stop: string; /** * */ - tradeType?: string; + tradeType: string; /** * */ - type?: string; + type: string; /** * */ - createdAt?: number; + createdAt: number; + + /** + * + */ + tax?: string; + + /** + * + */ + taxCurrency?: string; + + /** + * + */ + taxRate?: string; /** * Private constructor, please use the corresponding static methods to construct the object. */ - private constructor() {} + private constructor() { + // @ts-ignore + this.symbol = null; + // @ts-ignore + this.tradeId = null; + // @ts-ignore + this.orderId = null; + // @ts-ignore + this.counterOrderId = null; + // @ts-ignore + this.side = null; + // @ts-ignore + this.liquidity = null; + // @ts-ignore + this.forceTaker = null; + // @ts-ignore + this.price = null; + // @ts-ignore + this.size = null; + // @ts-ignore + this.funds = null; + // @ts-ignore + this.fee = null; + // @ts-ignore + this.feeRate = null; + // @ts-ignore + this.feeCurrency = null; + // @ts-ignore + this.stop = null; + // @ts-ignore + this.tradeType = null; + // @ts-ignore + this.type = null; + // @ts-ignore + this.createdAt = null; + } /** * Convert the object to a JSON string. */ diff --git a/sdk/node/src/generate/spot/order/model_get_recent_trade_history_old_req.ts b/sdk/node/src/generate/spot/order/model_get_recent_trade_history_old_req.ts deleted file mode 100644 index 14f108a0..00000000 --- a/sdk/node/src/generate/spot/order/model_get_recent_trade_history_old_req.ts +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. - -import { instanceToPlain, plainToClassFromExist } from 'class-transformer'; -import { Serializable } from '@internal/interfaces/serializable'; - -export class GetRecentTradeHistoryOldReq implements Serializable { - /** - * Current request page. - */ - currentPage?: number = 1; - - /** - * Number of results per request. Minimum is 10, maximum is 500. - */ - pageSize?: number; - - /** - * Private constructor, please use the corresponding static methods to construct the object. - */ - private constructor() {} - /** - * Creates a new instance of the `GetRecentTradeHistoryOldReq` class. - * The builder pattern allows step-by-step construction of a `GetRecentTradeHistoryOldReq` object. - */ - static builder(): GetRecentTradeHistoryOldReqBuilder { - return new GetRecentTradeHistoryOldReqBuilder(new GetRecentTradeHistoryOldReq()); - } - - /** - * Creates a new instance of the `GetRecentTradeHistoryOldReq` class with the given data. - */ - static create(data: { - /** - * Current request page. - */ - currentPage?: number; - /** - * Number of results per request. Minimum is 10, maximum is 500. - */ - pageSize?: number; - }): GetRecentTradeHistoryOldReq { - let obj = new GetRecentTradeHistoryOldReq(); - if (data.currentPage) { - obj.currentPage = data.currentPage; - } else { - obj.currentPage = 1; - } - obj.pageSize = data.pageSize; - return obj; - } - - /** - * Convert the object to a JSON string. - */ - toJson(): string { - return JSON.stringify(instanceToPlain(this)); - } - /** - * Create an object from a JSON string. - */ - static fromJson(input: string): GetRecentTradeHistoryOldReq { - return this.fromObject(JSON.parse(input)); - } - /** - * Create an object from Js Object. - */ - static fromObject(jsonObject: Object): GetRecentTradeHistoryOldReq { - return plainToClassFromExist(new GetRecentTradeHistoryOldReq(), jsonObject); - } -} - -export class GetRecentTradeHistoryOldReqBuilder { - constructor(readonly obj: GetRecentTradeHistoryOldReq) { - this.obj = obj; - } - /** - * Current request page. - */ - setCurrentPage(value: number): GetRecentTradeHistoryOldReqBuilder { - this.obj.currentPage = value; - return this; - } - - /** - * Number of results per request. Minimum is 10, maximum is 500. - */ - setPageSize(value: number): GetRecentTradeHistoryOldReqBuilder { - this.obj.pageSize = value; - return this; - } - - /** - * Get the final object. - */ - build(): GetRecentTradeHistoryOldReq { - return this.obj; - } -} diff --git a/sdk/node/src/generate/spot/order/model_get_stop_order_by_client_oid_data.ts b/sdk/node/src/generate/spot/order/model_get_stop_order_by_client_oid_data.ts index ba232972..408423e1 100644 --- a/sdk/node/src/generate/spot/order/model_get_stop_order_by_client_oid_data.ts +++ b/sdk/node/src/generate/spot/order/model_get_stop_order_by_client_oid_data.ts @@ -25,9 +25,9 @@ export class GetStopOrderByClientOidData implements Serializable { status?: string; /** - * Order type,limit, market, limit_stop or market_stop + * Order type */ - type?: string; + type?: GetStopOrderByClientOidData.TypeEnum; /** * transaction direction,include buy and sell @@ -182,3 +182,16 @@ export class GetStopOrderByClientOidData implements Serializable { return plainToClassFromExist(new GetStopOrderByClientOidData(), jsonObject); } } + +export namespace GetStopOrderByClientOidData { + export enum TypeEnum { + /** + * Limit order + */ + LIMIT = 'limit', + /** + * Market order + */ + MARKET = 'market', + } +} diff --git a/sdk/node/src/generate/spot/order/model_get_stop_order_by_order_id_resp.ts b/sdk/node/src/generate/spot/order/model_get_stop_order_by_order_id_resp.ts index b5978088..36bd97bf 100644 --- a/sdk/node/src/generate/spot/order/model_get_stop_order_by_order_id_resp.ts +++ b/sdk/node/src/generate/spot/order/model_get_stop_order_by_order_id_resp.ts @@ -26,9 +26,9 @@ export class GetStopOrderByOrderIdResp implements Response { status?: string; /** - * Order type,limit, market, limit_stop or market_stop + * Order type */ - type?: string; + type?: GetStopOrderByOrderIdResp.TypeEnum; /** * transaction direction,include buy and sell @@ -193,3 +193,16 @@ export class GetStopOrderByOrderIdResp implements Response { return plainToClassFromExist(new GetStopOrderByOrderIdResp(), jsonObject); } } + +export namespace GetStopOrderByOrderIdResp { + export enum TypeEnum { + /** + * Limit order + */ + LIMIT = 'limit', + /** + * Market order + */ + MARKET = 'market', + } +} diff --git a/sdk/node/src/generate/spot/order/model_get_stop_orders_list_items.ts b/sdk/node/src/generate/spot/order/model_get_stop_orders_list_items.ts index fcbf9171..0f4e3d31 100644 --- a/sdk/node/src/generate/spot/order/model_get_stop_orders_list_items.ts +++ b/sdk/node/src/generate/spot/order/model_get_stop_orders_list_items.ts @@ -7,42 +7,42 @@ export class GetStopOrdersListItems implements Serializable { /** * Order ID, the ID of an order. */ - id?: string; + id: string; /** * Symbol name */ - symbol?: string; + symbol: string; /** * User ID */ - userId?: string; + userId: string; /** * Order status, include NEW, TRIGGERED */ - status?: string; + status: string; /** - * Order type,limit, market, limit_stop or market_stop + * Order type */ - type?: string; + type: GetStopOrdersListItems.TypeEnum; /** * transaction direction,include buy and sell */ - side?: string; + side: string; /** * order price */ - price?: string; + price: string; /** * order quantity */ - size?: string; + size: string; /** * order funds @@ -57,27 +57,27 @@ export class GetStopOrdersListItems implements Serializable { /** * time InForce,include GTC,GTT,IOC,FOK */ - timeInForce?: string; + timeInForce: string; /** * cancel orders after n seconds,requires timeInForce to be GTT */ - cancelAfter?: number; + cancelAfter: number; /** * postOnly */ - postOnly?: boolean; + postOnly: boolean; /** * hidden order */ - hidden?: boolean; + hidden: boolean; /** * Iceberg order */ - iceberg?: boolean; + iceberg: boolean; /** * displayed quantity for iceberg order @@ -87,17 +87,17 @@ export class GetStopOrdersListItems implements Serializable { /** * order source */ - channel?: string; + channel: string; /** * user-entered order unique mark */ - clientOid?: string; + clientOid: string; /** * Remarks at stop order creation */ - remark?: string; + remark: string; /** * tag order source @@ -107,47 +107,47 @@ export class GetStopOrdersListItems implements Serializable { /** * Time of place a stop order, accurate to nanoseconds */ - orderTime?: number; + orderTime: number; /** * domainId, e.g: kucoin */ - domainId?: string; + domainId: string; /** * trade source: USER(Order by user), MARGIN_SYSTEM(Order by margin system) */ - tradeSource?: string; + tradeSource: string; /** * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). */ - tradeType?: string; + tradeType: string; /** * The currency of the fee */ - feeCurrency?: string; + feeCurrency: string; /** * Fee Rate of taker */ - takerFeeRate?: string; + takerFeeRate: string; /** * Fee Rate of maker */ - makerFeeRate?: string; + makerFeeRate: string; /** * order creation time */ - createdAt?: number; + createdAt: number; /** * Stop order type, include loss and entry */ - stop?: string; + stop: string; /** * The trigger time of the stop order @@ -157,12 +157,85 @@ export class GetStopOrdersListItems implements Serializable { /** * stop price */ - stopPrice?: string; + stopPrice: string; + + /** + * + */ + relatedNo?: string; + + /** + * + */ + limitPrice?: string; + + /** + * + */ + pop?: string; + + /** + * + */ + activateCondition?: string; /** * Private constructor, please use the corresponding static methods to construct the object. */ - private constructor() {} + private constructor() { + // @ts-ignore + this.id = null; + // @ts-ignore + this.symbol = null; + // @ts-ignore + this.userId = null; + // @ts-ignore + this.status = null; + // @ts-ignore + this.type = null; + // @ts-ignore + this.side = null; + // @ts-ignore + this.price = null; + // @ts-ignore + this.size = null; + // @ts-ignore + this.timeInForce = null; + // @ts-ignore + this.cancelAfter = null; + // @ts-ignore + this.postOnly = null; + // @ts-ignore + this.hidden = null; + // @ts-ignore + this.iceberg = null; + // @ts-ignore + this.channel = null; + // @ts-ignore + this.clientOid = null; + // @ts-ignore + this.remark = null; + // @ts-ignore + this.orderTime = null; + // @ts-ignore + this.domainId = null; + // @ts-ignore + this.tradeSource = null; + // @ts-ignore + this.tradeType = null; + // @ts-ignore + this.feeCurrency = null; + // @ts-ignore + this.takerFeeRate = null; + // @ts-ignore + this.makerFeeRate = null; + // @ts-ignore + this.createdAt = null; + // @ts-ignore + this.stop = null; + // @ts-ignore + this.stopPrice = null; + } /** * Convert the object to a JSON string. */ @@ -182,3 +255,16 @@ export class GetStopOrdersListItems implements Serializable { return plainToClassFromExist(new GetStopOrdersListItems(), jsonObject); } } + +export namespace GetStopOrdersListItems { + export enum TypeEnum { + /** + * Limit order + */ + LIMIT = 'limit', + /** + * Market order + */ + MARKET = 'market', + } +} diff --git a/sdk/node/src/generate/spot/order/model_get_stop_orders_list_req.ts b/sdk/node/src/generate/spot/order/model_get_stop_orders_list_req.ts index f557397c..a2deb356 100644 --- a/sdk/node/src/generate/spot/order/model_get_stop_orders_list_req.ts +++ b/sdk/node/src/generate/spot/order/model_get_stop_orders_list_req.ts @@ -12,17 +12,17 @@ export class GetStopOrdersListReq implements Serializable { /** * buy or sell */ - side?: GetStopOrdersListReq.SideEnum; + side?: string; /** - * limit, market, limit_stop or market_stop + * limit, market */ type?: GetStopOrdersListReq.TypeEnum; /** * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE */ - tradeType?: GetStopOrdersListReq.TradeTypeEnum; + tradeType?: string; /** * Start time (milisecond) @@ -35,19 +35,19 @@ export class GetStopOrdersListReq implements Serializable { endAt?: number; /** - * current page + * Current page */ - currentPage?: number; + currentPage?: number = 1; /** - * comma seperated order ID list + * Comma seperated order ID list */ orderIds?: string; /** - * page size + * Page size */ - pageSize?: number; + pageSize?: number = 50; /** * Order type: stop: stop loss order, oco: oco order @@ -77,15 +77,15 @@ export class GetStopOrdersListReq implements Serializable { /** * buy or sell */ - side?: GetStopOrdersListReq.SideEnum; + side?: string; /** - * limit, market, limit_stop or market_stop + * limit, market */ type?: GetStopOrdersListReq.TypeEnum; /** * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE */ - tradeType?: GetStopOrdersListReq.TradeTypeEnum; + tradeType?: string; /** * Start time (milisecond) */ @@ -95,15 +95,15 @@ export class GetStopOrdersListReq implements Serializable { */ endAt?: number; /** - * current page + * Current page */ currentPage?: number; /** - * comma seperated order ID list + * Comma seperated order ID list */ orderIds?: string; /** - * page size + * Page size */ pageSize?: number; /** @@ -118,9 +118,17 @@ export class GetStopOrdersListReq implements Serializable { obj.tradeType = data.tradeType; obj.startAt = data.startAt; obj.endAt = data.endAt; - obj.currentPage = data.currentPage; + if (data.currentPage) { + obj.currentPage = data.currentPage; + } else { + obj.currentPage = 1; + } obj.orderIds = data.orderIds; - obj.pageSize = data.pageSize; + if (data.pageSize) { + obj.pageSize = data.pageSize; + } else { + obj.pageSize = 50; + } obj.stop = data.stop; return obj; } @@ -146,47 +154,15 @@ export class GetStopOrdersListReq implements Serializable { } export namespace GetStopOrdersListReq { - export enum SideEnum { - /** - * - */ - BUY = 'buy', - /** - * - */ - SELL = 'sell', - } export enum TypeEnum { /** - * + * limit order */ LIMIT = 'limit', /** - * + * market order */ MARKET = 'market', - /** - * - */ - LIMIT_STOP = 'limit_stop', - /** - * - */ - MARKET_STOP = 'market_stop', - } - export enum TradeTypeEnum { - /** - * - */ - TRADE = 'TRADE', - /** - * - */ - MARGIN_TRADE = 'MARGIN_TRADE', - /** - * - */ - MARGIN_ISOLATED_TRADE = 'MARGIN_ISOLATED_TRADE', } } @@ -205,13 +181,13 @@ export class GetStopOrdersListReqBuilder { /** * buy or sell */ - setSide(value: GetStopOrdersListReq.SideEnum): GetStopOrdersListReqBuilder { + setSide(value: string): GetStopOrdersListReqBuilder { this.obj.side = value; return this; } /** - * limit, market, limit_stop or market_stop + * limit, market */ setType(value: GetStopOrdersListReq.TypeEnum): GetStopOrdersListReqBuilder { this.obj.type = value; @@ -221,7 +197,7 @@ export class GetStopOrdersListReqBuilder { /** * The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE */ - setTradeType(value: GetStopOrdersListReq.TradeTypeEnum): GetStopOrdersListReqBuilder { + setTradeType(value: string): GetStopOrdersListReqBuilder { this.obj.tradeType = value; return this; } @@ -243,7 +219,7 @@ export class GetStopOrdersListReqBuilder { } /** - * current page + * Current page */ setCurrentPage(value: number): GetStopOrdersListReqBuilder { this.obj.currentPage = value; @@ -251,7 +227,7 @@ export class GetStopOrdersListReqBuilder { } /** - * comma seperated order ID list + * Comma seperated order ID list */ setOrderIds(value: string): GetStopOrdersListReqBuilder { this.obj.orderIds = value; @@ -259,7 +235,7 @@ export class GetStopOrdersListReqBuilder { } /** - * page size + * Page size */ setPageSize(value: number): GetStopOrdersListReqBuilder { this.obj.pageSize = value; diff --git a/sdk/node/src/generate/spot/order/model_get_stop_orders_list_resp.ts b/sdk/node/src/generate/spot/order/model_get_stop_orders_list_resp.ts index 235b7545..aa771cb2 100644 --- a/sdk/node/src/generate/spot/order/model_get_stop_orders_list_resp.ts +++ b/sdk/node/src/generate/spot/order/model_get_stop_orders_list_resp.ts @@ -9,33 +9,44 @@ export class GetStopOrdersListResp implements Response { /** * current page id */ - currentPage?: number; + currentPage: number; /** * */ - pageSize?: number; + pageSize: number; /** * the stop order count */ - totalNum?: number; + totalNum: number; /** * total page count of the list */ - totalPage?: number; + totalPage: number; /** * the list of stop orders */ @Type(() => GetStopOrdersListItems) - items?: Array; + items: Array; /** * Private constructor, please use the corresponding static methods to construct the object. */ - private constructor() {} + private constructor() { + // @ts-ignore + this.currentPage = null; + // @ts-ignore + this.pageSize = null; + // @ts-ignore + this.totalNum = null; + // @ts-ignore + this.totalPage = null; + // @ts-ignore + this.items = null; + } /** * common response */ diff --git a/sdk/node/src/generate/spot/order/model_get_trade_history_old_items.ts b/sdk/node/src/generate/spot/order/model_get_trade_history_old_items.ts index d3cb6a72..5501cfa1 100644 --- a/sdk/node/src/generate/spot/order/model_get_trade_history_old_items.ts +++ b/sdk/node/src/generate/spot/order/model_get_trade_history_old_items.ts @@ -20,7 +20,7 @@ export class GetTradeHistoryOldItems implements Serializable { orderId?: string; /** - * Counterparty order Id + * Counterparty order ID */ counterOrderId?: string; @@ -40,12 +40,12 @@ export class GetTradeHistoryOldItems implements Serializable { forceTaker?: boolean; /** - * Order price + * Order Price */ price?: string; /** - * Order size + * Order Size */ size?: string; @@ -65,7 +65,7 @@ export class GetTradeHistoryOldItems implements Serializable { feeRate?: string; /** - * currency used to calculate trading fee + * Currency used to calculate trading fee */ feeCurrency?: string; @@ -80,7 +80,7 @@ export class GetTradeHistoryOldItems implements Serializable { tradeType?: string; /** - * Specify if the order is an \'limit\' order or \'market\' order. + * Specify if the order is a \'limit\' order or \'market\' order. */ type?: string; diff --git a/sdk/node/src/generate/spot/order/model_get_trade_history_old_req.ts b/sdk/node/src/generate/spot/order/model_get_trade_history_old_req.ts index 44974550..1dfd875d 100644 --- a/sdk/node/src/generate/spot/order/model_get_trade_history_old_req.ts +++ b/sdk/node/src/generate/spot/order/model_get_trade_history_old_req.ts @@ -10,12 +10,12 @@ export class GetTradeHistoryOldReq implements Serializable { symbol?: string; /** - * The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters) + * The unique order ID generated by the trading system. (If orderId is specified, please ignore the other query parameters.) */ orderId?: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side?: GetTradeHistoryOldReq.SideEnum; @@ -25,17 +25,17 @@ export class GetTradeHistoryOldReq implements Serializable { type?: GetTradeHistoryOldReq.TypeEnum; /** - * The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. + * The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. */ tradeType?: GetTradeHistoryOldReq.TradeTypeEnum = GetTradeHistoryOldReq.TradeTypeEnum.TRADE; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; @@ -70,11 +70,11 @@ export class GetTradeHistoryOldReq implements Serializable { */ symbol?: string; /** - * The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters) + * The unique order ID generated by the trading system. (If orderId is specified, please ignore the other query parameters.) */ orderId?: string; /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ side?: GetTradeHistoryOldReq.SideEnum; /** @@ -82,15 +82,15 @@ export class GetTradeHistoryOldReq implements Serializable { */ type?: GetTradeHistoryOldReq.TypeEnum; /** - * The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. + * The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. */ tradeType?: GetTradeHistoryOldReq.TradeTypeEnum; /** - * Start time (milisecond) + * Start time (milliseconds) */ startAt?: number; /** - * End time (milisecond) + * End time (milliseconds) */ endAt?: number; /** @@ -201,7 +201,7 @@ export class GetTradeHistoryOldReqBuilder { } /** - * The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters) + * The unique order ID generated by the trading system. (If orderId is specified, please ignore the other query parameters.) */ setOrderId(value: string): GetTradeHistoryOldReqBuilder { this.obj.orderId = value; @@ -209,7 +209,7 @@ export class GetTradeHistoryOldReqBuilder { } /** - * specify if the order is to \'buy\' or \'sell\' + * Specify if the order is to \'buy\' or \'sell\'. */ setSide(value: GetTradeHistoryOldReq.SideEnum): GetTradeHistoryOldReqBuilder { this.obj.side = value; @@ -225,7 +225,7 @@ export class GetTradeHistoryOldReqBuilder { } /** - * The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. + * The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. */ setTradeType(value: GetTradeHistoryOldReq.TradeTypeEnum): GetTradeHistoryOldReqBuilder { this.obj.tradeType = value; @@ -233,7 +233,7 @@ export class GetTradeHistoryOldReqBuilder { } /** - * Start time (milisecond) + * Start time (milliseconds) */ setStartAt(value: number): GetTradeHistoryOldReqBuilder { this.obj.startAt = value; @@ -241,7 +241,7 @@ export class GetTradeHistoryOldReqBuilder { } /** - * End time (milisecond) + * End time (milliseconds) */ setEndAt(value: number): GetTradeHistoryOldReqBuilder { this.obj.endAt = value; diff --git a/sdk/node/src/generate/spot/order/model_modify_order_req.ts b/sdk/node/src/generate/spot/order/model_modify_order_req.ts index 9f93b811..eaaff3ad 100644 --- a/sdk/node/src/generate/spot/order/model_modify_order_req.ts +++ b/sdk/node/src/generate/spot/order/model_modify_order_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class ModifyOrderReq implements Serializable { /** - * The old client order id,orderId and clientOid must choose one + * One must be chose out of the old client order ID, orderId and clientOid */ clientOid?: string; @@ -15,17 +15,17 @@ export class ModifyOrderReq implements Serializable { symbol: string; /** - * The old order id, orderId and clientOid must choose one + * One must be chosen out of the old order id, orderId and clientOid */ orderId?: string; /** - * The modified price of the new order, newPrice and newSize must choose one + * One must be chosen out of the modified price of the new order, newPrice and newSize */ newPrice?: string; /** - * The modified size of the new order, newPrice and newSize must choose one + * One must be chosen out of the modified size of the new order, newPrice and newSize */ newSize?: string; @@ -49,7 +49,7 @@ export class ModifyOrderReq implements Serializable { */ static create(data: { /** - * The old client order id,orderId and clientOid must choose one + * One must be chose out of the old client order ID, orderId and clientOid */ clientOid?: string; /** @@ -57,15 +57,15 @@ export class ModifyOrderReq implements Serializable { */ symbol: string; /** - * The old order id, orderId and clientOid must choose one + * One must be chosen out of the old order id, orderId and clientOid */ orderId?: string; /** - * The modified price of the new order, newPrice and newSize must choose one + * One must be chosen out of the modified price of the new order, newPrice and newSize */ newPrice?: string; /** - * The modified size of the new order, newPrice and newSize must choose one + * One must be chosen out of the modified size of the new order, newPrice and newSize */ newSize?: string; }): ModifyOrderReq { @@ -103,7 +103,7 @@ export class ModifyOrderReqBuilder { this.obj = obj; } /** - * The old client order id,orderId and clientOid must choose one + * One must be chose out of the old client order ID, orderId and clientOid */ setClientOid(value: string): ModifyOrderReqBuilder { this.obj.clientOid = value; @@ -119,7 +119,7 @@ export class ModifyOrderReqBuilder { } /** - * The old order id, orderId and clientOid must choose one + * One must be chosen out of the old order id, orderId and clientOid */ setOrderId(value: string): ModifyOrderReqBuilder { this.obj.orderId = value; @@ -127,7 +127,7 @@ export class ModifyOrderReqBuilder { } /** - * The modified price of the new order, newPrice and newSize must choose one + * One must be chosen out of the modified price of the new order, newPrice and newSize */ setNewPrice(value: string): ModifyOrderReqBuilder { this.obj.newPrice = value; @@ -135,7 +135,7 @@ export class ModifyOrderReqBuilder { } /** - * The modified size of the new order, newPrice and newSize must choose one + * One must be chosen out of the modified size of the new order, newPrice and newSize */ setNewSize(value: string): ModifyOrderReqBuilder { this.obj.newSize = value; diff --git a/sdk/node/src/generate/spot/order/model_modify_order_resp.ts b/sdk/node/src/generate/spot/order/model_modify_order_resp.ts index 064e03fa..867c6a82 100644 --- a/sdk/node/src/generate/spot/order/model_modify_order_resp.ts +++ b/sdk/node/src/generate/spot/order/model_modify_order_resp.ts @@ -6,12 +6,12 @@ import { Response } from '@internal/interfaces/serializable'; export class ModifyOrderResp implements Response { /** - * The new order id + * The new order ID */ newOrderId: string; /** - * The original client order id + * The original client order ID */ clientOid: string; diff --git a/sdk/node/src/generate/spot/order/model_set_dcp_req.ts b/sdk/node/src/generate/spot/order/model_set_dcp_req.ts index c32a722a..87ea1cfc 100644 --- a/sdk/node/src/generate/spot/order/model_set_dcp_req.ts +++ b/sdk/node/src/generate/spot/order/model_set_dcp_req.ts @@ -5,7 +5,7 @@ import { Serializable } from '@internal/interfaces/serializable'; export class SetDCPReq implements Serializable { /** - * Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. + * Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. */ timeout: number; @@ -34,7 +34,7 @@ export class SetDCPReq implements Serializable { */ static create(data: { /** - * Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. + * Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. */ timeout: number; /** @@ -73,7 +73,7 @@ export class SetDCPReqBuilder { this.obj = obj; } /** - * Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. + * Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. */ setTimeout(value: number): SetDCPReqBuilder { this.obj.timeout = value; diff --git a/sdk/node/src/generate/spot/spotprivate/api_spot_private.ts b/sdk/node/src/generate/spot/spotprivate/api_spot_private.ts index ffe6efdf..6a45fc1a 100644 --- a/sdk/node/src/generate/spot/spotprivate/api_spot_private.ts +++ b/sdk/node/src/generate/spot/spotprivate/api_spot_private.ts @@ -1,6 +1,7 @@ // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. import { OrderV2EventCallbackWrapper, OrderV2EventCallback } from './model_order_v2_event'; +import { StopOrderEventCallbackWrapper, StopOrderEventCallback } from './model_stop_order_event'; import { AccountEventCallback, AccountEventCallbackWrapper } from './model_account_event'; import { OrderV1EventCallback, OrderV1EventCallbackWrapper } from './model_order_v1_event'; import { WebSocketService } from '@internal/interfaces/websocket'; @@ -27,6 +28,13 @@ export interface SpotPrivateWS { */ orderV2(callback: OrderV2EventCallback): Promise; + /** + * stopOrder Get Stop Order + * This topic will push all change events of your stop orders. + * push frequency: real-time + */ + stopOrder(callback: StopOrderEventCallback): Promise; + /** * Unsubscribe from topics */ @@ -86,6 +94,18 @@ export class SpotPrivateWSImpl implements SpotPrivateWS { ); } + stopOrder(callback: StopOrderEventCallback): Promise { + let topicPrefix = '/spotMarket/advancedOrders'; + + let args: string[] = []; + + return this.wsService.subscribe( + topicPrefix, + args, + new StopOrderEventCallbackWrapper(callback), + ); + } + unSubscribe(id: string): Promise { return this.wsService.unsubscribe(id); } diff --git a/sdk/node/src/generate/spot/spotprivate/export.template b/sdk/node/src/generate/spot/spotprivate/export.template index 5103b665..1c038790 100644 --- a/sdk/node/src/generate/spot/spotprivate/export.template +++ b/sdk/node/src/generate/spot/spotprivate/export.template @@ -3,4 +3,5 @@ export type AccountEvent = SPOTPRIVATE.AccountEvent; export type AccountRelationContext = SPOTPRIVATE.AccountRelationContext; export type OrderV1Event = SPOTPRIVATE.OrderV1Event; export type OrderV2Event = SPOTPRIVATE.OrderV2Event; +export type StopOrderEvent = SPOTPRIVATE.StopOrderEvent; } diff --git a/sdk/node/src/generate/spot/spotprivate/index.ts b/sdk/node/src/generate/spot/spotprivate/index.ts index b6f03011..fe91a090 100644 --- a/sdk/node/src/generate/spot/spotprivate/index.ts +++ b/sdk/node/src/generate/spot/spotprivate/index.ts @@ -2,4 +2,5 @@ export * from './model_account_event'; export * from './model_account_relation_context'; export * from './model_order_v1_event'; export * from './model_order_v2_event'; +export * from './model_stop_order_event'; export * from './api_spot_private'; diff --git a/sdk/node/src/generate/spot/spotprivate/model_order_v1_event.ts b/sdk/node/src/generate/spot/spotprivate/model_order_v1_event.ts index ce8d1110..e59e62fe 100644 --- a/sdk/node/src/generate/spot/spotprivate/model_order_v1_event.ts +++ b/sdk/node/src/generate/spot/spotprivate/model_order_v1_event.ts @@ -11,11 +11,11 @@ export class OrderV1Event implements Response { */ canceledSize?: string; /** - * Client Order Id,The ClientOid field is a unique ID created by the user + * Client Order ID: The ClientOid field is a unique ID created by the user */ clientOid: string; /** - * Cumulative number of filled + * Cumulative number filled */ filledSize?: string; /** @@ -23,7 +23,7 @@ export class OrderV1Event implements Response { */ orderId: string; /** - * Order time(millisecond) + * Order time (milliseconds) */ orderTime: number; /** @@ -63,7 +63,7 @@ export class OrderV1Event implements Response { */ symbol: string; /** - * Push time(Nanosecond) + * Push time (nanoseconds) */ ts: number; /** @@ -91,7 +91,7 @@ export class OrderV1Event implements Response { */ matchSize?: string; /** - * Trade id, it is generated by Matching engine. + * Trade ID: Generated by Matching engine. */ tradeId?: string; @@ -174,7 +174,7 @@ export namespace OrderV1Event { */ _NEW = 'new', /** - * the order is in the order book(maker order) + * the order is in the order book (maker order) */ OPEN = 'open', /** @@ -188,15 +188,15 @@ export namespace OrderV1Event { } export enum TypeEnum { /** - * the order is in the order book(maker order) + * the order is in the order book (maker order) */ OPEN = 'open', /** - * the message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. + * The message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. */ MATCH = 'match', /** - * The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three situations: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. + * The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three scenarios: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. */ UPDATE = 'update', /** diff --git a/sdk/node/src/generate/spot/spotprivate/model_order_v2_event.ts b/sdk/node/src/generate/spot/spotprivate/model_order_v2_event.ts index 244b5e9a..4019e63c 100644 --- a/sdk/node/src/generate/spot/spotprivate/model_order_v2_event.ts +++ b/sdk/node/src/generate/spot/spotprivate/model_order_v2_event.ts @@ -11,11 +11,11 @@ export class OrderV2Event implements Response { */ canceledSize?: string; /** - * Client Order Id,The ClientOid field is a unique ID created by the user + * Client Order ID: The ClientOid field is a unique ID created by the user */ clientOid: string; /** - * Cumulative number of filled + * Cumulative number filled */ filledSize?: string; /** @@ -23,7 +23,7 @@ export class OrderV2Event implements Response { */ orderId: string; /** - * Order time(millisecond) + * Order time (milliseconds) */ orderTime: number; /** @@ -63,7 +63,7 @@ export class OrderV2Event implements Response { */ symbol: string; /** - * Push time(Nanosecond) + * Push time (nanoseconds) */ ts: number; /** @@ -91,7 +91,7 @@ export class OrderV2Event implements Response { */ matchSize?: string; /** - * Trade id, it is generated by Matching engine. + * Trade ID: Generated by Matching engine. */ tradeId?: string; @@ -174,7 +174,7 @@ export namespace OrderV2Event { */ _NEW = 'new', /** - * the order is in the order book(maker order) + * the order is in the order book (maker order) */ OPEN = 'open', /** @@ -188,15 +188,15 @@ export namespace OrderV2Event { } export enum TypeEnum { /** - * the order is in the order book(maker order) + * the order is in the order book (maker order) */ OPEN = 'open', /** - * the message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. + * The message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. */ MATCH = 'match', /** - * The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three situations: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. + * The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three scenarios: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. */ UPDATE = 'update', /** diff --git a/sdk/node/src/generate/spot/spotprivate/model_stop_order_event.ts b/sdk/node/src/generate/spot/spotprivate/model_stop_order_event.ts new file mode 100644 index 00000000..ef810c0f --- /dev/null +++ b/sdk/node/src/generate/spot/spotprivate/model_stop_order_event.ts @@ -0,0 +1,195 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +import { instanceToPlain, Exclude, plainToClassFromExist } from 'class-transformer'; +import { WsMessage } from '@model/common'; +import { WebSocketMessageCallback } from '@internal/interfaces/websocket'; +import { Response } from '@internal/interfaces/serializable'; + +export class StopOrderEvent implements Response { + /** + * Order created time (milliseconds) + */ + createdAt: number; + /** + * The unique order id generated by the trading system + */ + orderId: string; + /** + * Price + */ + orderPrice: string; + /** + * User-specified order type + */ + orderType: StopOrderEvent.OrderTypeEnum; + /** + * buy or sell + */ + side: StopOrderEvent.SideEnum; + /** + * User-specified order size + */ + size: string; + /** + * Order type: loss: stop loss order, oco: oco order + */ + stop: StopOrderEvent.StopEnum; + /** + * Stop Price + */ + stopPrice: string; + /** + * symbol + */ + symbol: string; + /** + * The type of trading: TRADE (Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). + */ + tradeType: StopOrderEvent.TradeTypeEnum; + /** + * Push time (nanoseconds) + */ + ts: number; + /** + * Order Type + */ + type: StopOrderEvent.TypeEnum; + + private constructor() { + // @ts-ignore + this.createdAt = null; + // @ts-ignore + this.orderId = null; + // @ts-ignore + this.orderPrice = null; + // @ts-ignore + this.orderType = null; + // @ts-ignore + this.side = null; + // @ts-ignore + this.size = null; + // @ts-ignore + this.stop = null; + // @ts-ignore + this.stopPrice = null; + // @ts-ignore + this.symbol = null; + // @ts-ignore + this.tradeType = null; + // @ts-ignore + this.ts = null; + // @ts-ignore + this.type = null; + } + /** + * common response + */ + @Exclude() + commonResponse?: WsMessage; + + setCommonResponse(response: WsMessage): void { + this.commonResponse = response; + } + + /** + * Convert the object to a JSON string. + */ + toJson(): string { + return JSON.stringify(instanceToPlain(this)); + } + /** + * Create an object from a JSON string. + */ + static fromJson(input: string): StopOrderEvent { + return this.fromObject(JSON.parse(input)); + } + /** + * Create an object from Js Object. + */ + static fromObject(jsonObject: Object): StopOrderEvent { + return plainToClassFromExist(new StopOrderEvent(), jsonObject); + } +} + +export namespace StopOrderEvent { + export enum OrderTypeEnum { + /** + * stop + */ + STOP = 'stop', + } + export enum SideEnum { + /** + * buy + */ + BUY = 'buy', + /** + * sell + */ + SELL = 'sell', + } + export enum StopEnum { + /** + * stop loss order + */ + LOSS = 'loss', + /** + * oco order + */ + OCO = 'oco', + } + export enum TradeTypeEnum { + /** + * Spot + */ + TRADE = 'TRADE', + /** + * Spot margin trade + */ + MARGIN_TRADE = 'MARGIN_TRADE', + /** + * Spot margin isolated trade + */ + MARGIN_ISOLATED_TRADE = 'MARGIN_ISOLATED_TRADE', + } + export enum TypeEnum { + /** + * The order is in the order book (maker order) + */ + OPEN = 'open', + /** + * The message sent when the order is matched, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. + */ + MATCH = 'match', + /** + * The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three scenarios: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. + */ + UPDATE = 'update', + /** + * The message sent when the status of the order changes to DONE after the transaction + */ + FILLED = 'filled', + /** + * The message sent when the status of the order changes to DONE due to being canceled + */ + CANCEL = 'cancel', + /** + * The message sent when the order enters the matching system. When the order has just entered the matching system and has not yet done matching logic with the counterparty, a private message with the message type "received" and the order status "new" will be pushed. + */ + RECEIVED = 'received', + } +} + +export type StopOrderEventCallback = (topic: string, subject: string, data: StopOrderEvent) => void; + +export class StopOrderEventCallbackWrapper implements WebSocketMessageCallback { + constructor(private callback: StopOrderEventCallback) { + this.callback = callback; + } + + onMessage(msg: WsMessage): void { + let event = StopOrderEvent.fromObject(msg.data); + event.setCommonResponse(msg); + this.callback(msg.topic, msg.subject, event); + } +} diff --git a/sdk/node/src/generate/spot/spotprivate/ws_spot_private.test.ts b/sdk/node/src/generate/spot/spotprivate/ws_spot_private.test.ts index 267f3557..cffa9346 100644 --- a/sdk/node/src/generate/spot/spotprivate/ws_spot_private.test.ts +++ b/sdk/node/src/generate/spot/spotprivate/ws_spot_private.test.ts @@ -1,4 +1,5 @@ import { OrderV2Event } from './model_order_v2_event'; +import { StopOrderEvent } from './model_stop_order_event'; import { AccountEvent } from './model_account_event'; import { OrderV1Event } from './model_order_v1_event'; import { WsMessage } from '@model/common'; @@ -49,4 +50,19 @@ describe('Auto Test', () => { ); console.log(resp); }); + test('stopOrder response test', () => { + /** + * stopOrder + * Get Stop Order + * /stopOrder/spotMarket/advancedOrders + */ + let data = + '{"topic":"/spotMarket/advancedOrders","type":"message","subject":"stopOrder","userId":"633559791e1cbc0001f319bc","channelType":"private","data":{"orderId":"vs93gpupfa48anof003u85mb","orderPrice":"70000","orderType":"stop","side":"buy","size":"0.00007142","stop":"loss","stopPrice":"71000","symbol":"BTC-USDT","tradeType":"TRADE","type":"open","createdAt":1742305928064,"ts":1742305928091268493}}'; + let commonResp = WsMessage.fromJson(data); + let resp = StopOrderEvent.fromObject(commonResp.data); + expect(Object.values(resp).every((value) => value === null || value === undefined)).toBe( + false, + ); + console.log(resp); + }); }); diff --git a/sdk/node/src/generate/spot/spotpublic/api_spot_public.ts b/sdk/node/src/generate/spot/spotpublic/api_spot_public.ts index 9b3ad52c..b652f405 100644 --- a/sdk/node/src/generate/spot/spotpublic/api_spot_public.ts +++ b/sdk/node/src/generate/spot/spotpublic/api_spot_public.ts @@ -5,6 +5,10 @@ import { OrderbookLevel5EventCallback, } from './model_orderbook_level5_event'; import { KlinesEventCallbackWrapper, KlinesEventCallback } from './model_klines_event'; +import { + CallAuctionInfoEventCallback, + CallAuctionInfoEventCallbackWrapper, +} from './model_call_auction_info_event'; import { TickerEventCallback, TickerEventCallbackWrapper } from './model_ticker_event'; import { SymbolSnapshotEventCallback, @@ -28,16 +32,37 @@ import { MarketSnapshotEventCallback, MarketSnapshotEventCallbackWrapper, } from './model_market_snapshot_event'; +import { + CallAuctionOrderbookLevel50EventCallback, + CallAuctionOrderbookLevel50EventCallbackWrapper, +} from './model_call_auction_orderbook_level50_event'; import { WebSocketService } from '@internal/interfaces/websocket'; export interface SpotPublicWS { /** * allTickers Get All Tickers - * Subscribe to this topic to get the push of all market symbols BBO change. + * Subscribe to this topic to get pushes on all market symbol BBO changes. * push frequency: once every 100ms */ allTickers(callback: AllTickersEventCallback): Promise; + /** + * callAuctionInfo Get Call Auction Info + * Subscribe to this topic to get the specified symbol call auction info. + * push frequency: once every 100ms + */ + callAuctionInfo(symbol: string, callback: CallAuctionInfoEventCallback): Promise; + + /** + * callAuctionOrderbookLevel50 CallAuctionOrderbook - Level50 + * The system will return the call auction 50 best ask/bid orders data; if there is no change in the market, data will not be pushed + * push frequency: once every 100ms + */ + callAuctionOrderbookLevel50( + symbol: string, + callback: CallAuctionOrderbookLevel50EventCallback, + ): Promise; + /** * klines Klines * Subscribe to this topic to get K-Line data. @@ -47,14 +72,14 @@ export interface SpotPublicWS { /** * marketSnapshot Market Snapshot - * Subscribe this topic to get the snapshot data of for the entire market. + * Subscribe to this topic to get snapshot data for the entire market. * push frequency: once every 2s */ marketSnapshot(market: string, callback: MarketSnapshotEventCallback): Promise; /** * orderbookIncrement Orderbook - Increment - * The system will return the increment change orderbook data(All depth), A topic supports up to 100 symbols. If there is no change in the market, data will not be pushed + * The system will return the increment change orderbook data (all depths); a topic supports up to 100 symbols. If there is no change in the market, data will not be pushed * push frequency: real-time */ orderbookIncrement( @@ -64,14 +89,14 @@ export interface SpotPublicWS { /** * orderbookLevel1 Orderbook - Level1 - * The system will return the 1 best ask/bid orders data, A topic supports up to 100 symbols. If there is no change in the market, data will not be pushed + * The system will return the 1 best ask/bid orders data; a topic supports up to 100 symbols. If there is no change in the market, data will not be pushed * push frequency: once every 10ms */ orderbookLevel1(symbol: Array, callback: OrderbookLevel1EventCallback): Promise; /** * orderbookLevel50 Orderbook - Level50 - * The system will return the 50 best ask/bid orders data, A topic supports up to 100 symbols. If there is no change in the market, data will not be pushed + * The system will return data for the 50 best ask/bid orders; a topic supports up to 100 symbols. If there is no change in the market, data will not be pushed * push frequency: once every 100ms */ orderbookLevel50( @@ -81,7 +106,7 @@ export interface SpotPublicWS { /** * orderbookLevel5 Orderbook - Level5 - * The system will return the 5 best ask/bid orders data,A topic supports up to 100 symbols. If there is no change in the market, data will not be pushed + * The system will return the 5 best ask/bid orders data; a topic supports up to 100 symbols. If there is no change in the market, data will not be pushed * push frequency: once every 100ms */ orderbookLevel5(symbol: Array, callback: OrderbookLevel5EventCallback): Promise; @@ -95,14 +120,14 @@ export interface SpotPublicWS { /** * ticker Get Ticker - * Subscribe to this topic to get the specified symbol push of BBO changes. + * Subscribe to this topic to get specified symbol pushes on BBO changes. * push frequency: once every 100ms */ ticker(symbol: Array, callback: TickerEventCallback): Promise; /** * trade Trade - * Subscribe to this topic to get the matching event data flow of Level 3. A topic supports up to 100 symbols. + * Subscribe to this topic to get Level 3 matching event data flows. A topic supports up to 100 symbols. * push frequency: real-time */ trade(symbol: Array, callback: TradeEventCallback): Promise; @@ -142,6 +167,33 @@ export class SpotPublicWSImpl implements SpotPublicWS { ); } + callAuctionInfo(symbol: string, callback: CallAuctionInfoEventCallback): Promise { + let topicPrefix = '/callauction/callauctionData'; + + let args: string[] = [symbol]; + + return this.wsService.subscribe( + topicPrefix, + args, + new CallAuctionInfoEventCallbackWrapper(callback), + ); + } + + callAuctionOrderbookLevel50( + symbol: string, + callback: CallAuctionOrderbookLevel50EventCallback, + ): Promise { + let topicPrefix = '/callauction/level2Depth50'; + + let args: string[] = [symbol]; + + return this.wsService.subscribe( + topicPrefix, + args, + new CallAuctionOrderbookLevel50EventCallbackWrapper(callback), + ); + } + klines(symbol: string, type: string, callback: KlinesEventCallback): Promise { let topicPrefix = '/market/candles'; @@ -200,7 +252,7 @@ export class SpotPublicWSImpl implements SpotPublicWS { symbol: Array, callback: OrderbookLevel50EventCallback, ): Promise { - let topicPrefix = '/market/level2'; + let topicPrefix = '/spotMarket/level2Depth50'; let args: string[] = symbol; diff --git a/sdk/node/src/generate/spot/spotpublic/export.template b/sdk/node/src/generate/spot/spotpublic/export.template index 16a735e2..33bada8d 100644 --- a/sdk/node/src/generate/spot/spotpublic/export.template +++ b/sdk/node/src/generate/spot/spotpublic/export.template @@ -1,5 +1,7 @@ export namespace SpotPublic { export type AllTickersEvent = SPOTPUBLIC.AllTickersEvent; +export type CallAuctionInfoEvent = SPOTPUBLIC.CallAuctionInfoEvent; +export type CallAuctionOrderbookLevel50Event = SPOTPUBLIC.CallAuctionOrderbookLevel50Event; export type KlinesEvent = SPOTPUBLIC.KlinesEvent; export type MarketSnapshotData = SPOTPUBLIC.MarketSnapshotData; export type MarketSnapshotDataMarketChange1h = SPOTPUBLIC.MarketSnapshotDataMarketChange1h; @@ -9,7 +11,6 @@ export type MarketSnapshotEvent = SPOTPUBLIC.MarketSnapshotEvent; export type OrderbookIncrementChanges = SPOTPUBLIC.OrderbookIncrementChanges; export type OrderbookIncrementEvent = SPOTPUBLIC.OrderbookIncrementEvent; export type OrderbookLevel1Event = SPOTPUBLIC.OrderbookLevel1Event; -export type OrderbookLevel50Changes = SPOTPUBLIC.OrderbookLevel50Changes; export type OrderbookLevel50Event = SPOTPUBLIC.OrderbookLevel50Event; export type OrderbookLevel5Event = SPOTPUBLIC.OrderbookLevel5Event; export type SymbolSnapshotData = SPOTPUBLIC.SymbolSnapshotData; diff --git a/sdk/node/src/generate/spot/spotpublic/index.ts b/sdk/node/src/generate/spot/spotpublic/index.ts index 20f9a35f..c0566a66 100644 --- a/sdk/node/src/generate/spot/spotpublic/index.ts +++ b/sdk/node/src/generate/spot/spotpublic/index.ts @@ -1,4 +1,6 @@ export * from './model_all_tickers_event'; +export * from './model_call_auction_info_event'; +export * from './model_call_auction_orderbook_level50_event'; export * from './model_klines_event'; export * from './model_market_snapshot_data'; export * from './model_market_snapshot_data_market_change1h'; @@ -8,7 +10,6 @@ export * from './model_market_snapshot_event'; export * from './model_orderbook_increment_changes'; export * from './model_orderbook_increment_event'; export * from './model_orderbook_level1_event'; -export * from './model_orderbook_level50_changes'; export * from './model_orderbook_level50_event'; export * from './model_orderbook_level5_event'; export * from './model_symbol_snapshot_data'; diff --git a/sdk/node/src/generate/spot/spotpublic/model_call_auction_info_event.ts b/sdk/node/src/generate/spot/spotpublic/model_call_auction_info_event.ts new file mode 100644 index 00000000..bd411496 --- /dev/null +++ b/sdk/node/src/generate/spot/spotpublic/model_call_auction_info_event.ts @@ -0,0 +1,106 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +import { instanceToPlain, Exclude, plainToClassFromExist } from 'class-transformer'; +import { WsMessage } from '@model/common'; +import { WebSocketMessageCallback } from '@internal/interfaces/websocket'; +import { Response } from '@internal/interfaces/serializable'; + +export class CallAuctionInfoEvent implements Response { + /** + * Symbol + */ + symbol: string; + /** + * Estimated price + */ + estimatedPrice: string; + /** + * Estimated size + */ + estimatedSize: string; + /** + * Sell ​​order minimum price + */ + sellOrderRangeLowPrice: string; + /** + * Sell ​​order maximum price + */ + sellOrderRangeHighPrice: string; + /** + * Buy ​​order minimum price + */ + buyOrderRangeLowPrice: string; + /** + * Buy ​​order maximum price + */ + buyOrderRangeHighPrice: string; + /** + * Timestamp (ms) + */ + time: number; + + private constructor() { + // @ts-ignore + this.symbol = null; + // @ts-ignore + this.estimatedPrice = null; + // @ts-ignore + this.estimatedSize = null; + // @ts-ignore + this.sellOrderRangeLowPrice = null; + // @ts-ignore + this.sellOrderRangeHighPrice = null; + // @ts-ignore + this.buyOrderRangeLowPrice = null; + // @ts-ignore + this.buyOrderRangeHighPrice = null; + // @ts-ignore + this.time = null; + } + /** + * common response + */ + @Exclude() + commonResponse?: WsMessage; + + setCommonResponse(response: WsMessage): void { + this.commonResponse = response; + } + + /** + * Convert the object to a JSON string. + */ + toJson(): string { + return JSON.stringify(instanceToPlain(this)); + } + /** + * Create an object from a JSON string. + */ + static fromJson(input: string): CallAuctionInfoEvent { + return this.fromObject(JSON.parse(input)); + } + /** + * Create an object from Js Object. + */ + static fromObject(jsonObject: Object): CallAuctionInfoEvent { + return plainToClassFromExist(new CallAuctionInfoEvent(), jsonObject); + } +} + +export type CallAuctionInfoEventCallback = ( + topic: string, + subject: string, + data: CallAuctionInfoEvent, +) => void; + +export class CallAuctionInfoEventCallbackWrapper implements WebSocketMessageCallback { + constructor(private callback: CallAuctionInfoEventCallback) { + this.callback = callback; + } + + onMessage(msg: WsMessage): void { + let event = CallAuctionInfoEvent.fromObject(msg.data); + event.setCommonResponse(msg); + this.callback(msg.topic, msg.subject, event); + } +} diff --git a/sdk/node/src/generate/spot/spotpublic/model_call_auction_orderbook_level50_event.ts b/sdk/node/src/generate/spot/spotpublic/model_call_auction_orderbook_level50_event.ts new file mode 100644 index 00000000..7eaa1a80 --- /dev/null +++ b/sdk/node/src/generate/spot/spotpublic/model_call_auction_orderbook_level50_event.ts @@ -0,0 +1,76 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +import { instanceToPlain, Exclude, plainToClassFromExist } from 'class-transformer'; +import { WsMessage } from '@model/common'; +import { WebSocketMessageCallback } from '@internal/interfaces/websocket'; +import { Response } from '@internal/interfaces/serializable'; + +export class CallAuctionOrderbookLevel50Event implements Response { + /** + * price, size + */ + asks: Array>; + /** + * + */ + bids: Array>; + /** + * + */ + timestamp: number; + + private constructor() { + // @ts-ignore + this.asks = null; + // @ts-ignore + this.bids = null; + // @ts-ignore + this.timestamp = null; + } + /** + * common response + */ + @Exclude() + commonResponse?: WsMessage; + + setCommonResponse(response: WsMessage): void { + this.commonResponse = response; + } + + /** + * Convert the object to a JSON string. + */ + toJson(): string { + return JSON.stringify(instanceToPlain(this)); + } + /** + * Create an object from a JSON string. + */ + static fromJson(input: string): CallAuctionOrderbookLevel50Event { + return this.fromObject(JSON.parse(input)); + } + /** + * Create an object from Js Object. + */ + static fromObject(jsonObject: Object): CallAuctionOrderbookLevel50Event { + return plainToClassFromExist(new CallAuctionOrderbookLevel50Event(), jsonObject); + } +} + +export type CallAuctionOrderbookLevel50EventCallback = ( + topic: string, + subject: string, + data: CallAuctionOrderbookLevel50Event, +) => void; + +export class CallAuctionOrderbookLevel50EventCallbackWrapper implements WebSocketMessageCallback { + constructor(private callback: CallAuctionOrderbookLevel50EventCallback) { + this.callback = callback; + } + + onMessage(msg: WsMessage): void { + let event = CallAuctionOrderbookLevel50Event.fromObject(msg.data); + event.setCommonResponse(msg); + this.callback(msg.topic, msg.subject, event); + } +} diff --git a/sdk/node/src/generate/spot/spotpublic/model_market_snapshot_data.ts b/sdk/node/src/generate/spot/spotpublic/model_market_snapshot_data.ts index a206cea7..05bb1011 100644 --- a/sdk/node/src/generate/spot/spotpublic/model_market_snapshot_data.ts +++ b/sdk/node/src/generate/spot/spotpublic/model_market_snapshot_data.ts @@ -24,7 +24,7 @@ export class MarketSnapshotData implements Serializable { */ bidSize: number; /** - * Trading pair partition: 0.primary partition 1.KuCoin Plus\", example = \"1\" + * Trading pair partition: 0. Primary partition 1.KuCoin Plus\", example = \"1\" */ board: MarketSnapshotData.BoardEnum; /** @@ -72,7 +72,7 @@ export class MarketSnapshotData implements Serializable { */ marginTrade: boolean; /** - * Trading Pair Mark: 0.default 1.ST. 2.NEW\", example = \"1\" + * Trading Pair Mark: 0. Default 1.ST. 2.NEW\", example = \"1\" */ mark: MarketSnapshotData.MarkEnum; /** diff --git a/sdk/node/src/generate/spot/spotpublic/model_orderbook_level50_changes.ts b/sdk/node/src/generate/spot/spotpublic/model_orderbook_level50_changes.ts deleted file mode 100644 index 4b5b02a9..00000000 --- a/sdk/node/src/generate/spot/spotpublic/model_orderbook_level50_changes.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. - -import { instanceToPlain, plainToClassFromExist } from 'class-transformer'; -import { Serializable } from '@internal/interfaces/serializable'; - -export class OrderbookLevel50Changes implements Serializable { - /** - * - */ - asks: Array>; - /** - * - */ - bids: Array>; - - private constructor() { - // @ts-ignore - this.asks = null; - // @ts-ignore - this.bids = null; - } - /** - * Convert the object to a JSON string. - */ - toJson(): string { - return JSON.stringify(instanceToPlain(this)); - } - /** - * Create an object from a JSON string. - */ - static fromJson(input: string): OrderbookLevel50Changes { - return this.fromObject(JSON.parse(input)); - } - /** - * Create an object from Js Object. - */ - static fromObject(jsonObject: Object): OrderbookLevel50Changes { - return plainToClassFromExist(new OrderbookLevel50Changes(), jsonObject); - } -} diff --git a/sdk/node/src/generate/spot/spotpublic/model_orderbook_level50_event.ts b/sdk/node/src/generate/spot/spotpublic/model_orderbook_level50_event.ts index dc2a13be..2da8b47f 100644 --- a/sdk/node/src/generate/spot/spotpublic/model_orderbook_level50_event.ts +++ b/sdk/node/src/generate/spot/spotpublic/model_orderbook_level50_event.ts @@ -1,44 +1,31 @@ // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. -import { Type, instanceToPlain, Exclude, plainToClassFromExist } from 'class-transformer'; -import { OrderbookLevel50Changes } from './model_orderbook_level50_changes'; +import { instanceToPlain, Exclude, plainToClassFromExist } from 'class-transformer'; import { WsMessage } from '@model/common'; import { WebSocketMessageCallback } from '@internal/interfaces/websocket'; import { Response } from '@internal/interfaces/serializable'; export class OrderbookLevel50Event implements Response { /** - * + * price, size */ - changes: OrderbookLevel50Changes; + asks: Array>; /** * */ - sequenceEnd: number; + bids: Array>; /** * */ - sequenceStart: number; - /** - * - */ - symbol: string; - /** - * - */ - time: number; + timestamp: number; private constructor() { // @ts-ignore - this.changes = null; - // @ts-ignore - this.sequenceEnd = null; - // @ts-ignore - this.sequenceStart = null; + this.asks = null; // @ts-ignore - this.symbol = null; + this.bids = null; // @ts-ignore - this.time = null; + this.timestamp = null; } /** * common response diff --git a/sdk/node/src/generate/spot/spotpublic/model_symbol_snapshot_data.ts b/sdk/node/src/generate/spot/spotpublic/model_symbol_snapshot_data.ts index fb2410d7..67a66eba 100644 --- a/sdk/node/src/generate/spot/spotpublic/model_symbol_snapshot_data.ts +++ b/sdk/node/src/generate/spot/spotpublic/model_symbol_snapshot_data.ts @@ -24,7 +24,7 @@ export class SymbolSnapshotData implements Serializable { */ bidSize: number; /** - * Trading pair partition: 0.primary partition 1.KuCoin Plus\", example = \"1\" + * Trading pair partition: 0. Primary partition 1.KuCoin Plus\", example = \"1\" */ board: SymbolSnapshotData.BoardEnum; /** @@ -72,7 +72,7 @@ export class SymbolSnapshotData implements Serializable { */ marginTrade: boolean; /** - * Trading Pair Mark: 0.default 1.ST. 2.NEW\", example = \"1\" + * Trading Pair Mark: 0. Default 1.ST. 2.NEW\", example = \"1\" */ mark: SymbolSnapshotData.MarkEnum; /** diff --git a/sdk/node/src/generate/spot/spotpublic/model_ticker_event.ts b/sdk/node/src/generate/spot/spotpublic/model_ticker_event.ts index 45b61ec0..7d34ff3d 100644 --- a/sdk/node/src/generate/spot/spotpublic/model_ticker_event.ts +++ b/sdk/node/src/generate/spot/spotpublic/model_ticker_event.ts @@ -37,7 +37,7 @@ export class TickerEvent implements Response { /** * The matching time of the latest transaction */ - Time: number; + time: number; private constructor() { // @ts-ignore @@ -55,7 +55,7 @@ export class TickerEvent implements Response { // @ts-ignore this.bestBidSize = null; // @ts-ignore - this.Time = null; + this.time = null; } /** * common response diff --git a/sdk/node/src/generate/spot/spotpublic/ws_spot_public.test.ts b/sdk/node/src/generate/spot/spotpublic/ws_spot_public.test.ts index 47c5db49..cbebb38e 100644 --- a/sdk/node/src/generate/spot/spotpublic/ws_spot_public.test.ts +++ b/sdk/node/src/generate/spot/spotpublic/ws_spot_public.test.ts @@ -1,5 +1,6 @@ import { OrderbookLevel5Event } from './model_orderbook_level5_event'; import { KlinesEvent } from './model_klines_event'; +import { CallAuctionInfoEvent } from './model_call_auction_info_event'; import { TickerEvent } from './model_ticker_event'; import { SymbolSnapshotEvent } from './model_symbol_snapshot_event'; import { OrderbookLevel1Event } from './model_orderbook_level1_event'; @@ -8,6 +9,7 @@ import { OrderbookIncrementEvent } from './model_orderbook_increment_event'; import { TradeEvent } from './model_trade_event'; import { OrderbookLevel50Event } from './model_orderbook_level50_event'; import { MarketSnapshotEvent } from './model_market_snapshot_event'; +import { CallAuctionOrderbookLevel50Event } from './model_call_auction_orderbook_level50_event'; import { WsMessage } from '@model/common'; describe('Auto Test', () => { @@ -26,6 +28,36 @@ describe('Auto Test', () => { ); console.log(resp); }); + test('callAuctionInfo response test', () => { + /** + * callAuctionInfo + * Get Call Auction Info + * /callAuctionInfo/callauction/callauctionData:_symbol_ + */ + let data = + '{"type":"message","topic":"/callauction/callauctionData:BTC-USDT","subject":"callauction.callauctionData","data":{"symbol":"BTC-USDT","estimatedPrice":"0.17","estimatedSize":"0.03715004","sellOrderRangeLowPrice":"1.788","sellOrderRangeHighPrice":"2.788","buyOrderRangeLowPrice":"1.788","buyOrderRangeHighPrice":"2.788","time":1550653727731}}'; + let commonResp = WsMessage.fromJson(data); + let resp = CallAuctionInfoEvent.fromObject(commonResp.data); + expect(Object.values(resp).every((value) => value === null || value === undefined)).toBe( + false, + ); + console.log(resp); + }); + test('callAuctionOrderbookLevel50 response test', () => { + /** + * callAuctionOrderbookLevel50 + * CallAuctionOrderbook - Level50 + * /callAuctionOrderbookLevel50/callauction/level2Depth50:_symbol_ + */ + let data = + '{"topic":"/spotMarket/level2Depth50:BTC-USDT","type":"message","subject":"level2","data":{"asks":[["95964.3","0.08168874"],["95967.9","0.00985094"],["95969.9","0.00078081"],["95971.2","0.10016039"],["95971.3","0.12531139"],["95971.7","0.00291"],["95971.9","0.10271829"],["95973.3","0.00021"],["95974.7","0.10271829"],["95976.9","0.03095177"],["95977","0.10271829"],["95978.7","0.00022411"],["95979.1","0.00023017"],["95981","0.00022008"],["95981.2","0.14330324"],["95982.3","0.27922082"],["95982.5","0.02302674"],["95983.8","0.00011035"],["95985","0.00104222"],["95985.1","0.00021808"],["95985.5","0.211127"],["95986.2","0.09690904"],["95986.3","0.31261"],["95986.9","0.09225037"],["95987","0.01042013"],["95990.5","0.12712438"],["95990.6","0.0916115"],["95992.2","0.279"],["95992.7","0.00521084"],["95995.2","0.00033"],["95999.1","0.02973561"],["96001.1","0.083825"],["96002.6","0.01900906"],["96002.7","0.00041665"],["96002.8","0.12531139"],["96002.9","0.279"],["96004.8","0.02081884"],["96006.3","0.00065542"],["96008.5","0.00033166"],["96011","0.08776246"],["96012.5","0.279"],["96013.3","0.00066666"],["96013.9","0.26097183"],["96014","0.01087009"],["96017","0.06248892"],["96017.1","0.20829641"],["96022","0.00107066"],["96022.1","0.279"],["96022.9","0.0006499"],["96024.6","0.00104131"]],"bids":[["95964.2","1.35483359"],["95964.1","0.01117492"],["95962.1","0.0062"],["95961.8","0.03081549"],["95961.7","0.10271829"],["95958.5","0.04681571"],["95958.4","0.05177498"],["95958.2","0.00155911"],["95957.8","0.10271829"],["95954.7","0.16312181"],["95954.6","0.44102109"],["95952.6","0.10271829"],["95951.3","0.0062"],["95951","0.17075141"],["95950.9","0.279"],["95949.5","0.13567811"],["95949.2","0.05177498"],["95948.3","0.10271829"],["95947.2","0.04634798"],["95944.7","0.10271829"],["95944.2","0.05177498"],["95942.3","0.26028569"],["95942.2","0.10271829"],["95940.6","0.12531139"],["95940.2","0.43349327"],["95938.3","0.01041604"],["95937.4","0.04957577"],["95937.2","0.00305"],["95936.3","0.10271829"],["95934","0.05177498"],["95931.9","0.03394093"],["95931.8","0.10271829"],["95930","0.01041814"],["95927.9","0.10271829"],["95927","0.13312774"],["95926.9","0.33077498"],["95924.9","0.10271829"],["95924","0.00180915"],["95923.8","0.00022434"],["95919.6","0.00021854"],["95919.1","0.01471872"],["95919","0.05177498"],["95918.1","0.00001889"],["95917.8","0.1521089"],["95917.5","0.00010962"],["95916.2","0.00021958"],["95915.5","0.12531139"],["95915.3","0.279"],["95913.6","0.01739249"],["95913.5","0.05177498"]],"timestamp":1733124805073}}'; + let commonResp = WsMessage.fromJson(data); + let resp = CallAuctionOrderbookLevel50Event.fromObject(commonResp.data); + expect(Object.values(resp).every((value) => value === null || value === undefined)).toBe( + false, + ); + console.log(resp); + }); test('klines response test', () => { /** * klines @@ -90,7 +122,7 @@ describe('Auto Test', () => { /** * orderbookLevel50 * Orderbook - Level50 - * /orderbookLevel50/market/level2:_symbol_,_symbol_ + * /orderbookLevel50/spotMarket/level2Depth50:_symbol_,_symbol_ */ let data = '{"topic":"/spotMarket/level2Depth50:BTC-USDT","type":"message","subject":"level2","data":{"asks":[["95964.3","0.08168874"],["95967.9","0.00985094"],["95969.9","0.00078081"],["95971.2","0.10016039"],["95971.3","0.12531139"],["95971.7","0.00291"],["95971.9","0.10271829"],["95973.3","0.00021"],["95974.7","0.10271829"],["95976.9","0.03095177"],["95977","0.10271829"],["95978.7","0.00022411"],["95979.1","0.00023017"],["95981","0.00022008"],["95981.2","0.14330324"],["95982.3","0.27922082"],["95982.5","0.02302674"],["95983.8","0.00011035"],["95985","0.00104222"],["95985.1","0.00021808"],["95985.5","0.211127"],["95986.2","0.09690904"],["95986.3","0.31261"],["95986.9","0.09225037"],["95987","0.01042013"],["95990.5","0.12712438"],["95990.6","0.0916115"],["95992.2","0.279"],["95992.7","0.00521084"],["95995.2","0.00033"],["95999.1","0.02973561"],["96001.1","0.083825"],["96002.6","0.01900906"],["96002.7","0.00041665"],["96002.8","0.12531139"],["96002.9","0.279"],["96004.8","0.02081884"],["96006.3","0.00065542"],["96008.5","0.00033166"],["96011","0.08776246"],["96012.5","0.279"],["96013.3","0.00066666"],["96013.9","0.26097183"],["96014","0.01087009"],["96017","0.06248892"],["96017.1","0.20829641"],["96022","0.00107066"],["96022.1","0.279"],["96022.9","0.0006499"],["96024.6","0.00104131"]],"bids":[["95964.2","1.35483359"],["95964.1","0.01117492"],["95962.1","0.0062"],["95961.8","0.03081549"],["95961.7","0.10271829"],["95958.5","0.04681571"],["95958.4","0.05177498"],["95958.2","0.00155911"],["95957.8","0.10271829"],["95954.7","0.16312181"],["95954.6","0.44102109"],["95952.6","0.10271829"],["95951.3","0.0062"],["95951","0.17075141"],["95950.9","0.279"],["95949.5","0.13567811"],["95949.2","0.05177498"],["95948.3","0.10271829"],["95947.2","0.04634798"],["95944.7","0.10271829"],["95944.2","0.05177498"],["95942.3","0.26028569"],["95942.2","0.10271829"],["95940.6","0.12531139"],["95940.2","0.43349327"],["95938.3","0.01041604"],["95937.4","0.04957577"],["95937.2","0.00305"],["95936.3","0.10271829"],["95934","0.05177498"],["95931.9","0.03394093"],["95931.8","0.10271829"],["95930","0.01041814"],["95927.9","0.10271829"],["95927","0.13312774"],["95926.9","0.33077498"],["95924.9","0.10271829"],["95924","0.00180915"],["95923.8","0.00022434"],["95919.6","0.00021854"],["95919.1","0.01471872"],["95919","0.05177498"],["95918.1","0.00001889"],["95917.8","0.1521089"],["95917.5","0.00010962"],["95916.2","0.00021958"],["95915.5","0.12531139"],["95915.3","0.279"],["95913.6","0.01739249"],["95913.5","0.05177498"]],"timestamp":1733124805073}}'; diff --git a/sdk/node/src/generate/version.ts b/sdk/node/src/generate/version.ts index c0dbceb9..be352b11 100644 --- a/sdk/node/src/generate/version.ts +++ b/sdk/node/src/generate/version.ts @@ -1,2 +1,2 @@ -export const SdkVersion = 'v0.1.1-alpha'; -export const SdkGenerateDate = '2025-02-25'; +export const SdkVersion = 'v1.2.0'; +export const SdkGenerateDate = '2025-03-21'; diff --git a/sdk/node/src/generate/viplending/index.ts b/sdk/node/src/generate/viplending/index.ts index a9109ea4..9371c291 100644 --- a/sdk/node/src/generate/viplending/index.ts +++ b/sdk/node/src/generate/viplending/index.ts @@ -5,11 +5,15 @@ export const Viplending = { export namespace Viplending { export type VIPLendingAPI = VIPLENDING.VIPLendingAPI; export namespace VIPLending { - export type GetAccountDetailLtv = VIPLENDING.GetAccountDetailLtv; - export type GetAccountDetailMargins = VIPLENDING.GetAccountDetailMargins; - export type GetAccountDetailOrders = VIPLENDING.GetAccountDetailOrders; - export type GetAccountDetailResp = VIPLENDING.GetAccountDetailResp; export type GetAccountsData = VIPLENDING.GetAccountsData; export type GetAccountsResp = VIPLENDING.GetAccountsResp; + export type GetDiscountRateConfigsData = VIPLENDING.GetDiscountRateConfigsData; + export type GetDiscountRateConfigsDataUsdtLevels = + VIPLENDING.GetDiscountRateConfigsDataUsdtLevels; + export type GetDiscountRateConfigsResp = VIPLENDING.GetDiscountRateConfigsResp; + export type GetLoanInfoLtv = VIPLENDING.GetLoanInfoLtv; + export type GetLoanInfoMargins = VIPLENDING.GetLoanInfoMargins; + export type GetLoanInfoOrders = VIPLENDING.GetLoanInfoOrders; + export type GetLoanInfoResp = VIPLENDING.GetLoanInfoResp; } } diff --git a/sdk/node/src/generate/viplending/viplending/api_vip_lending.template b/sdk/node/src/generate/viplending/viplending/api_vip_lending.template index 3bbe7a3c..28b944b0 100644 --- a/sdk/node/src/generate/viplending/viplending/api_vip_lending.template +++ b/sdk/node/src/generate/viplending/viplending/api_vip_lending.template @@ -5,13 +5,26 @@ describe('Auto Test', ()=> { beforeAll(()=> { api = ?? }); - test('getAccountDetail request test', ()=> { + test('getDiscountRateConfigs request test', ()=> { /** - * getAccountDetail - * Get Account Detail + * getDiscountRateConfigs + * Get Discount Rate Configs + * /api/v1/otc-loan/discount-rate-configs + */ + let resp = api.getDiscountRateConfigs(); + return resp.then(result => { + expect(result.data).toEqual(expect.anything()); + console.log(resp); + }); + }) + + test('getLoanInfo request test', ()=> { + /** + * getLoanInfo + * Get Loan Info * /api/v1/otc-loan/loan */ - let resp = api.getAccountDetail(); + let resp = api.getLoanInfo(); return resp.then(result => { expect(result.parentUid).toEqual(expect.anything()); expect(result.orders).toEqual(expect.anything()); diff --git a/sdk/node/src/generate/viplending/viplending/api_vip_lending.test.ts b/sdk/node/src/generate/viplending/viplending/api_vip_lending.test.ts index a3745681..87e1825c 100644 --- a/sdk/node/src/generate/viplending/viplending/api_vip_lending.test.ts +++ b/sdk/node/src/generate/viplending/viplending/api_vip_lending.test.ts @@ -1,20 +1,36 @@ -import { GetAccountDetailResp } from './model_get_account_detail_resp'; +import { GetLoanInfoResp } from './model_get_loan_info_resp'; +import { GetDiscountRateConfigsResp } from './model_get_discount_rate_configs_resp'; import { GetAccountsResp } from './model_get_accounts_resp'; import { RestResponse } from '@model/common'; describe('Auto Test', () => { - test('getAccountDetail request test', () => { + test('getDiscountRateConfigs request test', () => { /** - * getAccountDetail - * Get Account Detail + * getDiscountRateConfigs + * Get Discount Rate Configs + * /api/v1/otc-loan/discount-rate-configs + */ + }); + + test('getDiscountRateConfigs response test', () => { + /** + * getDiscountRateConfigs + * Get Discount Rate Configs + * /api/v1/otc-loan/discount-rate-configs + */ + }); + test('getLoanInfo request test', () => { + /** + * getLoanInfo + * Get Loan Info * /api/v1/otc-loan/loan */ }); - test('getAccountDetail response test', () => { + test('getLoanInfo response test', () => { /** - * getAccountDetail - * Get Account Detail + * getLoanInfo + * Get Loan Info * /api/v1/otc-loan/loan */ }); diff --git a/sdk/node/src/generate/viplending/viplending/api_vip_lending.ts b/sdk/node/src/generate/viplending/viplending/api_vip_lending.ts index b68cc7f6..20b0fbaf 100644 --- a/sdk/node/src/generate/viplending/viplending/api_vip_lending.ts +++ b/sdk/node/src/generate/viplending/viplending/api_vip_lending.ts @@ -1,39 +1,56 @@ // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. import { Transport } from '@internal/interfaces/transport'; -import { GetAccountDetailResp } from './model_get_account_detail_resp'; +import { GetLoanInfoResp } from './model_get_loan_info_resp'; +import { GetDiscountRateConfigsResp } from './model_get_discount_rate_configs_resp'; import { GetAccountsResp } from './model_get_accounts_resp'; export interface VIPLendingAPI { /** - * getAccountDetail Get Account Detail - * Description: The following information is only applicable to loans. Get information on off-exchange funding and loans, This endpoint is only for querying accounts that are currently involved in loans. + * getDiscountRateConfigs Get Discount Rate Configs + * Description: Get the gradient discount rate of each currency + * Documentation: https://www.kucoin.com/docs-new/api-3471463 + * +-----------------------+---------+ + * | Extra API Info | Value | + * +-----------------------+---------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | NULL | + * | API-RATE-LIMIT-POOL | PUBLIC | + * | API-RATE-LIMIT-WEIGHT | 10 | + * +-----------------------+---------+ + */ + getDiscountRateConfigs(): Promise; + + /** + * getLoanInfo Get Loan Info + * Description: The following information is only applicable to loans. Get information on off-exchange funding and loans. This endpoint is only for querying accounts that are currently involved in loans. * Documentation: https://www.kucoin.com/docs-new/api-3470277 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 1 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 5 | + * +-----------------------+------------+ */ - getAccountDetail(): Promise; + getLoanInfo(): Promise; /** * getAccounts Get Accounts - * Description: Accounts participating in OTC lending, This interface is only for querying accounts currently running OTC lending. + * Description: Accounts participating in OTC lending. This interface is only for querying accounts currently running OTC lending. * Documentation: https://www.kucoin.com/docs-new/api-3470278 - * +---------------------+------------+ - * | Extra API Info | Value | - * +---------------------+------------+ - * | API-DOMAIN | SPOT | - * | API-CHANNEL | PRIVATE | - * | API-PERMISSION | GENERAL | - * | API-RATE-LIMIT-POOL | MANAGEMENT | - * | API-RATE-LIMIT | 1 | - * +---------------------+------------+ + * +-----------------------+------------+ + * | Extra API Info | Value | + * +-----------------------+------------+ + * | API-DOMAIN | SPOT | + * | API-CHANNEL | PRIVATE | + * | API-PERMISSION | GENERAL | + * | API-RATE-LIMIT-POOL | MANAGEMENT | + * | API-RATE-LIMIT-WEIGHT | 20 | + * +-----------------------+------------+ */ getAccounts(): Promise; } @@ -41,14 +58,26 @@ export interface VIPLendingAPI { export class VIPLendingAPIImpl implements VIPLendingAPI { constructor(private transport: Transport) {} - getAccountDetail(): Promise { + getDiscountRateConfigs(): Promise { + return this.transport.call( + 'spot', + false, + 'GET', + '/api/v1/otc-loan/discount-rate-configs', + null, + GetDiscountRateConfigsResp, + false, + ); + } + + getLoanInfo(): Promise { return this.transport.call( 'spot', false, 'GET', '/api/v1/otc-loan/loan', null, - GetAccountDetailResp, + GetLoanInfoResp, false, ); } diff --git a/sdk/node/src/generate/viplending/viplending/export.template b/sdk/node/src/generate/viplending/viplending/export.template index 72e76d9d..f46b8078 100644 --- a/sdk/node/src/generate/viplending/viplending/export.template +++ b/sdk/node/src/generate/viplending/viplending/export.template @@ -1,8 +1,11 @@ export namespace VIPLending { -export type GetAccountDetailLtv = VIPLENDING.GetAccountDetailLtv; -export type GetAccountDetailMargins = VIPLENDING.GetAccountDetailMargins; -export type GetAccountDetailOrders = VIPLENDING.GetAccountDetailOrders; -export type GetAccountDetailResp = VIPLENDING.GetAccountDetailResp; export type GetAccountsData = VIPLENDING.GetAccountsData; export type GetAccountsResp = VIPLENDING.GetAccountsResp; +export type GetDiscountRateConfigsData = VIPLENDING.GetDiscountRateConfigsData; +export type GetDiscountRateConfigsDataUsdtLevels = VIPLENDING.GetDiscountRateConfigsDataUsdtLevels; +export type GetDiscountRateConfigsResp = VIPLENDING.GetDiscountRateConfigsResp; +export type GetLoanInfoLtv = VIPLENDING.GetLoanInfoLtv; +export type GetLoanInfoMargins = VIPLENDING.GetLoanInfoMargins; +export type GetLoanInfoOrders = VIPLENDING.GetLoanInfoOrders; +export type GetLoanInfoResp = VIPLENDING.GetLoanInfoResp; } diff --git a/sdk/node/src/generate/viplending/viplending/index.ts b/sdk/node/src/generate/viplending/viplending/index.ts index b0b08e3d..bc54ca5a 100644 --- a/sdk/node/src/generate/viplending/viplending/index.ts +++ b/sdk/node/src/generate/viplending/viplending/index.ts @@ -1,7 +1,10 @@ -export * from './model_get_account_detail_ltv'; -export * from './model_get_account_detail_margins'; -export * from './model_get_account_detail_orders'; -export * from './model_get_account_detail_resp'; export * from './model_get_accounts_data'; export * from './model_get_accounts_resp'; +export * from './model_get_discount_rate_configs_data'; +export * from './model_get_discount_rate_configs_data_usdt_levels'; +export * from './model_get_discount_rate_configs_resp'; +export * from './model_get_loan_info_ltv'; +export * from './model_get_loan_info_margins'; +export * from './model_get_loan_info_orders'; +export * from './model_get_loan_info_resp'; export * from './api_vip_lending'; diff --git a/sdk/node/src/generate/viplending/viplending/model_get_discount_rate_configs_data.ts b/sdk/node/src/generate/viplending/viplending/model_get_discount_rate_configs_data.ts new file mode 100644 index 00000000..e85c7882 --- /dev/null +++ b/sdk/node/src/generate/viplending/viplending/model_get_discount_rate_configs_data.ts @@ -0,0 +1,46 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +import { Type, instanceToPlain, plainToClassFromExist } from 'class-transformer'; +import { GetDiscountRateConfigsDataUsdtLevels } from './model_get_discount_rate_configs_data_usdt_levels'; +import { Serializable } from '@internal/interfaces/serializable'; + +export class GetDiscountRateConfigsData implements Serializable { + /** + * Currency + */ + currency: string; + + /** + * Gradient configuration list, amount converted into USDT + */ + @Type(() => GetDiscountRateConfigsDataUsdtLevels) + usdtLevels: Array; + + /** + * Private constructor, please use the corresponding static methods to construct the object. + */ + private constructor() { + // @ts-ignore + this.currency = null; + // @ts-ignore + this.usdtLevels = null; + } + /** + * Convert the object to a JSON string. + */ + toJson(): string { + return JSON.stringify(instanceToPlain(this)); + } + /** + * Create an object from a JSON string. + */ + static fromJson(input: string): GetDiscountRateConfigsData { + return this.fromObject(JSON.parse(input)); + } + /** + * Create an object from Js Object. + */ + static fromObject(jsonObject: Object): GetDiscountRateConfigsData { + return plainToClassFromExist(new GetDiscountRateConfigsData(), jsonObject); + } +} diff --git a/sdk/node/src/generate/viplending/viplending/model_get_discount_rate_configs_data_usdt_levels.ts b/sdk/node/src/generate/viplending/viplending/model_get_discount_rate_configs_data_usdt_levels.ts new file mode 100644 index 00000000..5c779ec9 --- /dev/null +++ b/sdk/node/src/generate/viplending/viplending/model_get_discount_rate_configs_data_usdt_levels.ts @@ -0,0 +1,51 @@ +// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +import { instanceToPlain, plainToClassFromExist } from 'class-transformer'; +import { Serializable } from '@internal/interfaces/serializable'; + +export class GetDiscountRateConfigsDataUsdtLevels implements Serializable { + /** + * Left end point of gradient interval, left { + /** + * + */ + @Type(() => GetDiscountRateConfigsData) + data: Array; + + /** + * Private constructor, please use the corresponding static methods to construct the object. + */ + private constructor() { + // @ts-ignore + this.data = null; + } + /** + * common response + */ + @Exclude() + commonResponse?: RestResponse; + + setCommonResponse(response: RestResponse): void { + this.commonResponse = response; + } + + /** + * Convert the object to a JSON string. + */ + toJson(): string { + return JSON.stringify(instanceToPlain(this.data)); + } + /** + * Create an object from a JSON string. + */ + static fromJson(input: string): GetDiscountRateConfigsResp { + return this.fromObject(JSON.parse(input)); + } + /** + * Create an object from Js Object. + */ + static fromObject(jsonObject: Object): GetDiscountRateConfigsResp { + return plainToClassFromExist(new GetDiscountRateConfigsResp(), { data: jsonObject }); + } +} diff --git a/sdk/node/src/generate/viplending/viplending/model_get_account_detail_ltv.ts b/sdk/node/src/generate/viplending/viplending/model_get_loan_info_ltv.ts similarity index 84% rename from sdk/node/src/generate/viplending/viplending/model_get_account_detail_ltv.ts rename to sdk/node/src/generate/viplending/viplending/model_get_loan_info_ltv.ts index 468d11b8..eeb45de7 100644 --- a/sdk/node/src/generate/viplending/viplending/model_get_account_detail_ltv.ts +++ b/sdk/node/src/generate/viplending/viplending/model_get_loan_info_ltv.ts @@ -3,7 +3,7 @@ import { instanceToPlain, plainToClassFromExist } from 'class-transformer'; import { Serializable } from '@internal/interfaces/serializable'; -export class GetAccountDetailLtv implements Serializable { +export class GetLoanInfoLtv implements Serializable { /** * LTV of Restricted Transfers to Funding Account */ @@ -53,13 +53,13 @@ export class GetAccountDetailLtv implements Serializable { /** * Create an object from a JSON string. */ - static fromJson(input: string): GetAccountDetailLtv { + static fromJson(input: string): GetLoanInfoLtv { return this.fromObject(JSON.parse(input)); } /** * Create an object from Js Object. */ - static fromObject(jsonObject: Object): GetAccountDetailLtv { - return plainToClassFromExist(new GetAccountDetailLtv(), jsonObject); + static fromObject(jsonObject: Object): GetLoanInfoLtv { + return plainToClassFromExist(new GetLoanInfoLtv(), jsonObject); } } diff --git a/sdk/node/src/generate/viplending/viplending/model_get_account_detail_margins.ts b/sdk/node/src/generate/viplending/viplending/model_get_loan_info_margins.ts similarity index 75% rename from sdk/node/src/generate/viplending/viplending/model_get_account_detail_margins.ts rename to sdk/node/src/generate/viplending/viplending/model_get_loan_info_margins.ts index 80ed8e50..da726645 100644 --- a/sdk/node/src/generate/viplending/viplending/model_get_account_detail_margins.ts +++ b/sdk/node/src/generate/viplending/viplending/model_get_loan_info_margins.ts @@ -3,7 +3,7 @@ import { instanceToPlain, plainToClassFromExist } from 'class-transformer'; import { Serializable } from '@internal/interfaces/serializable'; -export class GetAccountDetailMargins implements Serializable { +export class GetLoanInfoMargins implements Serializable { /** * Margin Currency */ @@ -15,7 +15,7 @@ export class GetAccountDetailMargins implements Serializable { marginQty: string; /** - * Margin Coefficient return real time margin discount rate to USDT + * Margin Coefficient return real-time margin discount rate to USDT */ marginFactor: string; @@ -39,13 +39,13 @@ export class GetAccountDetailMargins implements Serializable { /** * Create an object from a JSON string. */ - static fromJson(input: string): GetAccountDetailMargins { + static fromJson(input: string): GetLoanInfoMargins { return this.fromObject(JSON.parse(input)); } /** * Create an object from Js Object. */ - static fromObject(jsonObject: Object): GetAccountDetailMargins { - return plainToClassFromExist(new GetAccountDetailMargins(), jsonObject); + static fromObject(jsonObject: Object): GetLoanInfoMargins { + return plainToClassFromExist(new GetLoanInfoMargins(), jsonObject); } } diff --git a/sdk/node/src/generate/viplending/viplending/model_get_account_detail_orders.ts b/sdk/node/src/generate/viplending/viplending/model_get_loan_info_orders.ts similarity index 80% rename from sdk/node/src/generate/viplending/viplending/model_get_account_detail_orders.ts rename to sdk/node/src/generate/viplending/viplending/model_get_loan_info_orders.ts index 6116ee72..80b26f74 100644 --- a/sdk/node/src/generate/viplending/viplending/model_get_account_detail_orders.ts +++ b/sdk/node/src/generate/viplending/viplending/model_get_loan_info_orders.ts @@ -3,7 +3,7 @@ import { instanceToPlain, plainToClassFromExist } from 'class-transformer'; import { Serializable } from '@internal/interfaces/serializable'; -export class GetAccountDetailOrders implements Serializable { +export class GetLoanInfoOrders implements Serializable { /** * Loan Orders ID */ @@ -46,13 +46,13 @@ export class GetAccountDetailOrders implements Serializable { /** * Create an object from a JSON string. */ - static fromJson(input: string): GetAccountDetailOrders { + static fromJson(input: string): GetLoanInfoOrders { return this.fromObject(JSON.parse(input)); } /** * Create an object from Js Object. */ - static fromObject(jsonObject: Object): GetAccountDetailOrders { - return plainToClassFromExist(new GetAccountDetailOrders(), jsonObject); + static fromObject(jsonObject: Object): GetLoanInfoOrders { + return plainToClassFromExist(new GetLoanInfoOrders(), jsonObject); } } diff --git a/sdk/node/src/generate/viplending/viplending/model_get_account_detail_resp.ts b/sdk/node/src/generate/viplending/viplending/model_get_loan_info_resp.ts similarity index 68% rename from sdk/node/src/generate/viplending/viplending/model_get_account_detail_resp.ts rename to sdk/node/src/generate/viplending/viplending/model_get_loan_info_resp.ts index 64b86225..8ee5f401 100644 --- a/sdk/node/src/generate/viplending/viplending/model_get_account_detail_resp.ts +++ b/sdk/node/src/generate/viplending/viplending/model_get_loan_info_resp.ts @@ -1,13 +1,13 @@ // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. -import { GetAccountDetailLtv } from './model_get_account_detail_ltv'; +import { GetLoanInfoOrders } from './model_get_loan_info_orders'; +import { GetLoanInfoLtv } from './model_get_loan_info_ltv'; +import { GetLoanInfoMargins } from './model_get_loan_info_margins'; import { Type, instanceToPlain, Exclude, plainToClassFromExist } from 'class-transformer'; -import { GetAccountDetailOrders } from './model_get_account_detail_orders'; -import { GetAccountDetailMargins } from './model_get_account_detail_margins'; import { RestResponse } from '@model/common'; import { Response } from '@internal/interfaces/serializable'; -export class GetAccountDetailResp implements Response { +export class GetLoanInfoResp implements Response { /** * Master UID */ @@ -16,14 +16,14 @@ export class GetAccountDetailResp implements Response { /** * Loan Orders */ - @Type(() => GetAccountDetailOrders) - orders: Array; + @Type(() => GetLoanInfoOrders) + orders: Array; /** * */ - @Type(() => GetAccountDetailLtv) - ltv: GetAccountDetailLtv; + @Type(() => GetLoanInfoLtv) + ltv: GetLoanInfoLtv; /** * Total Margin Amount (USDT) @@ -38,8 +38,8 @@ export class GetAccountDetailResp implements Response { /** * */ - @Type(() => GetAccountDetailMargins) - margins: Array; + @Type(() => GetLoanInfoMargins) + margins: Array; /** * Private constructor, please use the corresponding static methods to construct the object. @@ -77,13 +77,13 @@ export class GetAccountDetailResp implements Response { /** * Create an object from a JSON string. */ - static fromJson(input: string): GetAccountDetailResp { + static fromJson(input: string): GetLoanInfoResp { return this.fromObject(JSON.parse(input)); } /** * Create an object from Js Object. */ - static fromObject(jsonObject: Object): GetAccountDetailResp { - return plainToClassFromExist(new GetAccountDetailResp(), jsonObject); + static fromObject(jsonObject: Object): GetLoanInfoResp { + return plainToClassFromExist(new GetLoanInfoResp(), jsonObject); } } diff --git a/sdk/node/src/internal/infra/default_signer.ts b/sdk/node/src/internal/infra/default_signer.ts index 854fe678..cccc04ad 100644 --- a/sdk/node/src/internal/infra/default_signer.ts +++ b/sdk/node/src/internal/infra/default_signer.ts @@ -62,7 +62,7 @@ export class KcSigner { 'KC-API-PASSPHRASE': this.apiPassphrase, 'KC-API-TIMESTAMP': timestamp, 'KC-API-SIGN': signature, - 'KC-API-KEY-VERSION': '2', + 'KC-API-KEY-VERSION': '3', }; return headers; @@ -89,7 +89,7 @@ export class KcSigner { 'KC-API-PASSPHRASE': this.apiPassphrase, 'KC-API-TIMESTAMP': timestamp, 'KC-API-SIGN': signature, - 'KC-API-KEY-VERSION': '2', + 'KC-API-KEY-VERSION': '3', 'KC-API-PARTNER': this.brokerPartner, 'KC-BROKER-NAME': this.brokerName, 'KC-API-PARTNER-VERIFY': 'true', diff --git a/sdk/node/src/internal/infra/default_ws_callback.ts b/sdk/node/src/internal/infra/default_ws_callback.ts index d57380f2..cf483ae3 100644 --- a/sdk/node/src/internal/infra/default_ws_callback.ts +++ b/sdk/node/src/internal/infra/default_ws_callback.ts @@ -43,7 +43,7 @@ export class CallbackManager { // split topic const parts = topic.split(':'); // if split into 2 parts, then it's a valid topic - if (parts.length === 2) { + if (parts.length === 2 && parts[1] !== 'all') { // add the second part to info.args info.args.push(parts[1]); } diff --git a/sdk/node/tests/e2e/rest/account_test/account_deposit.test.ts b/sdk/node/tests/e2e/rest/account_test/account_deposit.test.ts index 359c1ee1..63a8011c 100644 --- a/sdk/node/tests/e2e/rest/account_test/account_deposit.test.ts +++ b/sdk/node/tests/e2e/rest/account_test/account_deposit.test.ts @@ -8,11 +8,15 @@ import { import { AddDepositAddressV1Req, AddDepositAddressV3Req, - DepositAPI, GetDepositAddressV1Req, GetDepositAddressV2Req, - GetDepositAddressV3Req, GetDepositHistoryOldReq, + DepositAPI, + GetDepositAddressV1Req, + GetDepositAddressV2Req, + GetDepositAddressV3Req, + GetDepositHistoryOldReq, GetDepositHistoryReq, } from '@src/generate/account/deposit'; import { DefaultClient } from '@api/index'; +import ToEnum = AddDepositAddressV1Req.ToEnum; describe('Auto Test', () => { let api: DepositAPI; @@ -53,10 +57,14 @@ describe('Auto Test', () => { * /api/v3/deposit-address/create */ let builder = AddDepositAddressV3Req.builder(); - builder.setCurrency('USDT').setChain('near').setTo(AddDepositAddressV3Req.ToEnum.MAIN).setAmount('1'); + builder + .setCurrency('USDT') + .setChain('near') + .setTo(AddDepositAddressV3Req.ToEnum.MAIN) + .setAmount('1'); let req = builder.build(); let resp = api.addDepositAddressV3(req); - return resp.then(result => { + return resp.then((result) => { expect(result.address).toEqual(expect.anything()); expect(result.chainId).toEqual(expect.anything()); expect(result.to).toEqual(expect.anything()); @@ -77,7 +85,7 @@ describe('Auto Test', () => { builder.setCurrency('ETH').setAmount('10').setChain('eth'); let req = builder.build(); let resp = api.getDepositAddressV3(req); - return resp.then(result => { + return resp.then((result) => { expect(result.data).toEqual(expect.anything()); console.log(result); }); @@ -90,15 +98,15 @@ describe('Auto Test', () => { * /api/v1/deposits */ let builder = GetDepositHistoryReq.builder(); - builder.setCurrency('USDT').setStartAt(1673496371000).setEndAt(1705032371000) + builder.setCurrency('USDT').setStartAt(1673496371000).setEndAt(1705032371000); let req = builder.build(); let resp = api.getDepositHistory(req); - return resp.then(result => { + return resp.then((result) => { expect(result.currentPage).toEqual(expect.anything()); expect(result.pageSize).toEqual(expect.anything()); expect(result.totalNum).toEqual(expect.anything()); expect(result.totalPage).toEqual(expect.anything()); - result.items.forEach(item=> { + result.items.forEach((item) => { expect(item.currency).toEqual(expect.any(String)); expect(item.chain).toEqual(expect.any(String)); expect(item.status).toEqual(expect.any(String)); @@ -124,11 +132,11 @@ describe('Auto Test', () => { * /api/v2/deposit-addresses */ let builder = GetDepositAddressV2Req.builder(); - builder.setCurrency('USDT'); + builder.setCurrency('USDT').setChain("SOL"); let req = builder.build(); let resp = api.getDepositAddressV2(req); - return resp.then(result => { - result.data.forEach(item => { + return resp.then((result) => { + result.data.forEach((item) => { expect(item.address).toEqual(expect.any(String)); expect(item.memo).toEqual(expect.any(String)); expect(item.chain).toEqual(expect.any(String)); @@ -136,7 +144,7 @@ describe('Auto Test', () => { expect(item.to).toEqual(expect.any(String)); expect(item.currency).toEqual(expect.any(String)); expect(item.contractAddress).toEqual(expect.any(String)); - }) + }); console.log(result); }); }); @@ -151,7 +159,7 @@ describe('Auto Test', () => { builder.setCurrency('USDT').setChain('eth'); let req = builder.build(); let resp = api.getDepositAddressV1(req); - return resp.then(result => { + return resp.then((result) => { expect(result.address).toEqual(expect.anything()); expect(result.memo).toEqual(expect.anything()); expect(result.chain).toEqual(expect.anything()); @@ -172,7 +180,7 @@ describe('Auto Test', () => { builder.setStartAt(1714492800000).setEndAt(1732982400000); let req = builder.build(); let resp = api.getDepositHistoryOld(req); - return resp.then(result => { + return resp.then((result) => { expect(result.currentPage).toEqual(expect.anything()); expect(result.pageSize).toEqual(expect.anything()); expect(result.totalNum).toEqual(expect.anything()); @@ -189,10 +197,10 @@ describe('Auto Test', () => { * /api/v1/deposit-addresses */ let builder = AddDepositAddressV1Req.builder(); - builder.setCurrency('ETH').setChain('kcc'); + builder.setCurrency('ETH').setChain('kcc').setTo(ToEnum.TRADE); let req = builder.build(); let resp = api.addDepositAddressV1(req); - return resp.then(result => { + return resp.then((result) => { expect(result.address).toEqual(expect.anything()); expect(result.chain).toEqual(expect.anything()); expect(result.chainId).toEqual(expect.anything()); diff --git a/sdk/node/tests/e2e/rest/account_test/account_subaccount.test.ts b/sdk/node/tests/e2e/rest/account_test/account_subaccount.test.ts index bf07cef0..c260a9d8 100644 --- a/sdk/node/tests/e2e/rest/account_test/account_subaccount.test.ts +++ b/sdk/node/tests/e2e/rest/account_test/account_subaccount.test.ts @@ -147,7 +147,7 @@ describe('Auto Test', () => { * /api/v1/sub-accounts/{subUserId} */ let builder = GetSpotSubAccountDetailReq.builder(); - builder.setSubUserId('6744227ce235b300012232d6').setIncludeBaseAmount(false); + builder.setSubUserId('6745b7bc890ba20001911363').setIncludeBaseAmount(false).setBaseCurrency("USDT").setBaseAmount("0.1"); let req = builder.build(); let resp = api.getSpotSubAccountDetail(req); return resp.then((result) => { diff --git a/sdk/node/tests/e2e/rest/copytrading_test/futures.test.ts b/sdk/node/tests/e2e/rest/copytrading_test/futures.test.ts index a0a42160..d8fbba3c 100644 --- a/sdk/node/tests/e2e/rest/copytrading_test/futures.test.ts +++ b/sdk/node/tests/e2e/rest/copytrading_test/futures.test.ts @@ -68,7 +68,6 @@ describe('Auto Test', () => { .setSymbol('XBTUSDTM') .setLeverage(3) .setType(AddOrderReq.TypeEnum.LIMIT) - .setRemark('order remarks"') .setReduceOnly(false) .setMarginMode(AddOrderReq.MarginModeEnum.ISOLATED) .setPrice('0.1') @@ -96,7 +95,6 @@ describe('Auto Test', () => { .setSymbol('XBTUSDTM') .setLeverage(3) .setType(AddOrderTestReq.TypeEnum.LIMIT) - .setRemark('order remarks"') .setReduceOnly(false) .setMarginMode(AddOrderTestReq.MarginModeEnum.ISOLATED) .setPrice('0.1') @@ -124,7 +122,6 @@ describe('Auto Test', () => { .setSymbol('XBTUSDTM') .setLeverage(3) .setType(AddTPSLOrderReq.TypeEnum.LIMIT) - .setRemark('order remarks"') .setReduceOnly(false) .setMarginMode(AddTPSLOrderReq.MarginModeEnum.ISOLATED) .setPrice('0.1') @@ -181,7 +178,7 @@ describe('Auto Test', () => { * /api/v1/copy-trade/futures/get-max-open-size */ let builder = GetMaxOpenSizeReq.builder(); - builder.setSymbol('XBTUSDTM').setPrice('0.1').setLeverage(10); + builder.setSymbol('XBTUSDTM').setPrice(0.1).setLeverage(10); let req = builder.build(); let resp = api.getMaxOpenSize(req); return resp.then((result) => { @@ -266,7 +263,7 @@ describe('Auto Test', () => { * /api/v1/copy-trade/futures/position/margin/withdraw-margin */ let builder = RemoveIsolatedMarginReq.builder(); - builder.setSymbol('XBTUSDTM').setWithdrawAmount('0.0000001'); + builder.setSymbol('XBTUSDTM').setWithdrawAmount(0.0000001); let req = builder.build(); let resp = api.removeIsolatedMargin(req); return resp.then((result) => { diff --git a/sdk/node/tests/e2e/rest/futures_test/funding_fee.test.ts b/sdk/node/tests/e2e/rest/futures_test/funding_fee.test.ts index 40118d4a..9599019b 100644 --- a/sdk/node/tests/e2e/rest/futures_test/funding_fee.test.ts +++ b/sdk/node/tests/e2e/rest/futures_test/funding_fee.test.ts @@ -87,7 +87,6 @@ describe('Auto Test', () => { }); }); - // TODO empty test('getPrivateFundingHistory request test', () => { /** * getPrivateFundingHistory @@ -97,8 +96,8 @@ describe('Auto Test', () => { let builder = GetPrivateFundingHistoryReq.builder(); builder .setSymbol('XBTUSDTM') - .setFrom(1739203200000) - .setTo(1739289600000) + .setStartAt(1700310700000) + .setEndAt(1702310700000) .setReverse(true) .setMaxCount(100); let req = builder.build(); diff --git a/sdk/node/tests/e2e/rest/spot_test/market.test.ts b/sdk/node/tests/e2e/rest/spot_test/market.test.ts index 0a2ebee1..09a7ce02 100644 --- a/sdk/node/tests/e2e/rest/spot_test/market.test.ts +++ b/sdk/node/tests/e2e/rest/spot_test/market.test.ts @@ -8,7 +8,7 @@ import { import { Get24hrStatsReq, GetAllSymbolsReq, - GetAnnouncementsReq, + GetAnnouncementsReq, GetCallAuctionInfoReq, GetCallAuctionPartOrderBookReq, GetCurrencyReq, GetFiatPriceReq, GetFullOrderBookReq, @@ -332,6 +332,48 @@ describe('Auto Test', () => { }); }); + test('getCallAuctionPartOrderBook request test', ()=> { + /** + * getCallAuctionPartOrderBook + * Get Call Auction Part OrderBook + * /api/v1/market/orderbook/callauction/level2_{size} + */ + let builder = GetCallAuctionPartOrderBookReq.builder(); + builder.setSymbol("HBAR-USDC").setSize("20"); + let req = builder.build(); + let resp = api.getCallAuctionPartOrderBook(req); + return resp.then(result => { + expect(result.time).toEqual(expect.anything()); + expect(result.sequence).toEqual(expect.anything()); + expect(result.bids).toEqual(expect.anything()); + expect(result.asks).toEqual(expect.anything()); + console.log(resp); + }); + }) + + test('getCallAuctionInfo request test', ()=> { + /** + * getCallAuctionInfo + * Get Call Auction Info + * /api/v1/market/callauctionData + */ + let builder = GetCallAuctionInfoReq.builder(); + builder.setSymbol("HBAR-USDC"); + let req = builder.build(); + let resp = api.getCallAuctionInfo(req); + return resp.then(result => { + expect(result.symbol).toEqual(expect.anything()); + expect(result.estimatedPrice).toEqual(expect.anything()); + expect(result.estimatedSize).toEqual(expect.anything()); + expect(result.sellOrderRangeLowPrice).toEqual(expect.anything()); + expect(result.sellOrderRangeHighPrice).toEqual(expect.anything()); + expect(result.buyOrderRangeLowPrice).toEqual(expect.anything()); + expect(result.buyOrderRangeHighPrice).toEqual(expect.anything()); + expect(result.time).toEqual(expect.anything()); + console.log(resp); + }); + }) + test('get24hrStats request test', () => { /** * get24hrStats @@ -376,6 +418,19 @@ describe('Auto Test', () => { }); }); + test('getClientIPAddress request test', ()=> { + /** + * getClientIPAddress + * Get Client IP Address + * /api/v1/my-ip + */ + let resp = api.getClientIPAddress(); + return resp.then(result => { + expect(result.data).toEqual(expect.anything()); + console.log(resp); + }); + }) + test('getServerTime request test', () => { /** * getServerTime diff --git a/sdk/node/tests/e2e/rest/spot_test/order.test.ts b/sdk/node/tests/e2e/rest/spot_test/order.test.ts index 744addc3..2e7f47b2 100644 --- a/sdk/node/tests/e2e/rest/spot_test/order.test.ts +++ b/sdk/node/tests/e2e/rest/spot_test/order.test.ts @@ -38,15 +38,13 @@ import { GetOcoOrderByClientOidReq, GetOcoOrderByOrderIdReq, GetOcoOrderDetailByOrderIdReq, - GetOcoOrderListReq, + GetOcoOrderListReq, GetOpenOrdersByPageReq, GetOpenOrdersReq, GetOrderByClientOidOldReq, GetOrderByClientOidReq, GetOrderByOrderIdOldReq, GetOrderByOrderIdReq, GetOrdersListOldReq, - GetRecentOrdersListOldReq, - GetRecentTradeHistoryOldReq, GetStopOrderByClientOidReq, GetStopOrderByOrderIdReq, GetStopOrdersListReq, @@ -252,7 +250,7 @@ describe('Auto Test', () => { * /api/v1/hf/orders/{orderId} */ let builder = CancelOrderByOrderIdReq.builder(); - builder.setOrderId('67ac0e57ae86dc0008981482').setSymbol('BTC-USDT'); + builder.setOrderId('67d8da811ecaf60007e9f590').setSymbol('BTC-USDT'); let req = builder.build(); let resp = api.cancelOrderByOrderId(req); return resp.then((result) => { @@ -397,7 +395,7 @@ describe('Auto Test', () => { * /api/v1/hf/orders/{orderId} */ let builder = GetOrderByOrderIdReq.builder(); - builder.setSymbol('BTC-USDT').setOrderId('67ac106d07813c000779486e'); + builder.setSymbol('BTC-USDT').setOrderId('67d8da811ecaf60007e9f590'); let req = builder.build(); let resp = api.getOrderByOrderId(req); return resp.then((result) => { @@ -510,6 +508,33 @@ describe('Auto Test', () => { }); }); + + test('getOpenOrdersByPage request test', ()=> { + /** + * getOpenOrdersByPage + * Get Open Orders By Page + * /api/v1/hf/orders/active/page + */ + let builder = GetOpenOrdersByPageReq.builder(); + builder.setSymbol('BTC-USDT').setPageNum(1).setPageSize(50); + let req = builder.build(); + let resp = api.getOpenOrdersByPage(req); + return resp.then(result => { + expect(result.currentPage).toEqual(expect.anything()); + expect(result.pageSize).toEqual(expect.anything()); + expect(result.totalNum).toEqual(expect.anything()); + expect(result.totalPage).toEqual(expect.anything()); + result.items.forEach(item => { + expect(item.fee).toEqual(expect.anything()); + expect(item.id).toEqual(expect.anything()); + expect(item.symbol).toEqual(expect.anything()); + expect(item.opType).toEqual(expect.anything()); + }) + console.log(resp); + }); + }) + + test('getClosedOrders request test', () => { /** * getClosedOrders @@ -709,9 +734,7 @@ describe('Auto Test', () => { let builder = GetStopOrdersListReq.builder(); builder .setSymbol('BTC-USDT') - .setSide(GetStopOrdersListReq.SideEnum.BUY) .setType(GetStopOrdersListReq.TypeEnum.LIMIT) - .setTradeType(GetStopOrdersListReq.TradeTypeEnum.TRADE); let req = builder.build(); let resp = api.getStopOrdersList(req); return resp.then((result) => { @@ -1080,7 +1103,7 @@ describe('Auto Test', () => { * /api/v1/orders/{orderId} */ let builder = CancelOrderByOrderIdOldReq.builder(); - builder.setSymbol('BTC-USDT').setOrderId('67ac173127f3550007502cfc'); + builder.setOrderId('67ac173127f3550007502cfc'); let req = builder.build(); let resp = api.cancelOrderByOrderIdOld(req); return resp.then((result) => { @@ -1096,7 +1119,7 @@ describe('Auto Test', () => { * /api/v1/order/client-order/{clientOid} */ let builder = CancelOrderByClientOidOldReq.builder(); - builder.setSymbol('BTC-USDT').setClientOid('0a3a8abd-09e1-498f-a6cc-94eeacfe2203'); + builder.setClientOid('0a3a8abd-09e1-498f-a6cc-94eeacfe2203'); let req = builder.build(); let resp = api.cancelOrderByClientOidOld(req); return resp.then((result) => { @@ -1172,9 +1195,7 @@ describe('Auto Test', () => { * Get Recent Orders List - Old * /api/v1/limit/orders */ - let builder = GetRecentOrdersListOldReq.builder(); - let req = builder.build(); - let resp = api.getRecentOrdersListOld(req); + let resp = api.getRecentOrdersListOld(); return resp.then((result) => { result.data.forEach((item) => { expect(item.id).toEqual(expect.any(String)); @@ -1325,9 +1346,7 @@ describe('Auto Test', () => { * Get Recent Trade History - Old * /api/v1/limit/fills */ - let builder = GetRecentTradeHistoryOldReq.builder(); - let req = builder.build(); - let resp = api.getRecentTradeHistoryOld(req); + let resp = api.getRecentTradeHistoryOld(); return resp.then((result) => { result.data.forEach((item) => { expect(item.symbol).toEqual(expect.any(String)); diff --git a/sdk/node/tests/e2e/ws/spot/private.test.ts b/sdk/node/tests/e2e/ws/spot/private.test.ts index 60330377..b6d355c0 100644 --- a/sdk/node/tests/e2e/ws/spot/private.test.ts +++ b/sdk/node/tests/e2e/ws/spot/private.test.ts @@ -5,7 +5,13 @@ import { GlobalFuturesApiEndpoint, WebSocketClientOptionBuilder, } from '@model/index'; -import { AccountEvent, OrderV1Event, OrderV2Event, SpotPrivateWS } from '@src/generate/spot/spotprivate'; +import { + AccountEvent, + OrderV1Event, + OrderV2Event, + SpotPrivateWS, + StopOrderEvent, +} from '@src/generate/spot/spotprivate'; import { DefaultClient } from '@api/index'; jest.setTimeout(300000); @@ -109,4 +115,31 @@ describe('Spot Private WebSocket API Tests', () => { console.log(`subscribe id: ${subid}`); })(); }); + + test('stopOrder subscription test', (done) => { + (async () => { + let subid = await api.stopOrder( + async (topic: string, subject: string, item: StopOrderEvent) => { + console.log(item); + expect(item.createdAt).toEqual(expect.any(Number)); + expect(item.orderId).toEqual(expect.any(String)); + expect(item.orderPrice).toEqual(expect.any(Number)); + expect(item.orderType).toEqual(expect.any(String)); + expect(item.side).toEqual(expect.any(String)); + expect(item.size).toEqual(expect.any(String)); + expect(item.stop).toEqual(expect.any(String)); + expect(item.stopPrice).toEqual(expect.any(String)); + expect(item.symbol).toEqual(expect.any(String)); + expect(item.tradeType).toEqual(expect.any(String)); + expect(item.ts).toEqual(expect.any(Number)); + expect(item.type).toEqual(expect.any(String)); + api.unSubscribe(subid).then(() => { + done(); + }); + }, + ); + + console.log(`subscribe id: ${subid}`); + })(); + }); }); diff --git a/sdk/node/tests/e2e/ws/spot/public.test.ts b/sdk/node/tests/e2e/ws/spot/public.test.ts index 0a956b78..454aefa4 100644 --- a/sdk/node/tests/e2e/ws/spot/public.test.ts +++ b/sdk/node/tests/e2e/ws/spot/public.test.ts @@ -14,7 +14,9 @@ import { KlinesEvent, TradeEvent, OrderbookLevel50Event, - MarketSnapshotEvent + MarketSnapshotEvent, + CallAuctionInfoEvent, + CallAuctionOrderbookLevel50Event, } from '@src/generate/spot/spotpublic'; import { DefaultClient } from '@api/index'; @@ -85,17 +87,20 @@ describe('Spot Public WebSocket API Tests', () => { }); test('ticker test', () => { - const subid = api.ticker([TEST_SYMBOL], (topic: string, subject: string, data: TickerEvent) => { - expect(data).toBeDefined(); - expect(data.sequence).toEqual(expect.anything()); - expect(data.price).toEqual(expect.anything()); - expect(data.size).toEqual(expect.anything()); - expect(data.bestAsk).toEqual(expect.anything()); - expect(data.bestAskSize).toEqual(expect.anything()); - expect(data.bestBid).toEqual(expect.anything()); - expect(data.bestBidSize).toEqual(expect.anything()); - console.log(data); - }); + const subid = api.ticker( + [TEST_SYMBOL], + (topic: string, subject: string, data: TickerEvent) => { + expect(data).toBeDefined(); + expect(data.sequence).toEqual(expect.anything()); + expect(data.price).toEqual(expect.anything()); + expect(data.size).toEqual(expect.anything()); + expect(data.bestAsk).toEqual(expect.anything()); + expect(data.bestAskSize).toEqual(expect.anything()); + expect(data.bestBid).toEqual(expect.anything()); + expect(data.bestBidSize).toEqual(expect.anything()); + console.log(data); + }, + ); return subid .then(async (id) => { @@ -108,15 +113,18 @@ describe('Spot Public WebSocket API Tests', () => { }); test('orderbook increment subscription test', () => { - const subid = api.orderbookIncrement([TEST_SYMBOL], (topic: string, subject: string, data: OrderbookIncrementEvent) => { - expect(data).toBeDefined(); - expect(data.sequenceStart).toEqual(expect.anything()); - expect(data.sequenceEnd).toEqual(expect.anything()); - expect(data.changes).toBeDefined(); - expect(data.time).toEqual(expect.anything()); - expect(data.symbol).toEqual(expect.anything()); - console.log(data); - }); + const subid = api.orderbookIncrement( + [TEST_SYMBOL], + (topic: string, subject: string, data: OrderbookIncrementEvent) => { + expect(data).toBeDefined(); + expect(data.sequenceStart).toEqual(expect.anything()); + expect(data.sequenceEnd).toEqual(expect.anything()); + expect(data.changes).toBeDefined(); + expect(data.time).toEqual(expect.anything()); + expect(data.symbol).toEqual(expect.anything()); + console.log(data); + }, + ); return subid .then(async (id) => { @@ -129,13 +137,16 @@ describe('Spot Public WebSocket API Tests', () => { }); test('orderbook level5 subscription test', () => { - const subid = api.orderbookLevel5([TEST_SYMBOL], (topic: string, subject: string, data: OrderbookLevel5Event) => { - expect(data).toBeDefined(); - expect(data.asks).toEqual(expect.anything()); - expect(data.bids).toEqual(expect.anything()); - expect(data.timestamp).toEqual(expect.anything()); - console.log(data); - }); + const subid = api.orderbookLevel5( + [TEST_SYMBOL], + (topic: string, subject: string, data: OrderbookLevel5Event) => { + expect(data).toBeDefined(); + expect(data.asks).toEqual(expect.anything()); + expect(data.bids).toEqual(expect.anything()); + expect(data.timestamp).toEqual(expect.anything()); + console.log(data); + }, + ); return subid .then(async (id) => { @@ -148,13 +159,17 @@ describe('Spot Public WebSocket API Tests', () => { }); test('klines subscription test', () => { - const subid = api.klines(TEST_SYMBOL, '1min', (topic: string, subject: string, data: KlinesEvent) => { - expect(data).toBeDefined(); - expect(data.candles).toEqual(expect.anything()); - expect(data.candles).toEqual(expect.anything()); - expect(data.time).toEqual(expect.anything()); - console.log(data); - }); + const subid = api.klines( + TEST_SYMBOL, + '1min', + (topic: string, subject: string, data: KlinesEvent) => { + expect(data).toBeDefined(); + expect(data.candles).toEqual(expect.anything()); + expect(data.candles).toEqual(expect.anything()); + expect(data.time).toEqual(expect.anything()); + console.log(data); + }, + ); return subid .then(async (id) => { @@ -167,19 +182,22 @@ describe('Spot Public WebSocket API Tests', () => { }); test('trade subscription test', () => { - const subid = api.trade([TEST_SYMBOL], (topic: string, subject: string, data: TradeEvent) => { - expect(data).toBeDefined(); - expect(data.makerOrderId).toEqual(expect.anything()); - expect(data.price).toEqual(expect.anything()); - expect(data.sequence).toEqual(expect.anything()); - expect(data.side).toEqual(expect.anything()); - expect(data.size).toEqual(expect.anything()); - expect(data.symbol).toEqual(expect.anything()); - expect(data.takerOrderId).toEqual(expect.anything()); - expect(data.time).toEqual(expect.anything()); - expect(data.type).toEqual(expect.anything()); - console.log(data); - }); + const subid = api.trade( + [TEST_SYMBOL], + (topic: string, subject: string, data: TradeEvent) => { + expect(data).toBeDefined(); + expect(data.makerOrderId).toEqual(expect.anything()); + expect(data.price).toEqual(expect.anything()); + expect(data.sequence).toEqual(expect.anything()); + expect(data.side).toEqual(expect.anything()); + expect(data.size).toEqual(expect.anything()); + expect(data.symbol).toEqual(expect.anything()); + expect(data.takerOrderId).toEqual(expect.anything()); + expect(data.time).toEqual(expect.anything()); + expect(data.type).toEqual(expect.anything()); + console.log(data); + }, + ); return subid .then(async (id) => { @@ -192,15 +210,16 @@ describe('Spot Public WebSocket API Tests', () => { }); test('orderbook level50 subscription test', () => { - const subid = api.orderbookLevel50([TEST_SYMBOL], (topic: string, subject: string, data: OrderbookLevel50Event) => { - expect(data).toBeDefined(); - expect(data.sequenceStart).toEqual(expect.anything()); - expect(data.sequenceEnd).toEqual(expect.anything()); - expect(data.changes).toEqual(expect.anything()); - expect(data.time).toEqual(expect.anything()); - expect(data.symbol).toEqual(expect.anything()); - console.log(data); - }); + const subid = api.orderbookLevel50( + [TEST_SYMBOL], + (topic: string, subject: string, data: OrderbookLevel50Event) => { + expect(data).toBeDefined(); + expect(data.asks).toEqual(expect.anything()); + expect(data.bids).toEqual(expect.anything()); + expect(data.timestamp).toEqual(expect.anything()); + console.log(data); + }, + ); return subid .then(async (id) => { @@ -213,12 +232,15 @@ describe('Spot Public WebSocket API Tests', () => { }); test('market snapshot subscription test', () => { - const subid = api.marketSnapshot(TEST_SYMBOL, (topic: string, subject: string, data: MarketSnapshotEvent) => { - expect(data).toBeDefined(); - expect(data.sequence).toEqual(expect.anything()); - expect(data.data).toEqual(expect.anything()); - console.log(data); - }); + const subid = api.marketSnapshot( + TEST_SYMBOL, + (topic: string, subject: string, data: MarketSnapshotEvent) => { + expect(data).toBeDefined(); + expect(data.sequence).toEqual(expect.anything()); + expect(data.data).toEqual(expect.anything()); + console.log(data); + }, + ); return subid .then(async (id) => { @@ -230,4 +252,41 @@ describe('Spot Public WebSocket API Tests', () => { }); }); + test('market callAuctionInfo subscription test', () => { + const subid = api.callAuctionInfo( + TEST_SYMBOL, + (topic: string, subject: string, data: CallAuctionInfoEvent) => { + expect(data).toBeDefined(); + console.log(data); + }, + ); + + return subid + .then(async (id) => { + await delay(5000); + return id; + }) + .then((id) => { + return api.unSubscribe(id); + }); + }); + + test('market callAuctionOrderbookLevel50 subscription test', () => { + const subid = api.callAuctionOrderbookLevel50( + TEST_SYMBOL, + (topic: string, subject: string, data: CallAuctionOrderbookLevel50Event) => { + expect(data).toBeDefined(); + console.log(data); + }, + ); + + return subid + .then(async (id) => { + await delay(5000); + return id; + }) + .then((id) => { + return api.unSubscribe(id); + }); + }); }); diff --git a/sdk/postman/CHANGELOG.md b/sdk/postman/CHANGELOG.md index b078f665..421cd2f9 100644 --- a/sdk/postman/CHANGELOG.md +++ b/sdk/postman/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +API documentation [Changelog](https://www.kucoin.com/docs-new/change-log) + +Current synchronized API documentation version [20250313](https://www.kucoin.com/docs-new/change-log#20250313) + +## 2025-03-21(1.2.0) +- Update the latest APIs, documentation, etc +- Remove range validation in Python +- Update API KEY verification version to 3 +- Fix the bug related to resubscribing +- The Node.js SDK has been changed to the official unified version +- Fix issues with automated test execution. + +## 2025-03-04(Python 1.1.1) +- Update __init__.py to enhance the import experience +- Reduce unnecessary log output +- Optimize WebSocket reconnection logic + +## 2025-02-26(Nodejs 0.1.0-alpha) +- Release Node.js implementation + ## 2025-01-16(1.1.0) - Updated the API sequence to be consistent with the documentation. - Updated the license. diff --git a/sdk/postman/collection-Abandoned Endpoints.json b/sdk/postman/collection-Abandoned Endpoints.json index e756381e..1ba20221 100644 --- a/sdk/postman/collection-Abandoned Endpoints.json +++ b/sdk/postman/collection-Abandoned Endpoints.json @@ -10,7 +10,7 @@ "name": "Account & Funding", "item": [ { - "name": "Get SubAccount List - Summary Info(V1)", + "name": "Get sub-account List - Summary Info (V1)", "request": { "method": "GET", "header": [], @@ -87,7 +87,7 @@ ] }, { - "name": "Get SubAccount List - Spot Balance(V1)", + "name": "Get sub-account List - Spot Balance (V1)", "request": { "method": "GET", "header": [], @@ -162,7 +162,7 @@ ] }, { - "name": "Get Deposit Addresses(V2)", + "name": "Get Deposit Addresses (V2)", "request": { "method": "GET", "header": [], @@ -180,12 +180,17 @@ "query": [ { "key": "currency", - "value": "", + "value": "USDT", "description": "currency" + }, + { + "key": "chain", + "value": "eth", + "description": "Chain ID of currency" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470300)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/deposit-addresses** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nGet all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to Add Deposit Address first.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. |\n| chain | string | The chainName of currency |\n| chainId | string | The chainId of currency |\n| to | string | Deposit account type: main (funding account), trade (spot trading account) |\n| currency | string | currency |\n| contractAddress | string | The token contract address. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470300)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/deposit-addresses** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nGet all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to add the deposit address first.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. |\n| chain | string | The chainName of currency |\n| chainId | string | The chainId of currency |\n| to | string | Deposit account type: main (funding account), trade (spot trading account) |\n| currency | string | currency |\n| contractAddress | string | The token contract address. |\n\n---\n", "body": {} }, "response": [ @@ -208,8 +213,13 @@ "query": [ { "key": "currency", - "value": "", + "value": "USDT", "description": "currency" + }, + { + "key": "chain", + "value": "eth", + "description": "Chain ID of currency" } ] } @@ -249,9 +259,9 @@ ] }, { - "name": "SubAccount Transfer", + "name": "Get Deposit Addresses - V1", "request": { - "method": "POST", + "method": "GET", "header": [], "url": { "raw": "", @@ -261,28 +271,30 @@ ], "path": [ "api", - "v2", - "accounts", - "sub-transfer" + "v1", + "deposit-addresses" ], - "query": [] - }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470301)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/accounts/universal-transfer** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nFunds in the main account, trading account and margin account of a Master Account can be transferred to the main account, trading account, futures account and margin account of its Sub-Account. The futures account of both the Master Account and Sub-Account can only accept funds transferred in from the main account, trading account and margin account and cannot transfer out to these accounts.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits |\n| currency | string | currency |\n| amount | string | Transfer amount, the amount is a positive integer multiple of the currency precision. |\n| direction | string | OUT — the master user to sub user
IN — the sub user to the master user. |\n| accountType | string | Account type:MAIN、TRADE、CONTRACT、MARGIN |\n| subAccountType | string | Sub Account type:MAIN、TRADE、CONTRACT、MARGIN |\n| subUserId | string | the user ID of a sub-account. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | Transfer order ID |\n\n---\n", - "body": { - "mode": "raw", - "raw": "{\n \"clientOid\": \"64ccc0f164781800010d8c09\",\n \"currency\": \"USDT\",\n \"amount\": \"0.01\",\n \"direction\": \"OUT\",\n \"accountType\": \"MAIN\",\n \"subAccountType\": \"MAIN\",\n \"subUserId\": \"63743f07e0c5230001761d08\"\n}", - "options": { - "raw": { - "language": "json" + "query": [ + { + "key": "currency", + "value": "", + "description": "currency" + }, + { + "key": "chain", + "value": null, + "description": "The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies." } - } - } + ] + }, + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470305)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/deposit-addresses** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nGet all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to add the deposit address first.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. |\n| chain | string | The chainName of currency |\n| chainId | string | The chainId of currency |\n| to | string | Deposit account type: main (funding account), trade (spot trading account) |\n| currency | string | currency |\n| contractAddress | string | The token contract address. |\n\n---\n", + "body": {} }, "response": [ { "name": "Successful Response", "originalRequest": { - "method": "POST", + "method": "GET", "header": [], "url": { "raw": "", @@ -292,11 +304,21 @@ ], "path": [ "api", - "v2", - "accounts", - "sub-transfer" + "v1", + "deposit-addresses" ], - "query": [] + "query": [ + { + "key": "currency", + "value": "", + "description": "currency" + }, + { + "key": "chain", + "value": null, + "description": "The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies." + } + ] } }, "status": "OK", @@ -329,12 +351,12 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"orderId\": \"670be6b0b1b9080007040a9b\"\n }\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"address\": \"0xea220bf61c3c2b0adc2cfa29fec3d2677745a379\",\n \"memo\": \"\",\n \"chain\": \"ERC20\",\n \"chainId\": \"eth\",\n \"to\": \"MAIN\",\n \"currency\": \"USDT\"\n }\n}" } ] }, { - "name": "Inner Transfer", + "name": "Sub-account Transfer", "request": { "method": "POST", "header": [], @@ -348,14 +370,14 @@ "api", "v2", "accounts", - "inner-transfer" + "sub-transfer" ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470302)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/accounts/universal-transfer** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nThis API endpoint can be used to transfer funds between accounts internally. Users can transfer funds between their account free of charge. \n:::\n\nnotice:\nIt is not supported to transfer funds from contract account to other accounts.\nThe margin_v2 account currently only supports mutual transfers with margin accounts, and cannot be directly transferred from other accounts to margin_v2\nThe isolated_v2 account currently only supports mutual transfer with the margin account, and cannot be directly transferred from other accounts to isolated_v2\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits |\n| currency | string | currency |\n| amount | string | Transfer amount, the amount is a positive integer multiple of the currency precision. |\n| to | string | Receiving Account Type: main, trade, margin, isolated, margin_v2, isolated_v2, contract |\n| fromTag | string | Trading pair, required when the payment account type is isolated, e.g.: BTC-USDT |\n| toTag | string | Trading pair, required when the payment account type is isolated, e.g.: BTC-USDT |\n| from | string | Payment Account Type: main, trade, margin, isolated, margin_v2, isolated_v2 |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | Transfer order ID |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470301)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/accounts/universal-transfer** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nFunds in the main account, trading account and margin account of a Master Account can be transferred to the main account, trading account, futures account and margin account of its Sub-Account. The futures account of both the Master Account and Sub-Account can only accept funds transferred in from the main account, trading account and margin account and cannot transfer out to these accounts.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits |\n| currency | string | currency |\n| amount | string | Transfer amount: The amount is a positive integer multiple of the currency precision. |\n| direction | string | OUT — the master user to sub user
IN — the sub user to the master user |\n| accountType | string | Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED |\n| subAccountType | string | Sub-account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED |\n| subUserId | string | the user ID of a sub-account. |\n| tag | string | Need to be defined if accountType=ISOLATED. |\n| subTag | string | Need to be defined if subAccountType=ISOLATED. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | Transfer order ID |\n\n---\n", "body": { "mode": "raw", - "raw": "{\n \"clientOid\": \"64ccc0f164781800010d8c09\",\n \"currency\": \"USDT\",\n \"amount\": \"0.01\",\n \"from\": \"main\",\n \"to\": \"trade\"\n}", + "raw": "{\n \"clientOid\": \"64ccc0f164781800010d8c09\",\n \"currency\": \"USDT\",\n \"amount\": \"0.01\",\n \"direction\": \"OUT\",\n \"accountType\": \"MAIN\",\n \"subAccountType\": \"MAIN\",\n \"subUserId\": \"63743f07e0c5230001761d08\"\n}", "options": { "raw": { "language": "json" @@ -379,173 +401,7 @@ "api", "v2", "accounts", - "inner-transfer" - ], - "query": [] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": { - "content": "", - "type": "text/plain" - } - }, - { - "key": "gw-ratelimit-remaining", - "value": 1997, - "name": "gw-ratelimit-remaining" - }, - { - "key": "gw-ratelimit-limit", - "value": 2000, - "name": "gw-ratelimit-limit" - }, - { - "key": "gw-ratelimit-reset", - "value": 29990, - "name": "gw-ratelimit-reset" - } - ], - "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"orderId\": \"670beb3482a1bb0007dec644\"\n }\n}" - } - ] - }, - { - "name": "Futures Account Transfer Out", - "request": { - "method": "POST", - "header": [], - "url": { - "raw": "", - "protocol": "https", - "host": [ - "{{futures_endpoint}}" - ], - "path": [ - "api", - "v3", - "transfer-out" - ], - "query": [] - }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470303)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/accounts/universal-transfer** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nThe amount to be transferred will be deducted from the KuCoin Futures Account. Please ensure that you have sufficient funds in your KuCoin Futures Account, or the transfer will fail.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency, including XBT,USDT... |\n| amount | number | Amount to be transfered out, the maximum cannot exceed 1000000000 |\n| recAccountType | string | Receive account type, including MAIN,TRADE |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| applyId | string | Transfer order ID |\n| bizNo | string | Business number |\n| payAccountType | string | Pay account type |\n| payTag | string | Pay account sub type |\n| remark | string | User remark |\n| recAccountType | string | Receive account type |\n| recTag | string | Receive account sub type |\n| recRemark | string | Receive account tx remark |\n| recSystem | string | Receive system |\n| status | string | Status:APPLY, PROCESSING, PENDING_APPROVAL, APPROVED, REJECTED, PENDING_CANCEL, CANCEL, SUCCESS |\n| currency | string | Currency |\n| amount | string | Transfer amout |\n| fee | string | Transfer fee |\n| sn | integer | Serial number |\n| reason | string | Fail Reason |\n| createdAt | integer | Create time |\n| updatedAt | integer | Update time |\n\n---\n", - "body": { - "mode": "raw", - "raw": "{\n \"currency\": \"USDT\",\n \"amount\": 0.01,\n \"recAccountType\": \"MAIN\"\n}", - "options": { - "raw": { - "language": "json" - } - } - } - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [], - "url": { - "raw": "", - "protocol": "https", - "host": [ - "{{futures_endpoint}}" - ], - "path": [ - "api", - "v3", - "transfer-out" - ], - "query": [] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "description": { - "content": "", - "type": "text/plain" - } - }, - { - "key": "gw-ratelimit-remaining", - "value": 1997, - "name": "gw-ratelimit-remaining" - }, - { - "key": "gw-ratelimit-limit", - "value": 2000, - "name": "gw-ratelimit-limit" - }, - { - "key": "gw-ratelimit-reset", - "value": 29990, - "name": "gw-ratelimit-reset" - } - ], - "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"applyId\": \"670bf84c577f6c00017a1c48\",\n \"bizNo\": \"670bf84c577f6c00017a1c47\",\n \"payAccountType\": \"CONTRACT\",\n \"payTag\": \"DEFAULT\",\n \"remark\": \"\",\n \"recAccountType\": \"MAIN\",\n \"recTag\": \"DEFAULT\",\n \"recRemark\": \"\",\n \"recSystem\": \"KUCOIN\",\n \"status\": \"PROCESSING\",\n \"currency\": \"USDT\",\n \"amount\": \"0.01\",\n \"fee\": \"0\",\n \"sn\": 1519769124134806,\n \"reason\": \"\",\n \"createdAt\": 1728837708000,\n \"updatedAt\": 1728837708000\n }\n}" - } - ] - }, - { - "name": "Futures Account Transfer In", - "request": { - "method": "POST", - "header": [], - "url": { - "raw": "", - "protocol": "https", - "host": [ - "{{futures_endpoint}}" - ], - "path": [ - "api", - "v1", - "transfer-in" - ], - "query": [] - }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470304)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/accounts/universal-transfer** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nThe amount to be transferred will be deducted from the payAccount. Please ensure that you have sufficient funds in your payAccount Account, or the transfer will fail.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency, including XBT,USDT... |\n| amount | number | Amount to be transfered in |\n| payAccountType | string | Payment account type, including MAIN,TRADE |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | string | |\n\n---\n", - "body": { - "mode": "raw", - "raw": "{\n \"currency\": \"USDT\",\n \"amount\": 0.01,\n \"payAccountType\": \"MAIN\"\n}", - "options": { - "raw": { - "language": "json" - } - } - } - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [], - "url": { - "raw": "", - "protocol": "https", - "host": [ - "{{futures_endpoint}}" - ], - "path": [ - "api", - "v1", - "transfer-in" + "sub-transfer" ], "query": [] } @@ -580,12 +436,12 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": null\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"orderId\": \"670be6b0b1b9080007040a9b\"\n }\n}" } ] }, { - "name": "Get Deposit Addresses - V1", + "name": "Get Deposit History - Old", "request": { "method": "GET", "header": [], @@ -598,7 +454,7 @@ "path": [ "api", "v1", - "deposit-addresses" + "hist-deposits" ], "query": [ { @@ -607,13 +463,23 @@ "description": "currency" }, { - "key": "chain", - "value": null, - "description": "The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency." + "key": "status", + "value": "SUCCESS", + "description": "Status. Available value: PROCESSING, SUCCESS, and FAILURE" + }, + { + "key": "startAt", + "value": "1728663338000", + "description": "Start time (milliseconds)" + }, + { + "key": "endAt", + "value": "1728692138000", + "description": "End time (milliseconds)" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470305)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/deposit-addresses** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nGet all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to Add Deposit Address first.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. |\n| chain | string | The chainName of currency |\n| chainId | string | The chainId of currency |\n| to | string | Deposit account type: main (funding account), trade (spot trading account) |\n| currency | string | currency |\n| contractAddress | string | The token contract address. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470306)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v1/deposits** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest the V1 historical deposits list on KuCoin via this endpoint. The return value is the data after Pagination, sorted in descending order according to time.\n:::\n\n:::tip[TIPS]\nDefault query for one month of data.\nThis request is paginated.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total pages |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| createAt | integer | Database record creation time |\n| amount | string | Deposit amount |\n| walletTxId | string | Wallet Txid |\n| isInner | boolean | Internal deposit or not |\n| status | string | |\n\n---\n", "body": {} }, "response": [ @@ -631,7 +497,7 @@ "path": [ "api", "v1", - "deposit-addresses" + "hist-deposits" ], "query": [ { @@ -640,9 +506,19 @@ "description": "currency" }, { - "key": "chain", - "value": null, - "description": "The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency." + "key": "status", + "value": "SUCCESS", + "description": "Status. Available value: PROCESSING, SUCCESS, and FAILURE" + }, + { + "key": "startAt", + "value": "1728663338000", + "description": "Start time (milliseconds)" + }, + { + "key": "endAt", + "value": "1728692138000", + "description": "End time (milliseconds)" } ] } @@ -677,14 +553,14 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"address\": \"0xea220bf61c3c2b0adc2cfa29fec3d2677745a379\",\n \"memo\": \"\",\n \"chain\": \"ERC20\",\n \"chainId\": \"eth\",\n \"to\": \"MAIN\",\n \"currency\": \"USDT\"\n }\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 50,\n \"totalNum\": 0,\n \"totalPage\": 0,\n \"items\": [\n {\n \"currency\": \"BTC\",\n \"createAt\": 1528536998,\n \"amount\": \"0.03266638\",\n \"walletTxId\": \"55c643bc2c68d6f17266383ac1be9e454038864b929ae7cee0bc408cc5c869e8@12ffGWmMMD1zA1WbFm7Ho3JZ1w6NYXjpFk@234\",\n \"isInner\": false,\n \"status\": \"SUCCESS\"\n }\n ]\n }\n}" } ] }, { - "name": "Get Deposit History - Old", + "name": "Internal Transfer", "request": { - "method": "GET", + "method": "POST", "header": [], "url": { "raw": "", @@ -694,40 +570,28 @@ ], "path": [ "api", - "v1", - "hist-deposits" + "v2", + "accounts", + "inner-transfer" ], - "query": [ - { - "key": "currency", - "value": "", - "description": "currency" - }, - { - "key": "status", - "value": "SUCCESS", - "description": "Status. Available value: PROCESSING, SUCCESS, and FAILURE" - }, - { - "key": "startAt", - "value": "1728663338000", - "description": "Start time (milisecond)" - }, - { - "key": "endAt", - "value": "1728692138000", - "description": "End time (milisecond)" - } - ] + "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470306)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v1/deposits** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest via this endpoint to get the V1 historical deposits list on KuCoin. The return value is the data after Pagination, sorted in descending order according to time.\n:::\n\n:::tip[TIPS]\nDefault query for one month of data.\nThis request is paginated\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total page |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| createAt | integer | Creation time of the database record |\n| amount | string | Deposit amount |\n| walletTxId | string | Wallet Txid |\n| isInner | boolean | Internal deposit or not |\n| status | string | |\n\n---\n", - "body": {} + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470302)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/accounts/universal-transfer** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nThis API endpoint can be used to transfer funds between accounts internally. Users can transfer funds between their accounts free of charge. \n:::\n\nNotice:\nThe transfer of funds from contract accounts to other accounts is not supported.\nThe margin_v2 account currently only supports transfers between margin accounts, and does not support direct transfers from other accounts to margin_v2\nThe isolated_v2 account currently only supports transfers between margin accounts, and does not support direct transfers from other accounts to isolated_v2\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits |\n| currency | string | currency |\n| amount | string | Transfer amount: The amount is a positive integer multiple of the currency precision. |\n| to | string | Receiving Account Type: main, trade, margin, isolated, margin_v2, isolated_v2, contract |\n| fromTag | string | Trading pair, required when the payment account type is isolated, e.g.: BTC-USDT |\n| toTag | string | Trading pair, required when the payment account type is isolated, e.g.: BTC-USDT |\n| from | string | Payment Account Type: main, trade, margin, isolated, margin_v2, isolated_v2 |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | Transfer order ID |\n\n---\n", + "body": { + "mode": "raw", + "raw": "{\n \"clientOid\": \"64ccc0f164781800010d8c09\",\n \"currency\": \"USDT\",\n \"amount\": \"0.01\",\n \"from\": \"main\",\n \"to\": \"trade\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } }, "response": [ { "name": "Successful Response", "originalRequest": { - "method": "GET", + "method": "POST", "header": [], "url": { "raw": "", @@ -737,31 +601,11 @@ ], "path": [ "api", - "v1", - "hist-deposits" - ], - "query": [ - { - "key": "currency", - "value": "", - "description": "currency" - }, - { - "key": "status", - "value": "SUCCESS", - "description": "Status. Available value: PROCESSING, SUCCESS, and FAILURE" - }, - { - "key": "startAt", - "value": "1728663338000", - "description": "Start time (milisecond)" - }, - { - "key": "endAt", - "value": "1728692138000", - "description": "End time (milisecond)" - } - ] + "v2", + "accounts", + "inner-transfer" + ], + "query": [] } }, "status": "OK", @@ -794,7 +638,7 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 50,\n \"totalNum\": 0,\n \"totalPage\": 0,\n \"items\": [\n {\n \"currency\": \"BTC\",\n \"createAt\": 1528536998,\n \"amount\": \"0.03266638\",\n \"walletTxId\": \"55c643bc2c68d6f17266383ac1be9e454038864b929ae7cee0bc408cc5c869e8@12ffGWmMMD1zA1WbFm7Ho3JZ1w6NYXjpFk@234\",\n \"isInner\": false,\n \"status\": \"SUCCESS\"\n }\n ]\n }\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"orderId\": \"670beb3482a1bb0007dec644\"\n }\n}" } ] }, @@ -833,26 +677,26 @@ { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", "value": null, - "description": "Current request page, The default currentPage is 1" + "description": "Current request page. The default currentPage is 1" }, { "key": "pageSize", "value": null, - "description": "pageSize, The default pageSize is 50" + "description": "pageSize; the default pageSize is 50" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470307)\n\n:::info[Description]\nThis endpoint can get futures account transfer out ledger\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total page |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| applyId | string | Transfer order ID |\n| currency | string | Currency |\n| recRemark | string | Receive account tx remark |\n| recSystem | string | Receive system |\n| status | string | Status PROCESSING, SUCCESS, FAILURE |\n| amount | string | Transaction amount |\n| reason | string | Reason caused the failure |\n| offset | integer | Offset |\n| createdAt | integer | Request application time |\n| remark | string | User remark |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470307)\n\n:::info[Description]\nFutures account transfer out ledgers can be obtained at this endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total pages |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| applyId | string | Transfer order ID |\n| currency | string | Currency |\n| recRemark | string | Receive account tx remark |\n| recSystem | string | Receive system |\n| status | string | Status PROCESSING, SUCCESS, FAILURE |\n| amount | string | Transaction amount |\n| reason | string | Reason for the failure |\n| offset | integer | Offset |\n| createdAt | integer | Request application time |\n| remark | string | User remark |\n\n---\n", "body": {} }, "response": [ @@ -891,22 +735,22 @@ { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", "value": null, - "description": "Current request page, The default currentPage is 1" + "description": "Current request page. The default currentPage is 1" }, { "key": "pageSize", "value": null, - "description": "pageSize, The default pageSize is 50" + "description": "pageSize; the default pageSize is 50" } ] } @@ -975,12 +819,12 @@ { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", @@ -994,7 +838,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470308)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v1/withdrawals** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest via this endpoint to get withdrawal list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::\n\n:::tip[TIPS]\nDefault query for one month of data.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total page |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| createAt | integer | Creation time of the database record |\n| amount | string | Withdrawal amount |\n| address | string | Withdrawal address |\n| walletTxId | string | Wallet Txid |\n| isInner | boolean | Internal deposit or not |\n| status | string | Status |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470308)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v1/withdrawals** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest a withdrawal list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::\n\n:::tip[TIPS]\nDefault query for one month of data.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total pages |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| createAt | integer | Database record creation time |\n| amount | string | Withdrawal amount |\n| address | string | Withdrawal address |\n| walletTxId | string | Wallet Txid |\n| isInner | boolean | Internal deposit or not |\n| status | string | Status |\n\n---\n", "body": {} }, "response": [ @@ -1028,12 +872,12 @@ { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", @@ -1082,6 +926,172 @@ } ] }, + { + "name": "Futures Account Transfer Out", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "", + "protocol": "https", + "host": [ + "{{futures_endpoint}}" + ], + "path": [ + "api", + "v3", + "transfer-out" + ], + "query": [] + }, + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470303)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/accounts/universal-transfer** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nThe amount to be transferred will be deducted from the KuCoin Futures Account. Please ensure that you have sufficient funds in your KuCoin Futures Account, or the transfer will fail.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency, including XBT, USDT... |\n| amount | number | Amount to be transferred out; cannot exceed 1000000000 |\n| recAccountType | string | Receive account type, including MAIN, TRADE |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| applyId | string | Transfer order ID |\n| bizNo | string | Business number |\n| payAccountType | string | Pay account type |\n| payTag | string | Pay account sub type |\n| remark | string | User remark |\n| recAccountType | string | Receive account type |\n| recTag | string | Receive account sub type |\n| recRemark | string | Receive account tx remark |\n| recSystem | string | Receive system |\n| status | string | Status:APPLY, PROCESSING, PENDING_APPROVAL, APPROVED, REJECTED, PENDING_CANCEL, CANCEL, SUCCESS |\n| currency | string | Currency |\n| amount | string | Transfer amount |\n| fee | string | Transfer fee |\n| sn | integer | Serial number |\n| reason | string | Fail Reason |\n| createdAt | integer | Create time |\n| updatedAt | integer | Update time |\n\n---\n", + "body": { + "mode": "raw", + "raw": "{\n \"currency\": \"USDT\",\n \"amount\": 0.01,\n \"recAccountType\": \"MAIN\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [], + "url": { + "raw": "", + "protocol": "https", + "host": [ + "{{futures_endpoint}}" + ], + "path": [ + "api", + "v3", + "transfer-out" + ], + "query": [] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": { + "content": "", + "type": "text/plain" + } + }, + { + "key": "gw-ratelimit-remaining", + "value": 1997, + "name": "gw-ratelimit-remaining" + }, + { + "key": "gw-ratelimit-limit", + "value": 2000, + "name": "gw-ratelimit-limit" + }, + { + "key": "gw-ratelimit-reset", + "value": 29990, + "name": "gw-ratelimit-reset" + } + ], + "cookie": [], + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"applyId\": \"670bf84c577f6c00017a1c48\",\n \"bizNo\": \"670bf84c577f6c00017a1c47\",\n \"payAccountType\": \"CONTRACT\",\n \"payTag\": \"DEFAULT\",\n \"remark\": \"\",\n \"recAccountType\": \"MAIN\",\n \"recTag\": \"DEFAULT\",\n \"recRemark\": \"\",\n \"recSystem\": \"KUCOIN\",\n \"status\": \"PROCESSING\",\n \"currency\": \"USDT\",\n \"amount\": \"0.01\",\n \"fee\": \"0\",\n \"sn\": 1519769124134806,\n \"reason\": \"\",\n \"createdAt\": 1728837708000,\n \"updatedAt\": 1728837708000\n }\n}" + } + ] + }, + { + "name": "Futures Account Transfer In", + "request": { + "method": "POST", + "header": [], + "url": { + "raw": "", + "protocol": "https", + "host": [ + "{{futures_endpoint}}" + ], + "path": [ + "api", + "v1", + "transfer-in" + ], + "query": [] + }, + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470304)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/accounts/universal-transfer** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nThe amount to be transferred will be deducted from the payAccount. Please ensure that you have sufficient funds in your payAccount account, or the transfer will fail.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency, including XBT, USDT... |\n| amount | number | Amount to be transferred in |\n| payAccountType | string | Payment account type, including MAIN, TRADE |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | string | |\n\n---\n", + "body": { + "mode": "raw", + "raw": "{\n \"currency\": \"USDT\",\n \"amount\": 0.01,\n \"payAccountType\": \"MAIN\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [], + "url": { + "raw": "", + "protocol": "https", + "host": [ + "{{futures_endpoint}}" + ], + "path": [ + "api", + "v1", + "transfer-in" + ], + "query": [] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": { + "content": "", + "type": "text/plain" + } + }, + { + "key": "gw-ratelimit-remaining", + "value": 1997, + "name": "gw-ratelimit-remaining" + }, + { + "key": "gw-ratelimit-limit", + "value": 2000, + "name": "gw-ratelimit-limit" + }, + { + "key": "gw-ratelimit-reset", + "value": 29990, + "name": "gw-ratelimit-reset" + } + ], + "cookie": [], + "body": "{\n \"code\": \"200000\",\n \"data\": null\n}" + } + ] + }, { "name": "Add Deposit Address - V1", "request": { @@ -1100,7 +1110,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470309)\n\n:::tip[TIPS]\nIt is recommended to use the **POST /v3/deposit-address/create** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest via this endpoint to create a deposit address for a currency you intend to deposit.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| chain | string | The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. |\n| chain | string | The chainName of currency |\n| chainId | string | The chainId of currency |\n| to | string | Deposit account type: main (funding account), trade (spot trading account) |\n| currency | string | currency |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470309)\n\n:::tip[TIPS]\nIt is recommended to use the **POST /v3/deposit-address/create** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest via this endpoint the creation of a deposit address for a currency you intend to deposit.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| chain | string | The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. |\n| to | string | Deposit account type: main (funding account), trade (spot trading account); the default is main |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. |\n| chain | string | The chainName of currency |\n| chainId | string | The chainId of currency |\n| to | string | Deposit account type: main (funding account), trade (spot trading account) |\n| currency | string | currency |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"currency\": \"ETH\",\n \"chain\": \"eth\"\n}", @@ -1183,7 +1193,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470310)\n\n:::tip[TIPS]\nIt is recommended to use the **POST /api/v3/withdrawals** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nUse this interface to withdraw the specified currency\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| chain | string | The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. |\n| address | string | Withdrawal address |\n| amount | integer | Withdrawal amount, a positive number which is a multiple of the amount precision |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. |\n| isInner | boolean | Internal withdrawal or not. Default : false |\n| remark | string | remark |\n| feeDeductType | string | Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified

1. INTERNAL- deduct the transaction fees from your withdrawal amount
2. EXTERNAL- deduct the transaction fees from your main account
3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| withdrawalId | string | Withdrawal id, a unique ID for a withdrawal |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470310)\n\n:::tip[TIPS]\nIt is recommended to use the **POST /api/v3/withdrawals** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nUse this interface to withdraw the specified currency.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| chain | string | The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. |\n| address | string | Withdrawal address |\n| amount | integer | Withdrawal amount, a positive number which is a multiple of the amount precision |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. |\n| isInner | boolean | Internal withdrawal or not. Default: False |\n| remark | string | Remark |\n| feeDeductType | string | Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified

1. INTERNAL: Deduct the transaction fees from your withdrawal amount
2. EXTERNAL: Deduct the transaction fees from your main account
3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| withdrawalId | string | Withdrawal id, a unique ID for a withdrawal |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"currency\": \"USDT\",\n \"address\": \"TKFRQXSDc****16GmLrjJggwX8\",\n \"amount\": 3,\n \"chain\": \"trx\",\n \"isInner\": true\n}", @@ -1527,15 +1537,9 @@ "orders", "{{orderId}}" ], - "query": [ - { - "key": "symbol", - "value": "BTC-USDT", - "description": "symbol" - } - ] + "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470343)\n\n:::tip[]\nIt is recommended to use the **DELETE /api/v1/hf/orders/{orderId}** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nThis endpoint can be used to cancel a spot order by orderId.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| cancelledOrderIds | array | Refer to the schema section of cancelledOrderIds |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470343)\n\n:::tip[]\nIt is recommended to use the **DELETE /api/v1/hf/orders/{orderId}** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nThis endpoint can be used to cancel a spot order by orderId.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| cancelledOrderIds | array | Refer to the schema section of cancelledOrderIds |\n\n---\n", "body": {} }, "response": [ @@ -1556,13 +1560,7 @@ "orders", "{{orderId}}" ], - "query": [ - { - "key": "symbol", - "value": "BTC-USDT", - "description": "symbol" - } - ] + "query": [] } }, "status": "OK", @@ -1617,15 +1615,9 @@ "client-order", "{{clientOid}}" ], - "query": [ - { - "key": "symbol", - "value": "BTC-USDT", - "description": "symbol" - } - ] + "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470344)\n\n:::tip[]\nIt is recommended to use the **DELETE /api/v1/hf/orders/client-order/{clientOid}** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nThis endpoint can be used to cancel a spot order by clientOid.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,unique identifier created by the user |\n| cancelledOrderId | string | |\n| cancelledOcoOrderIds | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470344)\n\n:::tip[]\nIt is recommended to use the **DELETE /api/v1/hf/orders/client-order/{clientOid}** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nThis endpoint can be used to cancel a spot order by clientOid.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,unique identifier created by the user |\n| cancelledOrderId | string | The unique order id generated by the trading system |\n| cancelledOcoOrderIds | array | Refer to the schema section of cancelledOcoOrderIds |\n\n---\n", "body": {} }, "response": [ @@ -1647,13 +1639,7 @@ "client-order", "{{clientOid}}" ], - "query": [ - { - "key": "symbol", - "value": "BTC-USDT", - "description": "symbol" - } - ] + "query": [] } }, "status": "OK", @@ -1686,7 +1672,7 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"cancelledOrderId\": \"674a9a872033a50007e2790d\",\n \"clientOid\": \"5c52e11203aa677f33e4923fb\",\n \"cancelledOcoOrderIds\": null\n }\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"cancelledOrderId\": \"67c3252a63d25e0007f91de9\",\n \"clientOid\": \"5c52e11203aa677f331e493fb\",\n \"cancelledOcoOrderIds\": null\n }\n}" } ] }, @@ -1807,37 +1793,37 @@ { "key": "symbol", "value": "BTC-USDT", - "description": "symbol" + "description": "Symbol" }, { "key": "status", "value": null, - "description": "active or done(done as default), Only list orders with a specific status ." + "description": "Active or done (done as default); only list orders with a specific status." }, { "key": "side", "value": null, - "description": "buy or sell" + "description": "Buy or Sell" }, { "key": "type", "value": null, - "description": "limit, market, limit_stop or market_stop" + "description": "Order type" }, { "key": "tradeType", "value": null, - "description": "The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading." + "description": "The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading." }, { "key": "startAt", "value": null, - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": null, - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", @@ -1851,7 +1837,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470346)\n\n:::tip[]\nIt is recommended to use the **GET /api/v1/hf/orders/active** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest via this endpoint to get your current order list. The return value is the data after Pagination, sorted in descending order according to time.\n:::\n\n:::tip[Tips]\nWhen you query orders in active status, there is no time limit. However, when you query orders in done status, the start and end time range cannot exceed 7* 24 hours. An error will occur if the specified time window exceeds the range. If you specify the end time only, the system will automatically calculate the start time as end time minus 7*24 hours, and vice versa.\n\nThe history for cancelled orders is only kept for one month. The history for Filled orders is only kept for six month.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | |\n| pageSize | integer | |\n| totalNum | integer | |\n| totalPage | integer | |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | |\n| symbol | string | |\n| opType | string | |\n| type | string | |\n| side | string | |\n| price | string | |\n| size | string | |\n| funds | string | |\n| dealFunds | string | |\n| dealSize | string | |\n| fee | string | |\n| feeCurrency | string | |\n| stp | string | |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | |\n| postOnly | boolean | |\n| hidden | boolean | |\n| iceberg | boolean | |\n| visibleSize | string | |\n| cancelAfter | integer | |\n| channel | string | |\n| clientOid | string | |\n| remark | string | |\n| tags | string | |\n| isActive | boolean | |\n| cancelExist | boolean | |\n| createdAt | integer | |\n| tradeType | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470346)\n\n:::tip[]\nIt is recommended to use the **GET /api/v1/hf/orders/active** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest your current order list via this endpoint. The return value is the data after Pagination, sorted in descending order according to time.\n:::\n\n:::tip[Tips]\nWhen you query orders in active status, there is no time limit. However, when you query orders in done status, the start and end time range cannot exceed 7 * 24 hours. An error will occur if the specified time window exceeds the range. If you specify the end time only, the system will automatically calculate the start time as end time minus 7 * 24 hours, and vice versa.\n\nThe history for canceled orders is only kept for one month. The history for filled orders is only kept for six months.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | |\n| pageSize | integer | |\n| totalNum | integer | |\n| totalPage | integer | |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | |\n| symbol | string | |\n| opType | string | |\n| type | string | |\n| side | string | |\n| price | string | |\n| size | string | |\n| funds | string | |\n| dealFunds | string | |\n| dealSize | string | |\n| fee | string | |\n| feeCurrency | string | |\n| stp | string | |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | |\n| postOnly | boolean | |\n| hidden | boolean | |\n| iceberg | boolean | |\n| visibleSize | string | |\n| cancelAfter | integer | |\n| channel | string | |\n| clientOid | string | |\n| remark | string | |\n| tags | string | |\n| isActive | boolean | |\n| cancelExist | boolean | |\n| createdAt | integer | |\n| tradeType | string | |\n| tax | string | |\n| taxRate | string | |\n| taxCurrency | string | |\n\n---\n", "body": {} }, "response": [ @@ -1875,37 +1861,37 @@ { "key": "symbol", "value": "BTC-USDT", - "description": "symbol" + "description": "Symbol" }, { "key": "status", "value": null, - "description": "active or done(done as default), Only list orders with a specific status ." + "description": "Active or done (done as default); only list orders with a specific status." }, { "key": "side", "value": null, - "description": "buy or sell" + "description": "Buy or Sell" }, { "key": "type", "value": null, - "description": "limit, market, limit_stop or market_stop" + "description": "Order type" }, { "key": "tradeType", "value": null, - "description": "The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading." + "description": "The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading." }, { "key": "startAt", "value": null, - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": null, - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", @@ -1971,20 +1957,9 @@ "limit", "orders" ], - "query": [ - { - "key": "currentPage", - "value": null, - "description": "Current request page." - }, - { - "key": "pageSize", - "value": null, - "description": "Number of results per request. Minimum is 10, maximum is 500." - } - ] + "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470347)\n\n:::tip[]\nIt is recommended to use the **GET /api/v1/hf/orders/active** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest via this endpoint to get 1000 orders in the last 24 hours. The return value is the data after Pagination, sorted in descending order according to time.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | |\n| symbol | string | |\n| opType | string | |\n| type | string | |\n| side | string | |\n| price | string | |\n| size | string | |\n| funds | string | |\n| dealFunds | string | |\n| dealSize | string | |\n| fee | string | |\n| feeCurrency | string | |\n| stp | string | |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | |\n| postOnly | boolean | |\n| hidden | boolean | |\n| iceberg | boolean | |\n| visibleSize | string | |\n| cancelAfter | integer | |\n| channel | string | |\n| clientOid | string | |\n| remark | string | |\n| tags | string | |\n| isActive | boolean | |\n| cancelExist | boolean | |\n| createdAt | integer | |\n| tradeType | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470347)\n\n:::tip[]\nIt is recommended to use the **GET /api/v1/hf/orders/active** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest 1000 orders in the last 24 hours via this endpoint. The return value is the data after Pagination, sorted in descending order according to time.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | |\n| symbol | string | |\n| opType | string | |\n| type | string | |\n| side | string | |\n| price | string | |\n| size | string | |\n| funds | string | |\n| dealFunds | string | |\n| dealSize | string | |\n| fee | string | |\n| feeCurrency | string | |\n| stp | string | |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | |\n| postOnly | boolean | |\n| hidden | boolean | |\n| iceberg | boolean | |\n| visibleSize | string | |\n| cancelAfter | integer | |\n| channel | string | |\n| clientOid | string | |\n| remark | string | |\n| tags | string | |\n| isActive | boolean | |\n| cancelExist | boolean | |\n| createdAt | integer | |\n| tradeType | string | |\n| tax | string | |\n| taxRate | string | |\n| taxCurrency | string | |\n\n---\n", "body": {} }, "response": [ @@ -2005,18 +1980,7 @@ "limit", "orders" ], - "query": [ - { - "key": "currentPage", - "value": null, - "description": "Current request page." - }, - { - "key": "pageSize", - "value": null, - "description": "Number of results per request. Minimum is 10, maximum is 500." - } - ] + "query": [] } }, "status": "OK", @@ -2072,7 +2036,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470348)\n\n:::tip[]\nIt is recommended to use the **GET /api/v1/hf/orders/{orderId}** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest via this endpoint to get a single order info by order ID.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | |\n| symbol | string | |\n| opType | string | |\n| type | string | |\n| side | string | |\n| price | string | |\n| size | string | |\n| funds | string | |\n| dealFunds | string | |\n| dealSize | string | |\n| fee | string | |\n| feeCurrency | string | |\n| stp | string | |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | |\n| postOnly | boolean | |\n| hidden | boolean | |\n| iceberg | boolean | |\n| visibleSize | string | |\n| cancelAfter | integer | |\n| channel | string | |\n| clientOid | string | |\n| remark | string | |\n| tags | string | |\n| isActive | boolean | |\n| cancelExist | boolean | |\n| createdAt | integer | |\n| tradeType | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470348)\n\n:::tip[]\nIt is recommended to use the **GET /api/v1/hf/orders/{orderId}** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest a single order info by order ID via this endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | |\n| symbol | string | |\n| opType | string | |\n| type | string | |\n| side | string | |\n| price | string | |\n| size | string | |\n| funds | string | |\n| dealFunds | string | |\n| dealSize | string | |\n| fee | string | |\n| feeCurrency | string | |\n| stp | string | |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | |\n| postOnly | boolean | |\n| hidden | boolean | |\n| iceberg | boolean | |\n| visibleSize | string | |\n| cancelAfter | integer | |\n| channel | string | |\n| clientOid | string | |\n| remark | string | |\n| tags | string | |\n| isActive | boolean | |\n| cancelExist | boolean | |\n| createdAt | integer | |\n| tradeType | string | |\n| tax | string | |\n| taxRate | string | |\n| taxCurrency | string | |\n\n---\n", "body": {} }, "response": [ @@ -2150,7 +2114,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470349)\n\n:::tip[]\nIt is recommended to use the **GET /api/v1/hf/orders/client-order/{clientOid}** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest via this interface to check the information of a single active order via clientOid. The system will prompt that the order does not exists if the order does not exist or has been settled.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | |\n| symbol | string | |\n| opType | string | |\n| type | string | |\n| side | string | |\n| price | string | |\n| size | string | |\n| funds | string | |\n| dealFunds | string | |\n| dealSize | string | |\n| fee | string | |\n| feeCurrency | string | |\n| stp | string | |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | |\n| postOnly | boolean | |\n| hidden | boolean | |\n| iceberg | boolean | |\n| visibleSize | string | |\n| cancelAfter | integer | |\n| channel | string | |\n| clientOid | string | |\n| remark | string | |\n| tags | string | |\n| isActive | boolean | |\n| cancelExist | boolean | |\n| createdAt | integer | |\n| tradeType | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470349)\n\n:::tip[]\nIt is recommended to use the **GET /api/v1/hf/orders/client-order/{clientOid}** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest via this interface to check the information of a single active order via clientOid. The system will send a prompt that the order does not exist if the order does not exist or has been settled.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | |\n| symbol | string | |\n| opType | string | |\n| type | string | |\n| side | string | |\n| price | string | |\n| size | string | |\n| funds | string | |\n| dealFunds | string | |\n| dealSize | string | |\n| fee | string | |\n| feeCurrency | string | |\n| stp | string | |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | |\n| postOnly | boolean | |\n| hidden | boolean | |\n| iceberg | boolean | |\n| visibleSize | string | |\n| cancelAfter | integer | |\n| channel | string | |\n| clientOid | string | |\n| remark | string | |\n| tags | string | |\n| isActive | boolean | |\n| cancelExist | boolean | |\n| createdAt | integer | |\n| tradeType | string | |\n| tax | string | |\n| taxRate | string | |\n| taxCurrency | string | |\n\n---\n", "body": {} }, "response": [ @@ -2234,12 +2198,12 @@ { "key": "orderId", "value": null, - "description": "The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters)" + "description": "The unique order ID generated by the trading system. (If orderId is specified, please ignore the other query parameters.)" }, { "key": "side", "value": null, - "description": "specify if the order is to 'buy' or 'sell'" + "description": "Specify if the order is to 'buy' or 'sell'." }, { "key": "type", @@ -2249,17 +2213,17 @@ { "key": "tradeType", "value": null, - "description": "The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading." + "description": "The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading." }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", @@ -2273,7 +2237,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470350)\n\n:::tip[]\nIt is recommended to use the **GET /api/v1/hf/fills** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest via this endpoint to get the recent fills.\nThe return value is the data after Pagination, sorted in descending order according to time.\n:::\n\n:::tip[Tips]\nThe system allows you to retrieve data up to one week (start from the last day by default). If the time period of the queried data exceeds one week (time range from the start time to end time exceeded 7*24 hours), the system will prompt to remind you that you have exceeded the time limit. If you only specified the start time, the system will automatically calculate the end time (end time = start time + 7 * 24 hours). On the contrary, if you only specified the end time, the system will calculate the start time (start time= end time - 7 * 24 hours) the same way.\n\nThe total number of items retrieved cannot exceed 50,000. If it is exceeded, please shorten the query time range.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | |\n| pageSize | integer | |\n| totalNum | integer | |\n| totalPage | integer | |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | symbol |\n| tradeId | string | |\n| orderId | string | The unique order id generated by the trading system |\n| counterOrderId | string | Counterparty order Id |\n| side | string | Buy or sell |\n| liquidity | string | Liquidity type: taker or maker |\n| forceTaker | boolean | |\n| price | string | Order price |\n| size | string | Order size |\n| funds | string | Order Funds |\n| fee | string | [Handling fees](https://www.kucoin.com/docs-new/api-5327739) |\n| feeRate | string | Fee rate
|\n| feeCurrency | string | currency used to calculate trading fee |\n| stop | string | Take Profit and Stop Loss type, currently HFT does not support the Take Profit and Stop Loss type, so it is empty |\n| tradeType | string | Trade type, redundancy param |\n| type | string | Specify if the order is an 'limit' order or 'market' order. |\n| createdAt | integer | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470350)\n\n:::tip[]\nIt is recommended to use the **GET /api/v1/hf/fills** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest recent fills via this endpoint.\nThe return value is the data after Pagination, sorted in descending order according to time.\n:::\n\n:::tip[Tips]\nThe system allows you to retrieve up to one week’s worth of data (starting from the last day by default). If the time period of the queried data exceeds one week (time range from the start to end time exceeding 7 * 24 hours), the system will prompt to remind you that you have exceeded the time limit. If you only specified the start time, the system will automatically calculate the end time (end time = start time + 7 * 24 hours). Conversely, if you only specified the end time, the system will calculate the start time (start time = end time - 7 * 24 hours) the same way.\n\nThe total number of items retrieved cannot exceed 50,000. If it is exceeded, please shorten the query time range.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | |\n| pageSize | integer | |\n| totalNum | integer | |\n| totalPage | integer | |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | symbol |\n| tradeId | string | |\n| orderId | string | The unique order id generated by the trading system |\n| counterOrderId | string | Counterparty order ID |\n| side | string | Buy or sell |\n| liquidity | string | Liquidity type: taker or maker |\n| forceTaker | boolean | |\n| price | string | Order Price |\n| size | string | Order Size |\n| funds | string | Order Funds |\n| fee | string | [Handling fees](https://www.kucoin.com/docs-new/api-5327739) |\n| feeRate | string | Fee rate
|\n| feeCurrency | string | Currency used to calculate trading fee |\n| stop | string | Take Profit and Stop Loss type, currently HFT does not support the Take Profit and Stop Loss type, so it is empty |\n| tradeType | string | Trade type, redundancy param |\n| type | string | Specify if the order is a 'limit' order or 'market' order. |\n| createdAt | integer | |\n\n---\n", "body": {} }, "response": [ @@ -2302,12 +2266,12 @@ { "key": "orderId", "value": null, - "description": "The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters)" + "description": "The unique order ID generated by the trading system. (If orderId is specified, please ignore the other query parameters.)" }, { "key": "side", "value": null, - "description": "specify if the order is to 'buy' or 'sell'" + "description": "Specify if the order is to 'buy' or 'sell'." }, { "key": "type", @@ -2317,17 +2281,17 @@ { "key": "tradeType", "value": null, - "description": "The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading." + "description": "The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading." }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", @@ -2393,20 +2357,9 @@ "limit", "fills" ], - "query": [ - { - "key": "currentPage", - "value": null, - "description": "Current request page." - }, - { - "key": "pageSize", - "value": null, - "description": "Number of results per request. Minimum is 10, maximum is 500." - } - ] + "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470351)\n\n:::tip[]\nIt is recommended to use the **GET /api/v1/hf/fills** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest via this endpoint to get a list of 1000 fills in the last 24 hours. The return value is the data after Pagination, sorted in descending order according to time.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | |\n| tradeId | string | |\n| orderId | string | |\n| counterOrderId | string | |\n| side | string | |\n| liquidity | string | |\n| forceTaker | boolean | |\n| price | string | |\n| size | string | |\n| funds | string | |\n| fee | string | |\n| feeRate | string | |\n| feeCurrency | string | |\n| stop | string | |\n| tradeType | string | |\n| type | string | |\n| createdAt | integer | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470351)\n\n:::tip[]\nIt is recommended to use the **GET /api/v1/hf/fills** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest a list of 1000 fills in the last 24 hours via this endpoint. The return value is the data after Pagination, sorted in descending order according to time.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | |\n| tradeId | string | |\n| orderId | string | |\n| counterOrderId | string | |\n| side | string | |\n| liquidity | string | |\n| forceTaker | boolean | |\n| price | string | |\n| size | string | |\n| funds | string | |\n| fee | string | |\n| feeRate | string | |\n| feeCurrency | string | |\n| stop | string | |\n| tradeType | string | |\n| type | string | |\n| createdAt | integer | |\n| tax | string | |\n| taxCurrency | string | |\n| taxRate | string | |\n\n---\n", "body": {} }, "response": [ @@ -2427,18 +2380,7 @@ "limit", "fills" ], - "query": [ - { - "key": "currentPage", - "value": null, - "description": "Current request page." - }, - { - "key": "pageSize", - "value": null, - "description": "Number of results per request. Minimum is 10, maximum is 500." - } - ] + "query": [] } }, "status": "OK", @@ -2503,7 +2445,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470311)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/margin/accounts** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest via this endpoint to get the info of the margin account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| debtRatio | string | Debt ratio |\n| accounts | array | Refer to the schema section of accounts |\n\n**root.data.accounts Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| totalBalance | string | Total funds in the account |\n| availableBalance | string | Available funds in the account |\n| holdBalance | string | Funds on hold in the account |\n| liability | string | Total liabilities |\n| maxBorrowSize | string | Available size to borrow |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470311)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/margin/accounts** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest margin account info via this endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| debtRatio | string | Debt ratio |\n| accounts | array | Refer to the schema section of accounts |\n\n**root.data.accounts Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| totalBalance | string | Total funds in the account |\n| availableBalance | string | Available funds in the account |\n| holdBalance | string | Funds on hold in the account |\n| liability | string | Total liabilities |\n| maxBorrowSize | string | Available size to borrow |\n\n---\n", "body": {} }, "response": [ @@ -2580,7 +2522,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470312)\n\n:::tip[TIPS]\nIt is recommended to use the **POST /api/v3/hf/margin/order** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nPlace order to the Cross-margin or Isolated-margin 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.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | Yes | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| side | String | Yes | `buy` or `sell` |\n| type | String | No | Order type `limit` and `market`, defult is limit |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| marginModel | String | No | The type of trading, including cross (cross mode) and isolated (isolated mode). It is set at cross by default. |\n| autoBorrow | boolean | No | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | No | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n\n**Hidden Orders and Iceberg Orders (Hidden & Iceberg)**\n\nHidden orders and iceberg orders can be set in advanced settings (iceberg orders are a special type of hidden orders). When placing limit orders or stop limit orders, you can choose to execute according to hidden orders or iceberg orders.\n\nHidden orders are not shown in order books.\n\nUnlike hidden orders, iceberg orders are divided into visible and hidden portions. When engaging in iceberg orders, visible order sizes must be set. The minimum visible size for an iceberg order is 1/20 of the total order size.\n\nWhen matching, the visible portions of iceberg orders are matched first. Once the visible portions are fully matched, hidden portions will emerge. This will continue until the order is fully filled.\n\nNote:\n\n- The system will charge taker fees for hidden orders and iceberg orders.\n- If you simultaneously set iceberg orders and hidden orders, your order will default to an iceberg order for execution.\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | symbol |\n| type | string | specify if the order is an 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order

When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | Hidden or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| cancelAfter | integer | Cancel after n seconds,the order timing strategy is GTT |\n| funds | string | When **type** is market, select one out of two: size or funds |\n| autoBorrow | boolean | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n| marginModel | string | The type of trading, including cross (cross mode) and isolated (isolated mode). It is set at cross by default. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| loanApplyId | string | Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| borrowSize | string | Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| clientOid | string | This return value is invalid |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470312)\n\n:::tip[TIPS]\nIt is recommended to use the **POST /api/v3/hf/margin/order** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nPlace order in the Cross-margin or Isolated-margin 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.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | Yes | Client Order ID, unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| side | String | Yes | ‘buy’ or ‘sell’ |\n| type | String | No | Order type ‘limit’ and ‘market’, default is limit |\n| stp | String | No | self trade prevention is divided into four strategies: ‘CN’, ‘CO’, ‘CB’, and ‘DC’ |\n| marginModel | String | No | The type of trading, including cross (cross mode) and isolated (isolated mode). It is set at cross by default. |\n| autoBorrow | boolean | No | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | No | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n**Additional Request Parameters Required by ‘limit’ Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy ‘GTC’, ‘GTT’, ‘IOC’, ‘FOK’ (the default is ‘GTC’) |\n| cancelAfter | long | No | Cancel after ‘n’ seconds, the order timing strategy is ‘GTT’ |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is ‘IOC’ or ‘FOK’ |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by ‘market’ orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n| funds | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n\n\n\n**Hidden Orders and Iceberg Orders (Hidden & Iceberg)**\n\nHidden orders and iceberg orders can be set in advanced settings (iceberg orders are a special type of hidden order). When placing limit orders or stop limit orders, you can choose to execute according to either hidden orders or iceberg orders.\n\nHidden orders are not shown in order books.\n\nUnlike hidden orders, iceberg orders are divided into visible and hidden portions. When engaging in iceberg orders, visible order sizes must be set. The minimum visible size for an iceberg order is 1/20 of the total order size.\n\nWhen matching, the visible portions of iceberg orders are matched first. Once the visible portions are fully matched, hidden portions will emerge. This will continue until the order is fully filled.\n\nNote:\n\n- The system will charge taker fees for hidden orders and iceberg orders.\n- If you simultaneously set iceberg orders and hidden orders, your order will default to an iceberg order for execution.\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or canceled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled (already canceled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly canceled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: If the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: This feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | Specify if the order is to 'buy' or 'sell'. |\n| symbol | string | symbol |\n| type | string | Specify if the order is a 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order.

When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | Hidden or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| cancelAfter | integer | Cancel after n seconds, the order timing strategy is GTT |\n| funds | string | When **type** is market, select one out of two: size or funds |\n| autoBorrow | boolean | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n| marginModel | string | The type of trading, including cross (cross mode) and isolated (isolated mode). It is set at cross by default. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. |\n| loanApplyId | string | Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| borrowSize | string | Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| clientOid | string | This return value is invalid |\n\n---\n", "body": { "mode": "raw", "raw": "//limit order\n{\n \"type\": \"limit\",\n \"symbol\": \"BTC-USDT\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"clientOid\": \"5c52e11203aa677f33e4193fb\",\n \"remark\": \"order remarks\"\n}\n\n//market order 1\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"size\": \"0.00001\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n\n//market order 2\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"funds\": \"1\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n", @@ -2666,7 +2608,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470313)\n\n:::tip[TIPS]\nIt is recommended to use the **POST /api/v3/hf/margin/order/test** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nOrder test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | Yes | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| side | String | Yes | `buy` or `sell` |\n| type | String | No | Order type `limit` and `market`, defult is limit |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| marginModel | String | No | The type of trading, including cross (cross mode) and isolated (isolated mode). It is set at cross by default. |\n| autoBorrow | boolean | No | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | No | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n\n**Hidden Orders and Iceberg Orders (Hidden & Iceberg)**\n\nHidden orders and iceberg orders can be set in advanced settings (iceberg orders are a special type of hidden orders). When placing limit orders or stop limit orders, you can choose to execute according to hidden orders or iceberg orders.\n\nHidden orders are not shown in order books.\n\nUnlike hidden orders, iceberg orders are divided into visible and hidden portions. When engaging in iceberg orders, visible order sizes must be set. The minimum visible size for an iceberg order is 1/20 of the total order size.\n\nWhen matching, the visible portions of iceberg orders are matched first. Once the visible portions are fully matched, hidden portions will emerge. This will continue until the order is fully filled.\n\nNote:\n\n- The system will charge taker fees for hidden orders and iceberg orders.\n- If you simultaneously set iceberg orders and hidden orders, your order will default to an iceberg order for execution.\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | symbol |\n| type | string | specify if the order is an 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/api-5176570) is divided into four strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order

When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/api-5176570) is a special strategy used during trading |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | Hidden or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| cancelAfter | integer | Cancel after n seconds,the order timing strategy is GTT |\n| funds | string | When **type** is market, select one out of two: size or funds |\n| autoBorrow | boolean | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n| marginModel | string | The type of trading, including cross (cross mode) and isolated (isolated mode). It is set at cross by default. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| loanApplyId | string | Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| borrowSize | string | Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| clientOid | string | This return value is invalid |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470313)\n\n:::tip[TIPS]\nIt is recommended to use the **POST /api/v3/hf/margin/order/test** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nOrder test endpoint: This endpoint’s request and return parameters are identical to the order endpoint, and can be used to verify whether the signature is correct, among other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | Yes | Client Order ID, unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| side | String | Yes | ‘buy’ or ‘sell’ |\n| type | String | No | Order type ‘limit’ and ‘market’, default is limit |\n| stp | String | No | self trade prevention is divided into four strategies: ‘CN’, ‘CO’, ‘CB’, and ‘DC’ |\n| marginModel | String | No | The type of trading, including cross (cross mode) and isolated (isolated mode). It is set at cross by default. |\n| autoBorrow | boolean | No | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | No | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n**Additional Request Parameters Required by ‘limit’ Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy ‘GTC’, ‘GTT’, ‘IOC’, ‘FOK’ (the default is ‘GTC’) |\n| cancelAfter | long | No | Cancel after ‘n’ seconds, the order timing strategy is ‘GTT’ |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is ‘IOC’ or ‘FOK’ |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by ‘market’ orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n| funds | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n\n\n\n**Hidden Orders and Iceberg Orders (Hidden & Iceberg)**\n\nHidden orders and iceberg orders can be set in advanced settings (iceberg orders are a special type of hidden order). When placing limit orders or stop limit orders, you can choose to execute according to either hidden orders or iceberg orders.\n\nHidden orders are not shown in order books.\n\nUnlike hidden orders, iceberg orders are divided into visible and hidden portions. When engaging in iceberg orders, visible order sizes must be set. The minimum visible size for an iceberg order is 1/20 of the total order size.\n\nWhen matching, the visible portions of iceberg orders are matched first. Once the visible portions are fully matched, hidden portions will emerge. This will continue until the order is fully filled.\n\nNote:\n\n- The system will charge taker fees for hidden orders and iceberg orders.\n- If you simultaneously set iceberg orders and hidden orders, your order will default to an iceberg order for execution.\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or canceled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled (already canceled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly canceled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: If the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: This feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | Specify if the order is to 'buy' or 'sell'. |\n| symbol | string | symbol |\n| type | string | Specify if the order is a 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/api-5176570) is divided into four strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order.

When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/api-5176570) is a special strategy used during trading |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | Hidden or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| cancelAfter | integer | Cancel after n seconds, the order timing strategy is GTT |\n| funds | string | When **type** is market, select one out of two: size or funds |\n| autoBorrow | boolean | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n| marginModel | string | The type of trading, including cross (cross mode) and isolated (isolated mode). It is set at cross by default. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. |\n| loanApplyId | string | Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| borrowSize | string | Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| clientOid | string | This return value is invalid |\n\n---\n", "body": { "mode": "raw", "raw": "//limit order\n{\n \"type\": \"limit\",\n \"symbol\": \"BTC-USDT\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"clientOid\": \"5c52e11203aa677f33e4193fb\",\n \"remark\": \"order remarks\"\n}\n\n//market order 1\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"size\": \"0.00001\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n\n//market order 2\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"funds\": \"1\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n", @@ -2758,7 +2700,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470314)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/isolated/accounts** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest via this endpoint to get the info list of the isolated margin account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| totalConversionBalance | string | The total balance of the isolated margin account(in the request coin) |\n| liabilityConversionBalance | string | Total liabilities of the isolated margin account(in the request coin) |\n| assets | array | Refer to the schema section of assets |\n\n**root.data.assets Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol |\n| status | string | The position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW . |\n| debtRatio | string | debt ratio |\n| baseAsset | object | Refer to the schema section of baseAsset |\n| quoteAsset | object | Refer to the schema section of quoteAsset |\n\n**root.data.assets.baseAsset Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| totalBalance | string | Current currency total asset amount |\n| holdBalance | string | Current currency holding asset amount |\n| availableBalance | string | Current available asset amount |\n| liability | string | Liabilities |\n| interest | string | |\n| borrowableAmount | string | |\n\n**root.data.assets.baseAsset.quoteAsset Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| totalBalance | string | Current currency total asset amount |\n| holdBalance | string | Current currency holding asset amount |\n| availableBalance | string | Current available asset amount |\n| liability | string | Liabilities |\n| interest | string | |\n| borrowableAmount | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470314)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/isolated/accounts** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest the isolated margin account info list via this endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| totalConversionBalance | string | The total balance of the isolated margin account (in the request coin) |\n| liabilityConversionBalance | string | Total liabilities of the isolated margin account (in the request coin) |\n| assets | array | Refer to the schema section of assets |\n\n**root.data.assets Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol |\n| status | string | Position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW . |\n| debtRatio | string | debt ratio |\n| baseAsset | object | Refer to the schema section of baseAsset |\n| quoteAsset | object | Refer to the schema section of quoteAsset |\n\n**root.data.assets.baseAsset Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| totalBalance | string | Current currency total asset amount |\n| holdBalance | string | Current currency holding asset amount |\n| availableBalance | string | Current available asset amount |\n| liability | string | Liabilities |\n| interest | string | |\n| borrowableAmount | string | |\n\n**root.data.assets.baseAsset.quoteAsset Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| totalBalance | string | Current currency total asset amount |\n| holdBalance | string | Current currency holding asset amount |\n| availableBalance | string | Current available asset amount |\n| liability | string | Liabilities |\n| interest | string | |\n| borrowableAmount | string | |\n\n---\n", "body": {} }, "response": [ @@ -2842,7 +2784,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470315)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/isolated/accounts** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest via this endpoint to get the info of the isolated margin account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol |\n| status | string | The position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW . |\n| debtRatio | string | debt ratio |\n| baseAsset | object | Refer to the schema section of baseAsset |\n| quoteAsset | object | Refer to the schema section of quoteAsset |\n\n**root.data.baseAsset Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| totalBalance | string | Current currency total asset amount |\n| holdBalance | string | Current currency holding asset amount |\n| availableBalance | string | Current available asset amount |\n| liability | string | Liabilities |\n| interest | string | |\n| borrowableAmount | string | |\n\n**root.data.baseAsset.quoteAsset Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| totalBalance | string | Current currency total asset amount |\n| holdBalance | string | Current currency holding asset amount |\n| availableBalance | string | Current available asset amount |\n| liability | string | Liabilities |\n| interest | string | |\n| borrowableAmount | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470315)\n\n:::tip[TIPS]\nIt is recommended to use the **GET /api/v3/isolated/accounts** endpoint instead of this endpoint\n:::\n\n:::info[Description]\nRequest isolated margin account info via this endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol |\n| status | string | Position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW . |\n| debtRatio | string | debt ratio |\n| baseAsset | object | Refer to the schema section of baseAsset |\n| quoteAsset | object | Refer to the schema section of quoteAsset |\n\n**root.data.baseAsset Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| totalBalance | string | Current currency total asset amount |\n| holdBalance | string | Current currency holding asset amount |\n| availableBalance | string | Current available asset amount |\n| liability | string | Liabilities |\n| interest | string | |\n| borrowableAmount | string | |\n\n**root.data.baseAsset.quoteAsset Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| totalBalance | string | Current currency total asset amount |\n| holdBalance | string | Current currency holding asset amount |\n| availableBalance | string | Current available asset amount |\n| liability | string | Liabilities |\n| interest | string | |\n| borrowableAmount | string | |\n\n---\n", "body": {} }, "response": [ @@ -2927,7 +2869,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470255)\n\n:::tip[TIPS]\nCurrently, it is not recommended to use the Isolated margin + auto deposit margin . It is recommended to switch to the cross margin mode.\nPlease refer to **POST /api/v2/position/changeMarginMode** endpoint\n:::\n\n:::info[Description]\nThis endpoint is only applicable to isolated margin and is no longer recommended. It is recommended to use cross margin instead.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract
|\n| status | boolean | Status |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | boolean | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470255)\n\n:::tip[TIPS]\nCurrently, it is not recommended to use the Isolated margin + auto deposit margin. It is recommended to switch to cross margin mode.\nPlease refer to **POST /api/v2/position/changeMarginMode** endpoint\n:::\n\n:::info[Description]\nThis endpoint is only applicable to isolated margin and is no longer recommended. It is recommended to use cross margin instead.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract
|\n| status | boolean | Status |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | boolean | |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"symbol\": \"XBTUSDTM\",\n \"status\": true\n}", @@ -3014,7 +2956,7 @@ { "key": "symbol", "value": "XBTUSDTM", - "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) " + "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) " } ] }, @@ -3042,7 +2984,7 @@ { "key": "symbol", "value": "XBTUSDTM", - "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) " + "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) " } ] } @@ -3106,7 +3048,7 @@ "type": "text/javascript", "packages": {}, "exec": [ - "function extractPathVariable(str) {\n const regex = /^\\{\\{(.+?)\\}\\}$/;\n const match = str.match(regex);\n if (match) {\n return match[1];\n }\n return null;\n}\n\nfunction hasAnyFieldEmpty(obj) {\n for (const key in obj) {\n if (obj[key] === \"\" || obj[key] === null || obj[key] === undefined) {\n return true;\n }\n }\n return false;\n}\n\nfunction sign(text, secret) {\n const hash = CryptoJS.HmacSHA256(text, secret);\n return CryptoJS.enc.Base64.stringify(hash)\n}\n\nfunction auth(apiKey, method, url, data) {\n if (hasAnyFieldEmpty(apiKey)) {\n console.warn('The API key-related information is not configured; only the public channel API is accessible.')\n return {'User-Agent': `Kucoin-Universal-Postman-SDK/v1.1.0`}\n }\n\n const timestamp = Date.now();\n const text = timestamp + method.toUpperCase() + url + data;\n const signature = sign(text, apiKey.secret);\n return {\n 'KC-API-KEY': apiKey.key,\n 'KC-API-SIGN': signature,\n 'KC-API-TIMESTAMP': timestamp.toString(),\n 'KC-API-PASSPHRASE': sign(apiKey.passphrase || '', apiKey.secret),\n 'Content-Type': 'application/json',\n 'User-Agent': `Kucoin-Universal-Postman-SDK/v1.1.0`,\n 'KC-API-KEY-VERSION': 2,\n };\n}\n\nlet key = pm.environment.get('API_KEY')\nlet secret = pm.environment.get('API_SECRET')\nlet passphrase = pm.environment.get('API_PASSPHRASE')\n\nlet url = pm.request.url.getPathWithQuery()\nlet method = pm.request.method\nlet body = pm.request.body ? pm.request.body.toString() : ''\n\nfor (const index in pm.request.url.path) {\n path = pm.request.url.path[index]\n pathVar = extractPathVariable(path)\n if (pathVar != null) {\n let collectionVariable = pm.collectionVariables.get(pathVar);\n if (collectionVariable != null) {\n url = url.replace(path, collectionVariable)\n } else {\n console.warn('no path variable set: ' + path)\n }\n }\n}\n\nheader = auth({ key: key, passphrase: passphrase, secret: secret }, method, url, body)\n\nfor (const [headerName, headerValue] of Object.entries(header)) {\n pm.request.headers.add({ key: headerName, value: headerValue })\n}" + "function extractPathVariable(str) {\n const regex = /^\\{\\{(.+?)\\}\\}$/;\n const match = str.match(regex);\n if (match) {\n return match[1];\n }\n return null;\n}\n\nfunction hasAnyFieldEmpty(obj) {\n for (const key in obj) {\n if (obj[key] === \"\" || obj[key] === null || obj[key] === undefined) {\n return true;\n }\n }\n return false;\n}\n\nfunction sign(text, secret) {\n const hash = CryptoJS.HmacSHA256(text, secret);\n return CryptoJS.enc.Base64.stringify(hash)\n}\n\nfunction auth(apiKey, method, url, data) {\n if (hasAnyFieldEmpty(apiKey)) {\n console.warn('The API key-related information is not configured; only the public channel API is accessible.')\n return {'User-Agent': `Kucoin-Universal-Postman-SDK/v1.2.0`}\n }\n\n const timestamp = Date.now();\n const text = timestamp + method.toUpperCase() + url + data;\n const signature = sign(text, apiKey.secret);\n return {\n 'KC-API-KEY': apiKey.key,\n 'KC-API-SIGN': signature,\n 'KC-API-TIMESTAMP': timestamp.toString(),\n 'KC-API-PASSPHRASE': sign(apiKey.passphrase || '', apiKey.secret),\n 'Content-Type': 'application/json',\n 'User-Agent': `Kucoin-Universal-Postman-SDK/v1.2.0`,\n 'KC-API-KEY-VERSION': 3,\n };\n}\n\nlet key = pm.environment.get('API_KEY')\nlet secret = pm.environment.get('API_SECRET')\nlet passphrase = pm.environment.get('API_PASSPHRASE')\n\nlet url = pm.request.url.getPathWithQuery()\nlet method = pm.request.method\nlet body = pm.request.body ? pm.request.body.toString() : ''\n\nfor (const index in pm.request.url.path) {\n path = pm.request.url.path[index]\n pathVar = extractPathVariable(path)\n if (pathVar != null) {\n let collectionVariable = pm.collectionVariables.get(pathVar);\n if (collectionVariable != null) {\n url = url.replace(path, collectionVariable)\n } else {\n console.warn('no path variable set: ' + path)\n }\n }\n}\n\nheader = auth({ key: key, passphrase: passphrase, secret: secret }, method, url, body)\n\nfor (const [headerName, headerValue] of Object.entries(header)) {\n pm.request.headers.add({ key: headerName, value: headerValue })\n}" ] } }, diff --git a/sdk/postman/collection-REST.json b/sdk/postman/collection-REST.json index 64ae26d6..d2ed7243 100644 --- a/sdk/postman/collection-REST.json +++ b/sdk/postman/collection-REST.json @@ -30,7 +30,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470119)\n\n:::info[Description]\nThis endpoint can be used to obtain account summary information.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| level | integer | User VIP level
|\n| subQuantity | integer | Number of sub-accounts |\n| spotSubQuantity | integer | Number of sub-accounts with spot trading permissions enabled |\n| marginSubQuantity | integer | Number of sub-accounts with margin trading permissions enabled |\n| futuresSubQuantity | integer | Number of sub-accounts with futures trading permissions enabled |\n| optionSubQuantity | integer | Number of sub-accounts with option trading permissions enabled |\n| maxSubQuantity | integer | Max number of sub-accounts = maxDefaultSubQuantity + maxSpotSubQuantity |\n| maxDefaultSubQuantity | integer | Max number of default open sub-accounts (according to VIP level) |\n| maxSpotSubQuantity | integer | Max number of sub-accounts with additional Spot trading permissions |\n| maxMarginSubQuantity | integer | Max number of sub-accounts with additional margin trading permissions |\n| maxFuturesSubQuantity | integer | Max number of sub-accounts with additional futures trading permissions |\n| maxOptionSubQuantity | integer | Max number of sub-accounts with additional Option trading permissions |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470119)\n\n:::info[Description]\nThis endpoint can be used to obtain account summary information.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| level | integer | User VIP level
|\n| subQuantity | integer | Number of sub-accounts |\n| spotSubQuantity | integer | Number of sub-accounts with spot trading permissions enabled |\n| marginSubQuantity | integer | Number of sub-accounts with margin trading permissions enabled |\n| futuresSubQuantity | integer | Number of sub-accounts with futures trading permissions enabled |\n| optionSubQuantity | integer | Number of sub-accounts with option trading permissions enabled |\n| maxSubQuantity | integer | Max. number of sub-accounts = maxDefaultSubQuantity + maxSpotSubQuantity |\n| maxDefaultSubQuantity | integer | Max. number of default open sub-accounts (according to VIP level) |\n| maxSpotSubQuantity | integer | Max. number of sub-accounts with additional spot trading permissions |\n| maxMarginSubQuantity | integer | Max. number of sub-accounts with additional margin trading permissions |\n| maxFuturesSubQuantity | integer | Max. number of sub-accounts with additional futures trading permissions |\n| maxOptionSubQuantity | integer | Max. number of sub-accounts with additional option trading permissions |\n\n---\n", "body": {} }, "response": [ @@ -106,7 +106,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470130)\n\n:::info[Description]\nGet the information of the api key. Use the api key pending to be checked to call the endpoint. Both master and sub user's api key are applicable.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| remark | string | Remarks |\n| apiKey | string | Apikey |\n| apiVersion | integer | API Version |\n| permission | string | [Permissions](https://www.kucoin.com/docs-new/doc-338144), possible values: General, Spot, Margin, Futures, InnerTransfer, Transfer, Earn |\n| ipWhitelist | string | IP whitelist

|\n| createdAt | integer | Apikey create time |\n| uid | integer | Account UID |\n| isMaster | boolean | Whether it is the master account. |\n| subName | string | Sub Name, There is no such param for the master account |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470130)\n\n:::info[Description]\nGet the api key information. Use the api key awaiting checking to call the endpoint. Both master and sub user's api key are applicable.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| remark | string | Remarks |\n| apiKey | string | Apikey |\n| apiVersion | integer | API Version |\n| permission | string | [Permissions](https://www.kucoin.com/docs-new/doc-338144), possible values: General, Spot, Margin, Futures, InnerTransfer, Transfer, Earn |\n| ipWhitelist | string | IP whitelist

|\n| createdAt | integer | Apikey create time |\n| uid | integer | Account UID |\n| isMaster | boolean | Whether it is the master account. |\n| subName | string | Sub Name, There is no such param for the master account |\n\n---\n", "body": {} }, "response": [ @@ -184,7 +184,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470120)\n\n:::info[Description]\nThis interface determines whether the current user is a spot high-frequency user or a spot low-frequency user.\n:::\n\n:::tip[Tips]\nThis interface is a compatibility interface left over from the old version upgrade. Only some old users need to use it (high frequency will be opened before 2024 and trade_hf has been used). Most user do not need to use this interface. When the return is true, you need to use trade_hf to transfer assets and query assets When the return is false, you need to use trade to transfer assets and query assets.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | boolean | Spot account type. True means the current user is a high-frequency spot user, False means the current user is a low-frequency spot user |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470120)\n\n:::info[Description]\nThis interface determines whether the current user is a spot high-frequency user or a spot low-frequency user.\n:::\n\n:::tip[Tips]\nThis interface is a compatibility interface left over from the old version upgrade. Only some old users need to use it (high frequency will be opened before 2024 and trade_hf has been used). Most users do not need to use this interface. When the return is true, you need to use trade_hf to transfer assets and query assets. When the return is false, you need to use trade to transfer assets and query assets.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | boolean | Spot account type. True means the current user is a high-frequency spot user, False means the current user is a low-frequency spot user |\n\n---\n", "body": {} }, "response": [ @@ -268,11 +268,11 @@ { "key": "type", "value": "main", - "description": "Account type main、trade" + "description": "Account type" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470125)\n\n:::info[Description]\nGet a list of accounts. Please Deposit to the main account firstly, then transfer the funds to the trade account via Inner Transfer before transaction.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Account ID |\n| currency | string | Currency |\n| type | string | Account type:,main、trade、isolated(abandon)、margin(abandon)
|\n| balance | string | Total funds in the account |\n| available | string | Funds available to withdraw or trade |\n| holds | string | Funds on hold (not available for use) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470125)\n\n:::info[Description]\nGet a list of accounts. Please deposit funds into the **main** account first, then use the Transfer function to move them to the trade account before trading.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Account ID |\n| currency | string | Currency |\n| type | string | Account type: main, trade, isolated (abandon), margin (abandon)
|\n| balance | string | Total funds in the account |\n| available | string | Funds available to withdraw or trade |\n| holds | string | Funds on hold (not available for use) |\n\n---\n", "body": {} }, "response": [ @@ -301,7 +301,7 @@ { "key": "type", "value": "main", - "description": "Account type main、trade" + "description": "Account type" } ] } @@ -359,7 +359,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470126)\n\n:::info[Description]\nget Information for a single spot account. Use this endpoint when you know the accountId.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | The currency of the account |\n| balance | string | Total funds in the account |\n| available | string | Funds available to withdraw or trade |\n| holds | string | Funds on hold (not available for use) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470126)\n\n:::info[Description]\nGet information for a single spot account. Use this endpoint when you know the accountId.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | The currency of the account |\n| balance | string | Total funds in the account |\n| available | string | Funds available to withdraw or trade |\n| holds | string | Funds on hold (not available for use) |\n\n---\n", "body": {} }, "response": [ @@ -447,7 +447,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470127)\n\n:::info[Description]\nRequest via this endpoint to get the info of the cross margin account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| totalAssetOfQuoteCurrency | string | Total Assets in Quote Currency |\n| totalLiabilityOfQuoteCurrency | string | Total Liability in Quote Currency |\n| debtRatio | string | debt ratio |\n| status | string | Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW borrowing |\n| accounts | array | Refer to the schema section of accounts |\n\n**root.data.accounts Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| total | string | Total Assets |\n| available | string | Account available assets (total assets - frozen) |\n| hold | string | Account frozen assets |\n| liability | string | Liabilities |\n| maxBorrowSize | string | The user's remaining maximum loan amount |\n| borrowEnabled | boolean | Support borrow or not |\n| transferInEnabled | boolean | Support transfer or not |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470127)\n\n:::info[Description]\nRequest cross margin account info via this endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| totalAssetOfQuoteCurrency | string | Total Assets in Quote Currency |\n| totalLiabilityOfQuoteCurrency | string | Total Liability in Quote Currency |\n| debtRatio | string | debt ratio |\n| status | string | Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW-borrowing |\n| accounts | array | Refer to the schema section of accounts |\n\n**root.data.accounts Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| total | string | Total Assets |\n| available | string | Account available assets (total assets - frozen) |\n| hold | string | Account frozen assets |\n| liability | string | Liabilities |\n| maxBorrowSize | string | The user's remaining maximum loan amount |\n| borrowEnabled | boolean | Support borrow or not |\n| transferInEnabled | boolean | Support transfer or not |\n\n---\n", "body": {} }, "response": [ @@ -551,7 +551,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470128)\n\n:::info[Description]\nRequest via this endpoint to get the info of the isolated margin account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| totalAssetOfQuoteCurrency | string | Total Assets in Quote Currency |\n| totalLiabilityOfQuoteCurrency | string | Total Liability in Quote Currency |\n| timestamp | integer | timestamp |\n| assets | array | Refer to the schema section of assets |\n\n**root.data.assets Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol |\n| status | string | Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW borrowing |\n| debtRatio | string | debt ratio |\n| baseAsset | object | Refer to the schema section of baseAsset |\n| quoteAsset | object | Refer to the schema section of quoteAsset |\n\n**root.data.assets.baseAsset Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| borrowEnabled | boolean | Support borrow or not |\n| transferInEnabled | boolean | Support transfer or not |\n| liability | string | Liabilities |\n| total | string | Total Assets |\n| available | string | Account available assets (total assets - frozen) |\n| hold | string | Account frozen assets |\n| maxBorrowSize | string | The user's remaining maximum loan amount |\n\n**root.data.assets.baseAsset.quoteAsset Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| borrowEnabled | boolean | Support borrow or not |\n| transferInEnabled | boolean | Support transfer or not |\n| liability | string | Liabilities |\n| total | string | Total Assets |\n| available | string | Account available assets (total assets - frozen) |\n| hold | string | Account frozen assets |\n| maxBorrowSize | string | The user's remaining maximum loan amount |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470128)\n\n:::info[Description]\nRequest isolated margin account info via this endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| totalAssetOfQuoteCurrency | string | Total Assets in Quote Currency |\n| totalLiabilityOfQuoteCurrency | string | Total Liability in Quote Currency |\n| timestamp | integer | timestamp |\n| assets | array | Refer to the schema section of assets |\n\n**root.data.assets Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol |\n| status | string | Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW-borrowing |\n| debtRatio | string | debt ratio |\n| baseAsset | object | Refer to the schema section of baseAsset |\n| quoteAsset | object | Refer to the schema section of quoteAsset |\n\n**root.data.assets.baseAsset Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| borrowEnabled | boolean | Support borrow or not |\n| transferInEnabled | boolean | Support transfer or not |\n| liability | string | Liabilities |\n| total | string | Total Assets |\n| available | string | Account available assets (total assets - frozen) |\n| hold | string | Account frozen assets |\n| maxBorrowSize | string | The user's remaining maximum loan amount |\n\n**root.data.assets.baseAsset.quoteAsset Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| borrowEnabled | boolean | Support borrow or not |\n| transferInEnabled | boolean | Support transfer or not |\n| liability | string | Liabilities |\n| total | string | Total Assets |\n| available | string | Account available assets (total assets - frozen) |\n| hold | string | Account frozen assets |\n| maxBorrowSize | string | The user's remaining maximum loan amount |\n\n---\n", "body": {} }, "response": [ @@ -645,11 +645,11 @@ { "key": "currency", "value": "", - "description": "Currecny, Default XBT" + "description": "Currency, Default XBT" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470129)\n\n:::info[Description]\nRequest via this endpoint to get the info of the futures account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| accountEquity | number | Account equity = marginBalance + Unrealised PNL |\n| unrealisedPNL | number | Unrealised profit and loss |\n| marginBalance | number | Margin balance = positionMargin + orderMargin + frozenFunds + availableBalance - unrealisedPNL |\n| positionMargin | number | Position margin |\n| orderMargin | number | Order margin |\n| frozenFunds | number | Frozen funds for out-transfer |\n| availableBalance | number | Available balance |\n| currency | string | Currency |\n| riskRatio | number | Cross margin risk rate |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470129)\n\n:::info[Description]\nRequest futures account info via this endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| accountEquity | number | Account equity = marginBalance + unrealizedPNL |\n| unrealisedPNL | number | Unrealized profit and loss |\n| marginBalance | number | Margin balance = positionMargin + orderMargin + frozenFunds + availableBalance - unrealizedPNL |\n| positionMargin | number | Position margin |\n| orderMargin | number | Order margin |\n| frozenFunds | number | Frozen funds for out-transfer |\n| availableBalance | number | Available balance |\n| currency | string | Currency |\n| riskRatio | number | Cross margin risk rate |\n| maxWithdrawAmount | number | Maximum amount that can be withdrawn/transferred. |\n\n---\n", "body": {} }, "response": [ @@ -673,7 +673,7 @@ { "key": "currency", "value": "", - "description": "Currecny, Default XBT" + "description": "Currency, Default XBT" } ] } @@ -708,7 +708,7 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"currency\": \"USDT\",\n \"accountEquity\": 48.921913718,\n \"unrealisedPNL\": 1.59475,\n \"marginBalance\": 47.548728628,\n \"positionMargin\": 34.1577964733,\n \"orderMargin\": 0,\n \"frozenFunds\": 0,\n \"availableBalance\": 14.7876172447,\n \"riskRatio\": 0.0090285199\n }\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"accountEquity\": 394.439280806,\n \"unrealisedPNL\": 20.15278,\n \"marginBalance\": 371.394298816,\n \"positionMargin\": 102.20664159,\n \"orderMargin\": 10.06002012,\n \"frozenFunds\": 0.0,\n \"availableBalance\": 290.326799096,\n \"currency\": \"USDT\",\n \"riskRatio\": 0.0065289525,\n \"maxWithdrawAmount\": 290.326419096\n }\n}" } ] }, @@ -733,7 +733,7 @@ { "key": "currency", "value": "BTC", - "description": "Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default." + "description": "Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default." }, { "key": "direction", @@ -743,17 +743,17 @@ { "key": "bizType", "value": "TRANSFER", - "description": "Type: DEPOSIT -deposit, WITHDRAW -withdraw, TRANSFER -transfer, SUB_TRANSFER -subaccount transfer,TRADE_EXCHANGE -trade, MARGIN_EXCHANGE -margin trade, KUCOIN_BONUS -bonus, BROKER_TRANSFER -Broker transfer record" + "description": "Type: DEPOSIT-deposit, WITHDRAW-withdraw, TRANSFER-transfer, SUB_TRANSFER-sub-account transfer, TRADE_EXCHANGE-trade, MARGIN_EXCHANGE-margin trade, KUCOIN_BONUS-bonus, BROKER_TRANSFER-Broker transfer record" }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", @@ -767,7 +767,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470121)\n\n:::info[Description]\nThis interface is for transaction records from all types of your accounts, supporting inquiry of various currencies. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::\n\n:::tip[Tips]\nthe start and end time range cannot exceed 24 hours. An error will occur if the specified time window exceeds the range. If you specify the end time only, the system will automatically calculate the start time as end time minus 24 hours, and vice versa.\n:::\n\n:::tip[Tips]\nSupport to obtain 1 year historical data, if need to obtain longer historical data, please submit a ticket: https://kucoin.zendesk.com/hc/en-us/requests/new\n:::\n\n**context**\n\nIf the returned value under bizType is “trade exchange”, the additional info. (such as order ID and trade ID, trading pair, etc.) of the trade will be returned in field context.\n\n**BizType Description**\n\n| Field | Description |\n| ------ | ---------- |\n| Assets Transferred in After Upgrading | Assets Transferred in After V1 to V2 Upgrading |\n| Deposit | Deposit |\n| Withdrawal | Withdrawal |\n| Transfer | Transfer |\n| Trade_Exchange | Trade |\n| Vote for Coin | Vote for Coin |\n| KuCoin Bonus | KuCoin Bonus |\n| Referral Bonus | Referral Bonus |\n| Rewards | Activities Rewards |\n| Distribution | Distribution, such as get GAS by holding NEO |\n| Airdrop/Fork | Airdrop/Fork |\n| Other rewards | Other rewards, except Vote, Airdrop, Fork |\n| Fee Rebate | Fee Rebate |\n| Buy Crypto | Use credit card to buy crypto |\n| Sell Crypto | Use credit card to sell crypto |\n| Public Offering Purchase | Public Offering Purchase for Spotlight |\n| Send red envelope | Send red envelope |\n| Open red envelope | Open red envelope |\n| Staking | Staking |\n| LockDrop Vesting | LockDrop Vesting |\n| Staking Profits | Staking Profits |\n| Redemption | Redemption |\n| Refunded Fees | Refunded Fees |\n| KCS Pay Fees | KCS Pay Fees |\n| Margin Trade | Margin Trade |\n| Loans | Loans |\n| Borrowings | Borrowings |\n| Debt Repayment | Debt Repayment |\n| Loans Repaid | Loans Repaid |\n| Lendings | Lendings |\n| Pool transactions | Pool-X transactions |\n| Instant Exchange | Instant Exchange |\n| Sub Account Transfer | Sub-account transfer |\n| Liquidation Fees | Liquidation Fees |\n| Soft Staking Profits | Soft Staking Profits |\n| Voting Earnings | Voting Earnings on Pool-X |\n| Redemption of Voting | Redemption of Voting on Pool-X |\n| Convert to KCS | Convert to KCS |\n| BROKER_TRANSFER | Broker transfer record |\n\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total page |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | unique id |\n| currency | string | The currency of an account |\n| amount | string | The total amount of assets (fees included) involved in assets changes such as transaction, withdrawal and bonus distribution. |\n| fee | string | Fees generated in transaction, withdrawal, etc. |\n| balance | string | Remaining funds after the transaction. |\n| accountType | string | The account type of the master user: MAIN, TRADE, MARGIN or CONTRACT. |\n| bizType | string | Business type leading to the changes in funds, such as exchange, withdrawal, deposit, KUCOIN_BONUS, REFERRAL_BONUS, Lendings etc. |\n| direction | string | Side, out or in |\n| createdAt | integer | Time of the event |\n| context | string | Business related information such as order ID, serial No., etc. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470121)\n\n:::info[Description]\nThis interface is for transaction records from all your account types, supporting various currency inquiries. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::\n\n:::tip[Tips]\nThe start and end time range cannot exceed 24 hours. An error will occur if the specified time window exceeds the range. If you specify the end time only, the system will automatically calculate the start time as end time minus 24 hours, and vice versa.\n:::\n\n:::tip[Tips]\nSupport to obtain 1-year historical data. If you need to obtain longer historical data, please submit a ticket: https://kucoin.zendesk.com/hc/en-us/requests/new\n:::\n\n**context**\n\nIf the returned value under bizType is “trade exchange”, the additional trade info (such as order ID, trade ID, trading pair, etc.) will be returned in field context.\n\n**BizType Description**\n\n| Field | Description |\n| ------ | ---------- |\n| Assets Transferred in After Upgrading | Assets Transferred in After V1 to V2 Upgrading |\n| Deposit | Deposit |\n| Withdrawal | Withdrawal |\n| Transfer | Transfer |\n| Trade_Exchange | Trade |\n| Vote for Coin | Vote for Coin |\n| KuCoin Bonus | KuCoin Bonus |\n| Referral Bonus | Referral Bonus |\n| Rewards | Activities Rewards |\n| Distribution | Distribution, such as get GAS by holding NEO |\n| Airdrop/Fork | Airdrop/Fork |\n| Other rewards | Other rewards, except Vote, Airdrop, Fork |\n| Fee Rebate | Fee Rebate |\n| Buy Crypto | Use credit card to buy crypto |\n| Sell Crypto | Use credit card to sell crypto |\n| Public Offering Purchase | Public Offering Purchase for Spotlight |\n| Send red envelope | Send red envelope |\n| Open red envelope | Open red envelope |\n| Staking | Staking |\n| LockDrop Vesting | LockDrop Vesting |\n| Staking Profits | Staking Profits |\n| Redemption | Redemption |\n| Refunded Fees | Refunded Fees |\n| KCS Pay Fees | KCS Pay Fees |\n| Margin Trade | Margin Trade |\n| Loans | Loans |\n| Borrowings | Borrowings |\n| Debt Repayment | Debt Repayment |\n| Loans Repaid | Loans Repaid |\n| Lendings | Lendings |\n| Pool transactions | Pool-X transactions |\n| Instant Exchange | Instant Exchange |\n| Sub Account Transfer | Sub-account transfer |\n| Liquidation Fees | Liquidation Fees |\n| Soft Staking Profits | Soft Staking Profits |\n| Voting Earnings | Voting Earnings on Pool-X |\n| Redemption of Voting | Redemption of Voting on Pool-X |\n| Convert to KCS | Convert to KCS |\n| BROKER_TRANSFER | Broker transfer record |\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total pages |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | unique id |\n| currency | string | Currency |\n| amount | string | The total amount of assets (fees included) involved in assets changes such as transactions, withdrawals and bonus distributions. |\n| fee | string | Fees generated in transaction, withdrawal, etc. |\n| balance | string | Remaining funds after the transaction. (Deprecated field, no actual use of the value field) |\n| accountType | string | Master user account types: MAIN, TRADE, MARGIN or CONTRACT. |\n| bizType | string | Business type leading to changes in funds, such as exchange, withdrawal, deposit, KUCOIN_BONUS, REFERRAL_BONUS, Lendings, etc. |\n| direction | string | Side, out or in |\n| createdAt | integer | Time of event |\n| context | string | Business related information such as order ID, serial no., etc. |\n\n---\n", "body": {} }, "response": [ @@ -792,7 +792,7 @@ { "key": "currency", "value": "BTC", - "description": "Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default." + "description": "Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default." }, { "key": "direction", @@ -802,17 +802,17 @@ { "key": "bizType", "value": "TRANSFER", - "description": "Type: DEPOSIT -deposit, WITHDRAW -withdraw, TRANSFER -transfer, SUB_TRANSFER -subaccount transfer,TRADE_EXCHANGE -trade, MARGIN_EXCHANGE -margin trade, KUCOIN_BONUS -bonus, BROKER_TRANSFER -Broker transfer record" + "description": "Type: DEPOSIT-deposit, WITHDRAW-withdraw, TRANSFER-transfer, SUB_TRANSFER-sub-account transfer, TRADE_EXCHANGE-trade, MARGIN_EXCHANGE-margin trade, KUCOIN_BONUS-bonus, BROKER_TRANSFER-Broker transfer record" }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", @@ -883,7 +883,7 @@ { "key": "currency", "value": "BTC", - "description": "Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default." + "description": "Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default." }, { "key": "direction", @@ -893,31 +893,31 @@ { "key": "bizType", "value": "TRANSFER", - "description": "Transaction type: TRANSFER-transfer funds,TRADE_EXCHANGE-Trade" + "description": "Transaction type" }, { "key": "lastId", "value": "254062248624417", - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given." + "description": "The ID of the last set of data from the previous data batch. By default, the latest information is given." }, { "key": "limit", "value": "100", - "description": "Default100,Max200" + "description": "Default100, Max200" }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470122)\n\n:::info[Description]\nThis API endpoint returns all transfer (in and out) records in high-frequency trading account and supports multi-coin queries. The query results are sorted in descending order by createdAt and id.\n:::\n\n\n\n:::tip[Tips]\nIf lastId is configured, the information obtained < lastId. Otherwise, it will go back to the latest information.\n\nYou can only obtain data from within a 3 _ 24 hour time range (i.e., from 3 _ 24 hours ago up to now) If you specify a time range that exceeds this limit, the system will default to data from within 3 * 24 hours.\n:::\n\n**context**\n\nIf the bizType is TRADE_EXCHANGE, the context field will include additional transaction information (order id, transaction id, and trading pair).\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Unique id |\n| currency | string | currency |\n| amount | string | Change in funds balance |\n| fee | string | Deposit or withdrawal fee |\n| tax | string | |\n| balance | string | Total balance of funds after change |\n| accountType | string | Master account type TRADE_HF |\n| bizType | string | Trnasaction type,such as TRANSFER, TRADE_EXCHANGE, etc. |\n| direction | string | Direction of transfer( out or in) |\n| createdAt | string | Created time |\n| context | string | Core transaction parameter |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470122)\n\n:::info[Description]\nThis API endpoint returns all transfer (in and out) records in high-frequency trading accounts and supports multi-coin queries. The query results are sorted in descending order by createdAt and ID.\n:::\n\n\n\n:::tip[Tips]\nIf lastId is configured, the information obtained < lastId. Otherwise, it will revert to the latest information.\n\nYou can only obtain data from within a 3 * 24 hour time range (i.e., from 3 * 24 hours ago up to now). If you specify a time range that exceeds this limit, the system will default to data from within 3 * 24 hours.\n:::\n\n**context**\n\nIf the bizType is TRADE_EXCHANGE, the context field will include additional transaction information (order ID, transaction ID, and trading pair).\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Unique ID |\n| currency | string | currency |\n| amount | string | Change in funds balance |\n| fee | string | Transaction, Deposit or withdrawal fee |\n| tax | string | |\n| balance | string | Total balance of funds after change |\n| accountType | string | Master account type TRADE_HF |\n| bizType | string | Trnasaction type, such as TRANSFER, TRADE_EXCHANGE, etc. |\n| direction | string | Direction of transfer (out or in) |\n| createdAt | string | Created time |\n| context | string | Core transaction parameter |\n\n---\n", "body": {} }, "response": [ @@ -943,7 +943,7 @@ { "key": "currency", "value": "BTC", - "description": "Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default." + "description": "Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default." }, { "key": "direction", @@ -953,27 +953,27 @@ { "key": "bizType", "value": "TRANSFER", - "description": "Transaction type: TRANSFER-transfer funds,TRADE_EXCHANGE-Trade" + "description": "Transaction type" }, { "key": "lastId", "value": "254062248624417", - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given." + "description": "The ID of the last set of data from the previous data batch. By default, the latest information is given." }, { "key": "limit", "value": "100", - "description": "Default100,Max200" + "description": "Default100, Max200" }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" } ] } @@ -1035,7 +1035,7 @@ { "key": "currency", "value": "BTC", - "description": "currency, optional,can select more than one,separate with commas,select no more than 10 currencys,the default will be to query for all currencys if left empty" + "description": "Currency optional; more than one can be selected; separate using commas; select no more than 10 currencies; the default will be to query for all currencies if left empty" }, { "key": "direction", @@ -1045,31 +1045,31 @@ { "key": "bizType", "value": "TRANSFER", - "description": "Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE - cross margin trade, ISOLATED_EXCHANGE - isolated margin trade, LIQUIDATION - liquidation, ASSERT_RETURN - forced liquidation asset return" + "description": "Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE-cross margin trade, ISOLATED_EXCHANGE-isolated margin trade, LIQUIDATION-liquidation, ASSERT_RETURN-forced liquidation asset return" }, { "key": "lastId", "value": "254062248624417", - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given." + "description": "The ID of the last set of data from the previous data batch. By default, the latest information is given." }, { "key": "limit", "value": "100", - "description": "Default100,Max200" + "description": "Default100, Max200" }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470123)\n\n:::info[Description]\nThis API endpoint returns all transfer (in and out) records in high-frequency margin trading account and supports multi-coin queries. The query results are sorted in descending order by createdAt and id.\n:::\n\n\n:::tip[Tips]\nIf lastId is configured, the information obtained < lastId. Otherwise, it will go back to the latest information.\n\nYou can only obtain data from within a 3 _ 24 hour time range (i.e., from 3 _ 24 hours ago up to now) If you specify a time range that exceeds this limit, the system will default to data from within 3 * 24 hours.\n\nIf bizType is MARGIN_EXCHANGE or ISOLATED_EXCHANGE, the context field will contain additional information about the transaction (order id, transaction id, transaction pair).\n:::\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | integer | |\n| currency | string | currency |\n| amount | string | Change in funds balance |\n| fee | string | Deposit or withdrawal fee |\n| balance | string | Total balance of funds after change |\n| accountType | string | Master account type TRADE_HF |\n| bizType | string | Trnasaction type,such as TRANSFER, TRADE_EXCHANGE, etc. |\n| direction | string | Direction of transfer( out or in) |\n| createdAt | integer | Ledger creation time |\n| context | string | Core transaction parameter |\n| tax | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470123)\n\n:::info[Description]\nThis API endpoint returns all transfer (in and out) records in high-frequency margin trading accounts and supports multi-coin queries. The query results are sorted in descending order by createdAt and ID.\n:::\n\n\n:::tip[Tips]\nIf lastId is configured, the information obtained < lastId. Otherwise, it will revert to the latest information.\n\nYou can only obtain data from within a 3 * 24 hour time range (i.e., from 3 * 24 hours ago up to now). If you specify a time range that exceeds this limit, the system will default to data from within 3 * 24 hours.\n\nIf bizType is MARGIN_EXCHANGE or ISOLATED_EXCHANGE, the context field will contain additional information about the transaction (order ID, transaction ID, transaction pair).\n:::\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | integer | |\n| currency | string | currency |\n| amount | string | Change in funds balance |\n| fee | string | Transaction, Deposit or withdrawal fee |\n| balance | string | Total balance of funds after change |\n| accountType | string | Master account type TRADE_HF |\n| bizType | string | Trnasaction type, such as TRANSFER, TRADE_EXCHANGE, etc. |\n| direction | string | Direction of transfer (out or in) |\n| createdAt | integer | Ledger creation time |\n| context | string | Core transaction parameter |\n| tax | string | |\n\n---\n", "body": {} }, "response": [ @@ -1096,7 +1096,7 @@ { "key": "currency", "value": "BTC", - "description": "currency, optional,can select more than one,separate with commas,select no more than 10 currencys,the default will be to query for all currencys if left empty" + "description": "Currency optional; more than one can be selected; separate using commas; select no more than 10 currencies; the default will be to query for all currencies if left empty" }, { "key": "direction", @@ -1106,27 +1106,27 @@ { "key": "bizType", "value": "TRANSFER", - "description": "Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE - cross margin trade, ISOLATED_EXCHANGE - isolated margin trade, LIQUIDATION - liquidation, ASSERT_RETURN - forced liquidation asset return" + "description": "Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE-cross margin trade, ISOLATED_EXCHANGE-isolated margin trade, LIQUIDATION-liquidation, ASSERT_RETURN-forced liquidation asset return" }, { "key": "lastId", "value": "254062248624417", - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given." + "description": "The ID of the last set of data from the previous data batch. By default, the latest information is given." }, { "key": "limit", "value": "100", - "description": "Default100,Max200" + "description": "Default100, Max200" }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" } ] } @@ -1190,17 +1190,17 @@ { "key": "type", "value": "Transferin", - "description": "Type RealisedPNL-Realised profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out" + "description": "Type RealizedPNL-Realized profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out" }, { "key": "offset", "value": "254062248624417", - "description": "Start offset. Generally, the only attribute of the last returned result of the previous request is used, and the first page is returned by default" + "description": "Start offset. Generally, only the attributes of the last returned result of the previous request are used, and the first page is returned by default" }, { "key": "forward", "value": "false", - "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" + "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." }, { "key": "maxCount", @@ -1210,16 +1210,16 @@ { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470124)\n\n:::info[Description]\nThis interface can query the ledger records of the futures business line\n:::\n\n\n\n:::tip[Tips]\nIf there are open positions, the status of the first page returned will be Pending, indicating the realised profit and loss in the current 8-hour settlement period. Please specify the minimum offset number of the current page into the offset field to turn the page.\n:::\n\n:::tip[Tips]\nSupplementary instructions for startAt and endAt: startAt must be less than endAt; and the interval cannot exceed 1 day; only one field is allowed, and if only one field is passed, another field will be automatically added or subtracted by the system 1 day to complete\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| dataList | array | Refer to the schema section of dataList |\n| hasMore | boolean | Is it the last page. If it is false, it means it is the last page, and if it is true, it means need to turn the page. |\n\n**root.data.dataList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| time | integer | ledger time |\n| type | string | Type: RealisedPNL, Deposit, Withdrawal, TransferIn, TransferOut |\n| amount | number | Transaction amount |\n| fee | number | Fee |\n| accountEquity | number | Account equity |\n| status | string | Status: Completed, Pending |\n| remark | string | Ticker symbol of the contract |\n| offset | integer | Offset |\n| currency | string | Currency |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470124)\n\n:::info[Description]\nThis interface can query the ledger records of the futures business line.\n:::\n\n:::tip[Tips]\nIf there are open positions, the status of the first page returned will be Pending, indicating the realized profit and loss in the current 8-hour settlement period. Please specify the minimum offset number of the current page into the offset field to move to the next page.\n:::\n\n:::tip[Tips]\nSupplementary instructions for startAt and endAt: startAt must be less than endAt; and the interval cannot exceed 1 day; only one field is allowed, and if only one field is passed, another field will be automatically added or subtracted by the system 1 day to complete\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| dataList | array | Refer to the schema section of dataList |\n| hasMore | boolean | Is it the last page? If it is false, it means it is the last page, and if it is true, it means you need to move to the next page. |\n\n**root.data.dataList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| time | integer | Ledger time |\n| type | string | Type: RealisedPNL, Deposit, Withdrawal, TransferIn, TransferOut |\n| amount | number | Transaction amount |\n| fee | number | Fee |\n| accountEquity | number | Account equity |\n| status | string | Status: Completed, Pending |\n| remark | string | Ticker symbol of the contract |\n| offset | integer | Offset |\n| currency | string | Currency |\n\n---\n", "body": {} }, "response": [ @@ -1248,17 +1248,17 @@ { "key": "type", "value": "Transferin", - "description": "Type RealisedPNL-Realised profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out" + "description": "Type RealizedPNL-Realized profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out" }, { "key": "offset", "value": "254062248624417", - "description": "Start offset. Generally, the only attribute of the last returned result of the previous request is used, and the first page is returned by default" + "description": "Start offset. Generally, only the attributes of the last returned result of the previous request are used, and the first page is returned by default" }, { "key": "forward", "value": "false", - "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" + "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." }, { "key": "maxCount", @@ -1268,12 +1268,12 @@ { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" } ] } @@ -1319,7 +1319,7 @@ "name": "Sub Account", "item": [ { - "name": "Add SubAccount", + "name": "Add sub-account", "request": { "method": "POST", "header": [], @@ -1338,7 +1338,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470135)\n\n:::info[Description]\nThis endpoint can be used to create sub-accounts.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| password | string | Password(7-24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) |\n| remarks | string | Remarks(1~24 characters) |\n| subName | string | Sub-account name(must contain 7-32 characters, at least one number and one letter. Cannot contain any spaces.) |\n| access | string | Permission (types include Spot, Futures, Margin permissions, which can be used alone or in combination). |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | integer | Sub-account UID |\n| subName | string | Sub-account name |\n| remarks | string | Remarks |\n| access | string | Permission |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470135)\n\n:::info[Description]\nThis endpoint can be used to create sub-accounts.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| password | string | Password (7–24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) |\n| remarks | string | Remarks (1–24 characters) |\n| subName | string | Sub-account name (must contain 7–32 characters, at least one number and one letter. Cannot contain any spaces.) |\n| access | string | Permission (types include Spot, Futures, Margin permissions, which can be used alone or in combination). |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | integer | Sub-account UID |\n| subName | string | Sub-account name |\n| remarks | string | Remarks |\n| access | string | Permission |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"password\": \"1234567\",\n \"remarks\": \"TheRemark\",\n \"subName\": \"Name1234567\",\n \"access\": \"Spot\"\n}", @@ -1406,7 +1406,7 @@ ] }, { - "name": "Add SubAccount Margin Permission", + "name": "Add sub-account Margin Permission", "request": { "method": "POST", "header": [], @@ -1426,7 +1426,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470331)\n\n:::info[Description]\nThis endpoint can be used to add sub-accounts Margin permission. Before using this endpoints, you need to ensure that the master account apikey has Margin permissions and the Margin function has been activated.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | string | Sub account UID |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470331)\n\n:::info[Description]\nThis endpoint can be used to add sub-account Margin permissions. Before using this endpoint, you need to ensure that the master account apikey has Margin permissions and the Margin function has been activated.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | string | Sub account UID |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | string | |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"uid\": \"169579801\"\n}", @@ -1495,7 +1495,7 @@ ] }, { - "name": "Add SubAccount Futures Permission", + "name": "Add sub-account Futures Permission", "request": { "method": "POST", "header": [], @@ -1515,7 +1515,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470332)\n\n:::info[Description]\nThis endpoint can be used to add sub-accounts Futures permission. Before using this endpoints, you need to ensure that the master account apikey has Futures permissions and the Futures function has been activated.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | string | Sub account UID |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | boolean | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470332)\n\n:::info[Description]\nThis endpoint can be used to add sub-account Futures permissions. Before using this endpoint, you need to ensure that the master account apikey has Futures permissions and the Futures function has been activated.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | string | Sub account UID |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | boolean | |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"uid\": \"169579801\"\n}", @@ -1584,7 +1584,7 @@ ] }, { - "name": "Get SubAccount List - Summary Info", + "name": "Get sub-account List - Summary Info", "request": { "method": "GET", "header": [], @@ -1613,7 +1613,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470131)\n\n:::info[Description]\nThis endpoint can be used to get a paginated list of sub-accounts. Pagination is required.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | Current request page |\n| pageSize | integer | Number of results per request. Minimum is 1, maximum is 100 |\n| totalNum | integer | Total number of messages |\n| totalPage | integer | Total number of page |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| userId | string | Sub-account User Id |\n| uid | integer | Sub-account UID |\n| subName | string | Sub-account name |\n| status | integer | Sub-account; 2:Enable, 3:Frozen |\n| type | integer | Sub-account type |\n| access | string | Sub-account Permission |\n| createdAt | integer | Time of the event |\n| remarks | string | Remarks |\n| tradeTypes | array | Refer to the schema section of tradeTypes |\n| openedTradeTypes | array | Refer to the schema section of openedTradeTypes |\n| hostedStatus | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470131)\n\n:::info[Description]\nThis endpoint can be used to get a paginated list of sub-accounts. Pagination is required.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | Current request page |\n| pageSize | integer | Number of results per request. Minimum is 1, maximum is 100 |\n| totalNum | integer | Total number of messages |\n| totalPage | integer | Total number of pages |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| userId | string | Sub-account User ID |\n| uid | integer | Sub-account UID |\n| subName | string | Sub-account name |\n| status | integer | Sub-account; 2:Enable, 3:Frozen |\n| type | integer | Sub-account type |\n| access | string | Sub-account Permission |\n| createdAt | integer | Time of event |\n| remarks | string | Remarks |\n| tradeTypes | array | Refer to the schema section of tradeTypes |\n| openedTradeTypes | array | Refer to the schema section of openedTradeTypes |\n| hostedStatus | string | |\n\n---\n", "body": {} }, "response": [ @@ -1683,7 +1683,7 @@ ] }, { - "name": "Get SubAccount Detail - Balance", + "name": "Get sub-account Detail - Balance", "request": { "method": "GET", "header": [], @@ -1702,8 +1702,18 @@ "query": [ { "key": "includeBaseAmount", - "value": "false", - "description": "false: do not display the currency which asset is 0, true: display all currency" + "value": "", + "description": "False: Do not display currencies with 0 assets; True: display all currencies" + }, + { + "key": "baseCurrency", + "value": null, + "description": "Specify the currency used to convert assets" + }, + { + "key": "baseAmount", + "value": null, + "description": "The currency balance specified must be greater than or equal to the amount" } ] }, @@ -1731,8 +1741,18 @@ "query": [ { "key": "includeBaseAmount", - "value": "false", - "description": "false: do not display the currency which asset is 0, true: display all currency" + "value": "", + "description": "False: Do not display currencies with 0 assets; True: display all currencies" + }, + { + "key": "baseCurrency", + "value": null, + "description": "Specify the currency used to convert assets" + }, + { + "key": "baseAmount", + "value": null, + "description": "The currency balance specified must be greater than or equal to the amount" } ] } @@ -1772,7 +1792,7 @@ ] }, { - "name": "Get SubAccount List - Spot Balance(V2)", + "name": "Get sub-account List - Spot Balance (V2)", "request": { "method": "GET", "header": [], @@ -1869,7 +1889,7 @@ ] }, { - "name": "Get SubAccount List - Futures Balance(V2)", + "name": "Get sub-account List - Futures Balance (V2)", "request": { "method": "GET", "header": [], @@ -1888,11 +1908,11 @@ { "key": "currency", "value": "USDT", - "description": "Currecny, Default XBT" + "description": "Currency, Default XBT" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470134)\n\n:::info[Description]\nThis endpoint can be used to get Futures sub-account information. \n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| summary | object | Refer to the schema section of summary |\n| accounts | array | Refer to the schema section of accounts |\n\n**root.data.summary Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| accountEquityTotal | number | Total Account Equity |\n| unrealisedPNLTotal | number | Total unrealisedPNL |\n| marginBalanceTotal | number | Total Margin Balance |\n| positionMarginTotal | number | Total Position margin |\n| orderMarginTotal | number | |\n| frozenFundsTotal | number | Total frozen funds for withdrawal and out-transfer |\n| availableBalanceTotal | number | total available balance |\n| currency | string | |\n\n**root.data.summary.accounts Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| accountName | string | Account name, main account is main |\n| accountEquity | number | |\n| unrealisedPNL | number | |\n| marginBalance | number | |\n| positionMargin | number | |\n| orderMargin | number | |\n| frozenFunds | number | |\n| availableBalance | number | |\n| currency | string | currency |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470134)\n\n:::info[Description]\nThis endpoint can be used to get Futures sub-account information. \n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| summary | object | Refer to the schema section of summary |\n| accounts | array | Refer to the schema section of accounts |\n\n**root.data.summary Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| accountEquityTotal | number | Total Account Equity |\n| unrealisedPNLTotal | number | Total unrealizedPNL |\n| marginBalanceTotal | number | Total Margin Balance |\n| positionMarginTotal | number | Total Position margin |\n| orderMarginTotal | number | |\n| frozenFundsTotal | number | Total frozen funds for withdrawal and out-transfer |\n| availableBalanceTotal | number | Total available balance |\n| currency | string | |\n\n**root.data.summary.accounts Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| accountName | string | Account name, main account is main |\n| accountEquity | number | |\n| unrealisedPNL | number | |\n| marginBalance | number | |\n| positionMargin | number | |\n| orderMargin | number | |\n| frozenFunds | number | |\n| availableBalance | number | |\n| currency | string | currency |\n\n---\n", "body": {} }, "response": [ @@ -1916,7 +1936,7 @@ { "key": "currency", "value": "USDT", - "description": "Currecny, Default XBT" + "description": "Currency, Default XBT" } ] } @@ -1962,7 +1982,7 @@ "name": "Sub Account API", "item": [ { - "name": "Add SubAccount API", + "name": "Add sub-account API", "request": { "method": "POST", "header": [], @@ -1980,7 +2000,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470138)\n\n:::info[Description]\nThis endpoint can be used to create APIs for sub-accounts.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| passphrase | string | Password(Must contain 7-32 characters. Cannot contain any spaces.) |\n| remark | string | Remarks(1~24 characters) |\n| permission | string | [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") |\n| ipWhitelist | string | IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) |\n| expire | string | API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 |\n| subName | string | Sub-account name, create sub account name of API Key. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| subName | string | Sub-account name |\n| remark | string | Remarks |\n| apiKey | string | API Key |\n| apiSecret | string | API Secret Key
|\n| apiVersion | integer | API Version |\n| passphrase | string | Password |\n| permission | string | [Permissions](https://www.kucoin.com/docs-new/doc-338144) |\n| ipWhitelist | string | IP whitelist |\n| createdAt | integer | Time of the event |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470138)\n\n:::info[Description]\nThis endpoint can be used to create APIs for sub-accounts.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| passphrase | string | Password (Must contain 7–32 characters. Cannot contain any spaces.) |\n| remark | string | Remarks (1–24 characters) |\n| permission | string | [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") |\n| ipWhitelist | string | IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) |\n| expire | string | API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 |\n| subName | string | Sub-account name, create sub account name of API Key. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| subName | string | Sub-account name |\n| remark | string | Remarks |\n| apiKey | string | API Key |\n| apiSecret | string | API Secret Key
|\n| apiVersion | integer | API Version |\n| passphrase | string | Password |\n| permission | string | [Permissions](https://www.kucoin.com/docs-new/doc-338144) |\n| ipWhitelist | string | IP whitelist |\n| createdAt | integer | Time of event |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"subName\": \"testapi6\",\n \"passphrase\": \"11223344\",\n \"remark\": \"TheRemark\",\n \"permission\": \"General,Spot,Futures\"\n}", @@ -2047,7 +2067,7 @@ ] }, { - "name": "Modify SubAccount API", + "name": "Modify sub-account API", "request": { "method": "POST", "header": [], @@ -2066,7 +2086,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470139)\n\n:::info[Description]\nThis endpoint can be used to modify sub-account APIs.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| passphrase | string | Password(Must contain 7-32 characters. Cannot contain any spaces.) |\n| permission | string | [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") |\n| ipWhitelist | string | IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) |\n| expire | string | API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 |\n| subName | string | Sub-account name, create sub account name of API Key. |\n| apiKey | string | API-Key(Sub-account APIKey) |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| subName | string | Sub-account name |\n| apiKey | string | API Key |\n| permission | string | [Permissions](https://www.kucoin.com/docs-new/doc-338144) |\n| ipWhitelist | string | IP whitelist |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470139)\n\n:::info[Description]\nThis endpoint can be used to modify sub-account APIs.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| passphrase | string | Password (Must contain 7–32 characters. Cannot contain any spaces.) |\n| permission | string | [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") |\n| ipWhitelist | string | IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) |\n| expire | string | API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 |\n| subName | string | Sub-account name, create sub account name of API Key. |\n| apiKey | string | API-Key (Sub-account APIKey) |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| subName | string | Sub-account name |\n| apiKey | string | API Key |\n| permission | string | [Permissions](https://www.kucoin.com/docs-new/doc-338144) |\n| ipWhitelist | string | IP whitelist |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"subName\": \"testapi6\",\n \"apiKey\": \"670621e3a25958000159c82f\",\n \"passphrase\": \"11223344\",\n \"permission\": \"General,Spot,Futures\"\n}", @@ -2134,7 +2154,7 @@ ] }, { - "name": "Get SubAccount API List", + "name": "Get sub-account API List", "request": { "method": "GET", "header": [], @@ -2163,7 +2183,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470136)\n\n:::info[Description]\nThis endpoint can be used to obtain a list of APIs pertaining to a sub-account.(Not contain ND Broker Sub Account)\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| subName | string | Sub Name |\n| remark | string | Remarks |\n| apiKey | string | API Key |\n| apiVersion | integer | API Version |\n| permission | string | [Permissions](https://www.kucoin.com/docs-new/doc-338144) |\n| ipWhitelist | string | IP whitelist |\n| createdAt | integer | Apikey create time |\n| uid | integer | Sub-account UID |\n| isMaster | boolean | Whether it is the master account. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470136)\n\n:::info[Description]\nThis endpoint can be used to obtain a list of APIs pertaining to a sub-account (not including ND broker sub-accounts).\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| subName | string | Sub Name |\n| remark | string | Remarks |\n| apiKey | string | API Key |\n| apiVersion | integer | API Version |\n| permission | string | [Permissions](https://www.kucoin.com/docs-new/doc-338144) |\n| ipWhitelist | string | IP whitelist |\n| createdAt | integer | Apikey create time |\n| uid | integer | Sub-account UID |\n| isMaster | boolean | Whether it is the master account. |\n\n---\n", "body": {} }, "response": [ @@ -2233,7 +2253,7 @@ ] }, { - "name": "Delete SubAccount API", + "name": "Delete sub-account API", "request": { "method": "DELETE", "header": [], @@ -2263,7 +2283,7 @@ { "key": "passphrase", "value": "11223344", - "description": "Password(Password of the API key)" + "description": "Password (password of the API key)" } ] }, @@ -2302,7 +2322,7 @@ { "key": "passphrase", "value": "11223344", - "description": "Password(Password of the API key)" + "description": "Password (password of the API key)" } ] } @@ -2348,7 +2368,7 @@ "name": "Deposit", "item": [ { - "name": "Add Deposit Address(V3)", + "name": "Add Deposit Address (V3)", "request": { "method": "POST", "header": [], @@ -2366,7 +2386,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470142)\n\n:::info[Description]\nRequest via this endpoint to create a deposit address for a currency you intend to deposit.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| chain | string | The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. |\n| to | string | Deposit account type: main (funding account), trade (spot trading account), the default is main |\n| amount | string | Deposit amount. This parameter is only used when applying for invoices on the Lightning Network. This parameter is invalid if it is not passed through the Lightning Network. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. |\n| chainId | string | The chainId of currency |\n| to | string | Deposit account type: main (funding account), trade (spot trading account) |\n| expirationDate | integer | Expiration time, Lightning network expiration time, non-Lightning network this field is invalid |\n| currency | string | currency |\n| chainName | string | The chainName of currency |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470142)\n\n:::info[Description]\nRequest via this endpoint the creation of a deposit address for a currency you intend to deposit.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| chain | string | The currency chainId, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. |\n| to | string | Deposit account type: MAIN (funding account), TRADE (spot trading account); the default is MAIN |\n| amount | string | Deposit amount. This parameter is only used when applying for invoices on the Lightning Network. This parameter is invalid if it is not passed through the Lightning Network. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. |\n| chainId | string | The chainId of currency |\n| to | string | Deposit account type: MAIN (funding account), TRADE (spot trading account) |\n| expirationDate | integer | Expiration time; Lightning network expiration time; this field is not applicable to non-Lightning networks |\n| currency | string | currency |\n| chainName | string | The chainName of currency |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"currency\": \"TON\",\n \"chain\": \"ton\",\n \"to\": \"trade\"\n}", @@ -2433,7 +2453,7 @@ ] }, { - "name": "Get Deposit Address(V3)", + "name": "Get Deposit Address (V3)", "request": { "method": "GET", "header": [], @@ -2466,7 +2486,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470140)\n\n:::info[Description]\nGet all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to Add Deposit Address first.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. |\n| chainId | string | The chainId of currency |\n| to | string | Deposit account type: main (funding account), trade (spot trading account) |\n| expirationDate | integer | Expiration time, Lightning network expiration time, non-Lightning network this field is invalid |\n| currency | string | currency |\n| contractAddress | string | The token contract address. |\n| chainName | string | The chainName of currency |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470140)\n\n:::info[Description]\nGet all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to add the deposit address first.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. |\n| chainId | string | The chainId of currency |\n| to | string | Deposit account type: MAIN (funding account), TRADE (spot trading account) |\n| expirationDate | integer | Expiration time; Lightning network expiration time; this field is not applicable to non-Lightning networks |\n| currency | string | currency |\n| contractAddress | string | The token contract address. |\n| chainName | string | The chainName of currency |\n\n---\n", "body": {} }, "response": [ @@ -2569,12 +2589,12 @@ { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", @@ -2588,7 +2608,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470141)\n\n:::info[Description]\nRequest via this endpoint to get deposit list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total page |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| chain | string | The chainName of currency |\n| status | string | Status |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. |\n| isInner | boolean | Internal deposit or not |\n| amount | string | Deposit amount |\n| fee | string | Fees charged for deposit |\n| walletTxId | string | Wallet Txid |\n| createdAt | integer | Creation time of the database record |\n| updatedAt | integer | Update time of the database record |\n| remark | string | remark |\n| arrears | boolean | Whether there is any debt.A quick rollback will cause the deposit to fail. If the deposit fails, you will need to repay the balance. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470141)\n\n:::info[Description]\nRequest a deposit list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total pages |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| chain | string | The chainName of currency |\n| status | string | Status |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. |\n| isInner | boolean | Internal deposit or not |\n| amount | string | Deposit amount |\n| fee | string | Fees charged for deposit |\n| walletTxId | string | Wallet Txid |\n| createdAt | integer | Database record creation time |\n| updatedAt | integer | Update time of the database record |\n| remark | string | remark |\n| arrears | boolean | Whether there is any debt.A quick rollback will cause the deposit to fail. If the deposit fails, you will need to repay the balance. |\n\n---\n", "body": {} }, "response": [ @@ -2622,12 +2642,12 @@ { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", @@ -2708,11 +2728,11 @@ { "key": "chain", "value": null, - "description": "The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency." + "description": "The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies." } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470143)\n\n:::info[Description]\nThis interface can obtain the withdrawal quotas information of this currency.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | |\n| limitBTCAmount | string | |\n| usedBTCAmount | string | |\n| quotaCurrency | string | withdrawal limit currency |\n| limitQuotaCurrencyAmount | string | The intraday available withdrawal amount(withdrawal limit currency) |\n| usedQuotaCurrencyAmount | string | The intraday cumulative withdrawal amount(withdrawal limit currency) |\n| remainAmount | string | Remaining amount available to withdraw the current day
|\n| availableAmount | string | Current available withdrawal amount |\n| withdrawMinFee | string | Minimum withdrawal fee |\n| innerWithdrawMinFee | string | Fees for internal withdrawal |\n| withdrawMinSize | string | Minimum withdrawal amount |\n| isWithdrawEnabled | boolean | Is the withdraw function enabled or not |\n| precision | integer | Floating point precision. |\n| chain | string | The chainName of currency |\n| reason | string | Reasons for restriction, Usually empty |\n| lockedAmount | string | Total locked amount (including the amount locked into USDT for each currency) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470143)\n\n:::info[Description]\nThis interface can obtain the withdrawal quota information of this currency.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | |\n| limitBTCAmount | string | |\n| usedBTCAmount | string | |\n| quotaCurrency | string | Withdrawal limit currency |\n| limitQuotaCurrencyAmount | string | The intraday available withdrawal amount (withdrawal limit currency) |\n| usedQuotaCurrencyAmount | string | The intraday cumulative withdrawal amount (withdrawal limit currency) |\n| remainAmount | string | Remaining amount available to withdraw the current day
|\n| availableAmount | string | Current available withdrawal amount |\n| withdrawMinFee | string | Minimum withdrawal fee |\n| innerWithdrawMinFee | string | Fees for internal withdrawal |\n| withdrawMinSize | string | Minimum withdrawal amount |\n| isWithdrawEnabled | boolean | Is the withdraw function enabled? |\n| precision | integer | Floating point precision. |\n| chain | string | The chainName of currency |\n| reason | string | Reasons for restriction. Usually empty. |\n| lockedAmount | string | Total locked amount (including the amount locked into USDT for each currency) |\n\n---\n", "body": {} }, "response": [ @@ -2742,7 +2762,7 @@ { "key": "chain", "value": null, - "description": "The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency." + "description": "The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies." } ] } @@ -2782,7 +2802,7 @@ ] }, { - "name": "Withdraw(V3)", + "name": "Withdraw (V3)", "request": { "method": "POST", "header": [], @@ -2799,7 +2819,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470146)\n\n:::info[Description]\nUse this interface to withdraw the specified currency\n:::\n\n:::tip[Tips]\nOn the WEB end, you can open the switch of specified favorite addresses for withdrawal, and when it is turned on, it will verify whether your withdrawal address(including chain) is a favorite address(it is case sensitive); if it fails validation, it will respond with the error message {\"msg\":\"Already set withdraw whitelist, this address is not favorite address\",\"code\":\"260325\"}.\n:::\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| chain | string | The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. |\n| amount | integer | Withdrawal amount, a positive number which is a multiple of the amount precision |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. |\n| isInner | boolean | Internal withdrawal or not. Default : false |\n| remark | string | remark |\n| feeDeductType | string | Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified

1. INTERNAL- deduct the transaction fees from your withdrawal amount
2. EXTERNAL- deduct the transaction fees from your main account
3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. |\n| toAddress | string | Withdrawal address |\n| withdrawType | string | Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will have rate limited: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| withdrawalId | string | Withdrawal id, a unique ID for a withdrawal |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470146)\n\n:::info[Description]\nUse this interface to withdraw the specified currency.\n:::\n\n:::tip[Tips]\nOn the WEB end, you can open the switch of specified favorite addresses for withdrawal, and when it is turned on, it will verify whether your withdrawal address (including chain) is a favorite address (it is case sensitive); if it fails validation, it will respond with the error message {\"msg\":\"Already set withdraw whitelist, this address is not favorite address\",\"code\":\"260325\"}.\n:::\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| chain | string | The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. |\n| amount | integer | Withdrawal amount, a positive number which is a multiple of the amount precision |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. |\n| isInner | boolean | Internal withdrawal or not. Default: False |\n| remark | string | Remark |\n| feeDeductType | string | Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified

1. INTERNAL: Deduct the transaction fees from your withdrawal amount
2. EXTERNAL: Deduct the transaction fees from your main account
3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. |\n| toAddress | string | Withdrawal address |\n| withdrawType | string | Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will be rate limits: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| withdrawalId | string | Withdrawal id, a unique ID for a withdrawal |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"currency\": \"USDT\",\n \"toAddress\": \"TKFRQXSDcY****GmLrjJggwX8\",\n \"amount\": 3,\n \"withdrawType\": \"ADDRESS\",\n \"chain\": \"trx\",\n \"isInner\": true,\n \"remark\": \"this is Remark\"\n}", @@ -2883,7 +2903,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470144)\n\n:::info[Description]\nThis interface can cancel the withdrawal, Only withdrawals requests of PROCESSING status could be canceled.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470144)\n\n:::info[Description]\nThis interface can cancel the withdrawal. Only withdrawal requests with PROCESSING status can be canceled.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | string | |\n\n---\n", "body": {} }, "response": [ @@ -2966,17 +2986,17 @@ { "key": "status", "value": "SUCCESS", - "description": "Status. Available value: PROCESSING, WALLET_PROCESSING, SUCCESS, and FAILURE" + "description": "Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE" }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", @@ -2990,7 +3010,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470145)\n\n:::info[Description]\nRequest via this endpoint to get withdrawal list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total page |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Unique id |\n| currency | string | Currency |\n| chain | string | The id of currency |\n| status | string | Status |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. |\n| isInner | boolean | Internal deposit or not |\n| amount | string | Deposit amount |\n| fee | string | Fees charged for deposit |\n| walletTxId | string | Wallet Txid |\n| createdAt | integer | Creation time of the database record |\n| updatedAt | integer | Update time of the database record |\n| remark | string | remark |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470145)\n\n:::info[Description]\nRequest a withdrawal list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total pages |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Unique ID |\n| currency | string | Currency |\n| chain | string | The id of currency |\n| status | string | Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. |\n| isInner | boolean | Internal deposit or not |\n| amount | string | Deposit amount |\n| fee | string | Fees charged for deposit |\n| walletTxId | string | Wallet Txid |\n| createdAt | integer | Database record creation time |\n| updatedAt | integer | Update time of the database record |\n| remark | string | Remark |\n\n---\n", "body": {} }, "response": [ @@ -3019,17 +3039,17 @@ { "key": "status", "value": "SUCCESS", - "description": "Status. Available value: PROCESSING, WALLET_PROCESSING, SUCCESS, and FAILURE" + "description": "Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE" }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", @@ -3110,12 +3130,12 @@ { "key": "type", "value": "MAIN", - "description": "The account type:MAIN、TRADE、MARGIN、ISOLATED" + "description": "The account type:MAIN, TRADE, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2" }, { "key": "tag", "value": null, - "description": "Trading pair, required when the account type is ISOLATED; other types are not passed, e.g.: BTC-USDT" + "description": "Trading pair required when the account type is ISOLATED; other types do not pass, e.g.: BTC-USDT" } ] }, @@ -3149,12 +3169,12 @@ { "key": "type", "value": "MAIN", - "description": "The account type:MAIN、TRADE、MARGIN、ISOLATED" + "description": "The account type:MAIN, TRADE, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2" }, { "key": "tag", "value": null, - "description": "Trading pair, required when the account type is ISOLATED; other types are not passed, e.g.: BTC-USDT" + "description": "Trading pair required when the account type is ISOLATED; other types do not pass, e.g.: BTC-USDT" } ] } @@ -3212,7 +3232,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470147)\n\n:::info[Description]\nThis interface can be used for transfers between master and sub accounts and inner transfers\n:::\n\n\n\nThe API Key needs to have universal transfer permission when calling.\n\nSupport internal transfer,do not support transfers between sub-accounts.\n\nSupport transfer between master and sub accounts (only applicable to master account APIKey).\n\nMARGIN_V2 only supports internal transfers between MARGIN and does not support transfers between master and sub accounts.\n\nISOLATED_V2 only supports internal transfers between ISOLATED and does not support transfers between master and sub accounts.\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits |\n| currency | string | currency |\n| amount | string | Transfer amount, the amount is a positive integer multiple of the currency precision. |\n| fromUserId | string | Transfer out UserId, This is required when transferring sub-account to master-account. It is optional for internal transfers. |\n| fromAccountType | string | Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 |\n| fromAccountTag | string | Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT |\n| type | string | Transfer type:INTERNAL(Transfer within account)、PARENT_TO_SUB(Transfer from master-account to sub-account),SUB_TO_PARENT(Transfer from sub-account to master-account) |\n| toUserId | string | Transfer in UserId, This is required when transferring master-account to sub-account. It is optional for internal transfers. |\n| toAccountType | string | Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 |\n| toAccountTag | string | Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | Transfer order ID |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470147)\n\n:::info[Description]\nThis interface can be used for transfers between master- and sub-accounts and transfers\n:::\n\nThe API Key needs universal transfer permission when calling.\n\nIt supports transfers between master account and sub-accounts, and also supports transfers between different types of accounts.\n\nIt supports transfer between master account and sub-accounts (only applicable to master account APIKey).\n\nMARGIN_V2 only supports internal transfers between MARGIN and does not support transfers between master- and sub-accounts.\n\nISOLATED_V2 only supports internal transfers between ISOLATED and does not support transfers between master- and sub-accounts.\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits |\n| currency | string | currency |\n| amount | string | Transfer amount: The amount is a positive integer multiple of the currency precision. |\n| fromUserId | string | Transfer out UserId: This is required when transferring from sub-account to master-account. It is optional for internal transfers. |\n| fromAccountType | string | Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 |\n| fromAccountTag | string | Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT |\n| type | string | Transfer type: INTERNAL (Transfer within account), PARENT_TO_SUB (Transfer from master-account to sub-account), SUB_TO_PARENT (Transfer from sub-account to master-account) |\n| toUserId | string | Transfer in UserId: This is required when transferring master-account to sub-account. It is optional for internal transfers. |\n| toAccountType | string | Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 |\n| toAccountTag | string | Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | Transfer order ID |\n\n---\n", "body": { "mode": "raw", "raw": "//transfer from master-account to sub-account\n{\n \"clientOid\": \"64ccc0f164781800010d8c09\",\n \"type\": \"PARENT_TO_SUB\",\n \"currency\": \"USDT\",\n \"amount\": \"0.01\",\n \"fromAccountType\": \"TRADE\",\n \"toUserId\": \"63743f07e0c5230001761d08\",\n \"toAccountType\": \"TRADE\"\n}\n\n//transfer from sub-account to master-account\n// {\n// \"clientOid\": \"64ccc0f164781800010d8c09\",\n// \"type\": \"SUB_TO_PARENT\",\n// \"currency\": \"BTC\",\n// \"amount\": 1,\n// \"fromUserId\": \"62f5f5d4d72aaf000122707e\",\n// \"fromAccountType\": \"TRADE\",\n// \"toAccountType\": \"CONTRACT\"\n// }\n\n// internal transfer\n// {\n// \"clientOid\": \"53666633336123\",\n// \"type\": \"INTERNAL\",\n// \"currency\": \"BTC\",\n// \"amount\": 0.0003,\n// \"fromAccountType\": \"TRADE\",\n// \"toAccountType\": \"MAIN\"\n// }\n\n\n\n\n\n", @@ -3304,11 +3324,11 @@ { "key": "currencyType", "value": "", - "description": "Currency type: 0-crypto currency, 1-fiat currency. default is 0-crypto currency\n" + "description": "Currency type: 0-crypto currency, 1-fiat currency. Default is 0-crypto currency" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470149)\n\n:::info[Description]\nThis interface is for the spot/margin basic fee rate of users\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| takerFeeRate | string | Base taker fee rate |\n| makerFeeRate | string | Base maker fee rate |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470149)\n\n:::info[Description]\nThis interface is for the user’s spot/margin basic fee rate.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| takerFeeRate | string | Base taker fee rate |\n| makerFeeRate | string | Base maker fee rate |\n\n---\n", "body": {} }, "response": [ @@ -3332,7 +3352,7 @@ { "key": "currencyType", "value": "", - "description": "Currency type: 0-crypto currency, 1-fiat currency. default is 0-crypto currency\n" + "description": "Currency type: 0-crypto currency, 1-fiat currency. Default is 0-crypto currency" } ] } @@ -3391,11 +3411,11 @@ { "key": "symbols", "value": "", - "description": "Trading pair (optional, you can inquire fee rates of 10 trading pairs each time at most)" + "description": "Trading pair (optional; you can inquire fee rates of 10 trading pairs each time at most)" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470150)\n\n:::info[Description]\nThis interface is for the actual fee rate of the trading pair. You can inquire about fee rates of 10 trading pairs each time at most. The fee rate of your sub-account is the same as that of the master account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | The unique identity of the trading pair and will not change even if the trading pair is renamed |\n| takerFeeRate | string | Actual taker fee rate of the symbol |\n| makerFeeRate | string | Actual maker fee rate of the symbol |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470150)\n\n:::info[Description]\nThis interface is for the trading pair’s actual fee rate. You can inquire about fee rates of 10 trading pairs each time at most. The fee rate of your sub-account is the same as that of the master account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | The unique identity of the trading pair; will not change even if the trading pair is renamed |\n| takerFeeRate | string | Actual taker fee rate of the symbol |\n| makerFeeRate | string | Actual maker fee rate of the symbol |\n| sellTaxRate | string | Buy tax rate; this field is visible to users in certain countries |\n| buyTaxRate | string | Sell tax rate; this field is visible to users in certain countries |\n\n---\n", "body": {} }, "response": [ @@ -3419,7 +3439,7 @@ { "key": "symbols", "value": "", - "description": "Trading pair (optional, you can inquire fee rates of 10 trading pairs each time at most)" + "description": "Trading pair (optional; you can inquire fee rates of 10 trading pairs each time at most)" } ] } @@ -3478,11 +3498,11 @@ { "key": "symbol", "value": "", - "description": "Trading pair" + "description": "The unique identity of the trading pair; will not change even if the trading pair is renamed" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470151)\n\n:::info[Description]\nThis interface is for the actual futures fee rate of the trading pair. The fee rate of your sub-account is the same as that of the master account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | The unique identity of the trading pair and will not change even if the trading pair is renamed |\n| takerFeeRate | string | Actual taker fee rate of the trading pair |\n| makerFeeRate | string | Actual maker fee rate of the trading pair |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470151)\n\n:::info[Description]\nThis interface is for the trading pair’s actual futures fee rate. The fee rate of your sub-account is the same as that of the master account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | The unique identity of the trading pair; will not change even if the trading pair is renamed |\n| takerFeeRate | string | Actual taker fee rate of the trading pair |\n| makerFeeRate | string | Actual maker fee rate of the trading pair |\n\n---\n", "body": {} }, "response": [ @@ -3506,7 +3526,7 @@ { "key": "symbol", "value": "", - "description": "Trading pair" + "description": "The unique identity of the trading pair; will not change even if the trading pair is renamed" } ] } @@ -3715,11 +3735,11 @@ { "key": "chain", "value": "", - "description": "Support for querying the chain of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20. This only apply for multi-chain currency, and there is no need for single chain currency." + "description": "Support for querying the chain of currency, e.g. the available values for USDT are OMNI, ERC20, TRC20. This only applies to multi-chain currencies; no need for single-chain currencies." } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470155)\n\n:::info[Description]\nRequest via this endpoint to get the currency details of a specified currency\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | A unique currency code that will never change |\n| name | string | Currency name, will change after renaming |\n| fullName | string | Full name of a currency, will change after renaming |\n| precision | integer | Currency precision |\n| confirms | integer | Number of block confirmations |\n| contractAddress | string | Contract address |\n| isMarginEnabled | boolean | Support margin or not |\n| isDebitEnabled | boolean | Support debit or not |\n| chains | array | Refer to the schema section of chains |\n\n**root.data.chains Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| chainName | string | chain name of currency |\n| withdrawalMinSize | string | Minimum withdrawal amount |\n| depositMinSize | string | Minimum deposit amount |\n| withdrawFeeRate | string | withdraw fee rate |\n| withdrawalMinFee | string | Minimum fees charged for withdrawal |\n| isWithdrawEnabled | boolean | Support withdrawal or not |\n| isDepositEnabled | boolean | Support deposit or not |\n| confirms | integer | Number of block confirmations |\n| preConfirms | integer | The number of blocks (confirmations) for advance on-chain verification |\n| contractAddress | string | Contract address |\n| withdrawPrecision | integer | Withdrawal precision bit, indicating the maximum supported length after the decimal point of the withdrawal amount |\n| maxWithdraw | number | Maximum amount of single withdrawal |\n| maxDeposit | string | Maximum amount of single deposit (only applicable to Lightning Network) |\n| needTag | boolean | whether memo/tag is needed |\n| chainId | string | chain id of currency |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470155)\n\n:::info[Description]\nRequest the currency details of a specified currency via this endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | A unique currency code that will never change |\n| name | string | Currency name; will change after renaming |\n| fullName | string | Full currency name; will change after renaming |\n| precision | integer | Currency precision |\n| confirms | integer | Number of block confirmations |\n| contractAddress | string | Contract address |\n| isMarginEnabled | boolean | Margin support or not |\n| isDebitEnabled | boolean | Debit support or not |\n| chains | array | Refer to the schema section of chains |\n\n**root.data.chains Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| chainName | string | Chain name of currency |\n| withdrawalMinSize | string | Minimum withdrawal amount |\n| depositMinSize | string | Minimum deposit amount |\n| withdrawFeeRate | string | Withdraw fee rate |\n| withdrawalMinFee | string | Minimum fees charged for withdrawal |\n| isWithdrawEnabled | boolean | Withdrawal support or not |\n| isDepositEnabled | boolean | Deposit support or not |\n| confirms | integer | Number of block confirmations |\n| preConfirms | integer | The number of blocks (confirmations) for advance on-chain verification |\n| contractAddress | string | Contract address |\n| withdrawPrecision | integer | Withdrawal precision bit, indicating the maximum supported length after the decimal point of the withdrawal amount |\n| maxWithdraw | number | Maximum amount of single withdrawal |\n| maxDeposit | string | Maximum amount of single deposit (only applicable to Lightning Network) |\n| needTag | boolean | Need for memo/tag or not |\n| chainId | string | Chain id of currency |\n\n---\n", "body": {} }, "response": [ @@ -3744,7 +3764,7 @@ { "key": "chain", "value": "", - "description": "Support for querying the chain of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20. This only apply for multi-chain currency, and there is no need for single chain currency." + "description": "Support for querying the chain of currency, e.g. the available values for USDT are OMNI, ERC20, TRC20. This only applies to multi-chain currencies; no need for single-chain currencies." } ] } @@ -3801,7 +3821,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470152)\n\n:::info[Description]\nRequest via this endpoint to get the currency list. Not all currencies currently can be used for trading.\n:::\n\n:::tip[Tips]\n**CURRENCY CODES**\n\nCurrency codes will conform to the ISO 4217 standard where possible. Currencies which have or had no representation in ISO 4217 may use a custom code.\n\n\n| Code | Description |\n| --- | --- |\n| BTC | Bitcoin |\n| ETH | Ethereum |\n| KCS | Kucoin Shares |\n\nFor a coin, the \"**currency**\" is a fixed value and works as the only recognized identity of the coin. As the \"**name**\", \"**fullnane**\" and \"**precision**\" of a coin are modifiable values, when the \"name\" of a coin is changed, you should use \"**currency**\" to get the coin.\n\nFor example: The \"**currency**\" of XRB is \"XRB\", if the \"**name**\" of XRB is changed into \"**Nano**\", you should use \"XRB\" (the currency of XRB) to search the coin.\n:::\n\n\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | A unique currency code that will never change |\n| name | string | Currency name, will change after renaming |\n| fullName | string | Full name of a currency, will change after renaming |\n| precision | integer | Currency precision |\n| confirms | integer | Number of block confirmations |\n| contractAddress | string | Contract address |\n| isMarginEnabled | boolean | Support margin or not |\n| isDebitEnabled | boolean | Support debit or not |\n| chains | array | Refer to the schema section of chains |\n\n**root.data.chains Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| chainName | string | chain name of currency |\n| withdrawalMinSize | string | Minimum withdrawal amount |\n| depositMinSize | string | Minimum deposit amount |\n| withdrawFeeRate | string | withdraw fee rate |\n| withdrawalMinFee | string | Minimum fees charged for withdrawal |\n| isWithdrawEnabled | boolean | Support withdrawal or not |\n| isDepositEnabled | boolean | Support deposit or not |\n| confirms | integer | Number of block confirmations |\n| preConfirms | integer | The number of blocks (confirmations) for advance on-chain verification |\n| contractAddress | string | Contract address |\n| withdrawPrecision | integer | Withdrawal precision bit, indicating the maximum supported length after the decimal point of the withdrawal amount |\n| maxWithdraw | string | Maximum amount of single withdrawal |\n| maxDeposit | string | Maximum amount of single deposit (only applicable to Lightning Network) |\n| needTag | boolean | whether memo/tag is needed |\n| chainId | string | chain id of currency |\n| depositFeeRate | string | deposit fee rate (some currencies have this param, the default is empty) |\n| withdrawMaxFee | string | withdraw max fee(some currencies have this param, the default is empty) |\n| depositTierFee | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470152)\n\n:::info[Description]\nRequest a currency list via this endpoint. Not all currencies currently can be used for trading.\n:::\n\n:::tip[Tips]\n**CURRENCY CODES**\n\nCurrency codes will conform to the ISO 4217 standard where possible. Currencies which have or had no representation in ISO 4217 may use a custom code.\n\n\n| Code | Description |\n| --- | --- |\n| BTC | Bitcoin |\n| ETH | Ethereum |\n| KCS | Kucoin Shares |\n\nFor a coin, the \"**currency**\" is a fixed value and works as the only recognized identity of the coin. As the \"**name**\", \"**fullnane**\" and \"**precision**\" of a coin are modifiable values, when the \"name\" of a coin is changed, you should use \"**currency**\" to get the coin.\n\nFor example: The \"**currency**\" of XRB is \"XRB\"; if the \"**name**\" of XRB is changed into \"**Nano**\", you should use \"XRB\" (the currency of XRB) to search the coin.\n:::\n\n\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | A unique currency code that will never change |\n| name | string | Currency name; will change after renaming |\n| fullName | string | Full currency name; will change after renaming |\n| precision | integer | Currency precision |\n| confirms | integer | Number of block confirmations |\n| contractAddress | string | Contract address |\n| isMarginEnabled | boolean | Margin support or not |\n| isDebitEnabled | boolean | Debit support or not |\n| chains | array | Refer to the schema section of chains |\n\n**root.data.chains Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| chainName | string | Chain name of currency |\n| withdrawalMinSize | string | Minimum withdrawal amount |\n| depositMinSize | string | Minimum deposit amount |\n| withdrawFeeRate | string | Withdraw fee rate |\n| withdrawalMinFee | string | Minimum fees charged for withdrawal |\n| isWithdrawEnabled | boolean | Withdrawal support or not |\n| isDepositEnabled | boolean | Deposit support or not |\n| confirms | integer | Number of block confirmations |\n| preConfirms | integer | The number of blocks (confirmations) for advance on-chain verification |\n| contractAddress | string | Contract address |\n| withdrawPrecision | integer | Withdrawal precision bit, indicating the maximum supported length after the decimal point of the withdrawal amount |\n| maxWithdraw | string | Maximum amount of single withdrawal |\n| maxDeposit | string | Maximum amount of single deposit (only applicable to Lightning Network) |\n| needTag | boolean | Need for memo/tag or not |\n| chainId | string | Chain id of currency |\n| depositFeeRate | string | Deposit fee rate (some currencies have this param; the default is empty) |\n| withdrawMaxFee | string | Withdraw max. fee (some currencies have this param; the default is empty) |\n| depositTierFee | string | |\n\n---\n", "body": {} }, "response": [ @@ -3877,7 +3897,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470159)\n\n:::info[Description]\nRequest via this endpoint to get detail currency pairs for trading. If you want to get the market information of the trading symbol, please use Get All Tickers.\n:::\n\n\n- The baseMinSize and baseMaxSize fields define the min and max order size.\n- The priceIncrement field specifies the min order price as well as the price increment.This also applies to quote currency.\n\nThe order price must be a positive integer multiple of this priceIncrement (i.e. if the increment is 0.01, the 0.001 and 0.021 order prices would be rejected).\n\npriceIncrement and quoteIncrement may be adjusted in the future. We will notify you by email and site notifications before adjustment.\n\n| Order Type | Follow the rules of minFunds |\n| ------ | ---------- |\n| Limit Buy\t | [Order Amount * Order Price] >= minFunds |\n| Limit Sell | [Order Amount * Order Price] >= minFunds |\n| Market Buy | Order Value >= minFunds |\n| Market Sell | [Order Amount * Last Price of Base Currency] >= minFunds |\n\nNote:\n- API market buy orders (by amount) valued at (Order Amount * Last Price of Base Currency) < minFunds will be rejected.\n- API market sell orders (by value) valued at < minFunds will be rejected.\n- Take profit and stop loss orders at market or limit prices will be rejected when triggered.\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | unique code of a symbol, it would not change after renaming |\n| name | string | Name of trading pairs, it would change after renaming |\n| baseCurrency | string | Base currency,e.g. BTC. |\n| quoteCurrency | string | Quote currency,e.g. USDT. |\n| feeCurrency | string | The currency of charged fees. |\n| market | string | The trading market. |\n| baseMinSize | string | The minimum order quantity requried to place an order. |\n| quoteMinSize | string | The minimum order funds required to place a market order. |\n| baseMaxSize | string | The maximum order size required to place an order. |\n| quoteMaxSize | string | The maximum order funds required to place a market order. |\n| baseIncrement | string | Quantity increment: The quantity for an order must be a positive integer multiple of this increment. Here, the size refers to the quantity of the base currency for the order. For example, for the ETH-USDT trading pair, if the baseIncrement is 0.0000001, the order quantity can be 1.0000001 but not 1.00000001. |\n| quoteIncrement | string | Quote increment: The funds for a market order must be a positive integer multiple of this increment. The funds refer to the quote currency amount. For example, for the ETH-USDT trading pair, if the quoteIncrement is 0.000001, the amount of USDT for the order can be 3000.000001 but not 3000.0000001. |\n| priceIncrement | string | Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. |\n| priceLimitRate | string | Threshold for price portection |\n| minFunds | string | the minimum trading amounts |\n| isMarginEnabled | boolean | Available for margin or not. |\n| enableTrading | boolean | Available for transaction or not. |\n| feeCategory | integer | [Fee Type](https://www.kucoin.com/vip/privilege) |\n| makerFeeCoefficient | string | The maker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee |\n| takerFeeCoefficient | string | The taker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee |\n| st | boolean | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470159)\n\n:::info[Description]\nRequest via this endpoint to get detail currency pairs for trading. If you want to get the market information of the trading symbol, please use Get All Tickers.\n:::\n\n\n- The baseMinSize and baseMaxSize fields define the min and max order size.\n- The priceIncrement field specifies the min order price as well as the price increment.This also applies to quote currency.\n\nThe order price must be a positive integer multiple of this priceIncrement (i.e. if the increment is 0.01, the 0.001 and 0.021 order prices would be rejected).\n\npriceIncrement and quoteIncrement may be adjusted in the future. We will notify you by email and site notifications before adjustment.\n\n| Order Type | Follow the rules of minFunds |\n| ------ | ---------- |\n| Limit Buy\t | [Order Amount * Order Price] >= minFunds |\n| Limit Sell | [Order Amount * Order Price] >= minFunds |\n| Market Buy | Order Value >= minFunds |\n| Market Sell | [Order Amount * Last Price of Base Currency] >= minFunds |\n\nNote:\n- API market buy orders (by amount) valued at (Order Amount * Last Price of Base Currency) < minFunds will be rejected.\n- API market sell orders (by value) valued at < minFunds will be rejected.\n- Take profit and stop loss orders at market or limit prices will be rejected when triggered.\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | unique code of a symbol, it would not change after renaming |\n| name | string | Name of trading pairs, it would change after renaming |\n| baseCurrency | string | Base currency,e.g. BTC. |\n| quoteCurrency | string | Quote currency,e.g. USDT. |\n| feeCurrency | string | The currency of charged fees. |\n| market | string | The trading market. |\n| baseMinSize | string | The minimum order quantity requried to place an order. |\n| quoteMinSize | string | The minimum order funds required to place a market order. |\n| baseMaxSize | string | The maximum order size required to place an order. |\n| quoteMaxSize | string | The maximum order funds required to place a market order. |\n| baseIncrement | string | Quantity increment: The quantity for an order must be a positive integer multiple of this increment. Here, the size refers to the quantity of the base currency for the order. For example, for the ETH-USDT trading pair, if the baseIncrement is 0.0000001, the order quantity can be 1.0000001 but not 1.00000001. |\n| quoteIncrement | string | Quote increment: The funds for a market order must be a positive integer multiple of this increment. The funds refer to the quote currency amount. For example, for the ETH-USDT trading pair, if the quoteIncrement is 0.000001, the amount of USDT for the order can be 3000.000001 but not 3000.0000001. |\n| priceIncrement | string | Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. |\n| priceLimitRate | string | Threshold for price portection |\n| minFunds | string | The minimum trading amounts |\n| isMarginEnabled | boolean | Available for margin or not. |\n| enableTrading | boolean | Available for transaction or not. |\n| feeCategory | integer | [Fee Type](https://www.kucoin.com/vip/privilege) |\n| makerFeeCoefficient | string | The maker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee |\n| takerFeeCoefficient | string | The taker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee |\n| st | boolean | Whether it is a [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol |\n| callauctionIsEnabled | boolean | The [call auction](https://www.kucoin.com/support/40999744334105) status returns true/false |\n| callauctionPriceFloor | string | The lowest price declared in the call auction |\n| callauctionPriceCeiling | string | The highest bid price in the call auction
|\n| callauctionFirstStageStartTime | integer | The first phase of the call auction starts at (Allow add orders, allow cancel orders) |\n| callauctionSecondStageStartTime | integer | The second phase of the call auction starts at (Allow add orders, don't allow cancel orders) |\n| callauctionThirdStageStartTime | integer | The third phase of the call auction starts at (Don't allow add orders, don't allow cancel orders) |\n| tradingStartTime | integer | Official opening time (end time of the third phase of call auction) |\n\n---\n", "body": {} }, "response": [ @@ -3931,7 +3951,7 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"BTC-USDT\",\n \"name\": \"BTC-USDT\",\n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USDT\",\n \"feeCurrency\": \"USDT\",\n \"market\": \"USDS\",\n \"baseMinSize\": \"0.00001\",\n \"quoteMinSize\": \"0.1\",\n \"baseMaxSize\": \"10000000000\",\n \"quoteMaxSize\": \"99999999\",\n \"baseIncrement\": \"0.00000001\",\n \"quoteIncrement\": \"0.000001\",\n \"priceIncrement\": \"0.1\",\n \"priceLimitRate\": \"0.1\",\n \"minFunds\": \"0.1\",\n \"isMarginEnabled\": true,\n \"enableTrading\": true,\n \"feeCategory\": 1,\n \"makerFeeCoefficient\": \"1.00\",\n \"takerFeeCoefficient\": \"1.00\",\n \"st\": false\n }\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"BTC-USDT\",\n \"name\": \"BTC-USDT\",\n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USDT\",\n \"feeCurrency\": \"USDT\",\n \"market\": \"USDS\",\n \"baseMinSize\": \"0.00001\",\n \"quoteMinSize\": \"0.1\",\n \"baseMaxSize\": \"10000000000\",\n \"quoteMaxSize\": \"99999999\",\n \"baseIncrement\": \"0.00000001\",\n \"quoteIncrement\": \"0.000001\",\n \"priceIncrement\": \"0.1\",\n \"priceLimitRate\": \"0.1\",\n \"minFunds\": \"0.1\",\n \"isMarginEnabled\": true,\n \"enableTrading\": true,\n \"feeCategory\": 1,\n \"makerFeeCoefficient\": \"1.00\",\n \"takerFeeCoefficient\": \"1.00\",\n \"st\": false,\n \"callauctionIsEnabled\": false,\n \"callauctionPriceFloor\": null,\n \"callauctionPriceCeiling\": null,\n \"callauctionFirstStageStartTime\": null,\n \"callauctionSecondStageStartTime\": null,\n \"callauctionThirdStageStartTime\": null,\n \"tradingStartTime\": null\n }\n}" } ] }, @@ -3959,7 +3979,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470154)\n\n:::info[Description]\nRequest via this endpoint to get a list of available currency pairs for trading. If you want to get the market information of the trading symbol, please use Get All Tickers.\n:::\n\n\n:::tip[Tips]\npriceIncrement and quoteIncrement may be adjusted in the future. We will notify you by email and site notifications before adjustment.\n:::\n\n| Order Type | Follow the rules of minFunds |\n| --- | --- |\n| Limit Buy | [Order Amount * Order Price] >= minFunds |\n| Limit Sell | [Order Amount * Order Price] >= minFunds |\n| Market Buy | Order Value >= minFunds |\n| Market Sell | [Order Amount * Last Price of Base Currency] >= minFunds |\n\nNote:\n\n- API market buy orders (by amount) valued at [Order Amount * Last Price of Base Currency] < minFunds will be rejected.\n- API market sell orders (by value) valued at < minFunds will be rejected.\n- Take profit and stop loss orders at market or limit prices will be rejected when triggered.\n\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | unique code of a symbol, it would not change after renaming |\n| name | string | Name of trading pairs, it would change after renaming |\n| baseCurrency | string | Base currency,e.g. BTC. |\n| quoteCurrency | string | Quote currency,e.g. USDT. |\n| feeCurrency | string | The currency of charged fees. |\n| market | string | The trading market. |\n| baseMinSize | string | The minimum order quantity requried to place an order. |\n| quoteMinSize | string | The minimum order funds required to place a market order. |\n| baseMaxSize | string | The maximum order size required to place an order. |\n| quoteMaxSize | string | The maximum order funds required to place a market order. |\n| baseIncrement | string | Quantity increment: The quantity for an order must be a positive integer multiple of this increment. Here, the size refers to the quantity of the base currency for the order. For example, for the ETH-USDT trading pair, if the baseIncrement is 0.0000001, the order quantity can be 1.0000001 but not 1.00000001. |\n| quoteIncrement | string | Quote increment: The funds for a market order must be a positive integer multiple of this increment. The funds refer to the quote currency amount. For example, for the ETH-USDT trading pair, if the quoteIncrement is 0.000001, the amount of USDT for the order can be 3000.000001 but not 3000.0000001. |\n| priceIncrement | string | Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001.

specifies the min order price as well as the price increment.This also applies to quote currency. |\n| priceLimitRate | string | Threshold for price portection |\n| minFunds | string | the minimum trading amounts |\n| isMarginEnabled | boolean | Available for margin or not. |\n| enableTrading | boolean | Available for transaction or not. |\n| feeCategory | integer | [Fee Type](https://www.kucoin.com/vip/privilege) |\n| makerFeeCoefficient | string | The maker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee |\n| takerFeeCoefficient | string | The taker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee |\n| st | boolean | Whether it is an [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470154)\n\n:::info[Description]\nRequest a list of available currency pairs for trading via this endpoint. If you want to get the market information of the trading symbol, please use Get All Tickers.\n:::\n\n\n:::tip[Tips]\npriceIncrement and quoteIncrement may be adjusted in the future. We will notify you by email and site notifications before adjustments.\n:::\n\n| Order Type | Follow the rules of minFunds |\n| --- | --- |\n| Limit Buy | [Order Amount * Order Price] >= minFunds |\n| Limit Sell | [Order Amount * Order Price] >= minFunds |\n| Market Buy | Order Value >= minFunds |\n| Market Sell | [Order Amount * Last Price of Base Currency] >= minFunds |\n\nNote:\n\n- API market buy orders (by amount) valued at [Order Amount * Last Price of Base Currency] < minFunds will be rejected.\n- API market sell orders (by value) valued at < minFunds will be rejected.\n- Take profit and stop loss orders at market or limit prices will be rejected when triggered.\n\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Unique code of a symbol; it will not change after renaming |\n| name | string | Name of trading pairs, it will change after renaming |\n| baseCurrency | string | Base currency, e.g. BTC. |\n| quoteCurrency | string | Quote currency, e.g. USDT. |\n| feeCurrency | string | The currency of charged fees. |\n| market | string | The trading market. |\n| baseMinSize | string | The minimum order quantity required to place an order. |\n| quoteMinSize | string | The minimum order funds required to place a market order. |\n| baseMaxSize | string | The maximum order size required to place an order. |\n| quoteMaxSize | string | The maximum order funds required to place a market order. |\n| baseIncrement | string | Quantity increment: The quantity for an order must be a positive integer multiple of this increment. Here, the size refers to the quantity of the base currency for the order. For example, for the ETH-USDT trading pair, if the baseIncrement is 0.0000001, the order quantity can be 1.0000001 but not 1.00000001. |\n| quoteIncrement | string | Quote increment: The funds for a market order must be a positive integer multiple of this increment. The funds refer to the quote currency amount. For example, for the ETH-USDT trading pair, if the quoteIncrement is 0.000001, the amount of USDT for the order can be 3000.000001 but not 3000.0000001. |\n| priceIncrement | string | Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001.

Specifies the min. order price as well as the price increment.This also applies to quote currency. |\n| priceLimitRate | string | Threshold for price protection |\n| minFunds | string | The minimum trading amounts |\n| isMarginEnabled | boolean | Available for margin or not. |\n| enableTrading | boolean | Available for transaction or not. |\n| feeCategory | integer | [Fee Type](https://www.kucoin.com/vip/privilege) |\n| makerFeeCoefficient | string | The maker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee |\n| takerFeeCoefficient | string | The taker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee |\n| st | boolean | Whether it is a [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol |\n| callauctionIsEnabled | boolean | The [call auction](https://www.kucoin.com/support/40999744334105) status returns true/false |\n| callauctionPriceFloor | string | The lowest price declared in the call auction |\n| callauctionPriceCeiling | string | The highest bid price in the call auction
|\n| callauctionFirstStageStartTime | integer | The first phase of the call auction starts at (Allow add orders, allow cancel orders) |\n| callauctionSecondStageStartTime | integer | The second phase of the call auction starts at (Allow add orders, don't allow cancel orders) |\n| callauctionThirdStageStartTime | integer | The third phase of the call auction starts at (Don't allow add orders, don't allow cancel orders) |\n| tradingStartTime | integer | Official opening time (end time of the third phase of call auction) |\n\n---\n", "body": {} }, "response": [ @@ -4018,7 +4038,7 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"BTC-USDT\",\n \"name\": \"BTC-USDT\",\n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USDT\",\n \"feeCurrency\": \"USDT\",\n \"market\": \"USDS\",\n \"baseMinSize\": \"0.00001\",\n \"quoteMinSize\": \"0.1\",\n \"baseMaxSize\": \"10000000000\",\n \"quoteMaxSize\": \"99999999\",\n \"baseIncrement\": \"0.00000001\",\n \"quoteIncrement\": \"0.000001\",\n \"priceIncrement\": \"0.1\",\n \"priceLimitRate\": \"0.1\",\n \"minFunds\": \"0.1\",\n \"isMarginEnabled\": true,\n \"enableTrading\": true,\n \"feeCategory\": 1,\n \"makerFeeCoefficient\": \"1.00\",\n \"takerFeeCoefficient\": \"1.00\",\n \"st\": false\n }\n ]\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"BTC-USDT\",\n \"name\": \"BTC-USDT\",\n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USDT\",\n \"feeCurrency\": \"USDT\",\n \"market\": \"USDS\",\n \"baseMinSize\": \"0.00001\",\n \"quoteMinSize\": \"0.1\",\n \"baseMaxSize\": \"10000000000\",\n \"quoteMaxSize\": \"99999999\",\n \"baseIncrement\": \"0.00000001\",\n \"quoteIncrement\": \"0.000001\",\n \"priceIncrement\": \"0.1\",\n \"priceLimitRate\": \"0.1\",\n \"minFunds\": \"0.1\",\n \"isMarginEnabled\": true,\n \"enableTrading\": true,\n \"feeCategory\": 1,\n \"makerFeeCoefficient\": \"1.00\",\n \"takerFeeCoefficient\": \"1.00\",\n \"st\": false,\n \"callauctionIsEnabled\": false,\n \"callauctionPriceFloor\": null,\n \"callauctionPriceCeiling\": null,\n \"callauctionFirstStageStartTime\": null,\n \"callauctionSecondStageStartTime\": null,\n \"callauctionThirdStageStartTime\": null,\n \"tradingStartTime\": null\n }\n ]\n}" } ] }, @@ -4132,7 +4152,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470167)\n\n:::info[Description]\nRequest market tickers for all the trading pairs in the market (including 24h volume), takes a snapshot every 2 seconds.\n\nOn the rare occasion that we will change the currency name, if you still want the changed symbol name, you can use the symbolName field instead of the symbol field via “Get Symbols List” endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| time | integer | timestamp |\n| ticker | array | Refer to the schema section of ticker |\n\n**root.data.ticker Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol |\n| symbolName | string | Name of trading pairs, it would change after renaming |\n| buy | string | Best bid price |\n| bestBidSize | string | Best bid size |\n| sell | string | Best ask price |\n| bestAskSize | string | Best ask size |\n| changeRate | string | 24h change rate |\n| changePrice | string | 24h change price |\n| high | string | Highest price in 24h |\n| low | string | Lowest price in 24h |\n| vol | string | 24h volume, executed based on base currency |\n| volValue | string | 24h traded amount |\n| last | string | Last traded price |\n| averagePrice | string | Average trading price in the last 24 hours |\n| takerFeeRate | string | Basic Taker Fee |\n| makerFeeRate | string | Basic Maker Fee |\n| takerCoefficient | string | The taker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee |\n| makerCoefficient | string | The maker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470167)\n\n:::info[Description]\nRequest market tickers for all the trading pairs in the market (including 24h volume); takes a snapshot every 2 seconds.\n\nOn the rare occasion that we change the currency name, if you still want the changed symbol name, you can use the symbolName field instead of the symbol field via “Get Symbols List” endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| time | integer | timestamp |\n| ticker | array | Refer to the schema section of ticker |\n\n**root.data.ticker Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol |\n| symbolName | string | Name of trading pairs, it will change after renaming |\n| buy | string | Best bid price |\n| bestBidSize | string | Best bid size |\n| sell | string | Best ask price |\n| bestAskSize | string | Best ask size |\n| changeRate | string | 24h change rate |\n| changePrice | string | 24h change price |\n| high | string | Highest price in 24h |\n| low | string | Lowest price in 24h |\n| vol | string | 24h volume, executed based on base currency |\n| volValue | string | 24h traded amount |\n| last | string | Last traded price |\n| averagePrice | string | Average trading price in the last 24 hours |\n| takerFeeRate | string | Basic Taker Fee |\n| makerFeeRate | string | Basic Maker Fee |\n| takerCoefficient | string | The taker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee |\n| makerCoefficient | string | The maker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee |\n\n---\n", "body": {} }, "response": [ @@ -4580,6 +4600,188 @@ } ] }, + { + "name": "Get Call Auction Part OrderBook", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "", + "protocol": "https", + "host": [ + "{{spot_endpoint}}" + ], + "path": [ + "api", + "v1", + "market", + "orderbook", + "callauction", + "level2_{size}" + ], + "query": [ + { + "key": "symbol", + "value": "BTC-USDT", + "description": "symbol" + } + ] + }, + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3471564)\n\n:::info[Description]\nQuery for [call auction](https://www.kucoin.com/support/40999744334105) part orderbook depth data (aggregated by price).\n\nIt is recommended that you submit requests via this endpoint as the system response will be faster and consume less traffic.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| time | integer | Timestamp (milliseconds) |\n| sequence | string | Sequence number |\n| bids | array | Refer to the schema section of bids |\n| asks | array | Refer to the schema section of asks |\n\n---\n", + "body": {} + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "", + "protocol": "https", + "host": [ + "{{spot_endpoint}}" + ], + "path": [ + "api", + "v1", + "market", + "orderbook", + "callauction", + "level2_{size}" + ], + "query": [ + { + "key": "symbol", + "value": "BTC-USDT", + "description": "symbol" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": { + "content": "", + "type": "text/plain" + } + }, + { + "key": "gw-ratelimit-remaining", + "value": 1997, + "name": "gw-ratelimit-remaining" + }, + { + "key": "gw-ratelimit-limit", + "value": 2000, + "name": "gw-ratelimit-limit" + }, + { + "key": "gw-ratelimit-reset", + "value": 29990, + "name": "gw-ratelimit-reset" + } + ], + "cookie": [], + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"time\": 1729176273859,\n \"sequence\": \"14610502970\",\n \"bids\": [\n [\n \"66976.4\",\n \"0.69109872\"\n ],\n [\n \"66976.3\",\n \"0.14377\"\n ]\n ],\n \"asks\": [\n [\n \"66976.5\",\n \"0.05408199\"\n ],\n [\n \"66976.8\",\n \"0.0005\"\n ]\n ]\n }\n}" + } + ] + }, + { + "name": "Get Call Auction Info", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "", + "protocol": "https", + "host": [ + "{{spot_endpoint}}" + ], + "path": [ + "api", + "v1", + "market", + "callauctionData" + ], + "query": [ + { + "key": "symbol", + "value": "BTC-USDT", + "description": "symbol" + } + ] + }, + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3471565)\n\n:::info[Description]\nGet [call auction](https://www.kucoin.com/support/40999744334105) data, This endpoint will return the following information for the specified symbol during the call auction phase: estimated transaction price, estimated transaction quantity, bid price range, and ask price range.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol |\n| estimatedPrice | string | Estimated price |\n| estimatedSize | string | Estimated size |\n| sellOrderRangeLowPrice | string | Sell ​​order minimum price |\n| sellOrderRangeHighPrice | string | Sell ​​order maximum price |\n| buyOrderRangeLowPrice | string | Buy order minimum price |\n| buyOrderRangeHighPrice | string | Buy ​​order maximum price |\n| time | integer | Timestamp (ms) |\n\n---\n", + "body": {} + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "", + "protocol": "https", + "host": [ + "{{spot_endpoint}}" + ], + "path": [ + "api", + "v1", + "market", + "callauctionData" + ], + "query": [ + { + "key": "symbol", + "value": "BTC-USDT", + "description": "symbol" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": { + "content": "", + "type": "text/plain" + } + }, + { + "key": "gw-ratelimit-remaining", + "value": 1997, + "name": "gw-ratelimit-remaining" + }, + { + "key": "gw-ratelimit-limit", + "value": 2000, + "name": "gw-ratelimit-limit" + }, + { + "key": "gw-ratelimit-reset", + "value": 29990, + "name": "gw-ratelimit-reset" + } + ], + "cookie": [], + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"BTC-USDT\",\n \"estimatedPrice\": \"0.17\",\n \"estimatedSize\": \"0.03715004\",\n \"sellOrderRangeLowPrice\": \"1.788\",\n \"sellOrderRangeHighPrice\": \"2.788\",\n \"buyOrderRangeLowPrice\": \"1.788\",\n \"buyOrderRangeHighPrice\": \"2.788\",\n \"time\": 1550653727731\n }\n}" + } + ] + }, { "name": "Get Fiat Price", "request": { @@ -4600,7 +4802,7 @@ { "key": "base", "value": "", - "description": "Ticker symbol of a base currency,eg.USD,EUR. Default is USD" + "description": "Ticker symbol of a base currency, e.g. USD, EUR. Default is USD" }, { "key": "currencies", @@ -4609,7 +4811,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470153)\n\n:::info[Description]\nRequest via this endpoint to get the fiat price of the currencies for the available trading pairs.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| AGLD | string | |\n| DFI | string | |\n| PYTHUP | string | |\n| ISLM | string | |\n| NEAR | string | |\n| AIOZ | string | |\n| AUDIO | string | |\n| BBL | string | |\n| WLD | string | |\n| HNT | string | |\n| ETHFI | string | |\n| DMAIL | string | |\n| OPUP | string | |\n| VET3S | string | |\n| MANA3S | string | |\n| TIDAL | string | |\n| HALO | string | |\n| OPUL | string | |\n| MANA3L | string | |\n| DGB | string | |\n| AA | string | |\n| BCH | string | |\n| GMEE | string | |\n| JST | string | |\n| PBUX | string | |\n| AR | string | |\n| SEI | string | |\n| PSTAKE | string | |\n| LMWR | string | |\n| UNFIDOWN | string | |\n| BB | string | |\n| JTO | string | |\n| WEMIX | string | |\n| G | string | |\n| MARSH | string | |\n| BN | string | |\n| FLIP | string | |\n| FLR | string | |\n| BIGTIME | string | |\n| FLY | string | |\n| T | string | |\n| W | string | |\n| BDX | string | |\n| BABYDOGE | string | |\n| SFP | string | |\n| DIA | string | |\n| ISME | string | |\n| LYM | string | |\n| VET3L | string | |\n| JUP | string | |\n| LYX | string | |\n| AIEPK | string | |\n| SILLY | string | |\n| SCPT | string | |\n| WOO | string | |\n| BLUR | string | |\n| STRK | string | |\n| BFC | string | |\n| DC | string | |\n| KARATE | string | |\n| SUSHI3L | string | |\n| NETVR | string | |\n| WAVES | string | |\n| LITH | string | |\n| HAPI | string | |\n| SUSHI3S | string | |\n| CEEK | string | |\n| FLOKI | string | |\n| SHR | string | |\n| SAND | string | |\n| TURT | string | |\n| UMA | string | |\n| BEPRO | string | |\n| SCRT | string | |\n| TUSD | string | |\n| COOKIE | string | |\n| LRDS | string | |\n| SIN | string | |\n| OAS | string | |\n| ROOT | string | |\n| ADA3L | string | |\n| TIAUP | string | |\n| HTR | string | |\n| UNB | string | |\n| UNA | string | |\n| HARD | string | |\n| G3 | string | |\n| ADA3S | string | |\n| MYRO | string | |\n| HTX | string | |\n| FT | string | |\n| BTCDOWN | string | |\n| UNI | string | |\n| FX | string | |\n| OBI | string | |\n| UNO | string | |\n| WRX | string | |\n| TIADOWN | string | |\n| ETHDOWN | string | |\n| WELL | string | |\n| SWFTC | string | |\n| SKL | string | |\n| UOS | string | |\n| AIPAD | string | |\n| BRETT | string | |\n| SKY | string | |\n| FRM | string | |\n| VISION | string | |\n| LENDS | string | |\n| SLF | string | |\n| BULL | string | |\n| FLOW | string | |\n| ODDZ | string | |\n| SLN | string | |\n| UPO | string | |\n| SLP | string | |\n| ID | string | |\n| SLIM | string | |\n| SPOT | string | |\n| DOP | string | |\n| ISSP | string | |\n| UQC | string | |\n| IO | string | |\n| DOT | string | |\n| 1INCH | string | |\n| SMH | string | |\n| MAK | string | |\n| TOKO | string | |\n| TURBO | string | |\n| UNFI | string | |\n| MAN | string | |\n| EVER | string | |\n| FTM | string | |\n| SHRAP | string | |\n| MAV | string | |\n| MAX | string | |\n| DPR | string | |\n| FTT | string | |\n| ARKM | string | |\n| ATOM | string | |\n| PENDLE | string | |\n| QUICK | string | |\n| BLZ | string | |\n| BOBA | string | |\n| MBL | string | |\n| OFN | string | |\n| UNIO | string | |\n| SNS | string | |\n| SNX | string | |\n| NXRA | string | |\n| TAIKO | string | |\n| AVAX3L | string | |\n| L3 | string | |\n| API3 | string | |\n| XRP3S | string | |\n| QKC | string | |\n| AVAX3S | string | |\n| ROSE | string | |\n| SATS | string | |\n| BMX | string | |\n| PORTAL | string | |\n| TOMI | string | |\n| XRP3L | string | |\n| SOL | string | |\n| SON | string | |\n| BNC | string | |\n| SOCIAL | string | |\n| CGPT | string | |\n| CELR | string | |\n| BNB | string | |\n| OGN | string | |\n| CELO | string | |\n| AUCTION | string | |\n| MANTA | string | |\n| LAYER | string | |\n| AERO | string | |\n| CETUS | string | |\n| LL | string | |\n| SPA | string | |\n| PYTHDOWN | string | |\n| NEIROCTO | string | |\n| UTK | string | |\n| GMRX | string | |\n| BOB | string | |\n| HOTCROSS | string | |\n| AERGO | string | |\n| MOCA | string | |\n| SQD | string | |\n| MV | string | |\n| BNB3L | string | |\n| BNB3S | string | |\n| GALAX3L | string | |\n| KAI | string | |\n| SQR | string | |\n| GALAX3S | string | |\n| EGLD | string | |\n| ZBCN | string | |\n| KAS | string | |\n| MEW | string | |\n| PUNDIX | string | |\n| LOOKS | string | |\n| FXS | string | |\n| BOSON | string | |\n| BRISE | string | |\n| AEVO | string | |\n| FLUX | string | |\n| PRCL | string | |\n| UNFIUP | string | |\n| SEIDOWN | string | |\n| DOAI | string | |\n| QNT | string | |\n| REDO | string | |\n| STRIKE | string | |\n| ETHW | string | |\n| OM | string | |\n| OP | string | |\n| WHALE | string | |\n| 1CAT | string | |\n| NEON | string | |\n| GTAI | string | |\n| SSV | string | |\n| ETH2 | string | |\n| KCS | string | |\n| ARPA | string | |\n| ARTFI | string | |\n| BRL | string | |\n| ALEX | string | |\n| STG | string | |\n| SHIB | string | |\n| IOTX | string | |\n| OLE | string | |\n| KDA | string | |\n| CERE | string | |\n| DOCK | string | |\n| STX | string | |\n| OLT | string | |\n| QI | string | |\n| SDAO | string | |\n| BLAST | string | |\n| LINK3S | string | |\n| IOST | string | |\n| SUI | string | |\n| CAKE | string | |\n| BSW | string | |\n| OMG | string | |\n| VOLT | string | |\n| LINK3L | string | |\n| GEEQ | string | |\n| PYUSD | string | |\n| SUN | string | |\n| TOWER | string | |\n| BTC | string | |\n| IOTA | string | |\n| REEF | string | |\n| TRIAS | string | |\n| KEY | string | |\n| ETH3L | string | |\n| BTT | string | |\n| ONE | string | |\n| RENDER | string | |\n| ETH3S | string | |\n| ANKR | string | |\n| ALGO | string | |\n| SYLO | string | |\n| ZCX | string | |\n| SD | string | |\n| ONT | string | |\n| MJT | string | |\n| DYM | string | |\n| DYP | string | |\n| BAKEUP | string | |\n| OOE | string | |\n| ZELIX | string | |\n| DOGE3L | string | |\n| ARTY | string | |\n| QORPO | string | |\n| ICE | string | |\n| NOTAI | string | |\n| DOGE3S | string | |\n| NAKA | string | |\n| GALAX | string | |\n| MKR | string | |\n| DODO | string | |\n| ICP | string | |\n| ZEC | string | |\n| ZEE | string | |\n| ICX | string | |\n| KMNO | string | |\n| TT | string | |\n| DOT3L | string | |\n| XAI | string | |\n| ZEN | string | |\n| DOGE | string | |\n| ALPHA | string | |\n| DUSK | string | |\n| DOT3S | string | |\n| SXP | string | |\n| HBAR | string | |\n| SYNT | string | |\n| ZEX | string | |\n| BONDLY | string | |\n| MLK | string | |\n| KICKS | string | |\n| PEPE | string | |\n| OUSD | string | |\n| LUNCDOWN | string | |\n| DOGS | string | |\n| REV3L | string | |\n| CTSI | string | |\n| C98 | string | |\n| OSMO | string | |\n| NTRN | string | |\n| CFX2S | string | |\n| SYN | string | |\n| VIDT | string | |\n| SYS | string | |\n| GAS | string | |\n| BOME | string | |\n| COMBO | string | |\n| XCH | string | |\n| VR | string | |\n| CFX2L | string | |\n| VSYS | string | |\n| PANDORA | string | |\n| THETA | string | |\n| XCN | string | |\n| NEXG | string | |\n| MELOS | string | |\n| XCV | string | |\n| ORN | string | |\n| WLKN | string | |\n| AAVE | string | |\n| MNT | string | |\n| BONK | string | |\n| PERP | string | |\n| XDC | string | |\n| MNW | string | |\n| XDB | string | |\n| BOND | string | |\n| SUIA | string | |\n| MOG | string | |\n| SUTER | string | |\n| TIME | string | |\n| RACA | string | |\n| BICO | string | |\n| MON | string | |\n| SWEAT | string | |\n| MOXIE | string | |\n| BABYBNB | string | |\n| IGU | string | |\n| HMSTR | string | |\n| XEC | string | |\n| MONI | string | |\n| XR | string | |\n| PEOPLE | string | |\n| PUMLX | string | |\n| ZIL | string | |\n| WLDDOWN | string | |\n| VAI | string | |\n| XEN | string | |\n| MPC | string | |\n| XEM | string | |\n| JASMY3S | string | |\n| OTK | string | |\n| TRAC | string | |\n| DFYN | string | |\n| BIDP | string | |\n| JASMY3L | string | |\n| INJDOWN | string | |\n| KLV | string | |\n| WAXL | string | |\n| TRBDOWN | string | |\n| BCH3L | string | |\n| GMT3S | string | |\n| KMD | string | |\n| BCH3S | string | |\n| ECOX | string | |\n| AAVE3S | string | |\n| GMT3L | string | |\n| EPIK | string | |\n| SUIP | string | |\n| AAVE3L | string | |\n| ZK | string | |\n| ZKF | string | |\n| OMNIA | string | |\n| ZKJ | string | |\n| ZKL | string | |\n| GAFI | string | |\n| CARV | string | |\n| KNC | string | |\n| CATS | string | |\n| PROM | string | |\n| ALEPH | string | |\n| PONKE | string | |\n| OVR | string | |\n| CATI | string | |\n| ORDER | string | |\n| GFT | string | |\n| BIFI | string | |\n| GGC | string | |\n| GGG | string | |\n| DAPPX | string | |\n| SUKU | string | |\n| ULTI | string | |\n| CREDI | string | |\n| ERTHA | string | |\n| FURY | string | |\n| KARRAT | string | |\n| MOBILE | string | |\n| SIDUS | string | |\n| NAVI | string | |\n| TAO | string | |\n| USDJ | string | |\n| MTL | string | |\n| VET | string | |\n| FITFI | string | |\n| USDT | string | |\n| OXT | string | |\n| CANDY | string | |\n| USDP | string | |\n| MTS | string | |\n| TADA | string | |\n| MTV | string | |\n| NAVX | string | |\n| ILV | string | |\n| VINU | string | |\n| GHX | string | |\n| EDU | string | |\n| HYVE | string | |\n| BTC3L | string | |\n| ANYONE | string | |\n| BEAT | string | |\n| KING | string | |\n| CREAM | string | |\n| CAS | string | |\n| IMX | string | |\n| CAT | string | |\n| BTC3S | string | |\n| USDE | string | |\n| USDD | string | |\n| CWAR | string | |\n| USDC | string | |\n| KRL | string | |\n| INJ | string | |\n| GAME | string | |\n| TRIBL | string | |\n| XLM | string | |\n| TRBUP | string | |\n| VRADOWN | string | |\n| SUPER | string | |\n| EIGEN | string | |\n| IOI | string | |\n| KSM | string | |\n| CCD | string | |\n| EGO | string | |\n| EGP | string | |\n| MXC | string | |\n| TEL | string | |\n| MOVR | string | |\n| XMR | string | |\n| MXM | string | |\n| OORT | string | |\n| GLM | string | |\n| RAY | string | |\n| XTAG | string | |\n| GLQ | string | |\n| CWEB | string | |\n| REVU | string | |\n| REVV | string | |\n| ZRO | string | |\n| XNL | string | |\n| XNO | string | |\n| SAROS | string | |\n| KACE | string | |\n| ZRX | string | |\n| WLTH | string | |\n| ATOM3L | string | |\n| GMM | string | |\n| BEER | string | |\n| GMT | string | |\n| HEART | string | |\n| GMX | string | |\n| ABBC | string | |\n| OMNI | string | |\n| ATOM3S | string | |\n| IRL | string | |\n| CFG | string | |\n| WSDM | string | |\n| GNS | string | |\n| VANRY | string | |\n| CFX | string | |\n| GRAIL | string | |\n| BEFI | string | |\n| VELO | string | |\n| XPR | string | |\n| DOVI | string | |\n| ACE | string | |\n| ACH | string | |\n| ISP | string | |\n| XCAD | string | |\n| MINA | string | |\n| TIA | string | |\n| DRIFT | string | |\n| ACQ | string | |\n| ACS | string | |\n| MIND | string | |\n| STORE | string | |\n| REN | string | |\n| ELA | string | |\n| DREAMS | string | |\n| ADA | string | |\n| ELF | string | |\n| REQ | string | |\n| STORJ | string | |\n| LADYS | string | |\n| PAXG | string | |\n| REZ | string | |\n| XRD | string | |\n| CHO | string | |\n| CHR | string | |\n| ADS | string | |\n| CHZ | string | |\n| ADX | string | |\n| XRP | string | |\n| JASMY | string | |\n| KAGI | string | |\n| FIDA | string | |\n| PBR | string | |\n| AEG | string | |\n| H2O | string | |\n| CHMB | string | |\n| SAND3L | string | |\n| PBX | string | |\n| SOLVE | string | |\n| DECHAT | string | |\n| GARI | string | |\n| SHIB2L | string | |\n| SHIB2S | string | |\n| ENA | string | |\n| VEMP | string | |\n| ENJ | string | |\n| AFG | string | |\n| RATS | string | |\n| GRT | string | |\n| FORWARD | string | |\n| TFUEL | string | |\n| ENS | string | |\n| KASDOWN | string | |\n| XTM | string | |\n| DEGEN | string | |\n| TLM | string | |\n| DYDXDOWN | string | |\n| CKB | string | |\n| LUNC | string | |\n| AURORA | string | |\n| LUNA | string | |\n| XTZ | string | |\n| ELON | string | |\n| DMTR | string | |\n| EOS | string | |\n| GST | string | |\n| FORT | string | |\n| FLAME | string | |\n| PATEX | string | |\n| DEEP | string | |\n| ID3L | string | |\n| GTC | string | |\n| ID3S | string | |\n| RIO | string | |\n| CLH | string | |\n| BURGER | string | |\n| VRA | string | |\n| SUNDOG | string | |\n| GTT | string | |\n| INJUP | string | |\n| CPOOL | string | |\n| EPX | string | |\n| CLV | string | |\n| FEAR | string | |\n| MEME | string | |\n| ROOBEE | string | |\n| DEFI | string | |\n| TOKEN | string | |\n| GRAPE | string | |\n| KASUP | string | |\n| XWG | string | |\n| SKEY | string | |\n| SFUND | string | |\n| EQX | string | |\n| ORDIUP | string | |\n| TON | string | |\n| DEGO | string | |\n| IZI | string | |\n| ERG | string | |\n| ERN | string | |\n| VENOM | string | |\n| VOXEL | string | |\n| RLC | string | |\n| PHA | string | |\n| DYDXUP | string | |\n| APE3S | string | |\n| ORBS | string | |\n| OPDOWN | string | |\n| ESE | string | |\n| APE3L | string | |\n| HMND | string | |\n| COQ | string | |\n| AURY | string | |\n| CULT | string | |\n| AKT | string | |\n| GLMR | string | |\n| XYM | string | |\n| ORAI | string | |\n| XYO | string | |\n| ETC | string | |\n| LAI | string | |\n| PIP | string | |\n| ETH | string | |\n| NEO | string | |\n| RMV | string | |\n| KLAY | string | |\n| PIT | string | |\n| TARA | string | |\n| KALT | string | |\n| PIX | string | |\n| ETN | string | |\n| CSIX | string | |\n| TRADE | string | |\n| MAVIA | string | |\n| HIGH | string | |\n| TRB | string | |\n| ORDI | string | |\n| TRVL | string | |\n| AMB | string | |\n| TRU | string | |\n| LOGX | string | |\n| FINC | string | |\n| INFRA | string | |\n| NATIX | string | |\n| NFP | string | |\n| TRY | string | |\n| TRX | string | |\n| LBP | string | |\n| LBR | string | |\n| EUL | string | |\n| NFT | string | |\n| SEIUP | string | |\n| PUFFER | string | |\n| EUR | string | |\n| ORCA | string | |\n| NEAR3L | string | |\n| AMP | string | |\n| XDEFI | string | |\n| HIFI | string | |\n| TRUF | string | |\n| AITECH | string | |\n| AMU | string | |\n| USTC | string | |\n| KNGL | string | |\n| FOXY | string | |\n| NGC | string | |\n| TENET | string | |\n| NEAR3S | string | |\n| MAHA | string | |\n| NGL | string | |\n| TST | string | |\n| HIPPO | string | |\n| AXS3S | string | |\n| CRO | string | |\n| ZPAY | string | |\n| MNDE | string | |\n| CRV | string | |\n| SWASH | string | |\n| AXS3L | string | |\n| VERSE | string | |\n| RPK | string | |\n| RPL | string | |\n| AZERO | string | |\n| SOUL | string | |\n| VXV | string | |\n| LDO | string | |\n| MAGIC | string | |\n| ALICE | string | |\n| SEAM | string | |\n| PLU | string | |\n| AOG | string | |\n| SMOLE | string | |\n| EWT | string | |\n| TSUGT | string | |\n| PMG | string | |\n| OPAI | string | |\n| LOCUS | string | |\n| CTA | string | |\n| NIM | string | |\n| CTC | string | |\n| APE | string | |\n| MERL | string | |\n| JAM | string | |\n| CTI | string | |\n| APP | string | |\n| APT | string | |\n| WLDUP | string | |\n| ZEND | string | |\n| FIRE | string | |\n| DENT | string | |\n| PYTH | string | |\n| LFT | string | |\n| DPET | string | |\n| ORDIDOWN | string | |\n| KPOL | string | |\n| ETHUP | string | |\n| BAND | string | |\n| POL | string | |\n| ASTR | string | |\n| NKN | string | |\n| RSR | string | |\n| DVPN | string | |\n| TWT | string | |\n| ARB | string | |\n| CVC | string | |\n| ARC | string | |\n| XETA | string | |\n| MTRG | string | |\n| LOKA | string | |\n| LPOOL | string | |\n| TURBOS | string | |\n| CVX | string | |\n| ARX | string | |\n| MPLX | string | |\n| SUSHI | string | |\n| NLK | string | |\n| PEPE2 | string | |\n| WBTC | string | |\n| SUI3L | string | |\n| CWS | string | |\n| SUI3S | string | |\n| INSP | string | |\n| MANA | string | |\n| VRTX | string | |\n| CSPR | string | |\n| ATA | string | |\n| OPEN | string | |\n| HAI | string | |\n| NMR | string | |\n| ATH | string | |\n| LIT | string | |\n| TLOS | string | |\n| TNSR | string | |\n| CXT | string | |\n| POLYX | string | |\n| ZERO | string | |\n| ROUTE | string | |\n| LOOM | string | |\n| PRE | string | |\n| VRAUP | string | |\n| HBB | string | |\n| RVN | string | |\n| PRQ | string | |\n| ONDO | string | |\n| PEPEDOWN | string | |\n| WOOP | string | |\n| LUNCUP | string | |\n| KAVA | string | |\n| LKI | string | |\n| AVA | string | |\n| NOM | string | |\n| MAPO | string | |\n| PEPEUP | string | |\n| STRAX | string | |\n| NOT | string | |\n| ZERC | string | |\n| BCUT | string | |\n| MASA | string | |\n| WAN | string | |\n| WAT | string | |\n| WAX | string | |\n| MASK | string | |\n| EOS3L | string | |\n| IDEA | string | |\n| EOS3S | string | |\n| YFI | string | |\n| MOODENG | string | |\n| XCUR | string | |\n| HYDRA | string | |\n| POPCAT | string | |\n| LQTY | string | |\n| PIXEL | string | |\n| LMR | string | |\n| ZETA | string | |\n| YGG | string | |\n| AXS | string | |\n| BCHSV | string | |\n| NRN | string | |\n| FTON | string | |\n| COMP | string | |\n| XPRT | string | |\n| HFT | string | |\n| UXLINK | string | |\n| STAMP | string | |\n| RUNE | string | |\n| ZEUS | string | |\n| LTC3L | string | |\n| DAPP | string | |\n| FORTH | string | |\n| ALPINE | string | |\n| SENSO | string | |\n| LTC3S | string | |\n| DEXE | string | |\n| GOAL | string | |\n| AVAX | string | |\n| LISTA | string | |\n| AMPL | string | |\n| WORK | string | |\n| BRWL | string | |\n| BANANA | string | |\n| PUSH | string | |\n| WEN | string | |\n| NEIRO | string | |\n| BTCUP | string | |\n| SOL3S | string | |\n| BRAWL | string | |\n| LAY3R | string | |\n| LPT | string | |\n| GODS | string | |\n| SAND3S | string | |\n| RDNT | string | |\n| SOL3L | string | |\n| NIBI | string | |\n| NUM | string | |\n| PYR | string | |\n| DAG | string | |\n| DAI | string | |\n| HIP | string | |\n| DAO | string | |\n| AVAIL | string | |\n| DAR | string | |\n| FET | string | |\n| FCON | string | |\n| XAVA | string | |\n| LRC | string | |\n| UNI3S | string | |\n| POKT | string | |\n| DASH | string | |\n| BAKEDOWN | string | |\n| POLC | string | |\n| CIRUS | string | |\n| UNI3L | string | |\n| NWC | string | |\n| POLK | string | |\n| LSD | string | |\n| MARS4 | string | |\n| LSK | string | |\n| BLOCK | string | |\n| ANALOS | string | |\n| SAFE | string | |\n| DCK | string | |\n| LSS | string | |\n| DCR | string | |\n| LIKE | string | |\n| DATA | string | |\n| WIF | string | |\n| BLOK | string | |\n| LTC | string | |\n| METIS | string | |\n| WIN | string | |\n| HLG | string | |\n| LTO | string | |\n| DYDX | string | |\n| ARB3S | string | |\n| MUBI | string | |\n| ARB3L | string | |\n| RBTC1 | string | |\n| POND | string | |\n| LINA | string | |\n| MYRIA | string | |\n| LINK | string | |\n| QTUM | string | |\n| TUNE | string | |\n| UFO | string | |\n| CYBER | string | |\n| WILD | string | |\n| POLS | string | |\n| NYM | string | |\n| FIL | string | |\n| BAL | string | |\n| SCA | string | |\n| STND | string | |\n| WMTX | string | |\n| SCLP | string | |\n| MANEKI | string | |\n| BAT | string | |\n| AKRO | string | |\n| FTM3L | string | |\n| BAX | string | |\n| FTM3S | string | |\n| COTI | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470153)\n\n:::info[Description]\nRequest the fiat price of the currencies for the available trading pairs via this endpoint.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| AGLD | string | |\n| DFI | string | |\n| PYTHUP | string | |\n| ISLM | string | |\n| NEAR | string | |\n| AIOZ | string | |\n| AUDIO | string | |\n| BBL | string | |\n| WLD | string | |\n| HNT | string | |\n| ETHFI | string | |\n| DMAIL | string | |\n| OPUP | string | |\n| VET3S | string | |\n| MANA3S | string | |\n| TIDAL | string | |\n| HALO | string | |\n| OPUL | string | |\n| MANA3L | string | |\n| DGB | string | |\n| AA | string | |\n| BCH | string | |\n| GMEE | string | |\n| JST | string | |\n| PBUX | string | |\n| AR | string | |\n| SEI | string | |\n| PSTAKE | string | |\n| LMWR | string | |\n| UNFIDOWN | string | |\n| BB | string | |\n| JTO | string | |\n| WEMIX | string | |\n| G | string | |\n| MARSH | string | |\n| BN | string | |\n| FLIP | string | |\n| FLR | string | |\n| BIGTIME | string | |\n| FLY | string | |\n| T | string | |\n| W | string | |\n| BDX | string | |\n| BABYDOGE | string | |\n| SFP | string | |\n| DIA | string | |\n| ISME | string | |\n| LYM | string | |\n| VET3L | string | |\n| JUP | string | |\n| LYX | string | |\n| AIEPK | string | |\n| SILLY | string | |\n| SCPT | string | |\n| WOO | string | |\n| BLUR | string | |\n| STRK | string | |\n| BFC | string | |\n| DC | string | |\n| KARATE | string | |\n| SUSHI3L | string | |\n| NETVR | string | |\n| WAVES | string | |\n| LITH | string | |\n| HAPI | string | |\n| SUSHI3S | string | |\n| CEEK | string | |\n| FLOKI | string | |\n| SHR | string | |\n| SAND | string | |\n| TURT | string | |\n| UMA | string | |\n| BEPRO | string | |\n| SCRT | string | |\n| TUSD | string | |\n| COOKIE | string | |\n| LRDS | string | |\n| SIN | string | |\n| OAS | string | |\n| ROOT | string | |\n| ADA3L | string | |\n| TIAUP | string | |\n| HTR | string | |\n| UNB | string | |\n| UNA | string | |\n| HARD | string | |\n| G3 | string | |\n| ADA3S | string | |\n| MYRO | string | |\n| HTX | string | |\n| FT | string | |\n| BTCDOWN | string | |\n| UNI | string | |\n| FX | string | |\n| OBI | string | |\n| UNO | string | |\n| WRX | string | |\n| TIADOWN | string | |\n| ETHDOWN | string | |\n| WELL | string | |\n| SWFTC | string | |\n| SKL | string | |\n| UOS | string | |\n| AIPAD | string | |\n| BRETT | string | |\n| SKY | string | |\n| FRM | string | |\n| VISION | string | |\n| LENDS | string | |\n| SLF | string | |\n| BULL | string | |\n| FLOW | string | |\n| ODDZ | string | |\n| SLN | string | |\n| UPO | string | |\n| SLP | string | |\n| ID | string | |\n| SLIM | string | |\n| SPOT | string | |\n| DOP | string | |\n| ISSP | string | |\n| UQC | string | |\n| IO | string | |\n| DOT | string | |\n| 1INCH | string | |\n| SMH | string | |\n| MAK | string | |\n| TOKO | string | |\n| TURBO | string | |\n| UNFI | string | |\n| MAN | string | |\n| EVER | string | |\n| FTM | string | |\n| SHRAP | string | |\n| MAV | string | |\n| MAX | string | |\n| DPR | string | |\n| FTT | string | |\n| ARKM | string | |\n| ATOM | string | |\n| PENDLE | string | |\n| QUICK | string | |\n| BLZ | string | |\n| BOBA | string | |\n| MBL | string | |\n| OFN | string | |\n| UNIO | string | |\n| SNS | string | |\n| SNX | string | |\n| NXRA | string | |\n| TAIKO | string | |\n| AVAX3L | string | |\n| L3 | string | |\n| API3 | string | |\n| XRP3S | string | |\n| QKC | string | |\n| AVAX3S | string | |\n| ROSE | string | |\n| SATS | string | |\n| BMX | string | |\n| PORTAL | string | |\n| TOMI | string | |\n| XRP3L | string | |\n| SOL | string | |\n| SON | string | |\n| BNC | string | |\n| SOCIAL | string | |\n| CGPT | string | |\n| CELR | string | |\n| BNB | string | |\n| OGN | string | |\n| CELO | string | |\n| AUCTION | string | |\n| MANTA | string | |\n| LAYER | string | |\n| AERO | string | |\n| CETUS | string | |\n| LL | string | |\n| SPA | string | |\n| PYTHDOWN | string | |\n| NEIROCTO | string | |\n| UTK | string | |\n| GMRX | string | |\n| BOB | string | |\n| HOTCROSS | string | |\n| AERGO | string | |\n| MOCA | string | |\n| SQD | string | |\n| MV | string | |\n| BNB3L | string | |\n| BNB3S | string | |\n| GALAX3L | string | |\n| KAI | string | |\n| SQR | string | |\n| GALAX3S | string | |\n| EGLD | string | |\n| ZBCN | string | |\n| KAS | string | |\n| MEW | string | |\n| PUNDIX | string | |\n| LOOKS | string | |\n| FXS | string | |\n| BOSON | string | |\n| BRISE | string | |\n| AEVO | string | |\n| FLUX | string | |\n| PRCL | string | |\n| UNFIUP | string | |\n| SEIDOWN | string | |\n| DOAI | string | |\n| QNT | string | |\n| REDO | string | |\n| STRIKE | string | |\n| ETHW | string | |\n| OM | string | |\n| OP | string | |\n| WHALE | string | |\n| 1CAT | string | |\n| NEON | string | |\n| GTAI | string | |\n| SSV | string | |\n| ETH2 | string | |\n| KCS | string | |\n| ARPA | string | |\n| ARTFI | string | |\n| BRL | string | |\n| ALEX | string | |\n| STG | string | |\n| SHIB | string | |\n| IOTX | string | |\n| OLE | string | |\n| KDA | string | |\n| CERE | string | |\n| DOCK | string | |\n| STX | string | |\n| OLT | string | |\n| QI | string | |\n| SDAO | string | |\n| BLAST | string | |\n| LINK3S | string | |\n| IOST | string | |\n| SUI | string | |\n| CAKE | string | |\n| BSW | string | |\n| OMG | string | |\n| VOLT | string | |\n| LINK3L | string | |\n| GEEQ | string | |\n| PYUSD | string | |\n| SUN | string | |\n| TOWER | string | |\n| BTC | string | |\n| IOTA | string | |\n| REEF | string | |\n| TRIAS | string | |\n| KEY | string | |\n| ETH3L | string | |\n| BTT | string | |\n| ONE | string | |\n| RENDER | string | |\n| ETH3S | string | |\n| ANKR | string | |\n| ALGO | string | |\n| SYLO | string | |\n| ZCX | string | |\n| SD | string | |\n| ONT | string | |\n| MJT | string | |\n| DYM | string | |\n| DYP | string | |\n| BAKEUP | string | |\n| OOE | string | |\n| ZELIX | string | |\n| DOGE3L | string | |\n| ARTY | string | |\n| QORPO | string | |\n| ICE | string | |\n| NOTAI | string | |\n| DOGE3S | string | |\n| NAKA | string | |\n| GALAX | string | |\n| MKR | string | |\n| DODO | string | |\n| ICP | string | |\n| ZEC | string | |\n| ZEE | string | |\n| ICX | string | |\n| KMNO | string | |\n| TT | string | |\n| DOT3L | string | |\n| XAI | string | |\n| ZEN | string | |\n| DOGE | string | |\n| ALPHA | string | |\n| DUSK | string | |\n| DOT3S | string | |\n| SXP | string | |\n| HBAR | string | |\n| SYNT | string | |\n| ZEX | string | |\n| BONDLY | string | |\n| MLK | string | |\n| KICKS | string | |\n| PEPE | string | |\n| OUSD | string | |\n| LUNCDOWN | string | |\n| DOGS | string | |\n| REV3L | string | |\n| CTSI | string | |\n| C98 | string | |\n| OSMO | string | |\n| NTRN | string | |\n| CFX2S | string | |\n| SYN | string | |\n| VIDT | string | |\n| SYS | string | |\n| GAS | string | |\n| BOME | string | |\n| COMBO | string | |\n| XCH | string | |\n| VR | string | |\n| CFX2L | string | |\n| VSYS | string | |\n| PANDORA | string | |\n| THETA | string | |\n| XCN | string | |\n| NEXG | string | |\n| MELOS | string | |\n| XCV | string | |\n| ORN | string | |\n| WLKN | string | |\n| AAVE | string | |\n| MNT | string | |\n| BONK | string | |\n| PERP | string | |\n| XDC | string | |\n| MNW | string | |\n| XDB | string | |\n| BOND | string | |\n| SUIA | string | |\n| MOG | string | |\n| SUTER | string | |\n| TIME | string | |\n| RACA | string | |\n| BICO | string | |\n| MON | string | |\n| SWEAT | string | |\n| MOXIE | string | |\n| BABYBNB | string | |\n| IGU | string | |\n| HMSTR | string | |\n| XEC | string | |\n| MONI | string | |\n| XR | string | |\n| PEOPLE | string | |\n| PUMLX | string | |\n| ZIL | string | |\n| WLDDOWN | string | |\n| VAI | string | |\n| XEN | string | |\n| MPC | string | |\n| XEM | string | |\n| JASMY3S | string | |\n| OTK | string | |\n| TRAC | string | |\n| DFYN | string | |\n| BIDP | string | |\n| JASMY3L | string | |\n| INJDOWN | string | |\n| KLV | string | |\n| WAXL | string | |\n| TRBDOWN | string | |\n| BCH3L | string | |\n| GMT3S | string | |\n| KMD | string | |\n| BCH3S | string | |\n| ECOX | string | |\n| AAVE3S | string | |\n| GMT3L | string | |\n| EPIK | string | |\n| SUIP | string | |\n| AAVE3L | string | |\n| ZK | string | |\n| ZKF | string | |\n| OMNIA | string | |\n| ZKJ | string | |\n| ZKL | string | |\n| GAFI | string | |\n| CARV | string | |\n| KNC | string | |\n| CATS | string | |\n| PROM | string | |\n| ALEPH | string | |\n| PONKE | string | |\n| OVR | string | |\n| CATI | string | |\n| ORDER | string | |\n| GFT | string | |\n| BIFI | string | |\n| GGC | string | |\n| GGG | string | |\n| DAPPX | string | |\n| SUKU | string | |\n| ULTI | string | |\n| CREDI | string | |\n| ERTHA | string | |\n| FURY | string | |\n| KARRAT | string | |\n| MOBILE | string | |\n| SIDUS | string | |\n| NAVI | string | |\n| TAO | string | |\n| USDJ | string | |\n| MTL | string | |\n| VET | string | |\n| FITFI | string | |\n| USDT | string | |\n| OXT | string | |\n| CANDY | string | |\n| USDP | string | |\n| MTS | string | |\n| TADA | string | |\n| MTV | string | |\n| NAVX | string | |\n| ILV | string | |\n| VINU | string | |\n| GHX | string | |\n| EDU | string | |\n| HYVE | string | |\n| BTC3L | string | |\n| ANYONE | string | |\n| BEAT | string | |\n| KING | string | |\n| CREAM | string | |\n| CAS | string | |\n| IMX | string | |\n| CAT | string | |\n| BTC3S | string | |\n| USDE | string | |\n| USDD | string | |\n| CWAR | string | |\n| USDC | string | |\n| KRL | string | |\n| INJ | string | |\n| GAME | string | |\n| TRIBL | string | |\n| XLM | string | |\n| TRBUP | string | |\n| VRADOWN | string | |\n| SUPER | string | |\n| EIGEN | string | |\n| IOI | string | |\n| KSM | string | |\n| CCD | string | |\n| EGO | string | |\n| EGP | string | |\n| MXC | string | |\n| TEL | string | |\n| MOVR | string | |\n| XMR | string | |\n| MXM | string | |\n| OORT | string | |\n| GLM | string | |\n| RAY | string | |\n| XTAG | string | |\n| GLQ | string | |\n| CWEB | string | |\n| REVU | string | |\n| REVV | string | |\n| ZRO | string | |\n| XNL | string | |\n| XNO | string | |\n| SAROS | string | |\n| KACE | string | |\n| ZRX | string | |\n| WLTH | string | |\n| ATOM3L | string | |\n| GMM | string | |\n| BEER | string | |\n| GMT | string | |\n| HEART | string | |\n| GMX | string | |\n| ABBC | string | |\n| OMNI | string | |\n| ATOM3S | string | |\n| IRL | string | |\n| CFG | string | |\n| WSDM | string | |\n| GNS | string | |\n| VANRY | string | |\n| CFX | string | |\n| GRAIL | string | |\n| BEFI | string | |\n| VELO | string | |\n| XPR | string | |\n| DOVI | string | |\n| ACE | string | |\n| ACH | string | |\n| ISP | string | |\n| XCAD | string | |\n| MINA | string | |\n| TIA | string | |\n| DRIFT | string | |\n| ACQ | string | |\n| ACS | string | |\n| MIND | string | |\n| STORE | string | |\n| REN | string | |\n| ELA | string | |\n| DREAMS | string | |\n| ADA | string | |\n| ELF | string | |\n| REQ | string | |\n| STORJ | string | |\n| LADYS | string | |\n| PAXG | string | |\n| REZ | string | |\n| XRD | string | |\n| CHO | string | |\n| CHR | string | |\n| ADS | string | |\n| CHZ | string | |\n| ADX | string | |\n| XRP | string | |\n| JASMY | string | |\n| KAGI | string | |\n| FIDA | string | |\n| PBR | string | |\n| AEG | string | |\n| H2O | string | |\n| CHMB | string | |\n| SAND3L | string | |\n| PBX | string | |\n| SOLVE | string | |\n| DECHAT | string | |\n| GARI | string | |\n| SHIB2L | string | |\n| SHIB2S | string | |\n| ENA | string | |\n| VEMP | string | |\n| ENJ | string | |\n| AFG | string | |\n| RATS | string | |\n| GRT | string | |\n| FORWARD | string | |\n| TFUEL | string | |\n| ENS | string | |\n| KASDOWN | string | |\n| XTM | string | |\n| DEGEN | string | |\n| TLM | string | |\n| DYDXDOWN | string | |\n| CKB | string | |\n| LUNC | string | |\n| AURORA | string | |\n| LUNA | string | |\n| XTZ | string | |\n| ELON | string | |\n| DMTR | string | |\n| EOS | string | |\n| GST | string | |\n| FORT | string | |\n| FLAME | string | |\n| PATEX | string | |\n| DEEP | string | |\n| ID3L | string | |\n| GTC | string | |\n| ID3S | string | |\n| RIO | string | |\n| CLH | string | |\n| BURGER | string | |\n| VRA | string | |\n| SUNDOG | string | |\n| GTT | string | |\n| INJUP | string | |\n| CPOOL | string | |\n| EPX | string | |\n| CLV | string | |\n| FEAR | string | |\n| MEME | string | |\n| ROOBEE | string | |\n| DEFI | string | |\n| TOKEN | string | |\n| GRAPE | string | |\n| KASUP | string | |\n| XWG | string | |\n| SKEY | string | |\n| SFUND | string | |\n| EQX | string | |\n| ORDIUP | string | |\n| TON | string | |\n| DEGO | string | |\n| IZI | string | |\n| ERG | string | |\n| ERN | string | |\n| VENOM | string | |\n| VOXEL | string | |\n| RLC | string | |\n| PHA | string | |\n| DYDXUP | string | |\n| APE3S | string | |\n| ORBS | string | |\n| OPDOWN | string | |\n| ESE | string | |\n| APE3L | string | |\n| HMND | string | |\n| COQ | string | |\n| AURY | string | |\n| CULT | string | |\n| AKT | string | |\n| GLMR | string | |\n| XYM | string | |\n| ORAI | string | |\n| XYO | string | |\n| ETC | string | |\n| LAI | string | |\n| PIP | string | |\n| ETH | string | |\n| NEO | string | |\n| RMV | string | |\n| KLAY | string | |\n| PIT | string | |\n| TARA | string | |\n| KALT | string | |\n| PIX | string | |\n| ETN | string | |\n| CSIX | string | |\n| TRADE | string | |\n| MAVIA | string | |\n| HIGH | string | |\n| TRB | string | |\n| ORDI | string | |\n| TRVL | string | |\n| AMB | string | |\n| TRU | string | |\n| LOGX | string | |\n| FINC | string | |\n| INFRA | string | |\n| NATIX | string | |\n| NFP | string | |\n| TRY | string | |\n| TRX | string | |\n| LBP | string | |\n| LBR | string | |\n| EUL | string | |\n| NFT | string | |\n| SEIUP | string | |\n| PUFFER | string | |\n| EUR | string | |\n| ORCA | string | |\n| NEAR3L | string | |\n| AMP | string | |\n| XDEFI | string | |\n| HIFI | string | |\n| TRUF | string | |\n| AITECH | string | |\n| AMU | string | |\n| USTC | string | |\n| KNGL | string | |\n| FOXY | string | |\n| NGC | string | |\n| TENET | string | |\n| NEAR3S | string | |\n| MAHA | string | |\n| NGL | string | |\n| TST | string | |\n| HIPPO | string | |\n| AXS3S | string | |\n| CRO | string | |\n| ZPAY | string | |\n| MNDE | string | |\n| CRV | string | |\n| SWASH | string | |\n| AXS3L | string | |\n| VERSE | string | |\n| RPK | string | |\n| RPL | string | |\n| AZERO | string | |\n| SOUL | string | |\n| VXV | string | |\n| LDO | string | |\n| MAGIC | string | |\n| ALICE | string | |\n| SEAM | string | |\n| PLU | string | |\n| AOG | string | |\n| SMOLE | string | |\n| EWT | string | |\n| TSUGT | string | |\n| PMG | string | |\n| OPAI | string | |\n| LOCUS | string | |\n| CTA | string | |\n| NIM | string | |\n| CTC | string | |\n| APE | string | |\n| MERL | string | |\n| JAM | string | |\n| CTI | string | |\n| APP | string | |\n| APT | string | |\n| WLDUP | string | |\n| ZEND | string | |\n| FIRE | string | |\n| DENT | string | |\n| PYTH | string | |\n| LFT | string | |\n| DPET | string | |\n| ORDIDOWN | string | |\n| KPOL | string | |\n| ETHUP | string | |\n| BAND | string | |\n| POL | string | |\n| ASTR | string | |\n| NKN | string | |\n| RSR | string | |\n| DVPN | string | |\n| TWT | string | |\n| ARB | string | |\n| CVC | string | |\n| ARC | string | |\n| XETA | string | |\n| MTRG | string | |\n| LOKA | string | |\n| LPOOL | string | |\n| TURBOS | string | |\n| CVX | string | |\n| ARX | string | |\n| MPLX | string | |\n| SUSHI | string | |\n| NLK | string | |\n| PEPE2 | string | |\n| WBTC | string | |\n| SUI3L | string | |\n| CWS | string | |\n| SUI3S | string | |\n| INSP | string | |\n| MANA | string | |\n| VRTX | string | |\n| CSPR | string | |\n| ATA | string | |\n| OPEN | string | |\n| HAI | string | |\n| NMR | string | |\n| ATH | string | |\n| LIT | string | |\n| TLOS | string | |\n| TNSR | string | |\n| CXT | string | |\n| POLYX | string | |\n| ZERO | string | |\n| ROUTE | string | |\n| LOOM | string | |\n| PRE | string | |\n| VRAUP | string | |\n| HBB | string | |\n| RVN | string | |\n| PRQ | string | |\n| ONDO | string | |\n| PEPEDOWN | string | |\n| WOOP | string | |\n| LUNCUP | string | |\n| KAVA | string | |\n| LKI | string | |\n| AVA | string | |\n| NOM | string | |\n| MAPO | string | |\n| PEPEUP | string | |\n| STRAX | string | |\n| NOT | string | |\n| ZERC | string | |\n| BCUT | string | |\n| MASA | string | |\n| WAN | string | |\n| WAT | string | |\n| WAX | string | |\n| MASK | string | |\n| EOS3L | string | |\n| IDEA | string | |\n| EOS3S | string | |\n| YFI | string | |\n| MOODENG | string | |\n| XCUR | string | |\n| HYDRA | string | |\n| POPCAT | string | |\n| LQTY | string | |\n| PIXEL | string | |\n| LMR | string | |\n| ZETA | string | |\n| YGG | string | |\n| AXS | string | |\n| BCHSV | string | |\n| NRN | string | |\n| FTON | string | |\n| COMP | string | |\n| XPRT | string | |\n| HFT | string | |\n| UXLINK | string | |\n| STAMP | string | |\n| RUNE | string | |\n| ZEUS | string | |\n| LTC3L | string | |\n| DAPP | string | |\n| FORTH | string | |\n| ALPINE | string | |\n| SENSO | string | |\n| LTC3S | string | |\n| DEXE | string | |\n| GOAL | string | |\n| AVAX | string | |\n| LISTA | string | |\n| AMPL | string | |\n| WORK | string | |\n| BRWL | string | |\n| BANANA | string | |\n| PUSH | string | |\n| WEN | string | |\n| NEIRO | string | |\n| BTCUP | string | |\n| SOL3S | string | |\n| BRAWL | string | |\n| LAY3R | string | |\n| LPT | string | |\n| GODS | string | |\n| SAND3S | string | |\n| RDNT | string | |\n| SOL3L | string | |\n| NIBI | string | |\n| NUM | string | |\n| PYR | string | |\n| DAG | string | |\n| DAI | string | |\n| HIP | string | |\n| DAO | string | |\n| AVAIL | string | |\n| DAR | string | |\n| FET | string | |\n| FCON | string | |\n| XAVA | string | |\n| LRC | string | |\n| UNI3S | string | |\n| POKT | string | |\n| DASH | string | |\n| BAKEDOWN | string | |\n| POLC | string | |\n| CIRUS | string | |\n| UNI3L | string | |\n| NWC | string | |\n| POLK | string | |\n| LSD | string | |\n| MARS4 | string | |\n| LSK | string | |\n| BLOCK | string | |\n| ANALOS | string | |\n| SAFE | string | |\n| DCK | string | |\n| LSS | string | |\n| DCR | string | |\n| LIKE | string | |\n| DATA | string | |\n| WIF | string | |\n| BLOK | string | |\n| LTC | string | |\n| METIS | string | |\n| WIN | string | |\n| HLG | string | |\n| LTO | string | |\n| DYDX | string | |\n| ARB3S | string | |\n| MUBI | string | |\n| ARB3L | string | |\n| RBTC1 | string | |\n| POND | string | |\n| LINA | string | |\n| MYRIA | string | |\n| LINK | string | |\n| QTUM | string | |\n| TUNE | string | |\n| UFO | string | |\n| CYBER | string | |\n| WILD | string | |\n| POLS | string | |\n| NYM | string | |\n| FIL | string | |\n| BAL | string | |\n| SCA | string | |\n| STND | string | |\n| WMTX | string | |\n| SCLP | string | |\n| MANEKI | string | |\n| BAT | string | |\n| AKRO | string | |\n| FTM3L | string | |\n| BAX | string | |\n| FTM3S | string | |\n| COTI | string | |\n\n---\n", "body": {} }, "response": [ @@ -4633,7 +4835,7 @@ { "key": "base", "value": "", - "description": "Ticker symbol of a base currency,eg.USD,EUR. Default is USD" + "description": "Ticker symbol of a base currency, e.g. USD, EUR. Default is USD" }, { "key": "currencies", @@ -4784,7 +4986,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470166)\n\n:::info[Description]\nRequest via this endpoint to get the transaction currency for the entire trading market.\n:::\n\n:::tip[Tips]\nSC has been changed to USDS, but you can still use SC as a query parameter\n\nThe three markets of ETH, NEO and TRX are merged into the ALTS market. You can query the trading pairs of the ETH, NEO and TRX markets through the ALTS trading area.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470166)\n\n:::info[Description]\nRequest via this endpoint the transaction currency for the entire trading market.\n:::\n\n:::tip[Tips]\nSC has been changed to USDS, but you can still use SC as a query parameter\n\nThe three markets of ETH, NEO and TRX are merged into the ALTS market. You can query the trading pairs of the ETH, NEO and TRX markets through the ALTS trading area.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n---\n", "body": {} }, "response": [ @@ -4841,6 +5043,81 @@ } ] }, + { + "name": "Get Client IP Address", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "", + "protocol": "https", + "host": [ + "{{spot_endpoint}}" + ], + "path": [ + "api", + "v1", + "my-ip" + ], + "query": [] + }, + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3471123)\n\n:::info[Description]\nGet the client side IP address.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | string | |\n\n---\n", + "body": {} + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "", + "protocol": "https", + "host": [ + "{{spot_endpoint}}" + ], + "path": [ + "api", + "v1", + "my-ip" + ], + "query": [] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": { + "content": "", + "type": "text/plain" + } + }, + { + "key": "gw-ratelimit-remaining", + "value": 1997, + "name": "gw-ratelimit-remaining" + }, + { + "key": "gw-ratelimit-limit", + "value": 2000, + "name": "gw-ratelimit-limit" + }, + { + "key": "gw-ratelimit-reset", + "value": 29990, + "name": "gw-ratelimit-reset" + } + ], + "cookie": [], + "body": "{\n \"code\": \"200000\",\n \"data\": \"20.***.***.128\"\n}" + } + ] + }, { "name": "Get Server Time", "request": { @@ -4859,7 +5136,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470156)\n\n:::info[Description]\nGet the server time.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | integer | ServerTime(millisecond) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470156)\n\n:::info[Description]\nGet the server time.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | integer | ServerTime (milliseconds) |\n\n---\n", "body": {} }, "response": [ @@ -4934,7 +5211,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470158)\n\n:::info[Description]\nGet the service status\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| status | string | Status of service: open:normal transaction, close:Stop Trading/Maintenance, cancelonly:can only cancel the order but not place order |\n| msg | string | Remark for operation |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470158)\n\n:::info[Description]\nGet the service status.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| status | string | Status of service: open: normal transaction; close: Stop Trading/Maintenance; cancelonly: can only cancel the order but not place order |\n| msg | string | Remark for operation |\n\n---\n", "body": {} }, "response": [ @@ -5016,7 +5293,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470188)\n\n:::info[Description]\nPlace order to the Spot 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.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type `limit` and `market` |\n| side | String | Yes | `buy` or `sell` |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| tags | String | No | Order tag, length cannot exceed `20` characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed `20` characters (ASCII) |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | symbol |\n| type | string | specify if the order is an 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| remark | string | Order placement remarks, length cannot exceed 20 characters (ASCII) |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order

When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| tags | string | Order tag, length cannot exceed 20 characters (ASCII) |\n| cancelAfter | integer | Cancel after n seconds,the order timing strategy is GTT |\n| funds | string | When **type** is market, select one out of two: size or funds |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470188)\n\n:::info[Description]\nPlace order to the Spot 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.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type `limit` and `market` |\n| side | String | Yes | `buy` or `sell` |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| tags | String | No | Order tag, length cannot exceed `20` characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed `20` characters (ASCII) |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | symbol |\n| type | string | specify if the order is an 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| remark | string | Order placement remarks, length cannot exceed 20 characters (ASCII) |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order

When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| tags | string | Order tag, length cannot exceed 20 characters (ASCII) |\n| cancelAfter | integer | Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1
|\n| funds | string | When **type** is market, select one out of two: size or funds

When placing a market order, the funds field refers to the funds for the priced asset (the asset name written latter) of the trading pair. The funds must be based on the quoteIncrement of the trading pair. The quoteIncrement represents the precision of the trading pair. The funds value for an order must be a multiple of quoteIncrement and must be between quoteMinSize and quoteMaxSize. |\n| allowMaxTimeWindow | integer | Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. |\n| clientTimestamp | integer | Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", "body": { "mode": "raw", "raw": "//limit order\n{\n \"type\": \"limit\",\n \"symbol\": \"BTC-USDT\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"remark\": \"order remarks\"\n}\n\n//market order 1\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"size\": \"0.00001\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n\n//market order 2\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"funds\": \"1\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n", @@ -5102,7 +5379,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470170)\n\n:::info[Description]\nPlace order to the spot trading system\n\nThe difference between this interface and \"Add order\" is that this interface will synchronously return the order information after the order matching is completed.\n\nFor higher latency requirements, please select the \"Add order\" interface. If there is a requirement for returning data integrity, please select this interface\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type `limit` and `market` |\n| side | String | Yes | `buy` or `sell` |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| tags | String | No | Order tag, length cannot exceed `20` characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed `20` characters (ASCII) |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | symbol |\n| type | string | specify if the order is an 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| remark | string | Order placement remarks, length cannot exceed 20 characters (ASCII) |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order

When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| tags | string | Order tag, length cannot exceed 20 characters (ASCII) |\n| cancelAfter | integer | Cancel after n seconds,the order timing strategy is GTT |\n| funds | string | When **type** is market, select one out of two: size or funds |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n| orderTime | integer | |\n| originSize | string | original order size |\n| dealSize | string | deal size |\n| remainSize | string | remain size |\n| canceledSize | string | Cumulative canceled size |\n| status | string | Order Status. open:order is active; done:order has been completed |\n| matchTime | integer | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470170)\n\n:::info[Description]\nPlace order in the spot trading system\n\nThe difference between this interface and \"Add order\" is that this interface will synchronously return the order information after the order matching is completed.\n\nFor higher latency requirements, please select the \"Add order\" interface. If there is a requirement for returning data integrity, please select this interface.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order ID, unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type ‘limit’ and ‘market’ |\n| side | String | Yes | ‘buy’ or ‘sell’ |\n| stp | String | No | self trade prevention is divided into four strategies: ‘CN’, ‘CO’, ‘CB’, and ‘DC’ |\n| tags | String | No | Order tag, length cannot exceed ‘20’ characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed ‘20’ characters (ASCII) |\n\n**Additional Request Parameters Required by ‘limit’ Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy ‘GTC’, ‘GTT’, ‘IOC’, ‘FOK’ (the default is ‘GTC’) |\n| cancelAfter | long | No | Cancel after ‘n’ seconds, the order timing strategy is ‘GTT’ |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is ‘IOC’ or ‘FOK’ |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by ‘market’ orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n| funds | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or canceled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled (already canceled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly canceled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: If the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: This feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | Specify if the order is to 'buy' or 'sell'. |\n| symbol | string | symbol |\n| type | string | Specify if the order is a 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| remark | string | Order placement remarks, length cannot exceed 20 characters (ASCII) |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order.

When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| tags | string | Order tag, length cannot exceed 20 characters (ASCII) |\n| cancelAfter | integer | Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1
|\n| funds | string | When **type** is market, select one out of two: size or funds |\n| allowMaxTimeWindow | integer | The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. |\n| clientTimestamp | integer | Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order ID. |\n| orderTime | integer | |\n| originSize | string | Original order size |\n| dealSize | string | Deal size |\n| remainSize | string | Remain size |\n| canceledSize | string | Cumulative canceled size |\n| status | string | Order Status. open: order is active; done: order has been completed |\n| matchTime | integer | |\n\n---\n", "body": { "mode": "raw", "raw": "//limit order\n{\n \"type\": \"limit\",\n \"symbol\": \"BTC-USDT\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"clientOid\": \"5c52e11203aa677f33e493f\",\n \"remark\": \"order remarks\"\n}\n\n//market order 1\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"size\": \"0.00001\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\",\n// }\n\n//market order 2\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"funds\": \"1\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\",\n// }\n", @@ -5189,7 +5466,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470187)\n\n:::info[Description]\nOrder test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type `limit` and `market` |\n| side | String | Yes | `buy` or `sell` |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| tags | String | No | Order tag, length cannot exceed `20` characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed `20` characters (ASCII) |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | symbol |\n| type | string | specify if the order is an 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| remark | string | Order placement remarks, length cannot exceed 20 characters (ASCII) |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order

When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| tags | string | Order tag, length cannot exceed 20 characters (ASCII) |\n| cancelAfter | integer | Cancel after n seconds,the order timing strategy is GTT |\n| funds | string | When **type** is market, select one out of two: size or funds |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470187)\n\n:::info[Description]\nOrder test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type `limit` and `market` |\n| side | String | Yes | `buy` or `sell` |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| tags | String | No | Order tag, length cannot exceed `20` characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed `20` characters (ASCII) |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | symbol |\n| type | string | specify if the order is an 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| remark | string | Order placement remarks, length cannot exceed 20 characters (ASCII) |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order

When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| tags | string | Order tag, length cannot exceed 20 characters (ASCII) |\n| cancelAfter | integer | Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1
|\n| funds | string | When **type** is market, select one out of two: size or funds |\n| allowMaxTimeWindow | integer | Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. |\n| clientTimestamp | integer | Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", "body": { "mode": "raw", "raw": "//limit order\n{\n \"type\": \"limit\",\n \"symbol\": \"BTC-USDT\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"clientOid\": \"5c52e11203aa677f33e493f\",\n \"remark\": \"order remarks\"\n}\n\n//market order 1\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"size\": \"0.00001\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\",\n// }\n\n//market order 2\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"funds\": \"1\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\",\n// }\n", @@ -5276,7 +5553,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470168)\n\n:::info[Description]\nThis endpoint supports sequential batch order placement from a single endpoint. A maximum of 20 orders can be placed simultaneously.\n:::\n\n\n\n:::tip[Tips]\nThis endpoint only supports order placement requests. To obtain the results of the order placement, you will need to check the order status or subscribe to websocket to obtain information about he order.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type `limit` and `market` |\n| side | String | Yes | `buy` or `sell` |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| tags | String | No | Order tag, length cannot exceed `20` characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed `20` characters (ASCII) |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderList | array | Refer to the schema section of orderList |\n\n**root.orderList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.
|\n| symbol | string | symbol |\n| type | string | Specify if the order is an 'limit' order or 'market' order. |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading |\n| side | string | Specify if the order is to 'buy' or 'sell' |\n| price | string | Specify price for order |\n| size | string | Specify quantity for order

When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC |\n| cancelAfter | integer | Cancel after n seconds,the order timing strategy is GTT |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| tags | string | Order tag, length cannot exceed 20 characters (ASCII) |\n| remark | string | Order placement remarks, length cannot exceed 20 characters (ASCII) |\n| funds | string | When **type** is market, select one out of two: size or funds |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n| success | boolean | Add order success/failure |\n| failMsg | string | error message |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470168)\n\n:::info[Description]\nThis endpoint supports sequential batch order placement from a single endpoint. A maximum of 20 orders can be placed simultaneously.\n:::\n\n\n\n:::tip[Tips]\nThis endpoint only supports order placement requests. To obtain the results of the order placement, you will need to check the order status or subscribe to Websocket to obtain information about the order.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order ID, unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type ‘limit’ and ‘market’ |\n| side | String | Yes | ‘buy’ or ‘sell’ |\n| stp | String | No | self trade prevention is divided into four strategies: ‘CN’, ‘CO’, ‘CB’, and ‘DC’ |\n| tags | String | No | Order tag, length cannot exceed ‘20’ characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed ‘20’ characters (ASCII) |\n\n**Additional Request Parameters Required by ‘limit’ Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy ‘GTC’, ‘GTT’, ‘IOC’, ‘FOK’ (the default is ‘GTC’) |\n| cancelAfter | long | No | Cancel after ‘n’ seconds, the order timing strategy is ‘GTT’ |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is ‘IOC’ or ‘FOK’ |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by ‘market’ orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n| funds | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or canceled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled (already canceled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly canceled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: If the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: This feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderList | array | Refer to the schema section of orderList |\n\n**root.orderList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.
|\n| symbol | string | symbol |\n| type | string | Specify if the order is a 'limit' order or 'market' order. |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading |\n| side | string | Specify if the order is to 'buy' or 'sell'. |\n| price | string | Specify price for order |\n| size | string | Specify quantity for order.

When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC |\n| cancelAfter | integer | Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1
|\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| tags | string | Order tag, length cannot exceed 20 characters (ASCII) |\n| remark | string | Order placement remarks, length cannot exceed 20 characters (ASCII) |\n| funds | string | When **type** is market, select one out of two: size or funds |\n| clientTimestamp | integer | Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. |\n| allowMaxTimeWindow | integer | The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order ID. |\n| success | boolean | Add order success/failure |\n| failMsg | string | Error message |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"orderList\": [\n {\n \"clientOid\": \"client order id 12\",\n \"symbol\": \"BTC-USDT\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"30000\",\n \"size\": \"0.00001\"\n },\n {\n \"clientOid\": \"client order id 13\",\n \"symbol\": \"ETH-USDT\",\n \"type\": \"limit\",\n \"side\": \"sell\",\n \"price\": \"2000\",\n \"size\": \"0.00001\"\n }\n ]\n}", @@ -5364,7 +5641,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470169)\n\n:::info[Description]\nThis endpoint supports sequential batch order placement from a single endpoint. A maximum of 20 orders can be placed simultaneously.\n\nThe difference between this interface and \"Batch Add Orders\" is that this interface will synchronously return the order information after the order matching is completed.\n\nFor higher latency requirements, please select the \"Batch Add Orders\" interface. If there is a requirement for returning data integrity, please select this interface\n:::\n\n\n\n:::tip[Tips]\nThis endpoint only supports order placement requests. To obtain the results of the order placement, you will need to check the order status or subscribe to websocket to obtain information about he order.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type `limit` and `market` |\n| side | String | Yes | `buy` or `sell` |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| tags | String | No | Order tag, length cannot exceed `20` characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed `20` characters (ASCII) |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderList | array | Refer to the schema section of orderList |\n\n**root.orderList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.
|\n| symbol | string | symbol |\n| type | string | Specify if the order is an 'limit' order or 'market' order. |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading |\n| side | string | Specify if the order is to 'buy' or 'sell' |\n| price | string | Specify price for order |\n| size | string | Specify quantity for order

When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC |\n| cancelAfter | integer | Cancel after n seconds,the order timing strategy is GTT |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| tags | string | Order tag, length cannot exceed 20 characters (ASCII) |\n| remark | string | Order placement remarks, length cannot exceed 20 characters (ASCII) |\n| funds | string | When **type** is market, select one out of two: size or funds |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n| orderTime | integer | |\n| originSize | string | original order size |\n| dealSize | string | deal size |\n| remainSize | string | remain size |\n| canceledSize | string | Cumulative canceled size |\n| status | string | Order Status. open:order is active; done:order has been completed |\n| matchTime | integer | |\n| success | boolean | Add order success/failure |\n| failMsg | string | error message |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470169)\n\n:::info[Description]\nThis endpoint supports sequential batch order placement from a single endpoint. A maximum of 20 orders can be placed simultaneously.\n\nThe difference between this interface and \"Batch Add Orders\" is that this interface will synchronously return the order information after the order matching is completed.\n\nFor higher latency requirements, please select the \"Batch Add Orders\" interface. If there is a requirement for returning data integrity, please select this interface.\n:::\n\n\n\n:::tip[Tips]\nThis endpoint only supports order placement requests. To obtain the results of the order placement, you will need to check the order status or subscribe to Websocket to obtain information about the order.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order ID, unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type ‘limit’ and ‘market’ |\n| side | String | Yes | ‘buy’ or ‘sell’ |\n| stp | String | No | self trade prevention is divided into four strategies: ‘CN’, ‘CO’, ‘CB’, and ‘DC’ |\n| tags | String | No | Order tag, length cannot exceed ‘20’ characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed ‘20’ characters (ASCII) |\n\n**Additional Request Parameters Required by ‘limit’ Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy ‘GTC’, ‘GTT’, ‘IOC’, ‘FOK’ (the default is ‘GTC’) |\n| cancelAfter | long | No | Cancel after ‘n’ seconds, the order timing strategy is ‘GTT’ |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is ‘IOC’ or ‘FOK’ |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by ‘market’ orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n| funds | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or canceled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled (already canceled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly canceled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: If the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: This feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderList | array | Refer to the schema section of orderList |\n\n**root.orderList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.
|\n| symbol | string | symbol |\n| type | string | Specify if the order is a 'limit' order or 'market' order. |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading |\n| side | string | Specify if the order is to 'buy' or 'sell'. |\n| price | string | Specify price for order |\n| size | string | Specify quantity for order.

When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC |\n| cancelAfter | integer | Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1
|\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| tags | string | Order tag, length cannot exceed 20 characters (ASCII) |\n| remark | string | Order placement remarks, length cannot exceed 20 characters (ASCII) |\n| funds | string | When **type** is market, select one out of two: size or funds |\n| allowMaxTimeWindow | integer | The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. |\n| clientTimestamp | integer | Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order ID. |\n| orderTime | integer | |\n| originSize | string | Original order size |\n| dealSize | string | Deal size |\n| remainSize | string | Remain size |\n| canceledSize | string | Cumulative canceled size |\n| status | string | Order Status. open: order is active; done: order has been completed |\n| matchTime | integer | |\n| success | boolean | Add order success/failure |\n| failMsg | string | Error message |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"orderList\": [\n {\n \"clientOid\": \"client order id 13\",\n \"symbol\": \"BTC-USDT\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"30000\",\n \"size\": \"0.00001\"\n },\n {\n \"clientOid\": \"client order id 14\",\n \"symbol\": \"ETH-USDT\",\n \"type\": \"limit\",\n \"side\": \"sell\",\n \"price\": \"2000\",\n \"size\": \"0.00001\"\n }\n ]\n}", @@ -5458,7 +5735,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470174)\n\n:::info[Description]\nThis endpoint can be used to cancel a spot order by orderId.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | order id |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470174)\n\n:::info[Description]\nThis endpoint can be used to cancel a spot order by orderId.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | Order id |\n\n---\n", "body": {} }, "response": [ @@ -6095,7 +6372,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470171)\n\n:::info[Description]\nThis interface can modify the price and quantity of the order according to orderId or clientOid.\n\nThe implementation of this interface is: cancel the order and place a new order on the same trading pair, and return the modification result to the client synchronously\n\nWhen the quantity of the new order updated by the user is less than the filled quantity of this order, the order will be considered as completed, and the order will be cancelled, and no new order will be placed\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | The old client order id,orderId and clientOid must choose one |\n| symbol | string | symbol |\n| orderId | string | The old order id, orderId and clientOid must choose one |\n| newPrice | string | The modified price of the new order, newPrice and newSize must choose one |\n| newSize | string | The modified size of the new order, newPrice and newSize must choose one |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| newOrderId | string | The new order id |\n| clientOid | string | The original client order id |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470171)\n\n:::info[Description]\nThis interface can modify the price and quantity of the order according to orderId or clientOid.\n\nThe implementation of this interface is: Cancel the order and place a new order on the same trading pair, and return the modification result to the client synchronously.\n\nWhen the quantity of the new order updated by the user is less than the filled quantity of this order, the order will be considered as completed, and the order will be canceled, and no new order will be placed.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | One must be chose out of the old client order ID, orderId and clientOid |\n| symbol | string | symbol |\n| orderId | string | One must be chosen out of the old order id, orderId and clientOid |\n| newPrice | string | One must be chosen out of the modified price of the new order, newPrice and newSize |\n| newSize | string | One must be chosen out of the modified size of the new order, newPrice and newSize |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| newOrderId | string | The new order ID |\n| clientOid | string | The original client order ID |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", @@ -6518,6 +6795,119 @@ } ] }, + { + "name": "Get Open Orders By Page", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "", + "protocol": "https", + "host": [ + "{{spot_endpoint}}" + ], + "path": [ + "api", + "v1", + "hf", + "orders", + "active", + "page" + ], + "query": [ + { + "key": "symbol", + "value": "BTC-USDT", + "description": "Symbol" + }, + { + "key": "pageNum", + "value": null, + "description": "Current page" + }, + { + "key": "pageSize", + "value": null, + "description": "Size per page" + } + ] + }, + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3471591)\n\n:::info[Description]\nThis interface is to obtain Spot active order (uncompleted order) lists by page. The returned data is sorted in descending order according to the create time of the order.\n\nAfter the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nFor high-frequency trading users, we recommend locally caching, maintaining your own order records, and using market data streams to update your order information in real time.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | |\n| pageSize | integer | |\n| totalNum | integer | |\n| totalPage | integer | |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | The unique order id generated by the trading system |\n| symbol | string | symbol |\n| opType | string | |\n| type | string | Specify if the order is an 'limit' order or 'market' order. |\n| side | string | Buy or sell |\n| price | string | Order price |\n| size | string | Order size |\n| funds | string | Order Funds |\n| dealSize | string | Number of filled transactions |\n| dealFunds | string | Funds of filled transactions |\n| fee | string | [Handling fees](https://www.kucoin.com/docs-new/api-5327739) |\n| feeCurrency | string | currency used to calculate trading fee |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/api-5176570) |\n| timeInForce | string | Time in force |\n| postOnly | boolean | Whether its a postOnly order. |\n| hidden | boolean | Whether its a hidden order. |\n| iceberg | boolean | Whether its a iceberg order. |\n| visibleSize | string | Visible size of iceberg order in order book. |\n| cancelAfter | integer | A GTT timeInForce that expires in n seconds |\n| channel | string | |\n| clientOid | string | Client Order Id,unique identifier created by the user |\n| remark | string | Order placement remarks |\n| tags | string | Order tag |\n| cancelExist | boolean | Whether there is a cancellation record for the order. |\n| createdAt | integer | |\n| lastUpdatedAt | integer | |\n| tradeType | string | Trade type, redundancy param |\n| inOrderBook | boolean | Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook |\n| cancelledSize | string | Number of canceled transactions |\n| cancelledFunds | string | Funds of canceled transactions |\n| remainSize | string | Number of remain transactions |\n| remainFunds | string | Funds of remain transactions |\n| tax | string | Users in some regions need query this field |\n| active | boolean | Order status: true-The status of the order isactive; false-The status of the order is done |\n\n---\n", + "body": {} + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "", + "protocol": "https", + "host": [ + "{{spot_endpoint}}" + ], + "path": [ + "api", + "v1", + "hf", + "orders", + "active", + "page" + ], + "query": [ + { + "key": "symbol", + "value": "BTC-USDT", + "description": "Symbol" + }, + { + "key": "pageNum", + "value": null, + "description": "Current page" + }, + { + "key": "pageSize", + "value": null, + "description": "Size per page" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "name": "Content-Type", + "description": { + "content": "", + "type": "text/plain" + } + }, + { + "key": "gw-ratelimit-remaining", + "value": 1997, + "name": "gw-ratelimit-remaining" + }, + { + "key": "gw-ratelimit-limit", + "value": 2000, + "name": "gw-ratelimit-limit" + }, + { + "key": "gw-ratelimit-reset", + "value": 29990, + "name": "gw-ratelimit-reset" + } + ], + "cookie": [], + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 20,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"id\": \"67c1437ea5226600071cc080\",\n \"symbol\": \"BTC-USDT\",\n \"opType\": \"DEAL\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"funds\": \"0.5\",\n \"dealSize\": \"0\",\n \"dealFunds\": \"0\",\n \"fee\": \"0\",\n \"feeCurrency\": \"USDT\",\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": \"0\",\n \"cancelAfter\": 0,\n \"channel\": \"API\",\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"remark\": \"order remarks\",\n \"tags\": null,\n \"cancelExist\": false,\n \"createdAt\": 1740718974367,\n \"lastUpdatedAt\": 1741867658590,\n \"tradeType\": \"TRADE\",\n \"inOrderBook\": true,\n \"cancelledSize\": \"0\",\n \"cancelledFunds\": \"0\",\n \"remainSize\": \"0.00001\",\n \"remainFunds\": \"0.5\",\n \"tax\": \"0\",\n \"active\": true\n }\n ]\n }\n}" + } + ] + }, { "name": "Get Closed Orders", "request": { @@ -6849,7 +7239,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470172)\n\n:::info[Description]\nGet Disconnection Protect(Deadman Swich)Through this interface, you can query the settings of automatic order cancellation\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timeout | integer | Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400 |\n| symbols | string | List of trading pairs. Separated by commas, empty means all trading pairs |\n| currentTime | integer | System current time (in seconds) |\n| triggerTime | integer | Trigger cancellation time (in seconds) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470172)\n\n:::info[Description]\nGet Disconnection Protect (Deadman Switch). Through this interface, you can query the settings of automatic order cancellation.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timeout | integer | Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400 |\n| symbols | string | List of trading pairs. Separated by commas; empty means all trading pairs |\n| currentTime | integer | System current time (in seconds) |\n| triggerTime | integer | Trigger cancellation time (in seconds) |\n\n---\n", "body": {} }, "response": [ @@ -6929,7 +7319,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470173)\n\n:::info[Description]\nSet Disconnection Protect(Deadman Swich)Through this interface, Call this interface to automatically cancel all orders of the set trading pair after the specified time. If this interface is not called again for renewal or cancellation before the set time, the system will help the user to cancel the order of the corresponding trading pair. Otherwise it will not.\n:::\n\n:::tip[Tips]\nThe order cancellation delay is between 0 and 10 seconds, and the order will not be canceled in real time. When the system cancels the order, if the transaction pair status is no longer operable to cancel the order, it will not cancel the order\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timeout | integer | Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. |\n| symbols | string | List of trading pairs. When this parameter is not empty, separate it with commas and support up to 50 trading pairs. Empty means all trading pairs. When this parameter is changed, the previous setting will be overwritten. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentTime | integer | System current time (in seconds) |\n| triggerTime | integer | Trigger cancellation time (in seconds) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470173)\n\n:::info[Description]\nSet Disconnection Protect (Deadman Switch). Through this interface, call this interface to automatically cancel all orders of the set trading pair after the specified time. If this interface is not called again for renewal or cancellation before the set time, the system will help the user to cancel the order of the corresponding trading pair. Otherwise it will not.\n:::\n\n:::tip[Tips]\nThe order cancellation delay is between 0 and 10 seconds, and the order will not be canceled in real time. When the system cancels the order, if the transaction pair status is no longer operable to cancel the order, it will not cancel the order\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timeout | integer | Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. |\n| symbols | string | List of trading pairs. When this parameter is not empty, separate it with commas and support up to 50 trading pairs. Empty means all trading pairs. When this parameter is changed, the previous setting will be overwritten. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentTime | integer | System current time (in seconds) |\n| triggerTime | integer | Trigger cancellation time (in seconds) |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"timeout\": 5,\n \"symbols\": \"BTC-USDT,ETH-USDT\"\n}", @@ -7014,10 +7404,10 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470334)\n\n:::info[Description]\nPlace stop order to the Spot trading system. The maximum untriggered stop orders for a single trading pair in one account is 20.\n:::\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | symbol |\n| type | string | specify if the order is an 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| remark | string | Order placement remarks, length cannot exceed 20 characters (ASCII) |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order, not need for market order.

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order

When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading. Required for limit orders. |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK if **type** is limit. |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | When **type** is limit, this is Maximum visible quantity in iceberg orders. |\n| cancelAfter | integer | Cancel after n seconds,the order timing strategy is GTT when **type** is limit. |\n| funds | string | When **type** is market, select one out of two: size or funds |\n| stopPrice | string | The trigger price. |\n| tradeType | string | The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470334)\n\n:::info[Description]\nPlace stop order to the Spot trading system. The maximum untriggered stop orders for a single trading pair in one account is 20.\n:::\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | symbol |\n| type | string | specify if the order is an 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| remark | string | Order placement remarks, length cannot exceed 20 characters (ASCII) |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order, not need for market order.

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order

When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading. Required for limit orders. |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK if **type** is limit. |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | When **type** is limit, this is Maximum visible quantity in iceberg orders. |\n| cancelAfter | integer | Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1
|\n| funds | string | When **type** is market, select one out of two: size or funds |\n| stopPrice | string | The trigger price. |\n| tradeType | string | The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n\n---\n", "body": { "mode": "raw", - "raw": "//limit order\n{\n \"type\": \"limit\",\n \"symbol\": \"BTC-USDT\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"remark\": \"order remarks\"\n}\n\n//market order 1\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"size\": \"0.00001\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n\n//market order 2\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"funds\": \"1\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n", + "raw": "//limit order\n{\n \"type\": \"limit\",\n \"symbol\": \"BTC-USDT\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"stopPrice\": \"50000\",\n \"size\": \"0.00001\",\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"remark\": \"order remarks\"\n}\n\n//market order 1\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"size\": \"0.00001\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n\n//market order 2\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"funds\": \"1\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n", "options": { "raw": { "language": "json" @@ -7075,7 +7465,7 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"clientOid\": \"5c52e11203aa677f33e493fb\"\n }\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"orderId\": \"670fd33bf9406e0007ab3945\"\n }\n}" } ] }, @@ -7197,7 +7587,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470335)\n\n:::info[Description]\nRequest via this endpoint to cancel a single stop order previously placed.\n\nYou will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the websocket pushes.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| cancelledOrderIds | array | Refer to the schema section of cancelledOrderIds |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470335)\n\n:::info[Description]\nRequest via this endpoint the cancellation of a single stop order previously placed.\n\nYou will receive canceledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the Websocket pushes.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| cancelledOrderIds | array | Refer to the schema section of cancelledOrderIds |\n\n---\n", "body": {} }, "response": [ @@ -7281,7 +7671,7 @@ { "key": "tradeType", "value": null, - "description": "The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE" + "description": "The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin)." }, { "key": "orderIds", @@ -7320,7 +7710,7 @@ { "key": "tradeType", "value": null, - "description": "The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE" + "description": "The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin)." }, { "key": "orderIds", @@ -7380,18 +7770,61 @@ "v1", "stop-order" ], - "query": [] - }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470338)\n\n:::info[Description]\nRequest via this endpoint to get your current untriggered stop order list. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n\n:::\n\n\n:::tip[Example]\n```json\n{\n \"currentPage\": 1,\n \"pageSize\": 50,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"id\": \"vs8hoo8kqjnklv4m0038lrfq\",\n \"symbol\": \"KCS-USDT\",\n \"userId\": \"60fe4956c43cbc0006562c2c\",\n \"status\": \"NEW\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"0.01000000000000000000\",\n \"size\": \"0.01000000000000000000\",\n \"funds\": null,\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"cancelAfter\": -1,\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": null,\n \"channel\": \"API\",\n \"clientOid\": \"404814a0fb4311eb9098acde48001122\",\n \"remark\": null,\n \"tags\": null,\n \"orderTime\": 1628755183702150167,\n \"domainId\": \"kucoin\",\n \"tradeSource\": \"USER\",\n \"tradeType\": \"TRADE\",\n \"feeCurrency\": \"USDT\",\n \"takerFeeRate\": \"0.00200000000000000000\",\n \"makerFeeRate\": \"0.00200000000000000000\",\n \"createdAt\": 1628755183704,\n \"stop\": \"loss\",\n \"stopTriggerTime\": null,\n \"stopPrice\": \"10.00000000000000000000\"\n }\n ]\n}\n```\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Only list orders for a specific symbol |\n| side | string | buy or sell |\n| type | string | limit, market, limit_stop or market_stop |\n| tradeType | string | The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE |\n| startAt | number | Start time (milisecond) |\n| endAt | number | End time (milisecond) |\n| currentPage | integer | current page |\n| orderIds | string | comma seperated order ID list |\n| pageSize | integer | page size |\n| stop | string | Order type: stop: stop loss order, oco: oco order |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | current page id |\n| pageSize | integer | |\n| totalNum | integer | the stop order count |\n| totalPage | integer | total page count of the list |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Order ID, the ID of an order. |\n| symbol | string | Symbol name |\n| userId | string | User ID |\n| status | string | Order status, include NEW, TRIGGERED |\n| type | string | Order type,limit, market, limit_stop or market_stop |\n| side | string | transaction direction,include buy and sell |\n| price | string | order price |\n| size | string | order quantity |\n| funds | string | order funds |\n| stp | string | |\n| timeInForce | string | time InForce,include GTC,GTT,IOC,FOK |\n| cancelAfter | integer | cancel orders after n seconds,requires timeInForce to be GTT |\n| postOnly | boolean | postOnly |\n| hidden | boolean | hidden order |\n| iceberg | boolean | Iceberg order |\n| visibleSize | string | displayed quantity for iceberg order |\n| channel | string | order source |\n| clientOid | string | user-entered order unique mark |\n| remark | string | Remarks at stop order creation |\n| tags | string | tag order source |\n| orderTime | integer | Time of place a stop order, accurate to nanoseconds |\n| domainId | string | domainId, e.g: kucoin |\n| tradeSource | string | trade source: USER(Order by user), MARGIN_SYSTEM(Order by margin system) |\n| tradeType | string | The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). |\n| feeCurrency | string | The currency of the fee |\n| takerFeeRate | string | Fee Rate of taker |\n| makerFeeRate | string | Fee Rate of maker |\n| createdAt | integer | order creation time |\n| stop | string | Stop order type, include loss and entry |\n| stopTriggerTime | integer | The trigger time of the stop order |\n| stopPrice | string | stop price |\n\n---\n", - "body": { - "mode": "raw", - "raw": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", - "options": { - "raw": { - "language": "json" + "query": [ + { + "key": "symbol", + "value": null, + "description": "Only list orders for a specific symbol" + }, + { + "key": "side", + "value": null, + "description": "buy or sell" + }, + { + "key": "type", + "value": null, + "description": "limit, market" + }, + { + "key": "tradeType", + "value": null, + "description": "The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE" + }, + { + "key": "startAt", + "value": null, + "description": "Start time (milisecond)" + }, + { + "key": "endAt", + "value": null, + "description": "End time (milisecond)" + }, + { + "key": "currentPage", + "value": null, + "description": "Current page\n" + }, + { + "key": "orderIds", + "value": null, + "description": "Comma seperated order ID list" + }, + { + "key": "pageSize", + "value": null, + "description": "Page size" + }, + { + "key": "stop", + "value": null, + "description": "Order type: stop: stop loss order, oco: oco order" } - } - } + ] + }, + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470338)\n\n:::info[Description]\nRequest via this endpoint to get your current untriggered stop order list. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | current page id |\n| pageSize | integer | |\n| totalNum | integer | the stop order count |\n| totalPage | integer | total page count of the list |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Order ID, the ID of an order. |\n| symbol | string | Symbol name |\n| userId | string | User ID |\n| status | string | Order status, include NEW, TRIGGERED |\n| type | string | Order type |\n| side | string | transaction direction,include buy and sell |\n| price | string | order price |\n| size | string | order quantity |\n| funds | string | order funds |\n| stp | string | |\n| timeInForce | string | time InForce,include GTC,GTT,IOC,FOK |\n| cancelAfter | integer | cancel orders after n seconds,requires timeInForce to be GTT |\n| postOnly | boolean | postOnly |\n| hidden | boolean | hidden order |\n| iceberg | boolean | Iceberg order |\n| visibleSize | string | displayed quantity for iceberg order |\n| channel | string | order source |\n| clientOid | string | user-entered order unique mark |\n| remark | string | Remarks at stop order creation |\n| tags | string | tag order source |\n| orderTime | integer | Time of place a stop order, accurate to nanoseconds |\n| domainId | string | domainId, e.g: kucoin |\n| tradeSource | string | trade source: USER(Order by user), MARGIN_SYSTEM(Order by margin system) |\n| tradeType | string | The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). |\n| feeCurrency | string | The currency of the fee |\n| takerFeeRate | string | Fee Rate of taker |\n| makerFeeRate | string | Fee Rate of maker |\n| createdAt | integer | order creation time |\n| stop | string | Stop order type, include loss and entry |\n| stopTriggerTime | integer | The trigger time of the stop order |\n| stopPrice | string | stop price |\n| relatedNo | string | |\n| limitPrice | string | |\n| pop | string | |\n| activateCondition | string | |\n\n---\n", + "body": {} }, "response": [ { @@ -7410,7 +7843,58 @@ "v1", "stop-order" ], - "query": [] + "query": [ + { + "key": "symbol", + "value": null, + "description": "Only list orders for a specific symbol" + }, + { + "key": "side", + "value": null, + "description": "buy or sell" + }, + { + "key": "type", + "value": null, + "description": "limit, market" + }, + { + "key": "tradeType", + "value": null, + "description": "The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE" + }, + { + "key": "startAt", + "value": null, + "description": "Start time (milisecond)" + }, + { + "key": "endAt", + "value": null, + "description": "End time (milisecond)" + }, + { + "key": "currentPage", + "value": null, + "description": "Current page\n" + }, + { + "key": "orderIds", + "value": null, + "description": "Comma seperated order ID list" + }, + { + "key": "pageSize", + "value": null, + "description": "Page size" + }, + { + "key": "stop", + "value": null, + "description": "Order type: stop: stop loss order, oco: oco order" + } + ] } }, "status": "OK", @@ -7443,7 +7927,7 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 50,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"id\": \"vs8hoo8kqjnklv4m0038lrfq\",\n \"symbol\": \"KCS-USDT\",\n \"userId\": \"60fe4956c43cbc0006562c2c\",\n \"status\": \"NEW\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"0.01000000000000000000\",\n \"size\": \"0.01000000000000000000\",\n \"funds\": null,\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"cancelAfter\": -1,\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": null,\n \"channel\": \"API\",\n \"clientOid\": \"404814a0fb4311eb9098acde48001122\",\n \"remark\": null,\n \"tags\": null,\n \"orderTime\": 1628755183702150100,\n \"domainId\": \"kucoin\",\n \"tradeSource\": \"USER\",\n \"tradeType\": \"TRADE\",\n \"feeCurrency\": \"USDT\",\n \"takerFeeRate\": \"0.00200000000000000000\",\n \"makerFeeRate\": \"0.00200000000000000000\",\n \"createdAt\": 1628755183704,\n \"stop\": \"loss\",\n \"stopTriggerTime\": null,\n \"stopPrice\": \"10.00000000000000000000\"\n }\n ]\n }\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 50,\n \"totalNum\": 2,\n \"totalPage\": 1,\n \"items\": [\n {\n \"id\": \"vs93gptvr9t2fsql003l8k5p\",\n \"symbol\": \"BTC-USDT\",\n \"userId\": \"633559791e1cbc0001f319bc\",\n \"status\": \"NEW\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"50000.00000000000000000000\",\n \"size\": \"0.00001000000000000000\",\n \"funds\": null,\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"cancelAfter\": -1,\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": null,\n \"channel\": \"API\",\n \"clientOid\": \"5c52e11203aa677f222233e493fb\",\n \"remark\": \"order remarks\",\n \"tags\": null,\n \"relatedNo\": null,\n \"orderTime\": 1740626554883000024,\n \"domainId\": \"kucoin\",\n \"tradeSource\": \"USER\",\n \"tradeType\": \"TRADE\",\n \"feeCurrency\": \"USDT\",\n \"takerFeeRate\": \"0.00100000000000000000\",\n \"makerFeeRate\": \"0.00100000000000000000\",\n \"createdAt\": 1740626554884,\n \"stop\": \"loss\",\n \"stopTriggerTime\": null,\n \"stopPrice\": \"60000.00000000000000000000\",\n \"limitPrice\": null,\n \"pop\": null,\n \"activateCondition\": null\n }\n ]\n }\n}" } ] }, @@ -7466,7 +7950,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470339)\n\n:::info[Description]\nRequest via this interface to get a stop order information via the order ID.\n\n:::\n\n\n:::tip[Example]\n```json\n{\n \"id\": \"vs8hoo8q2ceshiue003b67c0\",\n \"symbol\": \"KCS-USDT\",\n \"userId\": \"60fe4956c43cbc0006562c2c\",\n \"status\": \"NEW\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"0.01000000000000000000\",\n \"size\": \"0.01000000000000000000\",\n \"funds\": null,\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"cancelAfter\": -1,\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": null,\n \"channel\": \"API\",\n \"clientOid\": \"40e0eb9efe6311eb8e58acde48001122\",\n \"remark\": null,\n \"tags\": null,\n \"orderTime\": 1629098781127530345,\n \"domainId\": \"kucoin\",\n \"tradeSource\": \"USER\",\n \"tradeType\": \"TRADE\",\n \"feeCurrency\": \"USDT\",\n \"takerFeeRate\": \"0.00200000000000000000\",\n \"makerFeeRate\": \"0.00200000000000000000\",\n \"createdAt\": 1629098781128,\n \"stop\": \"loss\",\n \"stopTriggerTime\": null,\n \"stopPrice\": \"10.00000000000000000000\"\n}\n```\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Only list orders for a specific symbol |\n| side | string | buy or sell |\n| type | string | limit, market, limit_stop or market_stop |\n| tradeType | string | The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE |\n| startAt | number | Start time (milisecond) |\n| endAt | number | End time (milisecond) |\n| currentPage | integer | current page |\n| orderIds | string | comma seperated order ID list |\n| pageSize | integer | page size |\n| stop | string | Order type: stop: stop loss order, oco: oco order |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| data | object | Refer to the schema section of data |\n| code | string | return status code |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Order ID, the ID of an order. |\n| symbol | string | Symbol name |\n| userId | string | User ID |\n| status | string | Order status, include NEW, TRIGGERED |\n| type | string | Order type,limit, market, limit_stop or market_stop |\n| side | string | transaction direction,include buy and sell |\n| price | string | order price |\n| size | string | order quantity |\n| funds | string | order funds |\n| stp | string | |\n| timeInForce | string | time InForce,include GTC,GTT,IOC,FOK |\n| cancelAfter | integer | cancel orders after n seconds,requires timeInForce to be GTT |\n| postOnly | boolean | postOnly |\n| hidden | boolean | hidden order |\n| iceberg | boolean | Iceberg order |\n| visibleSize | string | displayed quantity for iceberg order |\n| channel | string | order source |\n| clientOid | string | user-entered order unique mark |\n| remark | string | Remarks at stop order creation |\n| tags | string | tag order source |\n| domainId | string | domainId, e.g: kucoin |\n| tradeSource | string | trade source: USER(Order by user), MARGIN_SYSTEM(Order by margin system) |\n| tradeType | string | The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). |\n| feeCurrency | string | The currency of the fee |\n| takerFeeRate | string | Fee Rate of taker |\n| makerFeeRate | string | Fee Rate of maker |\n| createdAt | integer | order creation time |\n| stop | string | Stop order type, include loss and entry |\n| stopTriggerTime | integer | The trigger time of the stop order |\n| stopPrice | string | stop price |\n| orderTime | integer | Time of place a stop order, accurate to nanoseconds |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470339)\n\n:::info[Description]\nRequest via this interface to get a stop order information via the order ID.\n\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Only list orders for a specific symbol |\n| side | string | buy or sell |\n| type | string | limit, market, limit_stop or market_stop |\n| tradeType | string | The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE |\n| startAt | number | Start time (milisecond) |\n| endAt | number | End time (milisecond) |\n| currentPage | integer | current page |\n| orderIds | string | comma seperated order ID list |\n| pageSize | integer | page size |\n| stop | string | Order type: stop: stop loss order, oco: oco order |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| data | object | Refer to the schema section of data |\n| code | string | return status code |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Order ID, the ID of an order. |\n| symbol | string | Symbol name |\n| userId | string | User ID |\n| status | string | Order status, include NEW, TRIGGERED |\n| type | string | Order type |\n| side | string | transaction direction,include buy and sell |\n| price | string | order price |\n| size | string | order quantity |\n| funds | string | order funds |\n| stp | string | |\n| timeInForce | string | time InForce,include GTC,GTT,IOC,FOK |\n| cancelAfter | integer | cancel orders after n seconds,requires timeInForce to be GTT |\n| postOnly | boolean | postOnly |\n| hidden | boolean | hidden order |\n| iceberg | boolean | Iceberg order |\n| visibleSize | string | displayed quantity for iceberg order |\n| channel | string | order source |\n| clientOid | string | user-entered order unique mark |\n| remark | string | Remarks at stop order creation |\n| tags | string | tag order source |\n| domainId | string | domainId, e.g: kucoin |\n| tradeSource | string | trade source: USER(Order by user), MARGIN_SYSTEM(Order by margin system) |\n| tradeType | string | The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). |\n| feeCurrency | string | The currency of the fee |\n| takerFeeRate | string | Fee Rate of taker |\n| makerFeeRate | string | Fee Rate of maker |\n| createdAt | integer | order creation time |\n| stop | string | Stop order type, include loss and entry |\n| stopTriggerTime | integer | The trigger time of the stop order |\n| stopPrice | string | stop price |\n| orderTime | integer | Time of place a stop order, accurate to nanoseconds |\n\n---\n", "body": {} }, "response": [ @@ -7554,7 +8038,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470340)\n\n:::info[Description]\nRequest via this interface to get a stop order information via the clientOid.\n\n:::\n\n\n:::tip[Example]\n```json\n{\n \"id\": \"vs8hoo8q2ceshiue003b67c0\",\n \"symbol\": \"KCS-USDT\",\n \"userId\": \"60fe4956c43cbc0006562c2c\",\n \"status\": \"NEW\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"0.01000000000000000000\",\n \"size\": \"0.01000000000000000000\",\n \"funds\": null,\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"cancelAfter\": -1,\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": null,\n \"channel\": \"API\",\n \"clientOid\": \"40e0eb9efe6311eb8e58acde48001122\",\n \"remark\": null,\n \"tags\": null,\n \"orderTime\": 1629098781127530345,\n \"domainId\": \"kucoin\",\n \"tradeSource\": \"USER\",\n \"tradeType\": \"TRADE\",\n \"feeCurrency\": \"USDT\",\n \"takerFeeRate\": \"0.00200000000000000000\",\n \"makerFeeRate\": \"0.00200000000000000000\",\n \"createdAt\": 1629098781128,\n \"stop\": \"loss\",\n \"stopTriggerTime\": null,\n \"stopPrice\": \"10.00000000000000000000\"\n}\n```\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Only list orders for a specific symbol |\n| side | string | buy or sell |\n| type | string | limit, market, limit_stop or market_stop |\n| tradeType | string | The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE |\n| startAt | integer | Start time (milisecond) |\n| endAt | integer | End time (milisecond) |\n| currentPage | integer | current page |\n| orderIds | string | comma seperated order ID list |\n| pageSize | integer | page size |\n| stop | string | Order type: stop: stop loss order, oco: oco order |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | the return code |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Order ID, the ID of an order. |\n| symbol | string | Symbol name |\n| userId | string | User ID |\n| status | string | Order status, include NEW, TRIGGERED |\n| type | string | Order type,limit, market, limit_stop or market_stop |\n| side | string | transaction direction,include buy and sell |\n| price | string | order price |\n| size | string | order quantity |\n| funds | string | order funds |\n| stp | string | |\n| timeInForce | string | time InForce,include GTC,GTT,IOC,FOK |\n| cancelAfter | integer | cancel orders after n seconds,requires timeInForce to be GTT |\n| postOnly | boolean | postOnly |\n| hidden | boolean | hidden order |\n| iceberg | boolean | Iceberg order |\n| visibleSize | string | displayed quantity for iceberg order |\n| channel | string | order source |\n| clientOid | string | user-entered order unique mark |\n| remark | string | Remarks at stop order creation |\n| tags | string | tag order source |\n| domainId | string | domainId, e.g: kucoin |\n| tradeSource | string | trade source: USER(Order by user), MARGIN_SYSTEM(Order by margin system) |\n| tradeType | string | The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). |\n| feeCurrency | string | The currency of the fee |\n| takerFeeRate | string | Fee Rate of taker |\n| makerFeeRate | string | Fee Rate of maker |\n| createdAt | integer | order creation time |\n| stop | string | Stop order type, include loss and entry |\n| stopTriggerTime | integer | The trigger time of the stop order |\n| stopPrice | string | stop price |\n| orderTime | integer | Time of place a stop order, accurate to nanoseconds |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470340)\n\n:::info[Description]\nRequest via this interface to get a stop order information via the clientOid.\n\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Only list orders for a specific symbol |\n| side | string | buy or sell |\n| type | string | limit, market, limit_stop or market_stop |\n| tradeType | string | The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE |\n| startAt | integer | Start time (milisecond) |\n| endAt | integer | End time (milisecond) |\n| currentPage | integer | current page |\n| orderIds | string | comma seperated order ID list |\n| pageSize | integer | page size |\n| stop | string | Order type: stop: stop loss order, oco: oco order |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | the return code |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Order ID, the ID of an order. |\n| symbol | string | Symbol name |\n| userId | string | User ID |\n| status | string | Order status, include NEW, TRIGGERED |\n| type | string | Order type |\n| side | string | transaction direction,include buy and sell |\n| price | string | order price |\n| size | string | order quantity |\n| funds | string | order funds |\n| stp | string | |\n| timeInForce | string | time InForce,include GTC,GTT,IOC,FOK |\n| cancelAfter | integer | cancel orders after n seconds,requires timeInForce to be GTT |\n| postOnly | boolean | postOnly |\n| hidden | boolean | hidden order |\n| iceberg | boolean | Iceberg order |\n| visibleSize | string | displayed quantity for iceberg order |\n| channel | string | order source |\n| clientOid | string | user-entered order unique mark |\n| remark | string | Remarks at stop order creation |\n| tags | string | tag order source |\n| domainId | string | domainId, e.g: kucoin |\n| tradeSource | string | trade source: USER(Order by user), MARGIN_SYSTEM(Order by margin system) |\n| tradeType | string | The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). |\n| feeCurrency | string | The currency of the fee |\n| takerFeeRate | string | Fee Rate of taker |\n| makerFeeRate | string | Fee Rate of maker |\n| createdAt | integer | order creation time |\n| stop | string | Stop order type, include loss and entry |\n| stopTriggerTime | integer | The trigger time of the stop order |\n| stopPrice | string | stop price |\n| orderTime | integer | Time of place a stop order, accurate to nanoseconds |\n\n---\n", "body": {} }, "response": [ @@ -7728,7 +8212,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470354)\n\n:::info[Description]\nRequest via this endpoint to cancel a single oco order previously placed.\n\nYou will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| cancelledOrderIds | array | Refer to the schema section of cancelledOrderIds |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470354)\n\n:::info[Description]\nRequest via this endpoint the cancellation of a single OCO order previously placed.\n\nYou will receive canceledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| cancelledOrderIds | array | Refer to the schema section of cancelledOrderIds |\n\n---\n", "body": {} }, "response": [ @@ -7887,16 +8371,16 @@ { "key": "orderIds", "value": "674c388172cf2800072ee746,674c38bdfd8300000795167e", - "description": "Specify the order id, there can be multiple orders, separated by commas. If not passed, all oco orders will be canceled by default." + "description": "Specify the order ID; there can be multiple orders, separated by commas. If not passed, all OCO orders will be canceled by default." }, { "key": "symbol", "value": "BTC-USDT", - "description": "trading pair. If not passed, the oco orders of all symbols will be canceled by default." + "description": "Trading pair. If not passed, the OCO orders of all symbols will be canceled by default." } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470356)\n\n:::info[Description]\nThis interface can batch cancel OCO orders through orderIds.\n\nYou will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| cancelledOrderIds | array | Refer to the schema section of cancelledOrderIds |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470356)\n\n:::info[Description]\nThis interface can batch cancel OCO orders through orderIds.\n\nYou will receive canceledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| cancelledOrderIds | array | Refer to the schema section of cancelledOrderIds |\n\n---\n", "body": {} }, "response": [ @@ -7921,12 +8405,12 @@ { "key": "orderIds", "value": "674c388172cf2800072ee746,674c38bdfd8300000795167e", - "description": "Specify the order id, there can be multiple orders, separated by commas. If not passed, all oco orders will be canceled by default." + "description": "Specify the order ID; there can be multiple orders, separated by commas. If not passed, all OCO orders will be canceled by default." }, { "key": "symbol", "value": "BTC-USDT", - "description": "trading pair. If not passed, the oco orders of all symbols will be canceled by default." + "description": "Trading pair. If not passed, the OCO orders of all symbols will be canceled by default." } ] } @@ -7985,7 +8469,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470357)\n\n:::info[Description]\nRequest via this interface to get a oco order information via the order ID.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | symbol |\n| clientOid | string | Client Order Id |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| orderTime | integer | Order placement time, milliseconds |\n| status | string | Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELLED: Cancelled |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470357)\n\n:::info[Description]\nRequest via this interface an OCO order information via the order ID.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | symbol |\n| clientOid | string | Client Order ID |\n| orderId | string | The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. |\n| orderTime | integer | Order placement time, milliseconds |\n| status | string | Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELED: Canceled |\n\n---\n", "body": {} }, "response": [ @@ -8254,7 +8738,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470360)\n\n:::info[Description]\nRequest via this endpoint to get your current OCO order list. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | |\n| pageSize | integer | |\n| totalNum | integer | |\n| totalPage | integer | |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| symbol | string | symbol |\n| clientOid | string | Client Order Id |\n| orderTime | integer | Order placement time, milliseconds |\n| status | string | Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELLED: Cancelled |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470360)\n\n:::info[Description]\nRequest your current OCO order list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | |\n| pageSize | integer | |\n| totalNum | integer | |\n| totalPage | integer | |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. |\n| symbol | string | symbol |\n| clientOid | string | Client Order ID |\n| orderTime | integer | Order placement time, milliseconds |\n| status | string | Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELED: Canceled |\n\n---\n", "body": {} }, "response": [ @@ -8380,7 +8864,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470189)\n\n:::info[Description]\nThis endpoint allows querying the configuration of cross margin symbol.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timestamp | integer | |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | symbol |\n| name | string | symbol name |\n| enableTrading | boolean | Whether trading is enabled: true for enabled, false for disabled |\n| market | string | Trading market |\n| baseCurrency | string | Base currency,e.g. BTC. |\n| quoteCurrency | string | Quote currency,e.g. USDT. |\n| baseIncrement | string | Quantity increment: The quantity for an order must be a positive integer multiple of this increment. Here, the size refers to the quantity of the base currency for the order. For example, for the ETH-USDT trading pair, if the baseIncrement is 0.0000001, the order quantity can be 1.0000001 but not 1.00000001. |\n| baseMinSize | string | The minimum order quantity requried to place an order. |\n| quoteIncrement | string | Quote increment: The funds for a market order must be a positive integer multiple of this increment. The funds refer to the quote currency amount. For example, for the ETH-USDT trading pair, if the quoteIncrement is 0.000001, the amount of USDT for the order can be 3000.000001 but not 3000.0000001. |\n| quoteMinSize | string | The minimum order funds required to place a market order. |\n| baseMaxSize | string | The maximum order size required to place an order. |\n| quoteMaxSize | string | The maximum order funds required to place a market order. |\n| priceIncrement | string | Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001.

specifies the min order price as well as the price increment.This also applies to quote currency. |\n| feeCurrency | string | The currency of charged fees. |\n| priceLimitRate | string | Threshold for price portection |\n| minFunds | string | the minimum trading amounts |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470189)\n\n:::info[Description]\nThis endpoint allows querying the configuration of cross margin symbol.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timestamp | integer | |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | symbol |\n| name | string | Symbol name |\n| enableTrading | boolean | Whether trading is enabled: True for enabled; false for disabled |\n| market | string | Trading market |\n| baseCurrency | string | Base currency, e.g. BTC. |\n| quoteCurrency | string | Quote currency, e.g. USDT. |\n| baseIncrement | string | Quantity increment: The quantity for an order must be a positive integer multiple of this increment. Here, the size refers to the quantity of the base currency for the order. For example, for the ETH-USDT trading pair, if the baseIncrement is 0.0000001, the order quantity can be 1.0000001 but not 1.00000001. |\n| baseMinSize | string | The minimum order quantity required to place an order. |\n| quoteIncrement | string | Quote increment: The funds for a market order must be a positive integer multiple of this increment. The funds refer to the quote currency amount. For example, for the ETH-USDT trading pair, if the quoteIncrement is 0.000001, the amount of USDT for the order can be 3000.000001 but not 3000.0000001. |\n| quoteMinSize | string | The minimum order funds required to place a market order. |\n| baseMaxSize | string | The maximum order size required to place an order. |\n| quoteMaxSize | string | The maximum order funds required to place a market order. |\n| priceIncrement | string | Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001.

Specifies the min. order price as well as the price increment.This also applies to quote currency. |\n| feeCurrency | string | The currency of charged fees. |\n| priceLimitRate | string | Threshold for price protection |\n| minFunds | string | The minimum trading amounts |\n\n---\n", "body": {} }, "response": [ @@ -8445,7 +8929,7 @@ ] }, { - "name": "Get Margin Config", + "name": "Get ETF Info", "request": { "method": "GET", "header": [], @@ -8457,13 +8941,19 @@ ], "path": [ "api", - "v1", - "margin", - "config" + "v3", + "etf", + "info" ], - "query": [] + "query": [ + { + "key": "currency", + "value": "BTCUP", + "description": "ETF Currency: If empty, query all currencies\n" + } + ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470190)\n\n:::info[Description]\nRequest via this endpoint to get the configure info of the cross margin.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currencyList | array | Refer to the schema section of currencyList |\n| maxLeverage | integer | Max leverage available |\n| warningDebtRatio | string | The warning debt ratio of the forced liquidation |\n| liqDebtRatio | string | The debt ratio of the forced liquidation |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470191)\n\n:::info[Description]\nThis interface returns leveraged token information.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | ETF Currency |\n| netAsset | string | Net worth |\n| targetLeverage | string | Target leverage |\n| actualLeverage | string | Actual leverage |\n| issuedSize | string | The amount of currency issued |\n| basket | string | Basket information |\n\n---\n", "body": {} }, "response": [ @@ -8480,11 +8970,17 @@ ], "path": [ "api", - "v1", - "margin", - "config" + "v3", + "etf", + "info" ], - "query": [] + "query": [ + { + "key": "currency", + "value": "BTCUP", + "description": "ETF Currency: If empty, query all currencies\n" + } + ] } }, "status": "OK", @@ -8517,12 +9013,12 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"maxLeverage\": 5,\n \"warningDebtRatio\": \"0.95\",\n \"liqDebtRatio\": \"0.97\",\n \"currencyList\": [\n \"VRA\",\n \"APT\",\n \"IOTX\",\n \"SHIB\",\n \"KDA\",\n \"BCHSV\",\n \"NEAR\",\n \"CLV\",\n \"AUDIO\",\n \"AIOZ\",\n \"FLOW\",\n \"WLD\",\n \"COMP\",\n \"MEME\",\n \"SLP\",\n \"STX\",\n \"ZRO\",\n \"QI\",\n \"PYTH\",\n \"RUNE\",\n \"DGB\",\n \"IOST\",\n \"SUI\",\n \"BCH\",\n \"CAKE\",\n \"DOT\",\n \"OMG\",\n \"POL\",\n \"GMT\",\n \"1INCH\",\n \"RSR\",\n \"NKN\",\n \"BTC\",\n \"AR\",\n \"ARB\",\n \"TON\",\n \"LISTA\",\n \"AVAX\",\n \"SEI\",\n \"FTM\",\n \"ERN\",\n \"BB\",\n \"BTT\",\n \"JTO\",\n \"ONE\",\n \"RLC\",\n \"ANKR\",\n \"SUSHI\",\n \"CATI\",\n \"ALGO\",\n \"PEPE2\",\n \"ATOM\",\n \"LPT\",\n \"BIGTIME\",\n \"CFX\",\n \"DYM\",\n \"VELO\",\n \"XPR\",\n \"SNX\",\n \"JUP\",\n \"MANA\",\n \"API3\",\n \"PYR\",\n \"ROSE\",\n \"GLMR\",\n \"SATS\",\n \"TIA\",\n \"GALAX\",\n \"SOL\",\n \"DAO\",\n \"FET\",\n \"ETC\",\n \"MKR\",\n \"WOO\",\n \"DODO\",\n \"OGN\",\n \"BNB\",\n \"ICP\",\n \"BLUR\",\n \"ETH\",\n \"ZEC\",\n \"NEO\",\n \"CELO\",\n \"REN\",\n \"MANTA\",\n \"LRC\",\n \"STRK\",\n \"ADA\",\n \"STORJ\",\n \"REQ\",\n \"TAO\",\n \"VET\",\n \"FITFI\",\n \"USDT\",\n \"DOGE\",\n \"HBAR\",\n \"SXP\",\n \"NEIROCTO\",\n \"CHR\",\n \"ORDI\",\n \"DASH\",\n \"PEPE\",\n \"ONDO\",\n \"ILV\",\n \"WAVES\",\n \"CHZ\",\n \"DOGS\",\n \"XRP\",\n \"CTSI\",\n \"JASMY\",\n \"FLOKI\",\n \"TRX\",\n \"KAVA\",\n \"SAND\",\n \"C98\",\n \"UMA\",\n \"NOT\",\n \"IMX\",\n \"WIF\",\n \"ENA\",\n \"EGLD\",\n \"BOME\",\n \"LTC\",\n \"USDC\",\n \"METIS\",\n \"WIN\",\n \"THETA\",\n \"FXS\",\n \"ENJ\",\n \"CRO\",\n \"AEVO\",\n \"INJ\",\n \"LTO\",\n \"CRV\",\n \"GRT\",\n \"DYDX\",\n \"FLUX\",\n \"ENS\",\n \"WAX\",\n \"MASK\",\n \"POND\",\n \"UNI\",\n \"AAVE\",\n \"LINA\",\n \"TLM\",\n \"BONK\",\n \"QNT\",\n \"LDO\",\n \"ALICE\",\n \"XLM\",\n \"LINK\",\n \"CKB\",\n \"LUNC\",\n \"YFI\",\n \"ETHW\",\n \"XTZ\",\n \"LUNA\",\n \"OP\",\n \"SUPER\",\n \"EIGEN\",\n \"KSM\",\n \"ELON\",\n \"EOS\",\n \"FIL\",\n \"ZETA\",\n \"SKL\",\n \"BAT\",\n \"APE\",\n \"HMSTR\",\n \"YGG\",\n \"MOVR\",\n \"PEOPLE\",\n \"KCS\",\n \"AXS\",\n \"ARPA\",\n \"ZIL\"\n ]\n }\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"currency\": \"BTCUP\",\n \"netAsset\": \"33.846\",\n \"targetLeverage\": \"2-4\",\n \"actualLeverage\": \"2.1648\",\n \"issuedSize\": \"107134.87655291\",\n \"basket\": \"118.324559 XBTUSDTM\"\n }\n ]\n}" } ] }, { - "name": "Get ETF Info", + "name": "Get Mark Price Detail", "request": { "method": "GET", "header": [], @@ -8534,19 +9030,14 @@ ], "path": [ "api", - "v3", - "etf", - "info" + "v1", + "mark-price", + "{{symbol}}", + "current" ], - "query": [ - { - "key": "currency", - "value": "BTCUP", - "description": "ETF Currency, if empty query all currencies\n" - } - ] + "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470191)\n\n:::info[Description]\nThis interface returns leveraged token information\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | ETF Currency |\n| netAsset | string | Net worth |\n| targetLeverage | string | Target leverage |\n| actualLeverage | string | Actual leverage |\n| issuedSize | string | The amount of currency issued |\n| basket | string | Basket information |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470193)\n\n:::info[Description]\nThis endpoint returns the current Mark price for specified margin trading pairs.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | symbol |\n| timePoint | integer | Timestamp (milliseconds) |\n| value | number | Mark price |\n\n---\n", "body": {} }, "response": [ @@ -8563,17 +9054,12 @@ ], "path": [ "api", - "v3", - "etf", - "info" + "v1", + "mark-price", + "{{symbol}}", + "current" ], - "query": [ - { - "key": "currency", - "value": "BTCUP", - "description": "ETF Currency, if empty query all currencies\n" - } - ] + "query": [] } }, "status": "OK", @@ -8606,12 +9092,12 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"currency\": \"BTCUP\",\n \"netAsset\": \"33.846\",\n \"targetLeverage\": \"2-4\",\n \"actualLeverage\": \"2.1648\",\n \"issuedSize\": \"107134.87655291\",\n \"basket\": \"118.324559 XBTUSDTM\"\n }\n ]\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"USDT-BTC\",\n \"timePoint\": 1729676888000,\n \"value\": 1.5045e-05\n }\n}" } ] }, { - "name": "Get Mark Price List", + "name": "Get Margin Config", "request": { "method": "GET", "header": [], @@ -8623,13 +9109,13 @@ ], "path": [ "api", - "v3", - "mark-price", - "all-symbols" + "v1", + "margin", + "config" ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470192)\n\n:::info[Description]\nThis endpoint returns the current Mark price for all margin trading pairs.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | symbol |\n| timePoint | integer | Timestamp (milliseconds) |\n| value | number | Mark price |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470190)\n\n:::info[Description]\nRequest the configure info of the cross margin via this endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currencyList | array | Refer to the schema section of currencyList |\n| maxLeverage | integer | Max. leverage available |\n| warningDebtRatio | string | The warning debt ratio of the forced liquidation |\n| liqDebtRatio | string | The debt ratio of the forced liquidation |\n\n---\n", "body": {} }, "response": [ @@ -8646,9 +9132,9 @@ ], "path": [ "api", - "v3", - "mark-price", - "all-symbols" + "v1", + "margin", + "config" ], "query": [] } @@ -8683,12 +9169,12 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"USDT-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.504e-05\n },\n {\n \"symbol\": \"USDC-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.5049024e-05\n }\n ]\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"maxLeverage\": 5,\n \"warningDebtRatio\": \"0.95\",\n \"liqDebtRatio\": \"0.97\",\n \"currencyList\": [\n \"VRA\",\n \"APT\",\n \"IOTX\",\n \"SHIB\",\n \"KDA\",\n \"BCHSV\",\n \"NEAR\",\n \"CLV\",\n \"AUDIO\",\n \"AIOZ\",\n \"FLOW\",\n \"WLD\",\n \"COMP\",\n \"MEME\",\n \"SLP\",\n \"STX\",\n \"ZRO\",\n \"QI\",\n \"PYTH\",\n \"RUNE\",\n \"DGB\",\n \"IOST\",\n \"SUI\",\n \"BCH\",\n \"CAKE\",\n \"DOT\",\n \"OMG\",\n \"POL\",\n \"GMT\",\n \"1INCH\",\n \"RSR\",\n \"NKN\",\n \"BTC\",\n \"AR\",\n \"ARB\",\n \"TON\",\n \"LISTA\",\n \"AVAX\",\n \"SEI\",\n \"FTM\",\n \"ERN\",\n \"BB\",\n \"BTT\",\n \"JTO\",\n \"ONE\",\n \"RLC\",\n \"ANKR\",\n \"SUSHI\",\n \"CATI\",\n \"ALGO\",\n \"PEPE2\",\n \"ATOM\",\n \"LPT\",\n \"BIGTIME\",\n \"CFX\",\n \"DYM\",\n \"VELO\",\n \"XPR\",\n \"SNX\",\n \"JUP\",\n \"MANA\",\n \"API3\",\n \"PYR\",\n \"ROSE\",\n \"GLMR\",\n \"SATS\",\n \"TIA\",\n \"GALAX\",\n \"SOL\",\n \"DAO\",\n \"FET\",\n \"ETC\",\n \"MKR\",\n \"WOO\",\n \"DODO\",\n \"OGN\",\n \"BNB\",\n \"ICP\",\n \"BLUR\",\n \"ETH\",\n \"ZEC\",\n \"NEO\",\n \"CELO\",\n \"REN\",\n \"MANTA\",\n \"LRC\",\n \"STRK\",\n \"ADA\",\n \"STORJ\",\n \"REQ\",\n \"TAO\",\n \"VET\",\n \"FITFI\",\n \"USDT\",\n \"DOGE\",\n \"HBAR\",\n \"SXP\",\n \"NEIROCTO\",\n \"CHR\",\n \"ORDI\",\n \"DASH\",\n \"PEPE\",\n \"ONDO\",\n \"ILV\",\n \"WAVES\",\n \"CHZ\",\n \"DOGS\",\n \"XRP\",\n \"CTSI\",\n \"JASMY\",\n \"FLOKI\",\n \"TRX\",\n \"KAVA\",\n \"SAND\",\n \"C98\",\n \"UMA\",\n \"NOT\",\n \"IMX\",\n \"WIF\",\n \"ENA\",\n \"EGLD\",\n \"BOME\",\n \"LTC\",\n \"USDC\",\n \"METIS\",\n \"WIN\",\n \"THETA\",\n \"FXS\",\n \"ENJ\",\n \"CRO\",\n \"AEVO\",\n \"INJ\",\n \"LTO\",\n \"CRV\",\n \"GRT\",\n \"DYDX\",\n \"FLUX\",\n \"ENS\",\n \"WAX\",\n \"MASK\",\n \"POND\",\n \"UNI\",\n \"AAVE\",\n \"LINA\",\n \"TLM\",\n \"BONK\",\n \"QNT\",\n \"LDO\",\n \"ALICE\",\n \"XLM\",\n \"LINK\",\n \"CKB\",\n \"LUNC\",\n \"YFI\",\n \"ETHW\",\n \"XTZ\",\n \"LUNA\",\n \"OP\",\n \"SUPER\",\n \"EIGEN\",\n \"KSM\",\n \"ELON\",\n \"EOS\",\n \"FIL\",\n \"ZETA\",\n \"SKL\",\n \"BAT\",\n \"APE\",\n \"HMSTR\",\n \"YGG\",\n \"MOVR\",\n \"PEOPLE\",\n \"KCS\",\n \"AXS\",\n \"ARPA\",\n \"ZIL\"\n ]\n }\n}" } ] }, { - "name": "Get Mark Price Detail", + "name": "Get Mark Price List", "request": { "method": "GET", "header": [], @@ -8700,14 +9186,13 @@ ], "path": [ "api", - "v1", + "v3", "mark-price", - "{{symbol}}", - "current" + "all-symbols" ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470193)\n\n:::info[Description]\nThis endpoint returns the current Mark price for specified margin trading pairs.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | symbol |\n| timePoint | integer | Timestamp (milliseconds) |\n| value | number | Mark price |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470192)\n\n:::info[Description]\nThis endpoint returns the current Mark price for all margin trading pairs.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | symbol |\n| timePoint | integer | Timestamp (milliseconds) |\n| value | number | Mark price |\n\n---\n", "body": {} }, "response": [ @@ -8724,10 +9209,9 @@ ], "path": [ "api", - "v1", + "v3", "mark-price", - "{{symbol}}", - "current" + "all-symbols" ], "query": [] } @@ -8762,7 +9246,7 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"USDT-BTC\",\n \"timePoint\": 1729676888000,\n \"value\": 1.5045e-05\n }\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"USDT-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.504e-05\n },\n {\n \"symbol\": \"USDC-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.5049024e-05\n }\n ]\n}" } ] }, @@ -8785,7 +9269,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470194)\n\n:::info[Description]\nThis endpoint allows querying the configuration of isolated margin symbol.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | symbol |\n| symbolName | string | symbol name |\n| baseCurrency | string | Base currency,e.g. BTC. |\n| quoteCurrency | string | Quote currency,e.g. USDT. |\n| maxLeverage | integer | Max leverage of this symbol |\n| flDebtRatio | string | |\n| tradeEnable | boolean | |\n| autoRenewMaxDebtRatio | string | |\n| baseBorrowEnable | boolean | |\n| quoteBorrowEnable | boolean | |\n| baseTransferInEnable | boolean | |\n| quoteTransferInEnable | boolean | |\n| baseBorrowCoefficient | string | |\n| quoteBorrowCoefficient | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470194)\n\n:::info[Description]\nThis endpoint allows querying the configuration of isolated margin symbol.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | symbol |\n| symbolName | string | Symbol name |\n| baseCurrency | string | Base currency, e.g. BTC. |\n| quoteCurrency | string | Quote currency, e.g. USDT. |\n| maxLeverage | integer | Max. leverage of this symbol |\n| flDebtRatio | string | |\n| tradeEnable | boolean | |\n| autoRenewMaxDebtRatio | string | |\n| baseBorrowEnable | boolean | |\n| quoteBorrowEnable | boolean | |\n| baseTransferInEnable | boolean | |\n| quoteTransferInEnable | boolean | |\n| baseBorrowCoefficient | string | |\n| quoteBorrowCoefficient | string | |\n\n---\n", "body": {} }, "response": [ @@ -8869,7 +9353,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470204)\n\n:::info[Description]\nPlace order to the Cross-margin or Isolated-margin 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.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | Yes | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| side | String | Yes | `buy` or `sell` |\n| type | String | No | Order type `limit` and `market`, defult is limit |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| isIsolated | boolean | No | true - isolated margin ,false - cross margin. defult as false |\n| autoBorrow | boolean | No | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | No | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | symbol |\n| type | string | specify if the order is an 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order

When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/api-5176570) is a special strategy used during trading |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| cancelAfter | integer | Cancel after n seconds,the order timing strategy is GTT |\n| funds | string | When **type** is market, select one out of two: size or funds |\n| isIsolated | boolean | true - isolated margin ,false - cross margin. defult as false |\n| autoBorrow | boolean | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| loanApplyId | string | Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| borrowSize | string | Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470204)\n\n:::info[Description]\nPlace order in the Cross-margin or Isolated-margin 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.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | Yes | Client Order ID, unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| side | String | Yes | ‘buy’ or ‘sell’ |\n| type | String | No | Order type ‘limit’ and ‘market’, default is limit |\n| stp | String | No | self trade prevention is divided into four strategies: ‘CN’, ‘CO’, ‘CB’, and ‘DC’ |\n| isIsolated | boolean | No | true - isolated margin, false - cross margin. Default is false |\n| autoBorrow | boolean | No | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | No | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n**Additional Request Parameters Required by ‘limit’ Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy ‘GTC’, ‘GTT’, ‘IOC’, ‘FOK’ (the default is ‘GTC’) |\n| cancelAfter | long | No | Cancel after ‘n’ seconds, the order timing strategy is ‘GTT’ |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is ‘IOC’ or ‘FOK’ |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by ‘market’ orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n| funds | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or canceled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled (already canceled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly canceled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: If the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: This feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | Specify if the order is to 'buy' or 'sell'. |\n| symbol | string | symbol |\n| type | string | Specify if the order is a 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order.

When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/api-5176570) is a special strategy used during trading |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| cancelAfter | integer | Cancel after n seconds, the order timing strategy is GTT |\n| funds | string | When **type** is market, select one out of two: size or funds |\n| isIsolated | boolean | True - isolated margin; false - cross margin. Default is false |\n| autoBorrow | boolean | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. |\n| loanApplyId | string | Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| borrowSize | string | Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| clientOid | string | The user self-defined order ID. |\n\n---\n", "body": { "mode": "raw", "raw": "//limit order\n{\n \"type\": \"limit\",\n \"symbol\": \"BTC-USDT\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"remark\": \"order remarks\"\n}\n\n//market order 1\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"size\": \"0.00001\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n\n//market order 2\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"funds\": \"1\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n", @@ -8957,7 +9441,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470205)\n\n:::info[Description]\nOrder test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | Yes | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| side | String | Yes | `buy` or `sell` |\n| type | String | No | Order type `limit` and `market`, defult is limit |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| isIsolated | boolean | No | true - isolated margin ,false - cross margin. defult as false |\n| autoBorrow | boolean | No | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | No | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | symbol |\n| type | string | specify if the order is an 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order

When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/api-5176570) is a special strategy used during trading |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| cancelAfter | integer | Cancel after n seconds,the order timing strategy is GTT |\n| funds | string | When **type** is market, select one out of two: size or funds |\n| isIsolated | boolean | true - isolated margin ,false - cross margin. defult as false |\n| autoBorrow | boolean | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| loanApplyId | string | Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| borrowSize | number | ID of the borrowing response. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470205)\n\n:::info[Description]\nOrder test endpoint: This endpoint’s request and return parameters are identical to the order endpoint, and can be used to verify whether the signature is correct, among other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | Yes | Client Order ID, unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| side | String | Yes | ‘buy’ or ‘sell’ |\n| type | String | No | Order type ‘limit’ and ‘market’, default is limit |\n| stp | String | No | self trade prevention is divided into four strategies: ‘CN’, ‘CO’, ‘CB’, and ‘DC’ |\n| isIsolated | boolean | No | true - isolated margin, false - cross margin. Default is false |\n| autoBorrow | boolean | No | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | No | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n**Additional Request Parameters Required by ‘limit’ Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy ‘GTC’, ‘GTT’, ‘IOC’, ‘FOK’ (the default is ‘GTC’) |\n| cancelAfter | long | No | Cancel after ‘n’ seconds, the order timing strategy is ‘GTT’ |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is ‘IOC’ or ‘FOK’ |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by ‘market’ orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n| funds | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or canceled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled (already canceled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly canceled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: If the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: This feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.

Please remember the orderId created by the service provider, it used to check for updates in order status. |\n| side | string | Specify if the order is to 'buy' or 'sell'. |\n| symbol | string | symbol |\n| type | string | Specify if the order is a 'limit' order or 'market' order.

The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.

When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.

Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC |\n| price | string | Specify price for order

When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. |\n| size | string | Specify quantity for order.

When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.

When **type** is market, select one out of two: size or funds |\n| timeInForce | string | [Time in force](https://www.kucoin.com/docs-new/api-5176570) is a special strategy used during trading |\n| postOnly | boolean | passive order labels, this is disabled when the order timing strategy is IOC or FOK |\n| hidden | boolean | [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) |\n| iceberg | boolean | Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) |\n| visibleSize | string | Maximum visible quantity in iceberg orders |\n| cancelAfter | integer | Cancel after n seconds, the order timing strategy is GTT |\n| funds | string | When **type** is market, select one out of two: size or funds |\n| isIsolated | boolean | True - isolated margin; false - cross margin. Default is false |\n| autoBorrow | boolean | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. |\n| loanApplyId | string | Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| borrowSize | number | ID of the borrowing response. The field is returned only after placing the order under the mode of Auto-Borrow. |\n| clientOid | string | The user self-defined order ID. |\n\n---\n", "body": { "mode": "raw", "raw": "//limit order\n{\n \"type\": \"limit\",\n \"symbol\": \"BTC-USDT\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"remark\": \"order remarks\"\n}\n\n//market order 1\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"size\": \"0.00001\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n\n//market order 2\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"funds\": \"1\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n", @@ -9052,7 +9536,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470195)\n\n:::info[Description]\nThis endpoint can be used to cancel a margin order by orderId.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | order id |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470195)\n\n:::info[Description]\nThis endpoint can be used to cancel a margin order by orderId.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | Order id |\n\n---\n", "body": {} }, "response": [ @@ -9146,7 +9630,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470201)\n\n:::info[Description]\nThis endpoint can be used to cancel a margin order by clientOid.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id,unique identifier created by the user |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470201)\n\n:::info[Description]\nThis endpoint can be used to cancel a margin order by clientOid.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | Client Order Id, unique identifier created by the user |\n\n---\n", "body": {} }, "response": [ @@ -9244,7 +9728,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470197)\n\n:::info[Description]\nThis interface can cancel all open Margin orders by symbol\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470197)\n\n:::info[Description]\nThis interface can cancel all open Margin orders by symbol.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | string | |\n\n---\n", "body": {} }, "response": [ @@ -9342,7 +9826,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470196)\n\n:::info[Description]\nThis interface can query all Margin symbol that has active orders\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbolSize | integer | Symbol Size |\n| symbols | array | Refer to the schema section of symbols |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470196)\n\n:::info[Description]\nThis interface can query all Margin symbols that have active orders.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbolSize | integer | Symbol Size |\n| symbols | array | Refer to the schema section of symbols |\n\n---\n", "body": {} }, "response": [ @@ -9441,7 +9925,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470198)\n\n:::info[Description]\nThis interface is to obtain all Margin active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order.\n\nAfter the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nFor high-frequency trading users, we recommend locally caching, maintaining your own order records, and using market data streams to update your order information in real time.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | The unique order id generated by the trading system |\n| symbol | string | symbol |\n| opType | string | |\n| type | string | Specify if the order is an 'limit' order or 'market' order. |\n| side | string | Buy or sell |\n| price | string | Order price |\n| size | string | Order size |\n| funds | string | Order Funds |\n| dealSize | string | Number of filled transactions |\n| dealFunds | string | Funds of filled transactions |\n| fee | string | trading fee |\n| feeCurrency | string | currency used to calculate trading fee |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | Time in force |\n| postOnly | boolean | Whether its a postOnly order. |\n| hidden | boolean | Whether its a hidden order. |\n| iceberg | boolean | Whether its a iceberg order. |\n| visibleSize | string | Visible size of iceberg order in order book. |\n| cancelAfter | integer | A GTT timeInForce that expires in n seconds |\n| channel | string | |\n| clientOid | string | Client Order Id,unique identifier created by the user |\n| remark | string | Order placement remarks |\n| tags | string | Order tag |\n| cancelExist | boolean | Whether there is a cancellation record for the order. |\n| createdAt | integer | |\n| lastUpdatedAt | integer | |\n| tradeType | string | Trade type, redundancy param |\n| inOrderBook | boolean | Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook |\n| cancelledSize | string | Number of canceled transactions |\n| cancelledFunds | string | Funds of canceled transactions |\n| remainSize | string | Number of remain transactions |\n| remainFunds | string | Funds of remain transactions |\n| tax | string | Users in some regions need query this field |\n| active | boolean | Order status: true-The status of the order isactive; false-The status of the order is done |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470198)\n\n:::info[Description]\nThis interface is to obtain all Margin active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order.\n\nAfter the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nFor high-frequency trading users, we recommend caching locally, maintaining your own order records, and using market data streams to update your order information in real time.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | The unique order id generated by the trading system |\n| symbol | string | symbol |\n| opType | string | |\n| type | string | Specify if the order is a 'limit' order or 'market' order. |\n| side | string | Buy or sell |\n| price | string | Order Price |\n| size | string | Order Size |\n| funds | string | Order Funds |\n| dealSize | string | Number of filled transactions |\n| dealFunds | string | Funds of filled transactions |\n| fee | string | Trading fee |\n| feeCurrency | string | Currency used to calculate trading fee |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | Time in force |\n| postOnly | boolean | Whether it’s a postOnly order. |\n| hidden | boolean | Whether it’s a hidden order. |\n| iceberg | boolean | Whether it’s a iceberg order. |\n| visibleSize | string | Visible size of iceberg order in order book. |\n| cancelAfter | integer | A GTT timeInForce that expires in n seconds |\n| channel | string | |\n| clientOid | string | Client Order Id, unique identifier created by the user |\n| remark | string | Order placement remarks |\n| tags | string | Order tag |\n| cancelExist | boolean | Whether there is a cancellation record for the order. |\n| createdAt | integer | |\n| lastUpdatedAt | integer | |\n| tradeType | string | Trade type, redundancy param |\n| inOrderBook | boolean | Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook |\n| cancelledSize | string | Number of canceled transactions |\n| cancelledFunds | string | Funds of canceled transactions |\n| remainSize | string | Number of remain transactions |\n| remainFunds | string | Funds of remain transactions |\n| tax | string | Users in some regions have this field |\n| active | boolean | Order status: true-The status of the order is active; false-The status of the order is done |\n\n---\n", "body": {} }, "response": [ @@ -9545,36 +10029,36 @@ { "key": "side", "value": null, - "description": "specify if the order is to 'buy' or 'sell'" + "description": "Specify if the order is to 'buy' or 'sell'." }, { "key": "type", "value": null, - "description": "specify if the order is an 'limit' order or 'market' order. " + "description": "Specify if the order is a 'limit' order or 'market' order. " }, { "key": "lastId", "value": "254062248624417", - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page." + "description": "The ID of the last set of data from the previous data batch. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page." }, { "key": "limit", "value": "20", - "description": "Default20,Max100" + "description": "Default20, Max100" }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470199)\n\n:::info[Description]\nThis interface is to obtain all Margin Closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order.\n\nAfter the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 _ 24 hours (ie: from the current time to 3 _ 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| lastId | integer | The id of the last set of data from the previous batch of data. By default, the latest information is given.
lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | The unique order id generated by the trading system |\n| symbol | string | symbol |\n| opType | string | |\n| type | string | Specify if the order is an 'limit' order or 'market' order. |\n| side | string | Buy or sell |\n| price | string | Order price |\n| size | string | Order size |\n| funds | string | Order Funds |\n| dealSize | string | Number of filled transactions |\n| dealFunds | string | Funds of filled transactions |\n| fee | string | [Handling fees](https://www.kucoin.com/docs-new/api-5327739) |\n| feeCurrency | string | currency used to calculate trading fee |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | Time in force |\n| postOnly | boolean | Whether its a postOnly order. |\n| hidden | boolean | Whether its a hidden order. |\n| iceberg | boolean | Whether its a iceberg order. |\n| visibleSize | string | Visible size of iceberg order in order book. |\n| cancelAfter | integer | A GTT timeInForce that expires in n seconds |\n| channel | string | |\n| clientOid | string | Client Order Id,unique identifier created by the user |\n| remark | string | Order placement remarks |\n| tags | string | Order tag |\n| cancelExist | boolean | Whether there is a cancellation record for the order. |\n| createdAt | integer | |\n| lastUpdatedAt | integer | |\n| tradeType | string | Trade type, redundancy param |\n| inOrderBook | boolean | Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook |\n| cancelledSize | string | Number of canceled transactions |\n| cancelledFunds | string | Funds of canceled transactions |\n| remainSize | string | Number of remain transactions |\n| remainFunds | string | Funds of remain transactions |\n| tax | string | Users in some regions need query this field |\n| active | boolean | Order status: true-The status of the order isactive; false-The status of the order is done |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470199)\n\n:::info[Description]\nThis interface is to obtain all Margin Closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order.\n\nAfter the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 * 24 hours (i.e.: from the current time to 3 * 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| lastId | integer | The ID of the last set of data from the previous data batch. By default, the latest information is given.
lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | The unique order id generated by the trading system |\n| symbol | string | symbol |\n| opType | string | |\n| type | string | Specify if the order is a 'limit' order or 'market' order. |\n| side | string | Buy or sell |\n| price | string | Order Price |\n| size | string | Order Size |\n| funds | string | Order Funds |\n| dealSize | string | Number of filled transactions |\n| dealFunds | string | Funds of filled transactions |\n| fee | string | [Handling fees](https://www.kucoin.com/docs-new/api-5327739) |\n| feeCurrency | string | Currency used to calculate trading fee |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | Time in force |\n| postOnly | boolean | Whether it’s a postOnly order. |\n| hidden | boolean | Whether it’s a hidden order. |\n| iceberg | boolean | Whether it’s a iceberg order. |\n| visibleSize | string | Visible size of iceberg order in order book. |\n| cancelAfter | integer | A GTT timeInForce that expires in n seconds |\n| channel | string | |\n| clientOid | string | Client Order Id, unique identifier created by the user |\n| remark | string | Order placement remarks |\n| tags | string | Order tag |\n| cancelExist | boolean | Whether there is a cancellation record for the order. |\n| createdAt | integer | |\n| lastUpdatedAt | integer | |\n| tradeType | string | Trade type, redundancy param |\n| inOrderBook | boolean | Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook |\n| cancelledSize | string | Number of canceled transactions |\n| cancelledFunds | string | Funds of canceled transactions |\n| remainSize | string | Number of remain transactions |\n| remainFunds | string | Funds of remain transactions |\n| tax | string | Users in some regions have this field |\n| active | boolean | Order status: true-The status of the order is active; false-The status of the order is done |\n\n---\n", "body": {} }, "response": [ @@ -9611,32 +10095,32 @@ { "key": "side", "value": null, - "description": "specify if the order is to 'buy' or 'sell'" + "description": "Specify if the order is to 'buy' or 'sell'." }, { "key": "type", "value": null, - "description": "specify if the order is an 'limit' order or 'market' order. " + "description": "Specify if the order is a 'limit' order or 'market' order. " }, { "key": "lastId", "value": "254062248624417", - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page." + "description": "The ID of the last set of data from the previous data batch. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page." }, { "key": "limit", "value": "20", - "description": "Default20,Max100" + "description": "Default20, Max100" }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" } ] } @@ -9707,41 +10191,41 @@ { "key": "orderId", "value": null, - "description": "The unique order id generated by the trading system\n(If orderId is specified,please ignore the other query parameters)" + "description": "The unique order id generated by the trading system\n(If orderId is specified, please ignore the other query parameters)" }, { "key": "side", "value": null, - "description": "specify if the order is to 'buy' or 'sell'" + "description": "Specify if the order is to 'buy' or 'sell'." }, { "key": "type", "value": null, - "description": "specify if the order is an 'limit' order or 'market' order. " + "description": "Specify if the order is a 'limit' order or 'market' order. " }, { "key": "lastId", "value": "254062248624417", - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page." + "description": "The ID of the last set of data from the previous data batch. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page." }, { "key": "limit", "value": "100", - "description": "Default100,Max200" + "description": "Default20, Max100" }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470200)\n\n:::info[Description]\nThis endpoint can be used to obtain a list of the latest Margin transaction details. \nThe returned data is sorted in descending order according to the latest update time of the order.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 _ 24 hours (ie: from the current time to 3 _ 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| items | array | Refer to the schema section of items |\n| lastId | integer | The id of the last set of data from the previous batch of data. By default, the latest information is given.
lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | integer | Id of transaction detail |\n| symbol | string | symbol |\n| tradeId | integer | Trade Id, symbol latitude increment |\n| orderId | string | The unique order id generated by the trading system |\n| counterOrderId | string | Counterparty order Id |\n| side | string | Buy or sell |\n| liquidity | string | Liquidity type: taker or maker |\n| forceTaker | boolean | |\n| price | string | Order price |\n| size | string | Order size |\n| funds | string | Order Funds |\n| fee | string | [Handling fees](https://www.kucoin.com/docs-new/api-5327739) |\n| feeRate | string | Fee rate
|\n| feeCurrency | string | currency used to calculate trading fee |\n| stop | string | Take Profit and Stop Loss type, currently HFT does not support the Take Profit and Stop Loss type, so it is empty |\n| tradeType | string | Trade type, redundancy param |\n| tax | string | Users in some regions need query this field |\n| taxRate | string | Tax Rate, Users in some regions need query this field |\n| type | string | Specify if the order is an 'limit' order or 'market' order. |\n| createdAt | integer | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470200)\n\n:::info[Description]\nThis endpoint can be used to obtain a list of the latest Margin transaction details. \nThe returned data is sorted in descending order according to the latest update time of the order.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 * 24 hours (i.e.: from the current time to 3 * 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| items | array | Refer to the schema section of items |\n| lastId | integer | The ID of the last set of data from the previous data batch. By default, the latest information is given.
lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | integer | ID of transaction detail |\n| symbol | string | symbol |\n| tradeId | integer | Trade ID, symbol latitude increment |\n| orderId | string | The unique order id generated by the trading system |\n| counterOrderId | string | Counterparty order ID |\n| side | string | Buy or sell |\n| liquidity | string | Liquidity type: taker or maker |\n| forceTaker | boolean | |\n| price | string | Order Price |\n| size | string | Order Size |\n| funds | string | Order Funds |\n| fee | string | [Handling fees](https://www.kucoin.com/docs-new/api-5327739) |\n| feeRate | string | Fee rate
|\n| feeCurrency | string | Currency used to calculate trading fee |\n| stop | string | Take Profit and Stop Loss type, currently HFT does not support the Take Profit and Stop Loss type, so it is empty |\n| tradeType | string | Trade type, redundancy param |\n| tax | string | Users in some regions have this field |\n| taxRate | string | Tax Rate: Users in some regions must query this field |\n| type | string | Specify if the order is a 'limit' order or 'market' order. |\n| createdAt | integer | |\n\n---\n", "body": {} }, "response": [ @@ -9777,37 +10261,37 @@ { "key": "orderId", "value": null, - "description": "The unique order id generated by the trading system\n(If orderId is specified,please ignore the other query parameters)" + "description": "The unique order id generated by the trading system\n(If orderId is specified, please ignore the other query parameters)" }, { "key": "side", "value": null, - "description": "specify if the order is to 'buy' or 'sell'" + "description": "Specify if the order is to 'buy' or 'sell'." }, { "key": "type", "value": null, - "description": "specify if the order is an 'limit' order or 'market' order. " + "description": "Specify if the order is a 'limit' order or 'market' order. " }, { "key": "lastId", "value": "254062248624417", - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page." + "description": "The ID of the last set of data from the previous data batch. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page." }, { "key": "limit", "value": "100", - "description": "Default100,Max200" + "description": "Default20, Max100" }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" } ] } @@ -9873,7 +10357,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470202)\n\n:::info[Description]\nThis endpoint can be used to obtain information for a single Margin order using the order id.\n\nAfter the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 _ 24 hours (ie: from the current time to 3 _ 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | The unique order id generated by the trading system |\n| symbol | string | symbol |\n| opType | string | |\n| type | string | Specify if the order is an 'limit' order or 'market' order. |\n| side | string | Buy or sell |\n| price | string | Order price |\n| size | string | Order size |\n| funds | string | Order Funds |\n| dealSize | string | Number of filled transactions |\n| dealFunds | string | Funds of filled transactions |\n| fee | string | [Handling fees](https://www.kucoin.com/docs-new/api-5327739) |\n| feeCurrency | string | currency used to calculate trading fee |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | Time in force |\n| postOnly | boolean | Whether its a postOnly order. |\n| hidden | boolean | Whether its a hidden order. |\n| iceberg | boolean | Whether its a iceberg order. |\n| visibleSize | string | Visible size of iceberg order in order book. |\n| cancelAfter | integer | A GTT timeInForce that expires in n seconds |\n| channel | string | |\n| clientOid | string | Client Order Id,unique identifier created by the user |\n| remark | string | Order placement remarks |\n| tags | string | Order tag |\n| cancelExist | boolean | Whether there is a cancellation record for the order. |\n| createdAt | integer | |\n| lastUpdatedAt | integer | |\n| tradeType | string | Trade type, redundancy param |\n| inOrderBook | boolean | Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook |\n| cancelledSize | string | Number of canceled transactions |\n| cancelledFunds | string | Funds of canceled transactions |\n| remainSize | string | Number of remain transactions |\n| remainFunds | string | Funds of remain transactions |\n| tax | string | Users in some regions need query this field |\n| active | boolean | Order status: true-The status of the order isactive; false-The status of the order is done |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470202)\n\n:::info[Description]\nThis endpoint can be used to obtain information for a single Margin order using the order ID.\n\nAfter the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 * 24 hours (i.e.: from the current time to 3 * 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | The unique order id generated by the trading system |\n| symbol | string | symbol |\n| opType | string | |\n| type | string | Specify if the order is a 'limit' order or 'market' order. |\n| side | string | Buy or sell |\n| price | string | Order Price |\n| size | string | Order Size |\n| funds | string | Order Funds |\n| dealSize | string | Number of filled transactions |\n| dealFunds | string | Funds of filled transactions |\n| fee | string | [Handling fees](https://www.kucoin.com/docs-new/api-5327739) |\n| feeCurrency | string | Currency used to calculate trading fee |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | Time in force |\n| postOnly | boolean | Whether it’s a postOnly order. |\n| hidden | boolean | Whether it’s a hidden order. |\n| iceberg | boolean | Whether it’s a iceberg order. |\n| visibleSize | string | Visible size of iceberg order in order book. |\n| cancelAfter | integer | A GTT timeInForce that expires in n seconds |\n| channel | string | |\n| clientOid | string | Client Order Id, unique identifier created by the user |\n| remark | string | Order placement remarks |\n| tags | string | Order tag |\n| cancelExist | boolean | Whether there is a cancellation record for the order. |\n| createdAt | integer | |\n| lastUpdatedAt | integer | |\n| tradeType | string | Trade type, redundancy param |\n| inOrderBook | boolean | Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook |\n| cancelledSize | string | Number of canceled transactions |\n| cancelledFunds | string | Funds of canceled transactions |\n| remainSize | string | Number of remain transactions |\n| remainFunds | string | Funds of remain transactions |\n| tax | string | Users in some regions have this field |\n| active | boolean | Order status: true-The status of the order is active; false-The status of the order is done |\n\n---\n", "body": {} }, "response": [ @@ -9967,7 +10451,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470203)\n\n:::info[Description]\nThis endpoint can be used to obtain information for a single Margin order using the client order id.\n\nAfter the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 _ 24 hours (ie: from the current time to 3 _ 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | The unique order id generated by the trading system |\n| symbol | string | symbol |\n| opType | string | |\n| type | string | Specify if the order is an 'limit' order or 'market' order. |\n| side | string | Buy or sell |\n| price | string | Order price |\n| size | string | Order size |\n| funds | string | Order Funds |\n| dealSize | string | Number of filled transactions |\n| dealFunds | string | Funds of filled transactions |\n| fee | string | [Handling fees](https://www.kucoin.com/docs-new/api-5327739) |\n| feeCurrency | string | currency used to calculate trading fee |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | Time in force |\n| postOnly | boolean | Whether its a postOnly order. |\n| hidden | boolean | Whether its a hidden order. |\n| iceberg | boolean | Whether its a iceberg order. |\n| visibleSize | string | Visible size of iceberg order in order book. |\n| cancelAfter | integer | A GTT timeInForce that expires in n seconds |\n| channel | string | |\n| clientOid | string | Client Order Id,unique identifier created by the user |\n| remark | string | Order placement remarks |\n| tags | string | Order tag |\n| cancelExist | boolean | Whether there is a cancellation record for the order. |\n| createdAt | integer | |\n| lastUpdatedAt | integer | |\n| tradeType | string | Trade type, redundancy param |\n| inOrderBook | boolean | Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook |\n| cancelledSize | string | Number of canceled transactions |\n| cancelledFunds | string | Funds of canceled transactions |\n| remainSize | string | Number of remain transactions |\n| remainFunds | string | Funds of remain transactions |\n| tax | string | Users in some regions need query this field |\n| active | boolean | Order status: true-The status of the order isactive; false-The status of the order is done |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470203)\n\n:::info[Description]\nThis endpoint can be used to obtain information for a single Margin order using the client order ID.\n\nAfter the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 * 24 hours (i.e.: from the current time to 3 * 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | The unique order id generated by the trading system |\n| symbol | string | symbol |\n| opType | string | |\n| type | string | Specify if the order is a 'limit' order or 'market' order. |\n| side | string | Buy or sell |\n| price | string | Order Price |\n| size | string | Order Size |\n| funds | string | Order Funds |\n| dealSize | string | Number of filled transactions |\n| dealFunds | string | Funds of filled transactions |\n| fee | string | [Handling fees](https://www.kucoin.com/docs-new/api-5327739) |\n| feeCurrency | string | Currency used to calculate trading fee |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC |\n| stop | string | |\n| stopTriggered | boolean | |\n| stopPrice | string | |\n| timeInForce | string | Time in force |\n| postOnly | boolean | Whether it’s a postOnly order. |\n| hidden | boolean | Whether it’s a hidden order. |\n| iceberg | boolean | Whether it’s a iceberg order. |\n| visibleSize | string | Visible size of iceberg order in order book. |\n| cancelAfter | integer | A GTT timeInForce that expires in n seconds |\n| channel | string | |\n| clientOid | string | Client Order Id, unique identifier created by the user |\n| remark | string | Order placement remarks |\n| tags | string | Order tag |\n| cancelExist | boolean | Whether there is a cancellation record for the order. |\n| createdAt | integer | |\n| lastUpdatedAt | integer | |\n| tradeType | string | Trade type, redundancy param |\n| inOrderBook | boolean | Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook |\n| cancelledSize | string | Number of canceled transactions |\n| cancelledFunds | string | Funds of canceled transactions |\n| remainSize | string | Number of remain transactions |\n| remainFunds | string | Funds of remain transactions |\n| tax | string | Users in some regions have this field |\n| active | boolean | Order status: true-The status of the order is active; false-The status of the order is done |\n\n---\n", "body": {} }, "response": [ @@ -10059,7 +10543,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470206)\n\n:::info[Description]\nThis API endpoint is used to initiate an application for cross or isolated margin borrowing.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| size | number | Borrow amount |\n| timeInForce | string | timeInForce: IOC, FOK |\n| symbol | string | symbol, mandatory for isolated margin account |\n| isIsolated | boolean | true-isolated, false-cross; default is false |\n| isHf | boolean | true: high frequency borrowing, false: low frequency borrowing; default false |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderNo | string | Borrow Order Id |\n| actualSize | string | Actual borrowed amount |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470206)\n\n:::info[Description]\nThis API endpoint is used to initiate an application for cross or isolated margin borrowing.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| size | number | Borrow amount |\n| timeInForce | string | timeInForce: IOC, FOK |\n| symbol | string | symbol, mandatory for isolated margin account |\n| isIsolated | boolean | true-isolated, false-cross; default is false |\n| isHf | boolean | true: high frequency borrowing, false: low frequency borrowing; default false |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderNo | string | Borrow Order ID |\n| actualSize | string | Actual borrowed amount |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"currency\": \"USDT\",\n \"size\": 10,\n \"timeInForce\": \"FOK\",\n \"isIsolated\": false,\n \"isHf\": false\n}", @@ -10161,7 +10645,7 @@ { "key": "orderNo", "value": null, - "description": "Borrow Order Id" + "description": "Borrow Order ID" }, { "key": "startTime", @@ -10185,7 +10669,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470207)\n\n:::info[Description]\nThis API endpoint is used to get the borrowing orders for cross and isolated margin accounts\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timestamp | integer | |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total page |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderNo | string | Borrow Order Id |\n| symbol | string | Isolated Margin symbol; empty for cross margin |\n| currency | string | currency |\n| size | string | Initiated borrow amount |\n| actualSize | string | Actual borrow amount |\n| status | string | PENDING: Processing, SUCCESS: Successful, FAILED: Failed |\n| createdTime | integer | borrow time |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470207)\n\n:::info[Description]\nThis API endpoint is used to get the borrowing orders for cross and isolated margin accounts.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timestamp | integer | |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total pages |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderNo | string | Borrow Order ID |\n| symbol | string | Isolated Margin symbol; empty for cross margin |\n| currency | string | currency |\n| size | string | Initiated borrow amount |\n| actualSize | string | Actual borrow amount |\n| status | string | PENDING: Processing, SUCCESS: Successful, FAILED: Failed |\n| createdTime | integer | Borrow time |\n\n---\n", "body": {} }, "response": [ @@ -10225,7 +10709,7 @@ { "key": "orderNo", "value": null, - "description": "Borrow Order Id" + "description": "Borrow Order ID" }, { "key": "startTime", @@ -10303,7 +10787,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470210)\n\n:::info[Description]\nThis API endpoint is used to initiate an application for cross or isolated margin repayment.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| size | number | Borrow amount |\n| symbol | string | symbol, mandatory for isolated margin account |\n| isIsolated | boolean | true-isolated, false-cross; default is false |\n| isHf | boolean | true: high frequency borrowing, false: low frequency borrowing; default false |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timestamp | integer | |\n| orderNo | string | Repay Order Id |\n| actualSize | string | Actual repay amount |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470210)\n\n:::info[Description]\nThis API endpoint is used to initiate an application for cross or isolated margin repayment.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| size | number | Borrow amount |\n| symbol | string | symbol, mandatory for isolated margin account |\n| isIsolated | boolean | true-isolated, false-cross; default is false |\n| isHf | boolean | true: high frequency borrowing, false: low frequency borrowing; default false |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timestamp | integer | |\n| orderNo | string | Repay order ID |\n| actualSize | string | Actual repay amount |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"currency\": \"USDT\",\n \"size\": 10\n}", @@ -10405,7 +10889,7 @@ { "key": "orderNo", "value": null, - "description": "Repay Order Id" + "description": "Repay order ID" }, { "key": "startTime", @@ -10429,7 +10913,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470208)\n\n:::info[Description]\nThis API endpoint is used to get the repayment orders for cross and isolated margin accounts\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timestamp | integer | |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total page |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderNo | string | Repay Order Id |\n| symbol | string | Isolated Margin symbol; empty for cross margin |\n| currency | string | currency |\n| size | string | Amount of initiated repay |\n| principal | string | Amount of principal paid |\n| interest | string | Amount of interest paid |\n| status | string | PENDING: Processing, SUCCESS: Successful, FAILED: Failed |\n| createdTime | integer | Repayment time |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470208)\n\n:::info[Description]\nThis API endpoint is used to get the repayment orders for cross and isolated margin accounts.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timestamp | integer | |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total pages |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderNo | string | Repay order ID |\n| symbol | string | Isolated Margin symbol; empty for cross margin |\n| currency | string | currency |\n| size | string | Amount of initiated repay |\n| principal | string | Amount of principal paid |\n| interest | string | Amount of interest paid |\n| status | string | PENDING: Processing, SUCCESS: Successful, FAILED: Failed |\n| createdTime | integer | Repayment time |\n\n---\n", "body": {} }, "response": [ @@ -10469,7 +10953,7 @@ { "key": "orderNo", "value": null, - "description": "Repay Order Id" + "description": "Repay order ID" }, { "key": "startTime", @@ -10529,7 +11013,7 @@ ] }, { - "name": "Get Interest History", + "name": "Get Interest History.", "request": { "method": "GET", "header": [], @@ -10583,7 +11067,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470209)\n\n:::info[Description]\nRequest via this endpoint to get the interest records of the cross/isolated margin lending.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timestamp | integer | |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total page |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| dayRatio | string | Daily interest rate |\n| interestAmount | string | Interest amount |\n| createdTime | integer | Interest Timestamp |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470209)\n\n:::info[Description]\nRequest the interest records of the cross/isolated margin lending via this endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timestamp | integer | |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalNum | integer | total number |\n| totalPage | integer | total pages |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| dayRatio | string | Daily interest rate |\n| interestAmount | string | Interest amount |\n| createdTime | integer | Interest Timestamp |\n\n---\n", "body": {} }, "response": [ @@ -10793,7 +11277,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470212)\n\n:::info[Description]\nThis API endpoint is used to get the information about the currencies available for lending.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| purchaseEnable | boolean | Whether purchase is supported. |\n| redeemEnable | boolean | Whether redeem is supported. |\n| increment | string | Increment precision for purchase and redemption |\n| minPurchaseSize | string | Minimum purchase amount |\n| minInterestRate | string | Minimum lending rate |\n| maxInterestRate | string | Maximum lending rate |\n| interestIncrement | string | Increment precision for interest; default is 0.0001 |\n| maxPurchaseSize | string | Maximum purchase amount |\n| marketInterestRate | string | Latest market lending rate |\n| autoPurchaseEnable | boolean | Whether to allow automatic purchase: true: on, false: off |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470212)\n\n:::info[Description]\nThis API endpoint is used to get the information about the currencies available for lending.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| purchaseEnable | boolean | Whether purchase is supported. |\n| redeemEnable | boolean | Whether redeem is supported. |\n| increment | string | Increment precision for purchase and redemption |\n| minPurchaseSize | string | Minimum purchase amount |\n| minInterestRate | string | Minimum lending rate |\n| maxInterestRate | string | Maximum lending rate |\n| interestIncrement | string | Increment precision for interest; default is 0.0001 |\n| maxPurchaseSize | string | Maximum purchase amount |\n| marketInterestRate | string | Latest market lending rate |\n| autoPurchaseEnable | boolean | Whether to allow automatic purchase: True: on; false: off |\n\n---\n", "body": {} }, "response": [ @@ -10964,7 +11448,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470216)\n\n:::info[Description]\nInvest credit in the market and earn interest,Please ensure that the funds are in the main(funding) account\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| size | string | purchase amount |\n| interestRate | string | purchase interest rate |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderNo | string | Purchase order id |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470216)\n\n:::info[Description]\nInvest credit in the market and earn interest. Please ensure that the funds are in the main (funding) account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| size | string | Purchase amount |\n| interestRate | string | Purchase interest rate |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderNo | string | Purchase order ID |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"currency\": \"BTC\",\n \"size\": \"0.001\",\n \"interestRate\": \"0.1\"\n}", @@ -11049,7 +11533,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470217)\n\n:::info[Description]\nThis API endpoint is used to update the interest rates of subscription orders, which will take effect at the beginning of the next hour.,Please ensure that the funds are in the main(funding) account\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| interestRate | string | Modified purchase interest rate |\n| purchaseOrderNo | string | Purchase order id |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470217)\n\n:::info[Description]\nThis API endpoint is used to update the interest rates of subscription orders, which will take effect at the beginning of the next hour. Please ensure that the funds are in the main (funding) account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| interestRate | string | Modified purchase interest rate |\n| purchaseOrderNo | string | Purchase order ID |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | string | |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"currency\": \"BTC\",\n \"purchaseOrderNo\": \"671bafa804c26d000773c533\",\n \"interestRate\": \"0.09\"\n}", @@ -11135,19 +11619,19 @@ ], "query": [ { - "key": "currency", + "key": "status", "value": null, - "description": "currency" + "description": "DONE-completed; PENDING-settling" }, { - "key": "status", + "key": "currency", "value": null, - "description": "DONE-completed; PENDING-settling" + "description": "Currency" }, { "key": "purchaseOrderNo", "value": null, - "description": "" + "description": "Purchase order ID" }, { "key": "currentPage", @@ -11157,11 +11641,11 @@ { "key": "pageSize", "value": null, - "description": "Page size; 1<=pageSize<=100; default is 50" + "description": "Page size; 1<=pageSize<=50; default is 50" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470213)\n\n:::info[Description]\nThis API endpoint provides pagination query for the purchase orders.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | Current Page |\n| pageSize | integer | Page Size |\n| totalNum | integer | Total Number |\n| totalPage | integer | Total Page |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| purchaseOrderNo | string | Purchase order id |\n| purchaseSize | string | Total purchase size |\n| matchSize | string | Executed size |\n| interestRate | string | Target annualized interest rate |\n| incomeSize | string | Redeemed amount |\n| applyTime | integer | Time of purchase |\n| status | string | Status: DONE-completed; PENDING-settling |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470213)\n\n:::info[Description]\nThis API endpoint provides a pagination query for the purchase orders.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | Current Page |\n| pageSize | integer | Page Size |\n| totalNum | integer | Total Number |\n| totalPage | integer | Total Pages |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| purchaseOrderNo | string | Purchase order ID |\n| purchaseSize | string | Total purchase size |\n| matchSize | string | Executed size |\n| interestRate | string | Target annualized interest rate |\n| incomeSize | string | Redeemed amount |\n| applyTime | integer | Time of purchase |\n| status | string | Status: DONE-completed; PENDING-settling |\n\n---\n", "body": {} }, "response": [ @@ -11184,19 +11668,19 @@ ], "query": [ { - "key": "currency", + "key": "status", "value": null, - "description": "currency" + "description": "DONE-completed; PENDING-settling" }, { - "key": "status", + "key": "currency", "value": null, - "description": "DONE-completed; PENDING-settling" + "description": "Currency" }, { "key": "purchaseOrderNo", "value": null, - "description": "" + "description": "Purchase order ID" }, { "key": "currentPage", @@ -11206,7 +11690,7 @@ { "key": "pageSize", "value": null, - "description": "Page size; 1<=pageSize<=100; default is 50" + "description": "Page size; 1<=pageSize<=50; default is 50" } ] } @@ -11263,7 +11747,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470218)\n\n:::info[Description]\nRedeem your loan order\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| size | string | Redemption amount |\n| purchaseOrderNo | string | Purchase order id |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderNo | string | Redeem order id |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470218)\n\n:::info[Description]\nRedeem your loan order.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| size | string | Redemption amount |\n| purchaseOrderNo | string | Purchase order ID |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderNo | string | Redeem order ID |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"currency\": \"BTC\",\n \"size\": \"0.001\",\n \"purchaseOrderNo\": \"671bafa804c26d000773c533\"\n}", @@ -11347,19 +11831,19 @@ ], "query": [ { - "key": "currency", - "value": null, - "description": "currency" + "key": "status", + "value": "DONE", + "description": "DONE-completed; PENDING-settling" }, { - "key": "status", + "key": "currency", "value": null, - "description": "DONE-completed; PENDING-settling" + "description": "currency" }, { "key": "redeemOrderNo", "value": null, - "description": "Redeem order id" + "description": "Redeem order ID" }, { "key": "currentPage", @@ -11369,11 +11853,11 @@ { "key": "pageSize", "value": null, - "description": "Page size; 1<=pageSize<=100; default is 50" + "description": "Page size; 1<=pageSize<=50; default is 50" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470214)\n\n:::info[Description]\nThis API endpoint provides pagination query for the redeem orders.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | Current Page |\n| pageSize | integer | Page Size |\n| totalNum | integer | Total Number |\n| totalPage | integer | Total Page |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| purchaseOrderNo | string | Purchase order id |\n| redeemOrderNo | string | Redeem order id |\n| redeemSize | string | Redemption size |\n| receiptSize | string | Redeemed size |\n| applyTime | string | Time of redeem |\n| status | string | Status: DONE-completed; PENDING-settling |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470214)\n\n:::info[Description]\nThis API endpoint provides pagination query for the redeem orders.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | Current Page |\n| pageSize | integer | Page Size |\n| totalNum | integer | Total Number |\n| totalPage | integer | Total Pages |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| purchaseOrderNo | string | Purchase order ID |\n| redeemOrderNo | string | Redeem order ID |\n| redeemSize | string | Redemption size |\n| receiptSize | string | Redeemed size |\n| applyTime | string | Time of redeem |\n| status | string | Status: DONE-completed; PENDING-settling |\n\n---\n", "body": {} }, "response": [ @@ -11396,19 +11880,19 @@ ], "query": [ { - "key": "currency", - "value": null, - "description": "currency" + "key": "status", + "value": "DONE", + "description": "DONE-completed; PENDING-settling" }, { - "key": "status", + "key": "currency", "value": null, - "description": "DONE-completed; PENDING-settling" + "description": "currency" }, { "key": "redeemOrderNo", "value": null, - "description": "Redeem order id" + "description": "Redeem order ID" }, { "key": "currentPage", @@ -11418,7 +11902,7 @@ { "key": "pageSize", "value": null, - "description": "Page size; 1<=pageSize<=100; default is 50" + "description": "Page size; 1<=pageSize<=50; default is 50" } ] } @@ -11484,21 +11968,21 @@ { "key": "isIsolated", "value": "false", - "description": "true-isolated, false-cross" + "description": "True-isolated, false-cross" }, { "key": "currency", "value": "BTC", - "description": "currency, This field is only required for cross margin" + "description": "Currency: This field is only required for cross margin" }, { "key": "symbol", "value": null, - "description": "symbol, This field is only required for isolated margin" + "description": "Symbol: This field is only required for isolated margin" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470219)\n\n:::info[Description]\nRequest via this endpoint to get the Configure and Risk limit info of the margin.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timestamp | integer | Time stamp |\n| currency | string | CROSS MARGIN RESPONSES, Currency |\n| borrowMaxAmount | string | CROSS MARGIN RESPONSES, Maximum personal borrow amount. If the platform has no borrowing amount, this value will still be displayed. |\n| buyMaxAmount | string | CROSS MARGIN RESPONSES, Maximum buy amount |\n| holdMaxAmount | string | CROSS MARGIN RESPONSES, Maximum holding amount |\n| borrowCoefficient | string | CROSS MARGIN RESPONSES, [Borrow Coefficient](https://www.kucoin.com/land/price-protect) |\n| marginCoefficient | string | CROSS MARGIN RESPONSES, [Margin Coefficient](https://www.kucoin.com/land/price-protect) |\n| precision | integer | CROSS MARGIN RESPONSES, Currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 |\n| borrowMinAmount | string | CROSS MARGIN RESPONSES, Minimum personal borrow amount |\n| borrowMinUnit | string | CROSS MARGIN RESPONSES, Minimum unit for borrowing, the borrowed amount must be an integer multiple of this value |\n| borrowEnabled | boolean | CROSS MARGIN RESPONSES, Whether to support borrowing |\n| symbol | string | ISOLATED MARGIN RESPONSES, Symbol |\n| baseMaxBorrowAmount | string | ISOLATED MARGIN RESPONSES, Base maximum personal borrow amount. If the platform has no borrowing amount, this value will still be displayed. |\n| quoteMaxBorrowAmount | string | ISOLATED MARGIN RESPONSES, Quote maximum personal borrow amount. If the platform has no borrowing amount, this value will still be displayed. |\n| baseMaxBuyAmount | string | ISOLATED MARGIN RESPONSES, Base maximum buy amount
|\n| quoteMaxBuyAmount | string | ISOLATED MARGIN RESPONSES, Quote maximum buy amount |\n| baseMaxHoldAmount | string | ISOLATED MARGIN RESPONSES, Base maximum holding amount
|\n| quoteMaxHoldAmount | string | ISOLATED MARGIN RESPONSES, Quote maximum holding amount
|\n| basePrecision | integer | ISOLATED MARGIN RESPONSES, Base currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 |\n| quotePrecision | integer | ISOLATED MARGIN RESPONSES, Quote currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001
|\n| baseBorrowMinAmount | string | ISOLATED MARGIN RESPONSES, Base minimum personal borrow amount
|\n| quoteBorrowMinAmount | string | ISOLATED MARGIN RESPONSES, Quote minimum personal borrow amount |\n| baseBorrowMinUnit | string | ISOLATED MARGIN RESPONSES, Base minimum unit for borrowing, the borrowed amount must be an integer multiple of this value |\n| quoteBorrowMinUnit | string | ISOLATED MARGIN RESPONSES, Quote minimum unit for borrowing, the borrowed amount must be an integer multiple of this value |\n| baseBorrowEnabled | boolean | ISOLATED MARGIN RESPONSES, Base whether to support borrowing
|\n| quoteBorrowEnabled | boolean | ISOLATED MARGIN RESPONSES, Quote whether to support borrowing
|\n| baseBorrowCoefficient | string | ISOLATED MARGIN RESPONSES, [Base Borrow Coefficient](https://www.kucoin.com/land/price-protect) |\n| quoteBorrowCoefficient | string | ISOLATED MARGIN RESPONSES, [Quote Borrow Coefficient](https://www.kucoin.com/land/price-protect) |\n| baseMarginCoefficient | string | ISOLATED MARGIN RESPONSES, [Base Margin Coefficient](https://www.kucoin.com/land/price-protect) |\n| quoteMarginCoefficient | string | ISOLATED MARGIN RESPONSES, [Quote Margin Coefficient](https://www.kucoin.com/land/price-protect) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470219)\n\n:::info[Description]\nRequest Configure and Risk limit info of the margin via this endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| timestamp | integer | Time stamp |\n| currency | string | CROSS MARGIN RESPONSES, Currency |\n| borrowMaxAmount | string | CROSS MARGIN RESPONSES, Maximum personal borrow amount. If the platform has no borrowing amount, this value will still be displayed. |\n| buyMaxAmount | string | CROSS MARGIN RESPONSES, Maximum buy amount |\n| holdMaxAmount | string | CROSS MARGIN RESPONSES, Maximum holding amount |\n| borrowCoefficient | string | CROSS MARGIN RESPONSES, [Borrow Coefficient](https://www.kucoin.com/land/price-protect) |\n| marginCoefficient | string | CROSS MARGIN RESPONSES, [Margin Coefficient](https://www.kucoin.com/land/price-protect) |\n| precision | integer | CROSS MARGIN RESPONSES, Currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 |\n| borrowMinAmount | string | CROSS MARGIN RESPONSES, Minimum personal borrow amount |\n| borrowMinUnit | string | CROSS MARGIN RESPONSES, Minimum unit for borrowing; the borrowed amount must be an integer multiple of this value |\n| borrowEnabled | boolean | CROSS MARGIN RESPONSES, Whether to support borrowing |\n| symbol | string | ISOLATED MARGIN RESPONSES, Symbol |\n| baseMaxBorrowAmount | string | ISOLATED MARGIN RESPONSES, Base maximum personal borrow amount. If the platform has no borrowing amount, this value will still be displayed. |\n| quoteMaxBorrowAmount | string | ISOLATED MARGIN RESPONSES, Quote maximum personal borrow amount. If the platform has no borrowing amount, this value will still be displayed. |\n| baseMaxBuyAmount | string | ISOLATED MARGIN RESPONSES, Base maximum buy amount
|\n| quoteMaxBuyAmount | string | ISOLATED MARGIN RESPONSES, Quote maximum buy amount |\n| baseMaxHoldAmount | string | ISOLATED MARGIN RESPONSES, Base maximum holding amount
|\n| quoteMaxHoldAmount | string | ISOLATED MARGIN RESPONSES, Quote maximum holding amount
|\n| basePrecision | integer | ISOLATED MARGIN RESPONSES, Base currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 |\n| quotePrecision | integer | ISOLATED MARGIN RESPONSES, Quote currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001
|\n| baseBorrowMinAmount | string | ISOLATED MARGIN RESPONSES, Base minimum personal borrow amount
|\n| quoteBorrowMinAmount | string | ISOLATED MARGIN RESPONSES, Quote minimum personal borrow amount |\n| baseBorrowMinUnit | string | ISOLATED MARGIN RESPONSES, Base minimum unit for borrowing, the borrowed amount must be an integer multiple of this value |\n| quoteBorrowMinUnit | string | ISOLATED MARGIN RESPONSES, Quote minimum unit for borrowing, the borrowed amount must be an integer multiple of this value |\n| baseBorrowEnabled | boolean | ISOLATED MARGIN RESPONSES, Base whether to support borrowing
|\n| quoteBorrowEnabled | boolean | ISOLATED MARGIN RESPONSES, Quote whether to support borrowing
|\n| baseBorrowCoefficient | string | ISOLATED MARGIN RESPONSES, [Base Borrow Coefficient](https://www.kucoin.com/land/price-protect) |\n| quoteBorrowCoefficient | string | ISOLATED MARGIN RESPONSES, [Quote Borrow Coefficient](https://www.kucoin.com/land/price-protect) |\n| baseMarginCoefficient | string | ISOLATED MARGIN RESPONSES, [Base Margin Coefficient](https://www.kucoin.com/land/price-protect) |\n| quoteMarginCoefficient | string | ISOLATED MARGIN RESPONSES, [Quote Margin Coefficient](https://www.kucoin.com/land/price-protect) |\n\n---\n", "body": {} }, "response": [ @@ -11523,17 +12007,17 @@ { "key": "isIsolated", "value": "false", - "description": "true-isolated, false-cross" + "description": "True-isolated, false-cross" }, { "key": "currency", "value": "BTC", - "description": "currency, This field is only required for cross margin" + "description": "Currency: This field is only required for cross margin" }, { "key": "symbol", "value": null, - "description": "symbol, This field is only required for isolated margin" + "description": "Symbol: This field is only required for isolated margin" } ] } @@ -11603,7 +12087,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470221)\n\n:::info[Description]\nGet 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.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | 200000 is for success, other is error |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol |\n| rootSymbol | string | Contract group |\n| type | string | Type of the contract |\n| firstOpenDate | integer | First Open Date(millisecond) |\n| expireDate | integer | Expiration date(millisecond). Null means it will never expire |\n| settleDate | integer | Settlement date(millisecond). Null indicates that automatic settlement is not supported |\n| baseCurrency | string | Base currency |\n| quoteCurrency | string | Quote currency |\n| settleCurrency | string | Currency used to clear and settle the trades |\n| maxOrderQty | integer | Maximum order quantity |\n| maxPrice | number | Maximum order price |\n| lotSize | integer | Minimum lot size |\n| tickSize | number | Minimum price changes |\n| indexPriceTickSize | number | Index price of tick size |\n| multiplier | number | 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. |\n| initialMargin | number | Initial margin requirement |\n| maintainMargin | number | Maintenance margin requirement |\n| maxRiskLimit | integer | Maximum risk limit (unit: XBT) |\n| minRiskLimit | integer | Minimum risk limit (unit: XBT) |\n| riskStep | integer | Risk limit increment value (unit: XBT) |\n| makerFeeRate | number | Maker fee rate |\n| takerFeeRate | number | Taker fee rate |\n| takerFixFee | number | Deprecated param |\n| makerFixFee | number | Deprecated param |\n| settlementFee | number | Settlement fee |\n| isDeleverage | boolean | Enabled ADL or not |\n| isQuanto | boolean | Deprecated param |\n| isInverse | boolean | Whether it is a reverse contract |\n| markMethod | string | Marking method |\n| fairMethod | string | Fair price marking method, The Futures contract is null |\n| fundingBaseSymbol | string | Ticker symbol of the based currency |\n| fundingQuoteSymbol | string | Ticker symbol of the quote currency |\n| fundingRateSymbol | string | Funding rate symbol |\n| indexSymbol | string | Index symbol |\n| settlementSymbol | string | Settlement Symbol |\n| status | string | Contract status |\n| fundingFeeRate | number | Funding fee rate |\n| predictedFundingFeeRate | number | Predicted funding fee rate |\n| fundingRateGranularity | integer | Funding interval(millisecond) |\n| openInterest | string | Open interest |\n| turnoverOf24h | number | 24-hour turnover |\n| volumeOf24h | number | 24-hour volume |\n| markPrice | number | Mark price |\n| indexPrice | number | Index price |\n| lastTradePrice | number | Last trade price |\n| nextFundingRateTime | integer | Next funding rate time(millisecond) |\n| maxLeverage | integer | Maximum leverage |\n| sourceExchanges | array | Refer to the schema section of sourceExchanges |\n| premiumsSymbol1M | string | Premium index symbol(1 minute) |\n| premiumsSymbol8H | string | Premium index symbol(8 hours) |\n| fundingBaseSymbol1M | string | Base currency interest rate symbol(1 minute) |\n| fundingQuoteSymbol1M | string | Quote currency interest rate symbol(1 minute) |\n| lowPrice | number | 24-hour lowest price |\n| highPrice | number | 24-hour highest price |\n| priceChgPct | number | 24-hour price change% |\n| priceChg | number | 24-hour price change |\n| k | number | |\n| m | number | |\n| f | number | |\n| mmrLimit | number | |\n| mmrLevConstant | number | |\n| supportCross | boolean | Whether support Cross Margin |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470221)\n\n:::info[Description]\nGet 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.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | 200000 is for success, other is error |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol |\n| rootSymbol | string | Contract group |\n| type | string | Type of contract |\n| firstOpenDate | integer | First Open Date (milliseconds) |\n| expireDate | integer | Expiration date (milliseconds) Null means it will never expire |\n| settleDate | integer | Settlement date (milliseconds) Null indicates that automatic settlement is not supported |\n| baseCurrency | string | Base currency |\n| quoteCurrency | string | Quote currency |\n| settleCurrency | string | Currency used to clear and settle the trades |\n| maxOrderQty | integer | Maximum order quantity |\n| maxPrice | number | Maximum order price |\n| lotSize | integer | Minimum lot size |\n| tickSize | number | Minimum price changes |\n| indexPriceTickSize | number | Index price of tick size |\n| multiplier | number | 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. |\n| initialMargin | number | Initial margin requirement |\n| maintainMargin | number | Maintenance margin requirement |\n| maxRiskLimit | integer | Maximum risk limit (unit: XBT) |\n| minRiskLimit | integer | Minimum risk limit (unit: XBT) |\n| riskStep | integer | Risk limit increment value (unit: XBT) |\n| makerFeeRate | number | Maker fee rate |\n| takerFeeRate | number | Taker fee rate |\n| takerFixFee | number | Deprecated param |\n| makerFixFee | number | Deprecated param |\n| settlementFee | number | Settlement fee |\n| isDeleverage | boolean | Enabled ADL or not |\n| isQuanto | boolean | Deprecated param |\n| isInverse | boolean | Whether it is a reverse contract |\n| markMethod | string | Marking method |\n| fairMethod | string | Fair price marking method; the Futures contract is null |\n| fundingBaseSymbol | string | Ticker symbol of the base currency |\n| fundingQuoteSymbol | string | Ticker symbol of the quote currency |\n| fundingRateSymbol | string | Funding rate symbol |\n| indexSymbol | string | Index symbol |\n| settlementSymbol | string | Settlement symbol |\n| status | string | Contract status |\n| fundingFeeRate | number | Funding fee rate |\n| predictedFundingFeeRate | number | Predicted funding fee rate |\n| fundingRateGranularity | integer | Funding interval (milliseconds) |\n| openInterest | string | Open interest (unit: lots) |\n| turnoverOf24h | number | 24-hour turnover |\n| volumeOf24h | number | 24-hour volume |\n| markPrice | number | Mark price |\n| indexPrice | number | Index price |\n| lastTradePrice | number | Last trade price |\n| nextFundingRateTime | integer | Next funding rate time (milliseconds) |\n| maxLeverage | integer | Maximum leverage |\n| sourceExchanges | array | Refer to the schema section of sourceExchanges |\n| premiumsSymbol1M | string | Premium index symbol (1 minute) |\n| premiumsSymbol8H | string | Premium index symbol (8 hours) |\n| fundingBaseSymbol1M | string | Base currency interest rate symbol (1 minute) |\n| fundingQuoteSymbol1M | string | Quote currency interest rate symbol (1 minute) |\n| lowPrice | number | 24-hour lowest price |\n| highPrice | number | 24-hour highest price |\n| priceChgPct | number | 24-hour % price change |\n| priceChg | number | 24-hour price change |\n| k | number | |\n| m | number | |\n| f | number | |\n| mmrLimit | number | |\n| mmrLevConstant | number | |\n| supportCross | boolean | Whether support Cross Margin |\n| buyLimit | number | The current maximum buying price allowed |\n| sellLimit | number | The current minimum selling price allowed |\n\n---\n", "body": {} }, "response": [ @@ -11657,7 +12141,7 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"XBTUSDM\",\n \"rootSymbol\": \"XBT\",\n \"type\": \"FFWCSX\",\n \"firstOpenDate\": 1552638575000,\n \"expireDate\": null,\n \"settleDate\": null,\n \"baseCurrency\": \"XBT\",\n \"quoteCurrency\": \"USD\",\n \"settleCurrency\": \"XBT\",\n \"maxOrderQty\": 10000000,\n \"maxPrice\": 1000000.0,\n \"lotSize\": 1,\n \"tickSize\": 0.1,\n \"indexPriceTickSize\": 0.1,\n \"multiplier\": -1.0,\n \"initialMargin\": 0.014,\n \"maintainMargin\": 0.007,\n \"maxRiskLimit\": 1,\n \"minRiskLimit\": 1,\n \"riskStep\": 0,\n \"makerFeeRate\": 0.0002,\n \"takerFeeRate\": 0.0006,\n \"takerFixFee\": 0.0,\n \"makerFixFee\": 0.0,\n \"settlementFee\": null,\n \"isDeleverage\": true,\n \"isQuanto\": false,\n \"isInverse\": true,\n \"markMethod\": \"FairPrice\",\n \"fairMethod\": \"FundingRate\",\n \"fundingBaseSymbol\": \".XBTINT8H\",\n \"fundingQuoteSymbol\": \".USDINT8H\",\n \"fundingRateSymbol\": \".XBTUSDMFPI8H\",\n \"indexSymbol\": \".BXBT\",\n \"settlementSymbol\": null,\n \"status\": \"Open\",\n \"fundingFeeRate\": 0.000175,\n \"predictedFundingFeeRate\": 0.000176,\n \"fundingRateGranularity\": 28800000,\n \"openInterest\": \"61725904\",\n \"turnoverOf24h\": 209.56303473,\n \"volumeOf24h\": 14354731.0,\n \"markPrice\": 68336.7,\n \"indexPrice\": 68335.29,\n \"lastTradePrice\": 68349.3,\n \"nextFundingRateTime\": 17402942,\n \"maxLeverage\": 75,\n \"sourceExchanges\": [\n \"kraken\",\n \"bitstamp\",\n \"crypto\"\n ],\n \"premiumsSymbol1M\": \".XBTUSDMPI\",\n \"premiumsSymbol8H\": \".XBTUSDMPI8H\",\n \"fundingBaseSymbol1M\": \".XBTINT\",\n \"fundingQuoteSymbol1M\": \".USDINT\",\n \"lowPrice\": 67436.7,\n \"highPrice\": 69471.8,\n \"priceChgPct\": 0.0097,\n \"priceChg\": 658.7,\n \"k\": 2645000.0,\n \"m\": 1640000.0,\n \"f\": 1.3,\n \"mmrLimit\": 0.3,\n \"mmrLevConstant\": 75.0,\n \"supportCross\": true\n }\n}" + "body": "{\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\": 0.0002,\n \"takerFeeRate\": 0.0006,\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-05,\n \"predictedFundingFeeRate\": 8.3e-05,\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.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}" } ] }, @@ -11680,7 +12164,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470220)\n\n:::info[Description]\nGet 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.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | 200000 is for success, other is error |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol |\n| rootSymbol | string | Contract group |\n| type | string | Type of the contract |\n| firstOpenDate | integer | First Open Date(millisecond) |\n| expireDate | integer | Expiration date(millisecond). Null means it will never expire |\n| settleDate | integer | Settlement date(millisecond). Null indicates that automatic settlement is not supported |\n| baseCurrency | string | Base currency |\n| quoteCurrency | string | Quote currency |\n| settleCurrency | string | Currency used to clear and settle the trades |\n| maxOrderQty | integer | Maximum order quantity |\n| maxPrice | number | Maximum order price |\n| lotSize | integer | Minimum lot size |\n| tickSize | number | Minimum price changes |\n| indexPriceTickSize | number | Index price of tick size |\n| multiplier | number | 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. |\n| initialMargin | number | Initial margin requirement |\n| maintainMargin | number | Maintenance margin requirement |\n| maxRiskLimit | integer | Maximum risk limit (unit: XBT) |\n| minRiskLimit | integer | Minimum risk limit (unit: XBT) |\n| riskStep | integer | Risk limit increment value (unit: XBT) |\n| makerFeeRate | number | Maker fee rate |\n| takerFeeRate | number | Taker fee rate |\n| takerFixFee | number | Deprecated param |\n| makerFixFee | number | Deprecated param |\n| settlementFee | number | Settlement fee |\n| isDeleverage | boolean | Enabled ADL or not |\n| isQuanto | boolean | Deprecated param |\n| isInverse | boolean | Whether it is a reverse contract |\n| markMethod | string | Marking method |\n| fairMethod | string | Fair price marking method, The Futures contract is null |\n| fundingBaseSymbol | string | Ticker symbol of the based currency |\n| fundingQuoteSymbol | string | Ticker symbol of the quote currency |\n| fundingRateSymbol | string | Funding rate symbol |\n| indexSymbol | string | Index symbol |\n| settlementSymbol | string | Settlement Symbol |\n| status | string | Contract status |\n| fundingFeeRate | number | Funding fee rate |\n| predictedFundingFeeRate | number | Predicted funding fee rate |\n| fundingRateGranularity | integer | Funding interval(millisecond) |\n| openInterest | string | Open interest |\n| turnoverOf24h | number | 24-hour turnover |\n| volumeOf24h | number | 24-hour volume |\n| markPrice | number | Mark price |\n| indexPrice | number | Index price |\n| lastTradePrice | number | Last trade price |\n| nextFundingRateTime | integer | Next funding rate time(millisecond) |\n| maxLeverage | integer | Maximum leverage |\n| sourceExchanges | array | Refer to the schema section of sourceExchanges |\n| premiumsSymbol1M | string | Premium index symbol(1 minute) |\n| premiumsSymbol8H | string | Premium index symbol(8 hours) |\n| fundingBaseSymbol1M | string | Base currency interest rate symbol(1 minute) |\n| fundingQuoteSymbol1M | string | Quote currency interest rate symbol(1 minute) |\n| lowPrice | number | 24-hour lowest price |\n| highPrice | number | 24-hour highest price |\n| priceChgPct | number | 24-hour price change% |\n| priceChg | number | 24-hour price change |\n| k | number | |\n| m | number | |\n| f | number | |\n| mmrLimit | number | |\n| mmrLevConstant | number | |\n| supportCross | boolean | Whether support Cross Margin |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470220)\n\n:::info[Description]\nGet 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.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | 200000 is for success, other is error |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol |\n| rootSymbol | string | Contract group |\n| type | string | Type of contract |\n| firstOpenDate | integer | First Open Date (milliseconds) |\n| expireDate | integer | Expiration date (milliseconds) Null means it will never expire |\n| settleDate | integer | Settlement date (milliseconds) Null indicates that automatic settlement is not supported |\n| baseCurrency | string | Base currency |\n| quoteCurrency | string | Quote currency |\n| settleCurrency | string | Currency used to clear and settle the trades |\n| maxOrderQty | integer | Maximum order quantity |\n| maxPrice | number | Maximum order price |\n| lotSize | integer | Minimum lot size |\n| tickSize | number | Minimum price changes |\n| indexPriceTickSize | number | Index price of tick size |\n| multiplier | number | 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. |\n| initialMargin | number | Initial margin requirement |\n| maintainMargin | number | Maintenance margin requirement |\n| maxRiskLimit | integer | Maximum risk limit (unit: XBT) |\n| minRiskLimit | integer | Minimum risk limit (unit: XBT) |\n| riskStep | integer | Risk limit increment value (unit: XBT) |\n| makerFeeRate | number | Maker fee rate |\n| takerFeeRate | number | Taker fee rate |\n| takerFixFee | number | Deprecated param |\n| makerFixFee | number | Deprecated param |\n| settlementFee | number | Settlement fee |\n| isDeleverage | boolean | Enabled ADL or not |\n| isQuanto | boolean | Deprecated param |\n| isInverse | boolean | Whether it is a reverse contract |\n| markMethod | string | Marking method |\n| fairMethod | string | Fair price marking method; the Futures contract is null |\n| fundingBaseSymbol | string | Ticker symbol of the base currency |\n| fundingQuoteSymbol | string | Ticker symbol of the quote currency |\n| fundingRateSymbol | string | Funding rate symbol |\n| indexSymbol | string | Index symbol |\n| settlementSymbol | string | Settlement symbol |\n| status | string | Contract status |\n| fundingFeeRate | number | Funding fee rate |\n| predictedFundingFeeRate | number | Predicted funding fee rate |\n| fundingRateGranularity | integer | Funding interval (milliseconds) |\n| openInterest | string | Open interest (unit: lots) |\n| turnoverOf24h | number | 24-hour turnover |\n| volumeOf24h | number | 24-hour volume |\n| markPrice | number | Mark price |\n| indexPrice | number | Index price |\n| lastTradePrice | number | Last trade price |\n| nextFundingRateTime | integer | Next funding rate time (milliseconds) |\n| maxLeverage | integer | Maximum leverage |\n| sourceExchanges | array | Refer to the schema section of sourceExchanges |\n| premiumsSymbol1M | string | Premium index symbol (1 minute) |\n| premiumsSymbol8H | string | Premium index symbol (8 hours) |\n| fundingBaseSymbol1M | string | Base currency interest rate symbol (1 minute) |\n| fundingQuoteSymbol1M | string | Quote currency interest rate symbol (1 minute) |\n| lowPrice | number | 24-hour lowest price |\n| highPrice | number | 24-hour highest price |\n| priceChgPct | number | 24-hour % price change |\n| priceChg | number | 24-hour price change |\n| k | number | |\n| m | number | |\n| f | number | |\n| mmrLimit | number | |\n| mmrLevConstant | number | |\n| supportCross | boolean | Whether support Cross Margin |\n| buyLimit | number | The current maximum buying price allowed |\n| sellLimit | number | The current minimum selling price allowed |\n\n---\n", "body": {} }, "response": [ @@ -11734,7 +12218,7 @@ } ], "cookie": [], - "body": "{\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.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\": 0.0002,\n \"takerFeeRate\": 0.0006,\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\": 0.000153,\n \"predictedFundingFeeRate\": 8e-05,\n \"fundingRateGranularity\": 28800000,\n \"openInterest\": \"6384957\",\n \"turnoverOf24h\": 578840222.0999069,\n \"volumeOf24h\": 8274.432,\n \"markPrice\": 69732.33,\n \"indexPrice\": 69732.32,\n \"lastTradePrice\": 69732,\n \"nextFundingRateTime\": 21265941,\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\": 68817.5,\n \"highPrice\": 71615.8,\n \"priceChgPct\": 0.0006,\n \"priceChg\": 48.0,\n \"k\": 490.0,\n \"m\": 300.0,\n \"f\": 1.3,\n \"mmrLimit\": 0.3,\n \"mmrLevConstant\": 125.0,\n \"supportCross\": true\n }\n ]\n}" + "body": "{\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\": 5.2e-05,\n \"predictedFundingFeeRate\": 8.3e-05,\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}" } ] }, @@ -11758,11 +12242,11 @@ { "key": "symbol", "value": "", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) \n\n" + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) \n\n" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470222)\n\n:::info[Description]\nThis endpoint returns \"last traded price/size\"、\"best bid/ask price/size\" etc. of a single symbol.\nThese messages can also be obtained through Websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | 200000 is for success, other is error |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| sequence | integer | Sequence number, used to judge whether the messages pushed by Websocket is continuous. |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| side | string | 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. |\n| size | integer | Filled quantity |\n| tradeId | string | Transaction ID |\n| price | string | Filled price |\n| bestBidPrice | string | Best bid price |\n| bestBidSize | integer | Best bid size |\n| bestAskPrice | string | Best ask price |\n| bestAskSize | integer | Best ask size |\n| ts | integer | Filled time(nanosecond) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470222)\n\n:::info[Description]\nThis endpoint returns \"last traded price/size\", \"best bid/ask price/size\" etc. of a single symbol.\nThese messages can also be obtained through Websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | 200000 is for success, other is error |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| sequence | integer | Sequence number, used to judge whether the messages pushed by Websocket are continuous. |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| side | string | 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. |\n| size | integer | Filled quantity |\n| tradeId | string | Transaction ID |\n| price | string | Filled price |\n| bestBidPrice | string | Best bid price |\n| bestBidSize | integer | Best bid size |\n| bestAskPrice | string | Best ask price |\n| bestAskSize | integer | Best ask size |\n| ts | integer | Filled time (nanoseconds) |\n\n---\n", "body": {} }, "response": [ @@ -11786,7 +12270,7 @@ { "key": "symbol", "value": "", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) \n\n" + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) \n\n" } ] } @@ -11843,7 +12327,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470223)\n\n:::info[Description]\nThis endpoint returns \"last traded price/size\"、\"best bid/ask price/size\" etc. of all symbol.\nThese messages can also be obtained through Websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | 200000 is for success, other is error |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| sequence | integer | Sequence number, used to judge whether the messages pushed by Websocket is continuous. |\n| symbol | string | Symbol |\n| side | string | Trade direction |\n| size | integer | 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. |\n| tradeId | string | Transaction ID |\n| price | string | Filled price |\n| bestBidPrice | string | Best bid price |\n| bestBidSize | integer | Best bid size |\n| bestAskPrice | string | Best ask price |\n| bestAskSize | integer | Best ask size |\n| ts | integer | Filled time(nanosecond) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470223)\n\n:::info[Description]\nThis endpoint returns \"last traded price/size\", \"best bid/ask price/size\" etc. of all symbol.\nThese messages can also be obtained through Websocket.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | 200000 is for success, other is error |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| sequence | integer | Sequence number, used to judge whether the messages pushed by Websocket are continuous. |\n| symbol | string | Symbol |\n| side | string | Trade direction |\n| size | integer | 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. |\n| tradeId | string | Transaction ID |\n| price | string | Filled price |\n| bestBidPrice | string | Best bid price |\n| bestBidSize | integer | Best bid size |\n| bestAskPrice | string | Best ask price |\n| bestAskSize | integer | Best ask size |\n| ts | integer | Filled time (nanoseconds) |\n\n---\n", "body": {} }, "response": [ @@ -11921,11 +12405,11 @@ { "key": "symbol", "value": "XBTUSDM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) \n" + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) \n" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470224)\n\n:::info[Discription]\nQuery for Full orderbook depth data. (aggregated by price)\n\nIt is generally used by professional traders because it uses more server resources and traffic, and we have strict access rate limit control.\n\nTo maintain up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | 200000 is for success, other is error |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| sequence | integer | Sequence number |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| bids | array | Refer to the schema section of bids |\n| asks | array | Refer to the schema section of asks |\n| ts | integer | Timestamp(nanosecond) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470224)\n\n:::info[Discription]\nQuery for Full orderbook depth data (aggregated by price)\n\nIt is generally used by professional traders because it uses more server resources and traffic, and we have strict access rate limit controls.\n\nTo maintain an up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | 200000 is for success, other is error |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| sequence | integer | Sequence number |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| bids | array | Refer to the schema section of bids |\n| asks | array | Refer to the schema section of asks |\n| ts | integer | Timestamp (nanoseconds) |\n\n---\n", "body": {} }, "response": [ @@ -11950,7 +12434,7 @@ { "key": "symbol", "value": "XBTUSDM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) \n" + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) \n" } ] } @@ -12010,11 +12494,11 @@ { "key": "symbol", "value": "XBTUSDM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470225)\n\n:::info[Discription]\nQuery for part orderbook depth data. (aggregated by price)\n\nYou are recommended to request via this endpoint as the system reponse would be faster and cosume less traffic.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| sequence | integer | Sequence number |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| bids | array | Refer to the schema section of bids |\n| asks | array | Refer to the schema section of asks |\n| ts | integer | Timestamp(nanosecond) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470225)\n\n:::info[Discription]\nQuery for part orderbook depth data (aggregated by price).\n\nIt is recommended that you submit requests via this endpoint as the system response will be faster and consume less traffic.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| sequence | integer | Sequence number |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| bids | array | Refer to the schema section of bids |\n| asks | array | Refer to the schema section of asks |\n| ts | integer | Timestamp (nanoseconds) |\n\n---\n", "body": {} }, "response": [ @@ -12039,7 +12523,7 @@ { "key": "symbol", "value": "XBTUSDM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " } ] } @@ -12099,11 +12583,11 @@ { "key": "symbol", "value": "XBTUSDM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470232)\n\n:::info[Discription]\nRequest via this endpoint to get the trade history of the specified symbol, the returned quantity is the last 100 transaction records.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| sequence | integer | Sequence number |\n| contractId | integer | Deprecated param |\n| tradeId | string | Transaction ID |\n| makerOrderId | string | Maker order ID |\n| takerOrderId | string | Taker order ID |\n| ts | integer | Filled timestamp(nanosecond) |\n| size | integer | Filled amount |\n| price | string | Filled price |\n| side | string | 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. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470232)\n\n:::info[Discription]\nRequest the trade history of the specified symbol via this endpoint. The returned quantity is the last 100 transaction records.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| sequence | integer | Sequence number |\n| contractId | integer | Deprecated param |\n| tradeId | string | Transaction ID |\n| makerOrderId | string | Maker order ID |\n| takerOrderId | string | Taker order ID |\n| ts | integer | Filled timestamp (nanosecond) |\n| size | integer | Filled amount |\n| price | string | Filled price |\n| side | string | 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. |\n\n---\n", "body": {} }, "response": [ @@ -12128,7 +12612,7 @@ { "key": "symbol", "value": "XBTUSDM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " } ] } @@ -12188,26 +12672,26 @@ { "key": "symbol", "value": "", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "granularity", "value": "", - "description": "Type of candlestick patterns(minute)" + "description": "Type of candlestick patterns (minutes)" }, { "key": "from", "value": "1728552342000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "to", "value": "1729243542000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470234)\n\n:::info[Description]\nGet the Kline of the symbol. Data are returned in grouped buckets based on requested type.\nFor each query, the system would return at most 500 pieces of data. To obtain more data, please page the data by time.\n:::\n\n:::tip[Tips]\nKlines data may be incomplete. No data is published for intervals where there are no ticks.\n\nIf the specified start/end time and the time granularity exceeds the maximum size allowed for a single request, the system will only return 500 pieces of data for your request. If you want to get fine-grained data in a larger time range, you will need to specify the time ranges and make multiple requests for multiple times.\n\nIf you’ve specified only the start time in your request, the system will return 500 pieces of data from the specified start time to the current time of the system; If only the end time is specified, the system will return 500 pieces of data closest to the end time; If neither the start time nor the end time is specified, the system will return the 500 pieces of data closest to the current time of the system.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470234)\n\n:::info[Description]\nGet the symbol’s candlestick chart. Data are returned in grouped buckets based on requested type.\nFor each query, the system will return at most 500 pieces of data. To obtain more data, please page the data by time.\n:::\n\n:::tip[Tips]\nCandlestick chart data may be incomplete. No data is published for intervals where there are no ticks.\n\nIf the specified start/end time and the time granularity exceed the maximum size allowed for a single request, the system will only return 500 pieces of data for your request. If you want to get fine-grained data in a larger time range, you will need to specify the time ranges and make multiple requests for multiple times.\n\nIf you’ve specified only the start time in your request, the system will return 500 pieces of data from the specified start time to the current time of the system; if only the end time is specified, the system will return 500 pieces of data closest to the end time; if neither the start time nor the end time is specified, the system will return the 500 pieces of data closest to the current time of the system.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n---\n", "body": {} }, "response": [ @@ -12232,22 +12716,22 @@ { "key": "symbol", "value": "", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "granularity", "value": "", - "description": "Type of candlestick patterns(minute)" + "description": "Type of candlestick patterns (minutes)" }, { "key": "from", "value": "1728552342000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "to", "value": "1729243542000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" } ] } @@ -12306,7 +12790,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470233)\n\n:::info[Discription]\nGet current mark price\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| granularity | integer | Granularity (milisecond) |\n| timePoint | integer | Time point (milisecond) |\n| value | number | Mark price |\n| indexPrice | number | Index price |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470233)\n\n:::info[Discription]\nGet the current mark price (Update snapshots once per second, real-time query).\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| granularity | integer | Granularity (milliseconds) |\n| timePoint | integer | Time point (milliseconds) |\n| value | number | Mark price |\n| indexPrice | number | Index price |\n\n---\n", "body": {} }, "response": [ @@ -12386,22 +12870,22 @@ { "key": "symbol", "value": "", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "startAt", "value": null, - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": null, - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "reverse", "value": null, - "description": "This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default." + "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." }, { "key": "offset", @@ -12411,16 +12895,16 @@ { "key": "forward", "value": null, - "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" + "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." }, { "key": "maxCount", "value": null, - "description": "Max record count. The default record count is 10, The maximum length cannot exceed 100" + "description": "Max. record count. The default record count is 10; the maximum length cannot exceed 100" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470231)\n\n:::info[Discription]\nGet Spot Index price\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| dataList | array | Refer to the schema section of dataList |\n| hasMore | boolean | Whether there are more pages |\n\n**root.data.dataList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) |\n| granularity | integer | Granularity (milisecond) |\n| timePoint | integer | Timestamp (milisecond) |\n| value | number | Index Value |\n| decomposionList | array | Refer to the schema section of decomposionList |\n\n**root.data.dataList.decomposionList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| exchange | string | Exchange |\n| price | number | Price |\n| weight | number | Weight |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470231)\n\n:::info[Discription]\nGet Spot Index price (Update snapshots once per second, and there is a 5s cache when querying).\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| dataList | array | Refer to the schema section of dataList |\n| hasMore | boolean | Whether there are more pages |\n\n**root.data.dataList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) |\n| granularity | integer | Granularity (milliseconds) |\n| timePoint | integer | Timestamp (milliseconds) |\n| value | number | Index Value |\n| decomposionList | array | Refer to the schema section of decomposionList |\n\n**root.data.dataList.decomposionList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| exchange | string | Exchange |\n| price | number | Price |\n| weight | number | Weight |\n\n---\n", "body": {} }, "response": [ @@ -12445,22 +12929,22 @@ { "key": "symbol", "value": "", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "startAt", "value": null, - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": null, - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "reverse", "value": null, - "description": "This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default." + "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." }, { "key": "offset", @@ -12470,12 +12954,12 @@ { "key": "forward", "value": null, - "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" + "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." }, { "key": "maxCount", "value": null, - "description": "Max record count. The default record count is 10, The maximum length cannot exceed 100" + "description": "Max. record count. The default record count is 10; the maximum length cannot exceed 100" } ] } @@ -12535,22 +13019,22 @@ { "key": "symbol", "value": "", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "reverse", "value": "true", - "description": "This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default." + "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." }, { "key": "offset", @@ -12560,16 +13044,16 @@ { "key": "forward", "value": "true", - "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" + "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." }, { "key": "maxCount", "value": "10", - "description": "Max record count. The default record count is 10, The maximum length cannot exceed 100" + "description": "Max. record count. The default record count is 10; the maximum length cannot exceed 100" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470226)\n\n:::info[Discription]\nGet interest rate Index.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| dataList | array | Refer to the schema section of dataList |\n| hasMore | boolean | Whether there are more pages |\n\n**root.data.dataList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) |\n| granularity | integer | Granularity (milisecond) |\n| timePoint | integer | Timestamp(milisecond) |\n| value | number | Interest rate value |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470226)\n\n:::info[Discription]\nGet interest rate Index (real-time query).\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| dataList | array | Refer to the schema section of dataList |\n| hasMore | boolean | Whether there are more pages |\n\n**root.data.dataList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) |\n| granularity | integer | Granularity (milliseconds) |\n| timePoint | integer | Timestamp (milliseconds) |\n| value | number | Interest rate value |\n\n---\n", "body": {} }, "response": [ @@ -12594,22 +13078,22 @@ { "key": "symbol", "value": "", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "reverse", "value": "true", - "description": "This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default." + "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." }, { "key": "offset", @@ -12619,12 +13103,12 @@ { "key": "forward", "value": "true", - "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" + "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." }, { "key": "maxCount", "value": "10", - "description": "Max record count. The default record count is 10, The maximum length cannot exceed 100" + "description": "Max. record count. The default record count is 10; the maximum length cannot exceed 100" } ] } @@ -12684,22 +13168,22 @@ { "key": "symbol", "value": "", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "reverse", "value": "true", - "description": "This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default." + "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." }, { "key": "offset", @@ -12709,16 +13193,16 @@ { "key": "forward", "value": "true", - "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" + "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." }, { "key": "maxCount", "value": "10", - "description": "Max record count. The default record count is 10, The maximum length cannot exceed 100" + "description": "Max. record count. The default record count is 10; the maximum length cannot exceed 100" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470227)\n\n:::info[Discription]\nSubmit request to get premium index.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| dataList | array | Refer to the schema section of dataList |\n| hasMore | boolean | Whether there are more pages |\n\n**root.data.dataList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) |\n| granularity | integer | Granularity(milisecond) |\n| timePoint | integer | Timestamp(milisecond) |\n| value | number | Premium index |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470227)\n\n:::info[Discription]\nSubmit request to get premium index (Update snapshots once per second, real-time query).\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| dataList | array | Refer to the schema section of dataList |\n| hasMore | boolean | Whether there are more pages |\n\n**root.data.dataList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) |\n| granularity | integer | Granularity (milliseconds) |\n| timePoint | integer | Timestamp (milliseconds) |\n| value | number | Premium index |\n\n---\n", "body": {} }, "response": [ @@ -12743,22 +13227,22 @@ { "key": "symbol", "value": "", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "startAt", "value": "1728663338000", - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": "1728692138000", - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "reverse", "value": "true", - "description": "This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default." + "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." }, { "key": "offset", @@ -12768,12 +13252,12 @@ { "key": "forward", "value": "true", - "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" + "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." }, { "key": "maxCount", "value": "10", - "description": "Max record count. The default record count is 10, The maximum length cannot exceed 100" + "description": "Max. record count. The default record count is 10; the maximum length cannot exceed 100" } ] } @@ -12813,7 +13297,7 @@ ] }, { - "name": "Get 24hr Stats", + "name": "Get 24hr stats", "request": { "method": "GET", "header": [], @@ -12905,7 +13389,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470229)\n\n:::info[Discription]\nGet the API server time. This is the Unix timestamp.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | integer | ServerTime(millisecond) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470229)\n\n:::info[Discription]\nGet the API server time. This is the Unix timestamp.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | integer | ServerTime (milliseconds) |\n\n---\n", "body": {} }, "response": [ @@ -12980,7 +13464,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470230)\n\n:::info[Discription]\nGet the service status.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| msg | string | |\n| status | string | Status of service: open:normal transaction, close:Stop Trading/Maintenance, cancelonly:can only cancel the order but not place order |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470230)\n\n:::info[Discription]\nGet the service status.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| msg | string | |\n| status | string | Status of service: open: normal transaction; close: Stop Trading/Maintenance; cancelonly: can only cancel the order but not place order |\n\n---\n", "body": {} }, "response": [ @@ -13061,7 +13545,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470235)\n\n:::info[Description]\nPlace 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.\n:::\n\n:::tip[Tips]\nThe maximum limit orders for a single contract is 100 per account, and the maximum stop orders for a single contract is 200 per account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | 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(-) |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| leverage | integer | Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. |\n| type | string | specify if the order is an 'limit' order or 'market' order |\n| remark | string | remark for the order, length cannot exceed 100 utf8 characters |\n| stop | string | Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. |\n| stopPriceType | string | Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. |\n| stopPrice | string | Need to be defined if stop is specified. |\n| reduceOnly | boolean | 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. |\n| closeOrder | boolean | 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. |\n| forceHold | boolean | 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. |\n| stp | string | [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. |\n| marginMode | string | Margin mode: ISOLATED, CROSS, default: ISOLATED |\n| price | string | Required for type is 'limit' order, indicating the operating price |\n| size | integer | **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. |\n| timeInForce | string | 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 |\n| postOnly | boolean | 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. |\n| hidden | boolean | Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. |\n| iceberg | boolean | 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. |\n| visibleSize | string | 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. |\n| qty | string | **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 |\n| valueQty | string | **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 |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470235)\n\n:::info[Description]\nPlace 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.\n:::\n\n:::tip[Tips]\nThe maximum limit orders for a single contract are 100 per account, and the maximum stop orders for a single contract are 200 per account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | 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 (-). |\n| side | string | Specify if the order is to 'buy' or 'sell'. |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| leverage | integer | Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. |\n| type | string | Specify if the order is a 'limit' order or 'market' order |\n| remark | string | Remark for the order: Length cannot exceed 100 utf8 characters |\n| stop | string | Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. |\n| stopPriceType | string | Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. |\n| stopPrice | string | Needs to be defined if stop is specified. |\n| reduceOnly | boolean | 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. |\n| closeOrder | boolean | 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. |\n| forceHold | boolean | 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. |\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported. |\n| marginMode | string | Margin mode: ISOLATED, CROSS, default: ISOLATED |\n| price | string | Required for type is 'limit' order, indicating the operating price |\n| size | integer | **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. |\n| timeInForce | string | 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 |\n| postOnly | boolean | 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. |\n| hidden | boolean | Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. |\n| iceberg | boolean | 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. |\n| visibleSize | string | 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. |\n| qty | string | **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. |\n| valueQty | string | **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. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order ID. |\n\n---\n", "body": { "mode": "raw", "raw": "{\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}", @@ -13145,7 +13629,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470238)\n\n:::info[Description]\nOrder test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | 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(-) |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| leverage | integer | Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. |\n| type | string | specify if the order is an 'limit' order or 'market' order |\n| remark | string | remark for the order, length cannot exceed 100 utf8 characters |\n| stop | string | Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. |\n| stopPriceType | string | Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. |\n| stopPrice | string | Need to be defined if stop is specified. |\n| reduceOnly | boolean | 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. |\n| closeOrder | boolean | 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. |\n| forceHold | boolean | 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. |\n| stp | string | [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. |\n| marginMode | string | Margin mode: ISOLATED, CROSS, default: ISOLATED |\n| price | string | Required for type is 'limit' order, indicating the operating price |\n| size | integer | **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. |\n| timeInForce | string | 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 |\n| postOnly | boolean | 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. |\n| hidden | boolean | Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. |\n| iceberg | boolean | 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. |\n| visibleSize | string | 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. |\n| qty | string | **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 |\n| valueQty | string | **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 |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470238)\n\n:::info[Description]\nOrder test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | 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(-) |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| leverage | integer | Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. |\n| type | string | specify if the order is an 'limit' order or 'market' order |\n| remark | string | remark for the order, length cannot exceed 100 utf8 characters |\n| stop | string | Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. |\n| stopPriceType | string | Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. |\n| stopPrice | string | Need to be defined if stop is specified. |\n| reduceOnly | boolean | 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. |\n| closeOrder | boolean | 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. |\n| forceHold | boolean | 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. |\n| stp | string | [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. |\n| marginMode | string | Margin mode: ISOLATED, CROSS, default: ISOLATED |\n| price | string | Required for type is 'limit' order, indicating the operating price |\n| size | integer | **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. |\n| timeInForce | string | 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 |\n| postOnly | boolean | 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. |\n| hidden | boolean | Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. |\n| iceberg | boolean | 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. |\n| visibleSize | string | 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. |\n| qty | string | **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 |\n| valueQty | string | **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 |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", "body": { "mode": "raw", "raw": "{\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}", @@ -13314,7 +13798,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470237)\n\n:::info[Description]\nPlace 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.\n\nYou can place two 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.\n\nPlease be noted that the system would hold the fees from the orders entered the orderbook in advance. \n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | 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(-) |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| leverage | integer | Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. |\n| type | string | specify if the order is an 'limit' order or 'market' order |\n| remark | string | remark for the order, length cannot exceed 100 utf8 characters |\n| stopPriceType | string | Either 'TP', 'IP' or 'MP' |\n| reduceOnly | boolean | 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. |\n| closeOrder | boolean | 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. |\n| forceHold | boolean | 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. |\n| stp | string | [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. |\n| marginMode | string | Margin mode: ISOLATED, CROSS, default: ISOLATED |\n| price | string | Required for type is 'limit' order, indicating the operating price |\n| size | integer | **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. |\n| timeInForce | string | 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 |\n| postOnly | boolean | 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. |\n| hidden | boolean | Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. |\n| iceberg | boolean | 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. |\n| visibleSize | string | 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. |\n| triggerStopUpPrice | string | Take profit price |\n| triggerStopDownPrice | string | Stop loss price |\n| qty | string | **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 |\n| valueQty | string | **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 |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470237)\n\n:::info[Description]\nPlace 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.\n\nYou can place two 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.\n\nPlease be noted that the system would hold the fees from the orders entered the orderbook in advance. \n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | 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(-) |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| leverage | integer | Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. |\n| type | string | specify if the order is an 'limit' order or 'market' order |\n| remark | string | remark for the order, length cannot exceed 100 utf8 characters |\n| stopPriceType | string | Either 'TP', 'IP' or 'MP' |\n| reduceOnly | boolean | 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. |\n| closeOrder | boolean | 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. |\n| forceHold | boolean | 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. |\n| stp | string | [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. |\n| marginMode | string | Margin mode: ISOLATED, CROSS, default: ISOLATED |\n| price | string | Required for type is 'limit' order, indicating the operating price |\n| size | integer | **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. |\n| timeInForce | string | 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 |\n| postOnly | boolean | 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. |\n| hidden | boolean | Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. |\n| iceberg | boolean | 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. |\n| visibleSize | string | 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. |\n| triggerStopUpPrice | string | Take profit price |\n| triggerStopDownPrice | string | Stop loss price |\n| qty | string | **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 |\n| valueQty | string | **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 |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", "body": { "mode": "raw", "raw": "{\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}", @@ -13904,11 +14388,11 @@ { "key": "clientOid", "value": "5c52e11203aa677f33e493fb", - "description": "The user self-defined order id." + "description": "The user self-defined order ID." } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470352)\n\n:::info[Description]\nGet a single order by client order id (including a stop order).\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Order ID |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| type | string | Order type, market order or limit order |\n| side | string | Transaction side |\n| price | string | Order price |\n| size | integer | Order quantity |\n| value | string | Order value
|\n| dealValue | string | Executed size of funds
|\n| dealSize | integer | Executed quantity
|\n| stp | string | [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. |\n| stop | string | Stop order type (stop limit or stop market)
|\n| stopPriceType | string | Trigger price type of stop orders |\n| stopTriggered | boolean | Mark to show whether the stop order is triggered |\n| stopPrice | number | Trigger price of stop orders |\n| timeInForce | string | Time in force policy type
|\n| postOnly | boolean | Mark of post only
|\n| hidden | boolean | Mark of the hidden order
|\n| iceberg | boolean | Mark of the iceberg order
|\n| leverage | string | Leverage of the order
|\n| forceHold | boolean | A mark to forcely hold the funds for an order
|\n| closeOrder | boolean | A mark to close the position
|\n| visibleSize | integer | Visible size of the iceberg order
|\n| clientOid | string | Unique order id created by users to identify their orders
|\n| remark | string | Remark |\n| tags | string | tag order source
|\n| isActive | boolean | Mark of the active orders
|\n| cancelExist | boolean | Mark of the canceled orders
|\n| createdAt | integer | Time the order created
|\n| updatedAt | integer | last update time
|\n| endAt | integer | Order Endtime |\n| orderTime | integer | Order create time in nanosecond
|\n| settleCurrency | string | settlement currency
|\n| marginMode | string | Margin mode: ISOLATED (isolated), CROSS (cross margin).
|\n| avgDealPrice | string | 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 | integer | Value of the executed orders
|\n| filledValue | string | Executed order quantity
|\n| status | string | order status: “open” or “done”
|\n| reduceOnly | boolean | A mark to reduce the position size only
|\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470352)\n\n:::info[Description]\nGet a single order by client order ID (including a stop order).\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Order ID |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| type | string | Order type, market order or limit order |\n| side | string | Transaction side |\n| price | string | Order Price |\n| size | integer | Order quantity |\n| value | string | Order value
|\n| dealValue | string | Executed size of funds
|\n| dealSize | integer | Executed quantity
|\n| stp | string | [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported. |\n| stop | string | Stop order type (stop limit or stop market)
|\n| stopPriceType | string | Trigger price type of stop orders |\n| stopTriggered | boolean | Mark to show whether the stop order is triggered |\n| stopPrice | number | Trigger price of stop orders |\n| timeInForce | string | Time in force policy type
|\n| postOnly | boolean | Mark of post only
|\n| hidden | boolean | Mark of the hidden order
|\n| iceberg | boolean | Mark of the iceberg order
|\n| leverage | string | Leverage of the order
|\n| forceHold | boolean | A mark to force-hold the funds for an order
|\n| closeOrder | boolean | A mark to close the position
|\n| visibleSize | integer | Visible size of the iceberg order
|\n| clientOid | string | Unique order ID created by users to identify their orders
|\n| remark | string | Remark |\n| tags | string | Tag order source
|\n| isActive | boolean | Mark of the active orders
|\n| cancelExist | boolean | Mark of the canceled orders
|\n| createdAt | integer | Order creation time
|\n| updatedAt | integer | Last update time
|\n| endAt | integer | Order Endtime |\n| orderTime | integer | Order creation time in nanoseconds
|\n| settleCurrency | string | Settlement currency
|\n| marginMode | string | Margin mode: ISOLATED (isolated), CROSS (cross margin).
|\n| avgDealPrice | string | 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 | integer | Value of the executed orders
|\n| filledValue | string | Executed order quantity
|\n| status | string | order status: “open” or “done”
|\n| reduceOnly | boolean | A mark to reduce the position size only
|\n\n---\n", "body": {} }, "response": [ @@ -13933,7 +14417,7 @@ { "key": "clientOid", "value": "5c52e11203aa677f33e493fb", - "description": "The user self-defined order id." + "description": "The user self-defined order ID." } ] } @@ -14007,7 +14491,7 @@ { "key": "type", "value": null, - "description": "limit, market, limit_stop or market_stop" + "description": "Order Type" }, { "key": "startAt", @@ -14070,7 +14554,7 @@ { "key": "type", "value": null, - "description": "limit, market, limit_stop or market_stop" + "description": "Order Type" }, { "key": "startAt", @@ -14383,11 +14867,11 @@ { "key": "symbol", "value": "XBTUSDTM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470250)\n\n:::info[Description]\nYou can query this endpoint to get the the total number and value of the all your active orders.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| openOrderBuySize | integer | Total number of the unexecuted buy orders
|\n| openOrderSellSize | integer | Total number of the unexecuted sell orders
|\n| openOrderBuyCost | string | Value of all the unexecuted buy orders
|\n| openOrderSellCost | string | Value of all the unexecuted sell orders
|\n| settleCurrency | string | settlement currency
|\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470250)\n\n:::info[Description]\nYou can query this endpoint to get the total number and value of all your active orders.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| openOrderBuySize | integer | Total number of unexecuted buy orders
|\n| openOrderSellSize | integer | Total number of unexecuted sell orders
|\n| openOrderBuyCost | string | Value of all unexecuted buy orders
|\n| openOrderSellCost | string | Value of all unexecuted sell orders
|\n| settleCurrency | string | Settlement currency
|\n\n---\n", "body": {} }, "response": [ @@ -14411,7 +14895,7 @@ { "key": "symbol", "value": "XBTUSDTM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " } ] } @@ -14470,11 +14954,11 @@ { "key": "symbol", "value": "XBTUSDTM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470249)\n\n:::info[Description]\nGet a list of recent 1000 fills in the last 24 hours. If you need to get your recent traded order history with low latency, you may query this endpoint.\n\nIf you need to get your recent traded order history with low latency, you may query this endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| tradeId | string | Trade ID
|\n| orderId | string | Order ID
|\n| side | string | Transaction side
|\n| liquidity | string | Liquidity- taker or maker
|\n| forceTaker | boolean | Whether to force processing as a taker
|\n| price | string | Filled price
|\n| size | integer | Filled amount
|\n| value | string | Order value
|\n| openFeePay | string | Opening transaction fee
|\n| closeFeePay | string | Closing transaction fee
|\n| stop | string | A mark to the stop order type
|\n| feeRate | string | Fee Rate |\n| fixFee | string | Fixed fees(Deprecated field, no actual use of the value field)
|\n| feeCurrency | string | Charging currency
|\n| tradeTime | integer | trade time in nanosecond
|\n| subTradeType | string | Deprecated field, no actual use of the value field |\n| marginMode | string | Margin mode: ISOLATED (isolated), CROSS (cross margin).
|\n| displayType | string | Order Type |\n| fee | string | Transaction fee
|\n| settleCurrency | string | Settle Currency |\n| orderType | string | Order type
|\n| tradeType | string | Trade type (trade, liquid, cancel, adl or settlement)
|\n| createdAt | integer | Time the order created
|\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470249)\n\n:::info[Description]\nGet 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.\n\nIf you need to get your recently traded order history with low latency, you may query this endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| tradeId | string | Trade ID
|\n| orderId | string | Order ID
|\n| side | string | Transaction side
|\n| liquidity | string | Liquidity-taker or -maker
|\n| forceTaker | boolean | Whether to force processing as a taker
|\n| price | string | Filled price
|\n| size | integer | Filled amount
|\n| value | string | Order value
|\n| openFeePay | string | Opening transaction fee
|\n| closeFeePay | string | Closing transaction fee
|\n| stop | string | A mark to the stop order type
|\n| feeRate | string | Fee Rate |\n| fixFee | string | Fixed fees (Deprecated field, no actual use of the value field)
|\n| feeCurrency | string | Charging currency
|\n| tradeTime | integer | Trade time in nanoseconds
|\n| subTradeType | string | Deprecated field, no actual use of the value field |\n| marginMode | string | Margin mode: ISOLATED (isolated), CROSS (cross margin).
|\n| displayType | string | Order Type |\n| fee | string | Transaction fee
|\n| settleCurrency | string | Settle Currency |\n| orderType | string | Order type
|\n| tradeType | string | Trade type (trade, liquid, cancel, adl or settlement)
|\n| createdAt | integer | Order creation time
|\n\n---\n", "body": {} }, "response": [ @@ -14498,7 +14982,7 @@ { "key": "symbol", "value": "XBTUSDTM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " } ] } @@ -14557,12 +15041,12 @@ { "key": "orderId", "value": "236655147005071361", - "description": "List fills for a specific order only (If you specify orderId, other parameters can be ignored)" + "description": "List fills for a specific order only (if you specify orderId, other parameters can be ignored)" }, { "key": "symbol", "value": null, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "side", @@ -14577,31 +15061,31 @@ { "key": "tradeTypes", "value": null, - "description": "Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all type when empty" + "description": "Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all types when empty" }, { "key": "startAt", "value": null, - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": null, - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", "value": null, - "description": "Current request page, The default currentPage is 1" + "description": "Current request page. The default currentPage is 1" }, { "key": "pageSize", "value": null, - "description": "pageSize, The default pageSize is 50, The maximum cannot exceed 1000" + "description": "pageSize, The default pageSize is 50; the maximum cannot exceed 1000" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470248)\n\n:::info[Description]\nGet 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.\n:::\n\n**Data Time Range**\n\nThe system allows you to retrieve data up to one week (start from the last day by default). If the time period of the queried data exceeds one week (time range from the start time to end time exceeded 24*7 hours), the system will prompt to remind you that you have exceeded the time limit. If you only specified the start time, the system will automatically calculate the end time (end time = start time + 24 hours). On the contrary, if you only specified the end time, the system will calculate the start time (start time= end time - 24 hours) the same way.\n\n**Fee**\n\nOrders on KuCoin Futures platform are classified into two types, taker and maker. A taker order matches other resting orders on the exchange order book, and gets executed immediately after order entry. A maker order, on the contrary, stays on the exchange order book and awaits to be matched. Taker orders will be charged taker fees, while maker orders will receive maker rebates. Please note that market orders, iceberg orders and hidden orders are always charged taker fees.\n\nThe system will pre-freeze a predicted taker fee when you place an order.The liquidity field indicates if the fill was charged taker or maker fees.\n\nThe system will pre-freeze the predicted fees (including the maintenance margin needed for the position, entry fees and fees to close positions) if you added the position, and will not pre-freeze fees if you reduced the position. After the order is executed, if you added positions, the system will deduct entry fees from your balance, if you closed positions, the system will deduct the close fees.\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | |\n| pageSize | integer | |\n| totalNum | integer | |\n| totalPage | integer | |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| tradeId | string | Trade ID
|\n| orderId | string | Order ID
|\n| side | string | Transaction side |\n| liquidity | string | Liquidity- taker or maker |\n| forceTaker | boolean | Whether to force processing as a taker
|\n| price | string | Filled price |\n| size | integer | Filled amount |\n| value | string | Order value |\n| openFeePay | string | Opening transaction fee |\n| closeFeePay | string | Closing transaction fee |\n| stop | string | A mark to the stop order type |\n| feeRate | string | Fee Rate |\n| fixFee | string | Fixed fees(Deprecated field, no actual use of the value field) |\n| feeCurrency | string | Charging currency |\n| tradeTime | integer | trade time in nanosecond |\n| subTradeType | string | Deprecated field, no actual use of the value field |\n| marginMode | string | Margin mode: ISOLATED (isolated), CROSS (cross margin). |\n| settleCurrency | string | Settle Currency |\n| displayType | string | Order Type |\n| fee | string | |\n| orderType | string | Order type |\n| tradeType | string | Trade type (trade, liquid, adl or settlement)
|\n| createdAt | integer | Time the order created
|\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470248)\n\n:::info[Description]\nGet 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.\n:::\n\n**Data Time Range**\n\nThe system allows you to retrieve up to one week’s worth of data (starting from the last day by default). If the time period of the queried data exceeds one week (time range from start time to end time exceeding 24 * 7 hours), the system will prompt to remind you that you have exceeded the time limit. If you only specified the start time, the system will automatically calculate the end time (end time = start time + 24 hours). Conversely, if you only specified the end time, the system will calculate the start time (start time = end time - 24 hours) the same way.\n\n**Fee**\n\nOrders on KuCoin Futures platform are classified into two types, taker and maker. A taker order matches other resting orders on the exchange order book, and gets executed immediately after order entry. A maker order, on the other hand, stays on the exchange order book and awaits to be matched. Taker orders will be charged taker fees, while maker orders will receive maker rebates. Please note that market orders, iceberg orders and hidden orders are always charged taker fees.\n\nThe system will pre-freeze a predicted taker fee when you place an order. The liquidity field indicates if the fill was charged taker or maker fees.\n\nThe system will pre-freeze the predicted fees (including the maintenance margin needed for the position, entry fees and fees to close positions) if you added the position, and will not pre-freeze fees if you reduced the position. After the order is executed, if you added positions, the system will deduct entry fees from your balance; if you closed positions, the system will deduct the close fees.\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | |\n| pageSize | integer | |\n| totalNum | integer | |\n| totalPage | integer | |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| tradeId | string | Trade ID
|\n| orderId | string | Order ID
|\n| side | string | Transaction side |\n| liquidity | string | Liquidity-taker or -maker |\n| forceTaker | boolean | Whether to force processing as a taker
|\n| price | string | Filled price |\n| size | integer | Filled amount |\n| value | string | Order value |\n| openFeePay | string | Opening transaction fee |\n| closeFeePay | string | Closing transaction fee |\n| stop | string | A mark to the stop order type |\n| feeRate | string | Fee Rate |\n| fixFee | string | Fixed fees (Deprecated field, no actual use of the value field) |\n| feeCurrency | string | Charging currency |\n| tradeTime | integer | Trade time in nanoseconds |\n| subTradeType | string | Deprecated field, no actual use of the value field |\n| marginMode | string | Margin mode: ISOLATED (isolated), CROSS (cross margin). |\n| settleCurrency | string | Settle currency |\n| displayType | string | Order type |\n| fee | string | Trading fee |\n| orderType | string | Order type |\n| tradeType | string | Trade type (trade, liquid, adl or settlement)
|\n| createdAt | integer | Order creation time
|\n| openFeeTaxPay | string | Opening tax fee (Only KYC users in some regions have this parameter) |\n| closeFeeTaxPay | string | Close tax fee (Only KYC users in some regions have this parameter) |\n\n---\n", "body": {} }, "response": [ @@ -14625,12 +15109,12 @@ { "key": "orderId", "value": "236655147005071361", - "description": "List fills for a specific order only (If you specify orderId, other parameters can be ignored)" + "description": "List fills for a specific order only (if you specify orderId, other parameters can be ignored)" }, { "key": "symbol", "value": null, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "side", @@ -14645,27 +15129,27 @@ { "key": "tradeTypes", "value": null, - "description": "Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all type when empty" + "description": "Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all types when empty" }, { "key": "startAt", "value": null, - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endAt", "value": null, - "description": "End time (milisecond)" + "description": "End time (milliseconds)" }, { "key": "currentPage", "value": null, - "description": "Current request page, The default currentPage is 1" + "description": "Current request page. The default currentPage is 1" }, { "key": "pageSize", "value": null, - "description": "pageSize, The default pageSize is 50, The maximum cannot exceed 1000" + "description": "pageSize, The default pageSize is 50; the maximum cannot exceed 1000" } ] } @@ -14700,7 +15184,7 @@ } ], "cookie": [], - "body": "{\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\": \"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 \"settleCurrency\": \"USDT\",\n \"fee\": \"0.04045854\",\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 \"settleCurrency\": \"USDT\",\n \"fee\": \"0.040467\",\n \"orderType\": \"market\",\n \"displayType\": \"market\",\n \"tradeType\": \"trade\",\n \"subTradeType\": null,\n \"tradeTime\": 1729155587944000000,\n \"createdAt\": 1729155588104\n }\n ]\n }\n}" + "body": "{\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}" } ] } @@ -14904,12 +15388,12 @@ { "key": "symbol", "value": null, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "price", "value": null, - "description": "Order price\n" + "description": "Order Price\n" }, { "key": "leverage", @@ -14918,7 +15402,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470251)\n\n:::info[Description]\nGet Maximum Open Position Size.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| maxBuyOpenSize | integer | Maximum buy size
|\n| maxSellOpenSize | integer | Maximum buy size
|\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470251)\n\n:::info[Description]\nGet Maximum Open Position Size.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| maxBuyOpenSize | integer | Maximum buy size (unit: lot)
|\n| maxSellOpenSize | integer | Maximum buy size (unit: lot)
|\n\n---\n", "body": {} }, "response": [ @@ -14942,12 +15426,12 @@ { "key": "symbol", "value": null, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "price", "value": null, - "description": "Order price\n" + "description": "Order Price\n" }, { "key": "leverage", @@ -15209,7 +15693,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470254)\n\n:::info[Description]\nThis interface can query position history information records.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | Current page number
|\n| pageSize | integer | Number of results per page
|\n| totalNum | integer | Total number of results
|\n| totalPage | integer | Total number of pages
|\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| closeId | string | Close ID
|\n| userId | string | User ID |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| settleCurrency | string | Currency used to settle trades
|\n| leverage | string | Leverage applied to the order
|\n| type | string | Type of closure
|\n| pnl | string | Net profit and loss (after deducting fees and funding costs)
|\n| realisedGrossCost | string | Accumulated realised gross profit value
|\n| withdrawPnl | string | Accumulated realised profit withdrawn from the position
|\n| tradeFee | string | Accumulated trading fees
|\n| fundingFee | string | Accumulated funding fees
|\n| openTime | integer | Time when the position was opened
|\n| closeTime | integer | Time when the position was closed (default sorted in descending order)
|\n| openPrice | string | Opening price of the position
|\n| closePrice | string | Closing price of the position
|\n| marginMode | string | Margin Mode: CROSS,ISOLATED |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470254)\n\n:::info[Description]\nThis interface can query position history information records.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | Current page number
|\n| pageSize | integer | Number of results per page
|\n| totalNum | integer | Total number of results
|\n| totalPage | integer | Total number of pages
|\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| closeId | string | Close ID
|\n| userId | string | User ID |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| settleCurrency | string | Currency used to settle trades
|\n| leverage | string | Leverage applied to the order
|\n| type | string | Type of closure
|\n| pnl | string | Net profit and loss (after deducting fees and funding costs)
|\n| realisedGrossCost | string | Accumulated realised gross profit value
|\n| withdrawPnl | string | Accumulated realised profit withdrawn from the position
|\n| tradeFee | string | Accumulated trading fees
|\n| fundingFee | string | Accumulated funding fees
|\n| openTime | integer | Time when the position was opened
|\n| closeTime | integer | Time when the position was closed (default sorted in descending order)
|\n| openPrice | string | Opening price of the position
|\n| closePrice | string | Closing price of the position
|\n| marginMode | string | Margin Mode: CROSS,ISOLATED |\n| realisedGrossCostNew | string | |\n| tax | string | Tax |\n| roe | string | |\n| liquidAmount | string | |\n| liquidPrice | string | |\n| side | string | Position side |\n\n---\n", "body": {} }, "response": [ @@ -15288,7 +15772,7 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 10,\n \"totalNum\": 3,\n \"totalPage\": 1,\n \"items\": [\n {\n \"closeId\": \"500000000027312193\",\n \"userId\": \"633559791e1cbc0001f319bc\",\n \"symbol\": \"XBTUSDTM\",\n \"settleCurrency\": \"USDT\",\n \"leverage\": \"0.0\",\n \"type\": \"CLOSE_SHORT\",\n \"pnl\": \"-3.79237944\",\n \"realisedGrossCost\": \"3.795\",\n \"withdrawPnl\": \"0.0\",\n \"tradeFee\": \"0.078657\",\n \"fundingFee\": \"0.08127756\",\n \"openTime\": 1727073653603,\n \"closeTime\": 1729155587945,\n \"openPrice\": \"63650.0\",\n \"closePrice\": \"67445.0\",\n \"marginMode\": \"ISOLATED\"\n },\n {\n \"closeId\": \"500000000026809668\",\n \"userId\": \"633559791e1cbc0001f319bc\",\n \"symbol\": \"SUIUSDTM\",\n \"settleCurrency\": \"USDT\",\n \"leverage\": \"0.0\",\n \"type\": \"LIQUID_SHORT\",\n \"pnl\": \"-1.10919296\",\n \"realisedGrossCost\": \"1.11297635\",\n \"withdrawPnl\": \"0.0\",\n \"tradeFee\": \"0.00200295\",\n \"fundingFee\": \"0.00578634\",\n \"openTime\": 1726473389296,\n \"closeTime\": 1728738683541,\n \"openPrice\": \"1.1072\",\n \"closePrice\": \"2.22017635\",\n \"marginMode\": \"ISOLATED\"\n },\n {\n \"closeId\": \"500000000026819355\",\n \"userId\": \"633559791e1cbc0001f319bc\",\n \"symbol\": \"XBTUSDTM\",\n \"settleCurrency\": \"USDT\",\n \"leverage\": \"0.0\",\n \"type\": \"LIQUID_SHORT\",\n \"pnl\": \"-5.941896296\",\n \"realisedGrossCost\": \"5.86937042\",\n \"withdrawPnl\": \"0.0\",\n \"tradeFee\": \"0.074020096\",\n \"fundingFee\": \"0.00149422\",\n \"openTime\": 1726490775358,\n \"closeTime\": 1727061049859,\n \"openPrice\": \"58679.6\",\n \"closePrice\": \"64548.97042\",\n \"marginMode\": \"ISOLATED\"\n }\n ]\n }\n}" + "body": "{\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}" } ] }, @@ -15486,7 +15970,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470261)\n\n:::info[Description]\nThis interface can modify the current symbol’s cross-margin leverage multiple.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| leverage | string | Leverage multiple |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | |\n| leverage | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470261)\n\n:::info[Description]\nThis interface can modify the current symbol’s cross-margin leverage multiple.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| leverage | string | Leverage multiple |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | boolean | |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"symbol\": \"XBTUSDTM\",\n \"leverage\" : \"10\"\n}", @@ -15547,7 +16031,7 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"XBTUSDTM\",\n \"leverage\": \"3\"\n }\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": true\n}" } ] }, @@ -15743,7 +16227,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470263)\n\n:::info[Description]\nThis interface can be used to obtain information about risk limit level of a specific contract(Only valid for isolated Margin).\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| level | integer | level
|\n| maxRiskLimit | integer | Upper limit USDT(includes)
|\n| minRiskLimit | integer | Lower limit USDT
|\n| maxLeverage | integer | Max leverage
|\n| initialMargin | number | Initial margin rate
|\n| maintainMargin | number | Maintenance margin rate
|\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470263)\n\n:::info[Description]\nThis interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin).\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| level | integer | Level
|\n| maxRiskLimit | integer | Upper limit USDT (included)
|\n| minRiskLimit | integer | Lower limit USDT
|\n| maxLeverage | integer | Max. leverage
|\n| initialMargin | number | Initial margin rate
|\n| maintainMargin | number | Maintenance margin rate
|\n\n---\n", "body": {} }, "response": [ @@ -15822,7 +16306,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470264)\n\n:::info[Description]\nThis interface is for the adjustment of the risk limit level(Only valid for isolated Margin). To adjust the level will cancel the open order, the response can only indicate whether the submit of the adjustment request is successful or not. The result of the adjustment can be achieved by WebSocket information: Position Change Events\n\n:::\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| level | integer | level |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | boolean | To adjust the level will cancel the open order, the response can only indicate whether the submit of the adjustment request is successful or not.
|\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470264)\n\n:::info[Description]\nThis interface is for adjusting the risk limit level (only valid for Isolated Margin). Adjusting the level will result in the cancellation of any open orders. The response will indicate only whether the adjustment request was successfully submitted. The result of the adjustment can be obtained with information from Websocket: Position Change Events.\n\n:::\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| level | integer | Level |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | boolean | 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\n---\n", "body": { "mode": "raw", "raw": "{\n \"symbol\" : \"XBTUSDTM\",\n \"level\" : 2\n}", @@ -15896,7 +16380,7 @@ "name": "Funding Fees", "item": [ { - "name": "Get Current Funding Rate", + "name": "Get Current Funding Rate.", "request": { "method": "GET", "header": [], @@ -15915,7 +16399,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470265)\n\n:::info[Description]\nGet Current Funding Rate\n\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Funding Rate Symbol
|\n| granularity | integer | Granularity (milisecond)
|\n| timePoint | integer | The funding rate settlement time point of the previous cycle
(milisecond)
|\n| value | number | Current cycle funding rate
|\n| predictedValue | number | Predicted funding rate
|\n| fundingRateCap | number | Maximum Funding Rate |\n| fundingRateFloor | number | Minimum Funding Rate |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470265)\n\n:::info[Description]\nGet Current Funding Rate.\n\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Funding Rate Symbol
|\n| granularity | integer | Granularity (milliseconds)
|\n| timePoint | integer | The funding rate settlement time point of the previous cycle
(milliseconds)
|\n| value | number | Current cycle funding rate
|\n| predictedValue | number | Predicted funding rate
|\n| fundingRateCap | number | Maximum Funding Rate |\n| fundingRateFloor | number | Minimum Funding Rate |\n\n---\n", "body": {} }, "response": [ @@ -15995,21 +16479,21 @@ { "key": "symbol", "value": "XBTUSDTM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "from", "value": "1700310700000", - "description": "Begin time (milisecond)\n" + "description": "Begin time (milliseconds)\n" }, { "key": "to", "value": "1702310700000", - "description": "End time (milisecond)\n" + "description": "End time (milliseconds)\n" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470266)\n\n:::info[Description]\nQuery the funding rate at each settlement time point within a certain time range of the corresponding contract\n\n:::\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| fundingRate | number | Funding rate |\n| timepoint | integer | Time point (milisecond)

|\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470266)\n\n:::info[Description]\nQuery the funding rate at each settlement time point within a certain time range of the corresponding contract.\n\n:::\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| fundingRate | number | Funding rate |\n| timepoint | integer | Time point (milliseconds)

|\n\n---\n", "body": {} }, "response": [ @@ -16034,17 +16518,17 @@ { "key": "symbol", "value": "XBTUSDTM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "from", "value": "1700310700000", - "description": "Begin time (milisecond)\n" + "description": "Begin time (milliseconds)\n" }, { "key": "to", "value": "1702310700000", - "description": "End time (milisecond)\n" + "description": "End time (milliseconds)\n" } ] } @@ -16103,22 +16587,22 @@ { "key": "symbol", "value": "XBTUSDTM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, { - "key": "from", + "key": "startAt", "value": "1700310700000", - "description": "Begin time (milisecond)\n" + "description": "Begin time (milliseconds)\n" }, { - "key": "to", + "key": "endAt", "value": "1702310700000", - "description": "End time (milisecond)\n" + "description": "End time (milliseconds)\n" }, { "key": "reverse", "value": null, - "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" + "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" }, { "key": "offset", @@ -16128,16 +16612,16 @@ { "key": "forward", "value": null, - "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" + "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" }, { "key": "maxCount", "value": null, - "description": "Max record count. The default record count is 10" + "description": "Max. record count. The default record count is 10" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470267)\n\n:::info[Description]\nSubmit request to get the funding history.\n:::\n\n:::tip[Tips]\nThe **from time** and **to time** range cannot exceed 3 month. An error will occur if the specified time window exceeds the range. \n\nIf only **from time** is entered, the default **to time** is the current time. If it exceeds 3 months, an error will be reported.\n\nIf only **to time** is entered, the system will automatically calculate the start time as end time minus 3month.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| dataList | array | Refer to the schema section of dataList |\n| hasMore | boolean | Whether there are more pages
|\n\n**root.data.dataList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | integer | id |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| timePoint | integer | Time point (milisecond)
|\n| fundingRate | number | Funding rate
|\n| markPrice | number | Mark price
|\n| positionQty | integer | Position size |\n| positionCost | number | Position value at settlement period
|\n| funding | number | Settled funding fees. A positive number means that the user received the funding fee, and vice versa.
|\n| settleCurrency | string | settlement currency
|\n| context | string | context |\n| marginMode | string | Margin mode: ISOLATED (isolated), CROSS (cross margin). |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470267)\n\n:::info[Description]\nSubmit request to get the funding history.\n:::\n\n:::tip[Tips]\nThe **startAt** and **endAt** range cannot exceed 3 months. An error will occur if the specified time window exceeds the range. \n\nIf only **startAt** is entered, the default **endAt** is the current time. If it exceeds 3 months, an error will be reported.\n\nIf only **endAt** is entered, the system will automatically calculate the start time as end time minus 3 months.\n\n**Note:** Because data changes frequently, using offset-based pagination instead of time-based pagination (startAt and endAt) may lead to inaccurate or duplicated data. It is recommended to paginate using startAt and endAt for more reliable results. It is recommended to paginate by startAt and endAt\n:::\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| dataList | array | Refer to the schema section of dataList |\n| hasMore | boolean | Whether there are more pages
|\n\n**root.data.dataList Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | integer | ID |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| timePoint | integer | Time point (milliseconds)
|\n| fundingRate | number | Funding rate
|\n| markPrice | number | Mark price
|\n| positionQty | integer | Position size |\n| positionCost | number | Position value at settlement period
|\n| funding | number | Settled funding fees A positive number means that the user received the funding fee, and vice versa.
|\n| settleCurrency | string | Settlement currency
|\n| context | string | Context |\n| marginMode | string | Margin mode: ISOLATED (isolated), CROSS (cross margin). |\n\n---\n", "body": {} }, "response": [ @@ -16161,22 +16645,22 @@ { "key": "symbol", "value": "XBTUSDTM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, { - "key": "from", + "key": "startAt", "value": "1700310700000", - "description": "Begin time (milisecond)\n" + "description": "Begin time (milliseconds)\n" }, { - "key": "to", + "key": "endAt", "value": "1702310700000", - "description": "End time (milisecond)\n" + "description": "End time (milliseconds)\n" }, { "key": "reverse", "value": null, - "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" + "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" }, { "key": "offset", @@ -16186,12 +16670,12 @@ { "key": "forward", "value": null, - "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" + "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" }, { "key": "maxCount", "value": null, - "description": "Max record count. The default record count is 10" + "description": "Max. record count. The default record count is 10" } ] } @@ -16240,7 +16724,7 @@ "name": "Earn", "item": [ { - "name": "purchase", + "name": "Purchase", "request": { "method": "POST", "header": [], @@ -16258,7 +16742,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470268)\n\n:::info[Description]\nThis endpoint allows subscribing earn product\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| productId | string | Product Id |\n| amount | string | Subscription amount |\n| accountType | string | MAIN (funding account), TRADE (spot trading account) |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | Holding ID |\n| orderTxId | string | Subscription order ID |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470268)\n\n:::info[Description]\nThis endpoint allows you to subscribe Earn products.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| productId | string | Product ID |\n| amount | string | Subscription amount |\n| accountType | string | MAIN (funding account), TRADE (spot trading account) |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | Holding ID |\n| orderTxId | string | Subscription order ID |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"productId\": \"2611\",\n \"amount\": \"1\",\n \"accountType\": \"TRADE\"\n}", @@ -16354,7 +16838,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470269)\n\n:::info[Description]\nThis endpoint can get redemption preview information by holding ID. If the current holding is fully redeemed or in the process of being redeemed, it indicates that the holding does not exist.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| redeemAmount | string | Expected redemption amount |\n| penaltyInterestAmount | string | Penalty interest amount, incurred for early redemption of fixed-term products |\n| redeemPeriod | integer | Redemption waiting period (days) |\n| deliverTime | integer | Expected deliver time (milliseconds) |\n| manualRedeemable | boolean | Whether manual redemption is possible |\n| redeemAll | boolean | Whether the entire holding must be redeemed, required for early redemption of fixed-term products |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470269)\n\n:::info[Description]\nThis endpoint can get redemption preview information by holding ID. If the current holding is fully redeemed or in the process of being redeemed, it means that the holding does not exist.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | currency |\n| redeemAmount | string | Expected redemption amount |\n| penaltyInterestAmount | string | Penalty interest amount, incurred for early redemption of fixed-term products |\n| redeemPeriod | integer | Redemption waiting period (days) |\n| deliverTime | integer | Expected deliver time (milliseconds) |\n| manualRedeemable | boolean | Whether manual redemption is possible |\n| redeemAll | boolean | Whether the entire holding must be redeemed, required for early redemption of fixed-term products |\n\n---\n", "body": {} }, "response": [ @@ -16463,7 +16947,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470270)\n\n:::info[Description]\nThis endpoint allows initiating redemption by holding ID. If the current holding is fully redeemed or in the process of being redeemed, it indicates that the holding does not exist.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderTxId | string | Redemption order ID |\n| deliverTime | integer | Expected deliver time (milliseconds) |\n| status | string | Redemption status: SUCCESS (successful), PENDING (redemption pending) |\n| amount | string | Redemption amount |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470270)\n\n:::info[Description]\nThis endpoint allows you to redeem Earn products by using holding ID. If the current holding is fully redeemed or in the process of being redeemed, it means that the holding does not exist.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderTxId | string | Redemption order ID |\n| deliverTime | integer | Expected deliver time (milliseconds) |\n| status | string | Redemption status: SUCCESS (successful), PENDING (redemption pending) |\n| amount | string | Redemption amount |\n\n---\n", "body": {} }, "response": [ @@ -16568,7 +17052,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470271)\n\n:::info[Description]\nThis endpoint can get available savings products. If no products are available, an empty list is returned.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Product ID |\n| currency | string | currency |\n| category | string | Product category: DEMAND (savings) |\n| type | string | Product subtype: TIME (fixed), DEMAND (demand) |\n| precision | integer | Maximum precision supported |\n| productUpperLimit | string | Products total subscribe amount |\n| userUpperLimit | string | Max user subscribe amount |\n| userLowerLimit | string | Min user subscribe amount |\n| redeemPeriod | integer | Redemption waiting period (days) |\n| lockStartTime | integer | Product earliest interest start time, in milliseconds |\n| lockEndTime | integer | Product maturity time, in milliseconds |\n| applyStartTime | integer | Subscription start time, in milliseconds |\n| applyEndTime | integer | Subscription end time, in milliseconds |\n| returnRate | string | Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return |\n| incomeCurrency | string | Income currency |\n| earlyRedeemSupported | integer | Whether the fixed product supports early redemption: 0 (no), 1 (yes) |\n| productRemainAmount | string | Products remain subscribe amount |\n| status | string | Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) |\n| redeemType | string | Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) |\n| incomeReleaseType | string | Income release type: DAILY (daily release), AFTER (release after product ends) |\n| interestDate | integer | Most recent interest date(millisecond) |\n| duration | integer | Product duration (days) |\n| newUserOnly | integer | Whether the product is exclusive for new users: 0 (no), 1 (yes) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470271)\n\n:::info[Description]\nAvailable savings products can be obtained at this endpoint. If no products are available, an empty list is returned.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Product ID |\n| currency | string | currency |\n| category | string | Product category: DEMAND (savings) |\n| type | string | Product subtype: TIME (fixed), DEMAND (demand) |\n| precision | integer | Maximum precision supported |\n| productUpperLimit | string | Products total subscription amount |\n| userUpperLimit | string | Max. user subscription amount |\n| userLowerLimit | string | Min. user subscribe amount |\n| redeemPeriod | integer | Redemption waiting period (days) |\n| lockStartTime | integer | Product earliest interest start time, in milliseconds |\n| lockEndTime | integer | Product maturity time, in milliseconds |\n| applyStartTime | integer | Subscription start time, in milliseconds |\n| applyEndTime | integer | Subscription end time, in milliseconds |\n| returnRate | string | Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return |\n| incomeCurrency | string | Income currency |\n| earlyRedeemSupported | integer | Whether the fixed product supports early redemption: 0 (no), 1 (yes) |\n| productRemainAmount | string | Remaining product subscription amount |\n| status | string | Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) |\n| redeemType | string | Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) |\n| incomeReleaseType | string | Income release type: DAILY (daily release), AFTER (release after product ends) |\n| interestDate | integer | Most recent interest date (milliseconds) |\n| duration | integer | Product duration (days) |\n| newUserOnly | integer | Whether the product is exclusive to new users: 0 (no), 1 (yes) |\n\n---\n", "body": {} }, "response": [ @@ -16659,7 +17143,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470272)\n\n:::info[Description]\nThis endpoint can get available limited-time promotion products. If no products are available, an empty list is returned.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Product ID |\n| currency | string | currency |\n| category | string | Product category: ACTIVITY |\n| type | string | Product subtype: TIME (fixed), DEMAND (demand) |\n| precision | integer | Maximum precision supported |\n| productUpperLimit | string | Products total subscribe amount |\n| userUpperLimit | string | Max user subscribe amount |\n| userLowerLimit | string | Min user subscribe amount |\n| redeemPeriod | integer | Redemption waiting period (days) |\n| lockStartTime | integer | Product earliest interest start time, in milliseconds |\n| lockEndTime | integer | Product earliest interest end time, in milliseconds |\n| applyStartTime | integer | Subscription start time, in milliseconds |\n| applyEndTime | integer | Subscription end time, in milliseconds |\n| returnRate | string | Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return |\n| incomeCurrency | string | Income currency |\n| earlyRedeemSupported | integer | Whether the fixed product supports early redemption: 0 (no), 1 (yes) |\n| productRemainAmount | string | Products remain subscribe amount |\n| status | string | Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) |\n| redeemType | string | Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) |\n| incomeReleaseType | string | Income release type: DAILY (daily release), AFTER (release after product ends) |\n| interestDate | integer | Most recent interest date(millisecond) |\n| duration | integer | Product duration (days) |\n| newUserOnly | integer | Whether the product is exclusive for new users: 0 (no), 1 (yes) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470272)\n\n:::info[Description]\nAvailable limited-duration products can be obtained at this endpoint. If no products are available, an empty list is returned.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Product ID |\n| currency | string | currency |\n| category | string | Product category: ACTIVITY |\n| type | string | Product subtype: TIME (fixed), DEMAND (demand) |\n| precision | integer | Maximum precision supported |\n| productUpperLimit | string | Products total subscription amount |\n| userUpperLimit | string | Max. user subscription amount |\n| userLowerLimit | string | Min. user subscribe amount |\n| redeemPeriod | integer | Redemption waiting period (days) |\n| lockStartTime | integer | Product earliest interest start time, in milliseconds |\n| lockEndTime | integer | Earliest interest end time of product, in milliseconds |\n| applyStartTime | integer | Subscription start time, in milliseconds |\n| applyEndTime | integer | Subscription end time, in milliseconds |\n| returnRate | string | Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return |\n| incomeCurrency | string | Income currency |\n| earlyRedeemSupported | integer | Whether the fixed product supports early redemption: 0 (no), 1 (yes) |\n| productRemainAmount | string | Remaining product subscription amount |\n| status | string | Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) |\n| redeemType | string | Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) |\n| incomeReleaseType | string | Income release type: DAILY (daily release), AFTER (release after product ends) |\n| interestDate | integer | Most recent interest date (milliseconds) |\n| duration | integer | Product duration (days) |\n| newUserOnly | integer | Whether the product is exclusive to new users: 0 (no), 1 (yes) |\n\n---\n", "body": {} }, "response": [ @@ -16725,7 +17209,7 @@ ] }, { - "name": "Get Account Holding", + "name": "Get Staking Products", "request": { "method": "GET", "header": [], @@ -16739,37 +17223,18 @@ "api", "v1", "earn", - "hold-assets" + "staking", + "products" ], "query": [ { "key": "currency", - "value": "KCS", + "value": "STX", "description": "currency" - }, - { - "key": "productId", - "value": "", - "description": "Product ID" - }, - { - "key": "productCategory", - "value": "", - "description": "Product category" - }, - { - "key": "currentPage", - "value": "1", - "description": "Current request page." - }, - { - "key": "pageSize", - "value": "10", - "description": "Number of results per request. Minimum is 10, maximum is 500." } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470273)\n\n:::info[Description]\nThis endpoint can get current holding assets information. If no current holding assets are available, an empty list is returned.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| totalNum | integer | total number |\n| items | array | Refer to the schema section of items |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalPage | integer | total page |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | Holding ID |\n| productId | string | Product ID |\n| productCategory | string | Product category |\n| productType | string | Product sub-type |\n| currency | string | currency |\n| incomeCurrency | string | Income currency |\n| returnRate | string | Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return |\n| holdAmount | string | Holding amount |\n| redeemedAmount | string | Redeemed amount |\n| redeemingAmount | string | Redeeming amount |\n| lockStartTime | integer | Product earliest interest start time, in milliseconds |\n| lockEndTime | integer | Product maturity time, in milliseconds |\n| purchaseTime | integer | Most recent subscription time, in milliseconds |\n| redeemPeriod | integer | Redemption waiting period (days) |\n| status | string | Status: LOCKED (holding), REDEEMING (redeeming) |\n| earlyRedeemSupported | integer | Whether the fixed product supports early redemption: 0 (no), 1 (yes) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470274)\n\n:::info[Description]\nAvailable staking products can be obtained at this endpoint. If no products are available, an empty list is returned.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Product ID |\n| currency | string | currency |\n| category | string | Product category: STAKING |\n| type | string | Product subtype: TIME (fixed), DEMAND (demand) |\n| precision | integer | Maximum precision supported |\n| productUpperLimit | string | Products total subscription amount |\n| userUpperLimit | string | Max. user subscription amount |\n| userLowerLimit | string | Min. user subscription amount |\n| redeemPeriod | integer | Redemption waiting period (days) |\n| lockStartTime | integer | Product earliest interest start time, in milliseconds |\n| lockEndTime | integer | Product maturity time, in milliseconds |\n| applyStartTime | integer | Subscription start time, in milliseconds |\n| applyEndTime | integer | Subscription end time, in milliseconds |\n| returnRate | string | Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return |\n| incomeCurrency | string | Income currency |\n| earlyRedeemSupported | integer | Whether the fixed product supports early redemption: 0 (no), 1 (yes) |\n| productRemainAmount | string | Remaining product subscription amount |\n| status | string | Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest accrual in progress) |\n| redeemType | string | Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) |\n| incomeReleaseType | string | Income release type: DAILY (daily release), AFTER (release after product ends) |\n| interestDate | integer | Most recent interest date (milliseconds) |\n| duration | integer | Product duration (days) |\n| newUserOnly | integer | Whether the product is exclusive to new users: 0 (no), 1 (yes) |\n\n---\n", "body": {} }, "response": [ @@ -16788,33 +17253,14 @@ "api", "v1", "earn", - "hold-assets" + "staking", + "products" ], "query": [ { "key": "currency", - "value": "KCS", + "value": "STX", "description": "currency" - }, - { - "key": "productId", - "value": "", - "description": "Product ID" - }, - { - "key": "productCategory", - "value": "", - "description": "Product category" - }, - { - "key": "currentPage", - "value": "1", - "description": "Current request page." - }, - { - "key": "pageSize", - "value": "10", - "description": "Number of results per request. Minimum is 10, maximum is 500." } ] } @@ -16849,12 +17295,12 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"currentPage\": 1,\n \"pageSize\": 15,\n \"items\": [\n {\n \"orderId\": \"2767291\",\n \"productId\": \"2611\",\n \"productCategory\": \"KCS_STAKING\",\n \"productType\": \"DEMAND\",\n \"currency\": \"KCS\",\n \"incomeCurrency\": \"KCS\",\n \"returnRate\": \"0.03471727\",\n \"holdAmount\": \"1\",\n \"redeemedAmount\": \"0\",\n \"redeemingAmount\": \"1\",\n \"lockStartTime\": 1701252000000,\n \"lockEndTime\": null,\n \"purchaseTime\": 1729257513000,\n \"redeemPeriod\": 3,\n \"status\": \"REDEEMING\",\n \"earlyRedeemSupported\": 0\n }\n ]\n }\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"id\": \"2535\",\n \"currency\": \"STX\",\n \"category\": \"STAKING\",\n \"type\": \"DEMAND\",\n \"precision\": 8,\n \"productUpperLimit\": \"1000000\",\n \"userUpperLimit\": \"10000\",\n \"userLowerLimit\": \"1\",\n \"redeemPeriod\": 14,\n \"lockStartTime\": 1688614514000,\n \"lockEndTime\": null,\n \"applyStartTime\": 1688614512000,\n \"applyEndTime\": null,\n \"returnRate\": \"0.045\",\n \"incomeCurrency\": \"BTC\",\n \"earlyRedeemSupported\": 0,\n \"productRemainAmount\": \"254032.90178701\",\n \"status\": \"ONGOING\",\n \"redeemType\": \"MANUAL\",\n \"incomeReleaseType\": \"DAILY\",\n \"interestDate\": 1729267200000,\n \"duration\": 0,\n \"newUserOnly\": 0\n }\n ]\n}" } ] }, { - "name": "Get Staking Products", + "name": "Get KCS Staking Products", "request": { "method": "GET", "header": [], @@ -16868,18 +17314,18 @@ "api", "v1", "earn", - "staking", + "kcs-staking", "products" ], "query": [ { "key": "currency", - "value": "STX", + "value": "KCS", "description": "currency" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470274)\n\n:::info[Description]\nThis endpoint can get available staking products. If no products are available, an empty list is returned.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Product ID |\n| currency | string | currency |\n| category | string | Product category: STAKING |\n| type | string | Product subtype: TIME (fixed), DEMAND (demand) |\n| precision | integer | Maximum precision supported |\n| productUpperLimit | string | Products total subscribe amount |\n| userUpperLimit | string | Max user subscribe amount |\n| userLowerLimit | string | Min user subscribe amount |\n| redeemPeriod | integer | Redemption waiting period (days) |\n| lockStartTime | integer | Product earliest interest start time, in milliseconds |\n| lockEndTime | integer | Product maturity time, in milliseconds |\n| applyStartTime | integer | Subscription start time, in milliseconds |\n| applyEndTime | integer | Subscription end time, in milliseconds |\n| returnRate | string | Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return |\n| incomeCurrency | string | Income currency |\n| earlyRedeemSupported | integer | Whether the fixed product supports early redemption: 0 (no), 1 (yes) |\n| productRemainAmount | string | Products remain subscribe amount |\n| status | string | Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) |\n| redeemType | string | Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) |\n| incomeReleaseType | string | Income release type: DAILY (daily release), AFTER (release after product ends) |\n| interestDate | integer | Most recent interest date(millisecond) |\n| duration | integer | Product duration (days) |\n| newUserOnly | integer | Whether the product is exclusive for new users: 0 (no), 1 (yes) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470275)\n\n:::info[Description]\nAvailable KCS staking products can be obtained at this endpoint. If no products are available, an empty list is returned.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Product ID |\n| currency | string | currency |\n| category | string | Product category: KCS_STAKING |\n| type | string | Product subtype: TIME (fixed), DEMAND (demand) |\n| precision | integer | Maximum precision supported |\n| productUpperLimit | string | Products total subscription amount |\n| userUpperLimit | string | Max. user subscription amount |\n| userLowerLimit | string | Min. user subscribe amount |\n| redeemPeriod | integer | Redemption waiting period (days) |\n| lockStartTime | integer | Product earliest interest start time, in milliseconds |\n| lockEndTime | integer | Product maturity time, in milliseconds |\n| applyStartTime | integer | Subscription start time, in milliseconds |\n| applyEndTime | integer | Subscription end time, in milliseconds |\n| returnRate | string | Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return |\n| incomeCurrency | string | Income currency |\n| earlyRedeemSupported | integer | Whether the fixed product supports early redemption: 0 (no), 1 (yes) |\n| productRemainAmount | string | Remaining product subscription amount |\n| status | string | Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) |\n| redeemType | string | Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) |\n| incomeReleaseType | string | Income release type: DAILY (daily release), AFTER (release after product ends) |\n| interestDate | integer | Most recent interest date (milliseconds) |\n| duration | integer | Product duration (days) |\n| newUserOnly | integer | Whether the product is exclusive to new users: 0 (no), 1 (yes) |\n\n---\n", "body": {} }, "response": [ @@ -16898,13 +17344,13 @@ "api", "v1", "earn", - "staking", + "kcs-staking", "products" ], "query": [ { "key": "currency", - "value": "STX", + "value": "KCS", "description": "currency" } ] @@ -16940,12 +17386,12 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"id\": \"2535\",\n \"currency\": \"STX\",\n \"category\": \"STAKING\",\n \"type\": \"DEMAND\",\n \"precision\": 8,\n \"productUpperLimit\": \"1000000\",\n \"userUpperLimit\": \"10000\",\n \"userLowerLimit\": \"1\",\n \"redeemPeriod\": 14,\n \"lockStartTime\": 1688614514000,\n \"lockEndTime\": null,\n \"applyStartTime\": 1688614512000,\n \"applyEndTime\": null,\n \"returnRate\": \"0.045\",\n \"incomeCurrency\": \"BTC\",\n \"earlyRedeemSupported\": 0,\n \"productRemainAmount\": \"254032.90178701\",\n \"status\": \"ONGOING\",\n \"redeemType\": \"MANUAL\",\n \"incomeReleaseType\": \"DAILY\",\n \"interestDate\": 1729267200000,\n \"duration\": 0,\n \"newUserOnly\": 0\n }\n ]\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"id\": \"2611\",\n \"currency\": \"KCS\",\n \"category\": \"KCS_STAKING\",\n \"type\": \"DEMAND\",\n \"precision\": 8,\n \"productUpperLimit\": \"100000000\",\n \"userUpperLimit\": \"100000000\",\n \"userLowerLimit\": \"1\",\n \"redeemPeriod\": 3,\n \"lockStartTime\": 1701252000000,\n \"lockEndTime\": null,\n \"applyStartTime\": 1701252000000,\n \"applyEndTime\": null,\n \"returnRate\": \"0.03471727\",\n \"incomeCurrency\": \"KCS\",\n \"earlyRedeemSupported\": 0,\n \"productRemainAmount\": \"58065850.54998251\",\n \"status\": \"ONGOING\",\n \"redeemType\": \"MANUAL\",\n \"incomeReleaseType\": \"DAILY\",\n \"interestDate\": 1729267200000,\n \"duration\": 0,\n \"newUserOnly\": 0\n }\n ]\n}" } ] }, { - "name": "Get KCS Staking Products", + "name": "Get ETH Staking Products", "request": { "method": "GET", "header": [], @@ -16959,18 +17405,18 @@ "api", "v1", "earn", - "kcs-staking", + "eth-staking", "products" ], "query": [ { "key": "currency", - "value": "KCS", + "value": "ETH", "description": "currency" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470275)\n\n:::info[Description]\nThis endpoint can get available KCS staking products. If no products are available, an empty list is returned.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Product ID |\n| currency | string | currency |\n| category | string | Product category: KCS_STAKING |\n| type | string | Product subtype: TIME (fixed), DEMAND (demand) |\n| precision | integer | Maximum precision supported |\n| productUpperLimit | string | Products total subscribe amount |\n| userUpperLimit | string | Max user subscribe amount |\n| userLowerLimit | string | Min user subscribe amount |\n| redeemPeriod | integer | Redemption waiting period (days) |\n| lockStartTime | integer | Product earliest interest start time, in milliseconds |\n| lockEndTime | integer | Product maturity time, in milliseconds |\n| applyStartTime | integer | Subscription start time, in milliseconds |\n| applyEndTime | integer | Subscription end time, in milliseconds |\n| returnRate | string | Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return |\n| incomeCurrency | string | Income currency |\n| earlyRedeemSupported | integer | Whether the fixed product supports early redemption: 0 (no), 1 (yes) |\n| productRemainAmount | string | Products remain subscribe amount |\n| status | string | Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) |\n| redeemType | string | Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) |\n| incomeReleaseType | string | Income release type: DAILY (daily release), AFTER (release after product ends) |\n| interestDate | integer | Most recent interest date(millisecond) |\n| duration | integer | Product duration (days) |\n| newUserOnly | integer | Whether the product is exclusive for new users: 0 (no), 1 (yes) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470276)\n\n:::info[Description]\nAvailable ETH staking products can be obtained at this endpoint. If no products are available, an empty list is returned.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Product ID |\n| category | string | Product category: ETH2 (ETH Staking) |\n| type | string | Product subtype: DEMAND (demand) |\n| precision | integer | Maximum precision supported |\n| currency | string | currency |\n| incomeCurrency | string | Income currency |\n| returnRate | string | Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return |\n| userLowerLimit | string | Min. user subscribe amount |\n| userUpperLimit | string | Max. user subscription amount |\n| productUpperLimit | string | Products total subscription amount |\n| productRemainAmount | string | Remaining product subscription amount |\n| redeemPeriod | integer | Redemption waiting period (days) |\n| redeemType | string | Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) |\n| incomeReleaseType | string | Income release type: DAILY (daily release), AFTER (release after product ends) |\n| applyStartTime | integer | Subscription start time, in milliseconds |\n| applyEndTime | integer | Subscription end time, in milliseconds |\n| lockStartTime | integer | Product earliest interest start time, in milliseconds |\n| lockEndTime | integer | Product maturity time, in milliseconds |\n| interestDate | integer | Most recent interest date (milliseconds) |\n| newUserOnly | integer | Whether the product is exclusive to new users: 0 (no), 1 (yes) |\n| earlyRedeemSupported | integer | Whether the fixed product supports early redemption: 0 (no), 1 (yes) |\n| duration | integer | Product duration (days) |\n| status | string | Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) |\n\n---\n", "body": {} }, "response": [ @@ -16989,13 +17435,13 @@ "api", "v1", "earn", - "kcs-staking", + "eth-staking", "products" ], "query": [ { "key": "currency", - "value": "KCS", + "value": "ETH", "description": "currency" } ] @@ -17031,12 +17477,12 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"id\": \"2611\",\n \"currency\": \"KCS\",\n \"category\": \"KCS_STAKING\",\n \"type\": \"DEMAND\",\n \"precision\": 8,\n \"productUpperLimit\": \"100000000\",\n \"userUpperLimit\": \"100000000\",\n \"userLowerLimit\": \"1\",\n \"redeemPeriod\": 3,\n \"lockStartTime\": 1701252000000,\n \"lockEndTime\": null,\n \"applyStartTime\": 1701252000000,\n \"applyEndTime\": null,\n \"returnRate\": \"0.03471727\",\n \"incomeCurrency\": \"KCS\",\n \"earlyRedeemSupported\": 0,\n \"productRemainAmount\": \"58065850.54998251\",\n \"status\": \"ONGOING\",\n \"redeemType\": \"MANUAL\",\n \"incomeReleaseType\": \"DAILY\",\n \"interestDate\": 1729267200000,\n \"duration\": 0,\n \"newUserOnly\": 0\n }\n ]\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"id\": \"ETH2\",\n \"category\": \"ETH2\",\n \"type\": \"DEMAND\",\n \"precision\": 8,\n \"currency\": \"ETH\",\n \"incomeCurrency\": \"ETH2\",\n \"returnRate\": \"0.028\",\n \"userLowerLimit\": \"0.01\",\n \"userUpperLimit\": \"8557.3597075\",\n \"productUpperLimit\": \"8557.3597075\",\n \"productRemainAmount\": \"8557.3597075\",\n \"redeemPeriod\": 5,\n \"redeemType\": \"MANUAL\",\n \"incomeReleaseType\": \"DAILY\",\n \"applyStartTime\": 1729255485000,\n \"applyEndTime\": null,\n \"lockStartTime\": 1729255485000,\n \"lockEndTime\": null,\n \"interestDate\": 1729267200000,\n \"newUserOnly\": 0,\n \"earlyRedeemSupported\": 0,\n \"duration\": 0,\n \"status\": \"ONGOING\"\n }\n ]\n}" } ] }, { - "name": "Get ETH Staking Products", + "name": "Get Account Holding", "request": { "method": "GET", "header": [], @@ -17050,18 +17496,37 @@ "api", "v1", "earn", - "eth-staking", - "products" + "hold-assets" ], "query": [ { "key": "currency", - "value": "ETH", + "value": "KCS", "description": "currency" + }, + { + "key": "productId", + "value": "", + "description": "Product ID" + }, + { + "key": "productCategory", + "value": "", + "description": "Product category" + }, + { + "key": "currentPage", + "value": "1", + "description": "Current request page." + }, + { + "key": "pageSize", + "value": "10", + "description": "Number of results per request. Minimum is 10, maximum is 500." } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470276)\n\n:::info[Description]\nThis endpoint can get available ETH staking products. If no products are available, an empty list is returned.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Product ID |\n| category | string | Product category: ETH2 (ETH Staking) |\n| type | string | Product subtype: DEMAND (demand) |\n| precision | integer | Maximum precision supported |\n| currency | string | currency |\n| incomeCurrency | string | Income currency |\n| returnRate | string | Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return |\n| userLowerLimit | string | Min user subscribe amount |\n| userUpperLimit | string | Max user subscribe amount |\n| productUpperLimit | string | Products total subscribe amount |\n| productRemainAmount | string | Products remain subscribe amount |\n| redeemPeriod | integer | Redemption waiting period (days) |\n| redeemType | string | Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) |\n| incomeReleaseType | string | Income release type: DAILY (daily release), AFTER (release after product ends) |\n| applyStartTime | integer | Subscription start time, in milliseconds |\n| applyEndTime | integer | Subscription end time, in milliseconds |\n| lockStartTime | integer | Product earliest interest start time, in milliseconds |\n| lockEndTime | integer | Product maturity time, in milliseconds |\n| interestDate | integer | Most recent interest date(millisecond) |\n| newUserOnly | integer | Whether the product is exclusive for new users: 0 (no), 1 (yes) |\n| earlyRedeemSupported | integer | Whether the fixed product supports early redemption: 0 (no), 1 (yes) |\n| duration | integer | Product duration (days) |\n| status | string | Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470273)\n\n:::info[Description]\nInformation on currently held assets can be obtained at this endpoint. If no assets are currently held, an empty list is returned.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| totalNum | integer | total number |\n| items | array | Refer to the schema section of items |\n| currentPage | integer | current page |\n| pageSize | integer | page size |\n| totalPage | integer | total pages |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | Holding ID |\n| productId | string | Product ID |\n| productCategory | string | Product category |\n| productType | string | Product sub-type |\n| currency | string | currency |\n| incomeCurrency | string | Income currency |\n| returnRate | string | Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return |\n| holdAmount | string | Holding amount |\n| redeemedAmount | string | Redeemed amount |\n| redeemingAmount | string | Redeeming amount |\n| lockStartTime | integer | Product earliest interest start time, in milliseconds |\n| lockEndTime | integer | Product maturity time, in milliseconds |\n| purchaseTime | integer | Most recent subscription time, in milliseconds |\n| redeemPeriod | integer | Redemption waiting period (days) |\n| status | string | Status: LOCKED (holding), REDEEMING (redeeming) |\n| earlyRedeemSupported | integer | Whether the fixed product supports early redemption: 0 (no), 1 (yes) |\n\n---\n", "body": {} }, "response": [ @@ -17080,14 +17545,33 @@ "api", "v1", "earn", - "eth-staking", - "products" + "hold-assets" ], "query": [ { "key": "currency", - "value": "ETH", + "value": "KCS", "description": "currency" + }, + { + "key": "productId", + "value": "", + "description": "Product ID" + }, + { + "key": "productCategory", + "value": "", + "description": "Product category" + }, + { + "key": "currentPage", + "value": "1", + "description": "Current request page." + }, + { + "key": "pageSize", + "value": "10", + "description": "Number of results per request. Minimum is 10, maximum is 500." } ] } @@ -17122,7 +17606,7 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"id\": \"ETH2\",\n \"category\": \"ETH2\",\n \"type\": \"DEMAND\",\n \"precision\": 8,\n \"currency\": \"ETH\",\n \"incomeCurrency\": \"ETH2\",\n \"returnRate\": \"0.028\",\n \"userLowerLimit\": \"0.01\",\n \"userUpperLimit\": \"8557.3597075\",\n \"productUpperLimit\": \"8557.3597075\",\n \"productRemainAmount\": \"8557.3597075\",\n \"redeemPeriod\": 5,\n \"redeemType\": \"MANUAL\",\n \"incomeReleaseType\": \"DAILY\",\n \"applyStartTime\": 1729255485000,\n \"applyEndTime\": null,\n \"lockStartTime\": 1729255485000,\n \"lockEndTime\": null,\n \"interestDate\": 1729267200000,\n \"newUserOnly\": 0,\n \"earlyRedeemSupported\": 0,\n \"duration\": 0,\n \"status\": \"ONGOING\"\n }\n ]\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"currentPage\": 1,\n \"pageSize\": 15,\n \"items\": [\n {\n \"orderId\": \"2767291\",\n \"productId\": \"2611\",\n \"productCategory\": \"KCS_STAKING\",\n \"productType\": \"DEMAND\",\n \"currency\": \"KCS\",\n \"incomeCurrency\": \"KCS\",\n \"returnRate\": \"0.03471727\",\n \"holdAmount\": \"1\",\n \"redeemedAmount\": \"0\",\n \"redeemingAmount\": \"1\",\n \"lockStartTime\": 1701252000000,\n \"lockEndTime\": null,\n \"purchaseTime\": 1729257513000,\n \"redeemPeriod\": 3,\n \"status\": \"REDEEMING\",\n \"earlyRedeemSupported\": 0\n }\n ]\n }\n}" } ] } @@ -17133,7 +17617,84 @@ "name": "VIP Lending", "item": [ { - "name": "Get Account Detail", + "name": "Get Discount Rate Configs", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "", + "protocol": "https", + "host": [ + "{{spot_endpoint}}" + ], + "path": [ + "api", + "v1", + "otc-loan", + "discount-rate-configs" + ], + "query": [] + }, + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3471463)\n\n:::info[Description]\nGet the gradient discount rate of each currency\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| usdtLevels | array | Refer to the schema section of usdtLevels |\n\n**root.data.usdtLevels Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| left | integer | Left end point of gradient interval, left |\n| uid | string | Sub-Account UID |\n| createdAt | integer | Creation time, unix timestamp (milliseconds) |\n| level | integer | Subaccount VIP level |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470290)\n\n:::info[Description]\nThis endpoint supports Broker users creating sub-accounts.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| accountName | string | Sub-account Name. Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| accountName | string | Sub-account name
|\n| uid | string | Sub-account UID |\n| createdAt | integer | Creation time, Unix timestamp (milliseconds) |\n| level | integer | Sub-account VIP level |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"accountName\": \"Account1\"\n}", @@ -17698,7 +18259,7 @@ ] }, { - "name": "Get SubAccount", + "name": "Get sub-account", "request": { "method": "GET", "header": [], @@ -17733,7 +18294,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470283)\n\n:::info[Description]\nThis interface supports querying sub-accounts created by Broker\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | Current page |\n| pageSize | integer | Page Size |\n| totalNum | integer | Total Number |\n| totalPage | integer | Total Page |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| accountName | string | Sub-account name |\n| uid | string | Sub-account UID |\n| createdAt | integer | Creation time, unix timestamp (milliseconds) |\n| level | integer | Sub-account VIP level
|\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470283)\n\n:::info[Description]\nThis interface supports querying sub-accounts created by Broker.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currentPage | integer | Current page |\n| pageSize | integer | Page Size |\n| totalNum | integer | Total Number |\n| totalPage | integer | Total Pages |\n| items | array | Refer to the schema section of items |\n\n**root.data.items Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| accountName | string | Sub-account name |\n| uid | string | Sub-account UID |\n| createdAt | integer | Creation time, Unix timestamp (milliseconds) |\n| level | integer | Sub-account VIP level
|\n\n---\n", "body": {} }, "response": [ @@ -17809,7 +18370,7 @@ ] }, { - "name": "Add SubAccount API", + "name": "Add sub-account API", "request": { "method": "POST", "header": [], @@ -17829,7 +18390,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470291)\n\n:::info[Description]\nThis interface supports the creation of Broker sub-account APIKEY\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | string | Subaccount UID |\n| passphrase | string | API passphrase |\n| ipWhitelist | array | Refer to the schema section of ipWhitelist |\n| permissions | array | Refer to the schema section of permissions |\n| label | string | apikey remarks (length 4~32)
|\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | string | Sub-Account UID |\n| label | string | apikey remarks |\n| apiKey | string | apiKey |\n| secretKey | string | secretKey |\n| apiVersion | integer | apiVersion |\n| permissions | array | Refer to the schema section of permissions |\n| ipWhitelist | array | Refer to the schema section of ipWhitelist |\n| createdAt | integer | Creation time, unix timestamp (milliseconds) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470291)\n\n:::info[Description]\nThis interface supports the creation of Broker sub-account APIKEY.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | string | Sub-account UID |\n| passphrase | string | API passphrase |\n| ipWhitelist | array | Refer to the schema section of ipWhitelist |\n| permissions | array | Refer to the schema section of permissions |\n| label | string | apikey remarks (length 4~32)
|\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | string | Sub-account UID |\n| label | string | apikey remarks |\n| apiKey | string | apiKey |\n| secretKey | string | secretKey |\n| apiVersion | integer | apiVersion |\n| permissions | array | Refer to the schema section of permissions |\n| ipWhitelist | array | Refer to the schema section of ipWhitelist |\n| createdAt | integer | Creation time, Unix timestamp (milliseconds) |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"uid\": \"226383154\",\n \"passphrase\": \"11223344\",\n \"ipWhitelist\": [\n \"127.0.0.1\",\"123.123.123.123\"\n ],\n \"permissions\": [\n \"general\",\"spot\"\n ],\n \"label\": \"This is remarks\"\n}", @@ -17898,7 +18459,7 @@ ] }, { - "name": "Get SubAccount API", + "name": "Get sub-account API", "request": { "method": "GET", "header": [], @@ -17929,7 +18490,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470284)\n\n:::info[Description]\nThis interface supports querying the Broker’s sub-account APIKEY\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | string | Sub-Account UID |\n| label | string | apikey remarks |\n| apiKey | string | apiKey |\n| apiVersion | integer | apiVersion |\n| permissions | array | Refer to the schema section of permissions |\n| ipWhitelist | array | Refer to the schema section of ipWhitelist |\n| createdAt | integer | Creation time, unix timestamp (milliseconds) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470284)\n\n:::info[Description]\nThis interface supports querying the Broker’s sub-account APIKEY.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | string | Sub-account UID |\n| label | string | apikey remarks |\n| apiKey | string | apiKey |\n| apiVersion | integer | apiVersion |\n| permissions | array | Refer to the schema section of permissions |\n| ipWhitelist | array | Refer to the schema section of ipWhitelist |\n| createdAt | integer | Creation time, Unix timestamp (milliseconds) |\n\n---\n", "body": {} }, "response": [ @@ -18001,7 +18562,7 @@ ] }, { - "name": "Modify SubAccount API", + "name": "Modify sub-account API", "request": { "method": "POST", "header": [], @@ -18021,7 +18582,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470292)\n\n:::info[Description]\nThis interface supports modify the Broker’s sub-account APIKEY\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | string | Subaccount UID |\n| ipWhitelist | array | Refer to the schema section of ipWhitelist |\n| permissions | array | Refer to the schema section of permissions |\n| label | string | apikey remarks (length 4~32)
|\n| apiKey | string | Subaccount apiKey |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | string | Sub-Account UID |\n| label | string | apikey remarks |\n| apiKey | string | apiKey |\n| apiVersion | integer | apiVersion |\n| permissions | array | Refer to the schema section of permissions |\n| ipWhitelist | array | Refer to the schema section of ipWhitelist |\n| createdAt | integer | Creation time, unix timestamp (milliseconds) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470292)\n\n:::info[Description]\nThis interface supports modifying the Broker’s sub-account APIKEY.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | string | Sub-account UID |\n| ipWhitelist | array | Refer to the schema section of ipWhitelist |\n| permissions | array | Refer to the schema section of permissions |\n| label | string | apikey remarks (length 4~32)
|\n| apiKey | string | Sub-account apiKey |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | string | Sub-account UID |\n| label | string | apikey remarks |\n| apiKey | string | apiKey |\n| apiVersion | integer | apiVersion |\n| permissions | array | Refer to the schema section of permissions |\n| ipWhitelist | array | Refer to the schema section of ipWhitelist |\n| createdAt | integer | Creation time, Unix timestamp (milliseconds) |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"uid\": \"226383154\",\n \"apiKey\": \"671afb36cee20f00015cfaf1\",\n \"ipWhitelist\": [\n \"127.0.0.1\",\n \"123.123.123.123\"\n ],\n \"permissions\": [\n \"general\",\n \"spot\"\n ],\n \"label\": \"This is remarks\"\n}", @@ -18090,7 +18651,7 @@ ] }, { - "name": "Delete SubAccount API", + "name": "Delete sub-account API", "request": { "method": "DELETE", "header": [], @@ -18121,7 +18682,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470289)\n\n:::info[Description]\nThis interface supports deleting Broker’s sub-account APIKEY\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | boolean | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470289)\n\n:::info[Description]\nThis interface supports deleting Broker’s sub-account APIKEY.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | boolean | |\n\n---\n", "body": {} }, "response": [ @@ -18212,7 +18773,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470293)\n\n:::info[Description]\nThis endpoint supports fund transfer between Broker account and Broker sub-accounts.\n\nPlease be aware that withdrawal from sub-account is not directly supported. Broker has to transfer funds from broker sub-account to broker account to initiate the withdrawals.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| amount | string | Transfer Amount (must be a positive integer in the currency's precision) |\n| direction | string | Fund transfer direction: OUT (Broker account is transferred to Broker sub-account), IN (Broker sub-account is transferred to Broker account) |\n| accountType | string | Broker account types: MAIN (Funding account), TRADE (Spot trading account) |\n| specialUid | string | Broker subaccount uid, must be the Broker subaccount created by the current Broker user. |\n| specialAccountType | string | Broker sub-account types: MAIN (Funding account), TRADE (Spot trading account) |\n| clientOid | string | Client Order Id, The unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470293)\n\n:::info[Description]\nThis endpoint supports fund transfer between Broker accounts and Broker sub-accounts.\n\nPlease be aware that withdrawal from sub-accounts is not directly supported. Broker has to transfer funds from broker sub-account to broker account to initiate the withdrawals.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| currency | string | Currency |\n| amount | string | Transfer Amount (must be a positive integer in the currency's precision) |\n| direction | string | Fund transfer direction: OUT (Broker account is transferred to Broker sub-account), IN (Broker sub-account is transferred to Broker account) |\n| accountType | string | Broker account types: MAIN (Funding account), TRADE (Spot trading account) |\n| specialUid | string | Broker sub-account UID, must be the Broker sub-account created by the current Broker user. |\n| specialAccountType | string | Broker sub-account types: MAIN (Funding account), TRADE (Spot trading account) |\n| clientOid | string | Client Order ID, the unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | |\n\n---\n", "body": { "mode": "raw", "raw": "{\n \"currency\": \"USDT\",\n \"amount\": \"1\",\n \"clientOid\": \"e6c24d23-6bc2-401b-bf9e-55e2daddfbc1\",\n \"direction\": \"OUT\",\n \"accountType\": \"MAIN\",\n \"specialUid\": \"226383154\",\n \"specialAccountType\": \"MAIN\"\n}", @@ -18306,7 +18867,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470286)\n\n:::info[Description]\nThis endpoint supports querying transfer records of the broker itself and its created sub-accounts.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | Transfer Order ID |\n| currency | string | Currency |\n| amount | string | Transfer Amount |\n| fromUid | integer | UID of the user transferring out |\n| fromAccountType | string | From Account Type:Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED |\n| fromAccountTag | string | Trading pair, required if the account type is ISOLATED, e.g., BTC-USDT |\n| toUid | integer | UID of the user transferring in |\n| toAccountType | string | Account Type:Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED |\n| toAccountTag | string | To Trading pair, required if the account type is ISOLATED, e.g., BTC-USDT |\n| status | string | Status: PROCESSING (processing), SUCCESS (successful), FAILURE (failed) |\n| reason | string | Failure Reason |\n| createdAt | integer | Creation Time (Unix timestamp in milliseconds) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470286)\n\n:::info[Description]\nThis endpoint supports querying the transfer records of the broker itself and its created sub-accounts.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | Transfer Order ID |\n| currency | string | Currency |\n| amount | string | Transfer Amount |\n| fromUid | integer | UID of the user transferring out |\n| fromAccountType | string | From Account Type: Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED |\n| fromAccountTag | string | Trading pair (required if the account type is ISOLATED), e.g., BTC-USDT |\n| toUid | integer | UID of the user transferring in |\n| toAccountType | string | Account Type: Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED |\n| toAccountTag | string | To Trading pair (required if the account type is ISOLATED), e.g., BTC-USDT |\n| status | string | Status: PROCESSING (processing), SUCCESS (successful), FAILURE (failed) |\n| reason | string | Failure Reason |\n| createdAt | integer | Creation Time (Unix timestamp in milliseconds) |\n\n---\n", "body": {} }, "response": [ @@ -18410,12 +18971,12 @@ { "key": "startTimestamp", "value": null, - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endTimestamp", "value": null, - "description": "End time (milisecond),Default sorting in descending order" + "description": "End time (milliseconds); default sorting in descending order" }, { "key": "limit", @@ -18424,7 +18985,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470285)\n\n:::info[Description]\nThis endpoint can obtain the deposit records of each sub-account under the ND Broker.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| success | boolean | |\n| code | string | |\n| msg | string | |\n| retry | boolean | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | number | deposit uid |\n| hash | string | hash |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. |\n| amount | string | Deposit amount |\n| fee | string | Fees charged for deposit |\n| currency | string | currency |\n| isInner | boolean | Internal deposit or not |\n| walletTxId | string | Wallet Txid |\n| status | string | Status. Available value: PROCESSING, SUCCESS, FAILURE |\n| remark | string | remark |\n| chain | string | chain name of currency |\n| createdAt | integer | Creation time of the database record |\n| updatedAt | integer | Update time of the database record |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470285)\n\n:::info[Description]\nThe deposit records of each sub-account under the ND broker can be obtained at this endpoint.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| success | boolean | |\n| code | string | |\n| msg | string | |\n| retry | boolean | |\n| data | array | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| uid | number | deposit uid |\n| hash | string | hash |\n| address | string | Deposit address |\n| memo | string | Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. |\n| amount | string | Deposit amount |\n| fee | string | Fees charged for deposit |\n| currency | string | currency |\n| isInner | boolean | Internal deposit or not |\n| walletTxId | string | Wallet Txid |\n| status | string | Status. Available value: PROCESSING, SUCCESS, FAILURE |\n| remark | string | Remark |\n| chain | string | Chain name of currency |\n| createdAt | integer | Database record creation time |\n| updatedAt | integer | Update time of the database record |\n\n---\n", "body": {} }, "response": [ @@ -18466,12 +19027,12 @@ { "key": "startTimestamp", "value": null, - "description": "Start time (milisecond)" + "description": "Start time (milliseconds)" }, { "key": "endTimestamp", "value": null, - "description": "End time (milisecond),Default sorting in descending order" + "description": "End time (milliseconds); default sorting in descending order" }, { "key": "limit", @@ -18547,7 +19108,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470288)\n\n:::info[Description]\nThis endpoint supports querying the deposit record of sub-accounts created by a Broker (excluding main account of nd broker)\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| data | object | Refer to the schema section of data |\n| code | string | |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| chain | string | chain id of currency |\n| hash | string | Hash |\n| walletTxId | string | Wallet Transaction ID |\n| uid | integer | UID |\n| updatedAt | integer | Update Time (milliseconds) |\n| amount | string | Amount |\n| memo | string | Memo |\n| fee | string | Fee |\n| address | string | Address |\n| remark | string | Remark |\n| isInner | boolean | Is Internal (true or false) |\n| currency | string | Currency |\n| status | string | Status (PROCESSING, SUCCESS, FAILURE) |\n| createdAt | integer | Creation Time (milliseconds) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470288)\n\n:::info[Description]\nThis endpoint supports querying the deposit record of sub-accounts created by a Broker (excluding main account of ND broker).\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| data | object | Refer to the schema section of data |\n| code | string | |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| chain | string | Chain ID of currency |\n| hash | string | Hash |\n| walletTxId | string | Wallet Transaction ID |\n| uid | integer | UID |\n| updatedAt | integer | Update Time (milliseconds) |\n| amount | string | Amount |\n| memo | string | Memo |\n| fee | string | Fee |\n| address | string | Address |\n| remark | string | Remark |\n| isInner | boolean | Is Internal (true or false) |\n| currency | string | Currency |\n| status | string | Status (PROCESSING, SUCCESS, FAILURE) |\n| createdAt | integer | Creation Time (milliseconds) |\n\n---\n", "body": {} }, "response": [ @@ -18645,7 +19206,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470287)\n\n:::info[Description]\nThis endpoint supports querying the withdrawal records of sub-accounts created by a Broker (excluding main account of nd broker).\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| data | object | Refer to the schema section of data |\n| code | string | |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Withdrawal ID |\n| chain | string | chain id of currency |\n| walletTxId | string | Wallet Transaction ID |\n| uid | integer | UID |\n| updatedAt | integer | Update Time (milliseconds) |\n| amount | string | Amount |\n| memo | string | Memo |\n| fee | string | Fee |\n| address | string | Address |\n| remark | string | Remark |\n| isInner | boolean | Is Internal (true or false) |\n| currency | string | Currency |\n| status | string | Status (PROCESSING, WALLET_PROCESSING, REVIEW, SUCCESS, FAILURE) |\n| createdAt | integer | Creation Time (milliseconds) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470287)\n\n:::info[Description]\nThis endpoint supports querying the withdrawal records of sub-accounts created by a Broker (excluding main account of ND broker).\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| data | object | Refer to the schema section of data |\n| code | string | |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| id | string | Withdrawal ID |\n| chain | string | Chain ID of currency |\n| walletTxId | string | Wallet Transaction ID |\n| uid | integer | UID |\n| updatedAt | integer | Update Time (milliseconds) |\n| amount | string | Amount |\n| memo | string | Memo |\n| fee | string | Fee |\n| address | string | Address |\n| remark | string | Remark |\n| isInner | boolean | Is Internal (true or false) |\n| currency | string | Currency |\n| status | string | Status (PROCESSING, WALLET_PROCESSING, REVIEW, SUCCESS, FAILURE) |\n| createdAt | integer | Creation Time (milliseconds) |\n\n---\n", "body": {} }, "response": [ @@ -18744,11 +19305,11 @@ { "key": "tradeType", "value": "1", - "description": "Transaction type, 1: spot 2: futures" + "description": "Transaction type: 1, spot; 2, futures" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470281)\n\n:::info[Description]\nThis interface supports downloading Broker rebate orders\n:::\n\n### Excel Response\n\n| Param | Description | Example |\n| ------------------- | ----------------- |--------- |\n| Date | Date | 2024/9/1 |\n| BrokerUID | Broker's UID | 3243241 |\n| AffiliateUID | Affiliate's UID | 2354546 |\n| UID | User's UID | 6345466 |\n| BizLine | Business Line(Spot、Futures) | Spot |\n| Volume | Volume | 0 |\n| TotalCommission | Total Commission = BrokerCommission + UserCommission + AffiliateCommission | 0 |\n| BrokerCommission | Broker Commission | 0 |\n| UserCommission | User Commission | 0 |\n| AffiliateCommission | Affiliate Commission | 0 |\n\n\n\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| url | string | Rebate order file (link is valid for 1 day) |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470281)\n\n:::info[Description]\nThis interface supports the downloading of Broker rebate orders.\n:::\n\n### Excel Response\n\n| Param | Description | Example |\n| ------------------- | ----------------- |--------- |\n| Date | Date | 2024/9/1 |\n| BrokerUID | Broker's UID | 3243241 |\n| AffiliateUID | Affiliate's UID | 2354546 |\n| UID | User's UID | 6345466 |\n| BizLine | Business Line (Spot, Futures) | Spot |\n| Volume | Volume | 0 |\n| TotalCommission | Total Commission = BrokerCommission + UserCommission + AffiliateCommission | 0 |\n| BrokerCommission | Broker Commission | 0 |\n| UserCommission | User Commission | 0 |\n| AffiliateCommission | Affiliate Commission | 0 |\n\n\n\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| url | string | Rebate order file (link is valid for 1 day) |\n\n---\n", "body": {} }, "response": [ @@ -18785,7 +19346,7 @@ { "key": "tradeType", "value": "1", - "description": "Transaction type, 1: spot 2: futures" + "description": "Transaction type: 1, spot; 2, futures" } ] } @@ -18836,7 +19397,7 @@ "type": "text/javascript", "packages": {}, "exec": [ - "\nfunction extractPathVariable(str) {\n const regex = /^\\{\\{(.+?)\\}\\}$/;\n const match = str.match(regex);\n if (match) {\n return match[1];\n }\n return null;\n}\n\nfunction hasAnyFieldEmpty(obj) {\n for (const key in obj) {\n if (obj[key] === \"\" || obj[key] === null || obj[key] === undefined) {\n return true;\n }\n }\n return false;\n}\n\nfunction sign(text, secret) {\n const hash = CryptoJS.HmacSHA256(text, secret);\n return CryptoJS.enc.Base64.stringify(hash)\n}\n\nfunction auth(apiKey, method, url, data) {\n if (hasAnyFieldEmpty(apiKey)) {\n console.warn('The API key-related (or broker-related) information is not configured. Please check the fields in the environment variables.')\n return {'User-Agent': `Kucoin-Universal-Postman-SDK/v1.1.0`}\n }\n\n\n const timestamp = Date.now();\n const text = timestamp + method.toUpperCase() + url + data;\n const signature = sign(text, apiKey.secret);\n const brokerText = timestamp + apiKey.partner + apiKey.key;\n const brokerSignature = sign(brokerText, apiKey.brokerKey);\n return {\n 'KC-API-KEY': apiKey.key,\n 'KC-API-SIGN': signature,\n 'KC-API-TIMESTAMP': timestamp.toString(),\n 'KC-API-PASSPHRASE': sign(apiKey.passphrase || '', apiKey.secret),\n 'Content-Type': 'application/json',\n 'User-Agent': `Kucoin-Universal-Postman-SDK/v1.1.0`,\n 'KC-API-KEY-VERSION': 2,\n 'KC-API-PARTNER': apiKey.partner,\n 'KC-BROKER-NAME': apiKey.brokerName,\n 'KC-API-PARTNER-VERIFY': 'true',\n 'KC-API-PARTNER-SIGN': brokerSignature,\n };\n}\n\nlet key = pm.environment.get('API_KEY')\nlet secret = pm.environment.get('API_SECRET')\nlet passphrase = pm.environment.get('API_PASSPHRASE')\n\nlet brokerName = pm.environment.get('BROKER_NAME')\nlet partner = pm.environment.get('BROKER_PARTNER')\nlet brokerKey = pm.environment.get('BROKER_KEY')\n\nlet url = pm.request.url.getPathWithQuery()\nlet method = pm.request.method\nlet body = pm.request.body ? pm.request.body.toString() : ''\n\nfor (const index in pm.request.url.path) {\n path = pm.request.url.path[index]\n pathVar = extractPathVariable(path)\n if (pathVar != null) {\n let collectionVariable = pm.collectionVariables.get(pathVar);\n if (collectionVariable != null) {\n url = url.replace(path, collectionVariable)\n } else {\n console.warn('no path variable set: ' + path)\n }\n }\n}\n\nheader = auth({\n key: key, passphrase: passphrase, secret: secret, brokerName: brokerName, partner: partner, brokerKey: brokerKey\n}, method, url, body)\n\nfor (const [headerName, headerValue] of Object.entries(header)) {\n pm.request.headers.add({ key: headerName, value: headerValue })\n}" + "\nfunction extractPathVariable(str) {\n const regex = /^\\{\\{(.+?)\\}\\}$/;\n const match = str.match(regex);\n if (match) {\n return match[1];\n }\n return null;\n}\n\nfunction hasAnyFieldEmpty(obj) {\n for (const key in obj) {\n if (obj[key] === \"\" || obj[key] === null || obj[key] === undefined) {\n return true;\n }\n }\n return false;\n}\n\nfunction sign(text, secret) {\n const hash = CryptoJS.HmacSHA256(text, secret);\n return CryptoJS.enc.Base64.stringify(hash)\n}\n\nfunction auth(apiKey, method, url, data) {\n if (hasAnyFieldEmpty(apiKey)) {\n console.warn('The API key-related (or broker-related) information is not configured. Please check the fields in the environment variables.')\n return {'User-Agent': `Kucoin-Universal-Postman-SDK/v1.2.0`}\n }\n\n\n const timestamp = Date.now();\n const text = timestamp + method.toUpperCase() + url + data;\n const signature = sign(text, apiKey.secret);\n const brokerText = timestamp + apiKey.partner + apiKey.key;\n const brokerSignature = sign(brokerText, apiKey.brokerKey);\n return {\n 'KC-API-KEY': apiKey.key,\n 'KC-API-SIGN': signature,\n 'KC-API-TIMESTAMP': timestamp.toString(),\n 'KC-API-PASSPHRASE': sign(apiKey.passphrase || '', apiKey.secret),\n 'Content-Type': 'application/json',\n 'User-Agent': `Kucoin-Universal-Postman-SDK/v1.2.0`,\n 'KC-API-KEY-VERSION': 3,\n 'KC-API-PARTNER': apiKey.partner,\n 'KC-BROKER-NAME': apiKey.brokerName,\n 'KC-API-PARTNER-VERIFY': 'true',\n 'KC-API-PARTNER-SIGN': brokerSignature,\n };\n}\n\nlet key = pm.environment.get('API_KEY')\nlet secret = pm.environment.get('API_SECRET')\nlet passphrase = pm.environment.get('API_PASSPHRASE')\n\nlet brokerName = pm.environment.get('BROKER_NAME')\nlet partner = pm.environment.get('BROKER_PARTNER')\nlet brokerKey = pm.environment.get('BROKER_KEY')\n\nlet url = pm.request.url.getPathWithQuery()\nlet method = pm.request.method\nlet body = pm.request.body ? pm.request.body.toString() : ''\n\nfor (const index in pm.request.url.path) {\n path = pm.request.url.path[index]\n pathVar = extractPathVariable(path)\n if (pathVar != null) {\n let collectionVariable = pm.collectionVariables.get(pathVar);\n if (collectionVariable != null) {\n url = url.replace(path, collectionVariable)\n } else {\n console.warn('no path variable set: ' + path)\n }\n }\n}\n\nheader = auth({\n key: key, passphrase: passphrase, secret: secret, brokerName: brokerName, partner: partner, brokerKey: brokerKey\n}, method, url, body)\n\nfor (const [headerName, headerValue] of Object.entries(header)) {\n pm.request.headers.add({ key: headerName, value: headerValue })\n}" ] } }, @@ -18875,7 +19436,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470363)\n\n:::info[Description]\nPlace 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.\n:::\n\n:::tip[Tips]\nThe maximum limit orders for a single contract is 100 per account, and the maximum stop orders for a single contract is 200 per account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | 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(-) |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| leverage | integer | Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. |\n| type | string | specify if the order is an 'limit' order or 'market' order |\n| remark | string | remark for the order, length cannot exceed 100 utf8 characters |\n| stop | string | Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. |\n| stopPriceType | string | Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. |\n| stopPrice | string | Need to be defined if stop is specified. |\n| reduceOnly | boolean | 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. |\n| closeOrder | boolean | 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. |\n| forceHold | boolean | 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. |\n| marginMode | string | Margin mode: ISOLATED, CROSS, default: ISOLATED |\n| price | string | Required for type is 'limit' order, indicating the operating price |\n| size | integer | Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. |\n| timeInForce | string | 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 |\n| postOnly | boolean | 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. |\n| hidden | boolean | Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. |\n| iceberg | boolean | 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. |\n| visibleSize | string | 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. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470363)\n\n:::info[Description]\nPlace 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.\n:::\n\n:::tip[Tips]\nThe maximum limit orders for a single contract is 100 per account, and the maximum stop orders for a single contract is 200 per account.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | 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(-) |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| leverage | integer | Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. |\n| type | string | specify if the order is an 'limit' order or 'market' order |\n| stop | string | Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. |\n| stopPriceType | string | Either 'TP' or 'MP', Need to be defined if stop is specified. |\n| stopPrice | string | Need to be defined if stop is specified. |\n| reduceOnly | boolean | 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. |\n| closeOrder | boolean | 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. |\n| marginMode | string | Margin mode: ISOLATED, default: ISOLATED |\n| price | string | Required for type is 'limit' order, indicating the operating price |\n| size | integer | Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. |\n| timeInForce | string | 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 |\n| postOnly | boolean | 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. |\n| hidden | boolean | Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. |\n| iceberg | boolean | 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. |\n| visibleSize | string | 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. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", "body": { "mode": "raw", "raw": "{\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}", @@ -18963,7 +19524,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470618)\n\n:::info[Description]\nOrder test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | 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(-) |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| leverage | integer | Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. |\n| type | string | specify if the order is an 'limit' order or 'market' order |\n| remark | string | remark for the order, length cannot exceed 100 utf8 characters |\n| stop | string | Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. |\n| stopPriceType | string | Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. |\n| stopPrice | string | Need to be defined if stop is specified. |\n| reduceOnly | boolean | 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. |\n| closeOrder | boolean | 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. |\n| forceHold | boolean | 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. |\n| marginMode | string | Margin mode: ISOLATED, CROSS, default: ISOLATED |\n| price | string | Required for type is 'limit' order, indicating the operating price |\n| size | integer | Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. |\n| timeInForce | string | 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 |\n| postOnly | boolean | 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. |\n| hidden | boolean | Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. |\n| iceberg | boolean | 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. |\n| visibleSize | string | 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. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470618)\n\n:::info[Description]\nOrder test endpoint: The request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\n:::\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | 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 (-). |\n| side | string | Specify if the order is to 'buy' or 'sell'. |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| leverage | integer | Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. |\n| type | string | Specify if the order is a 'limit' order or 'market' order |\n| stop | string | Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. |\n| stopPriceType | string | Either 'TP' or 'MP' need to be defined if stop is specified. |\n| stopPrice | string | Needs to be defined if stop is specified. |\n| reduceOnly | boolean | 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. |\n| closeOrder | boolean | 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. |\n| marginMode | string | Margin mode: ISOLATED, default: ISOLATED |\n| price | string | Required for type is 'limit' order, indicating the operating price |\n| size | integer | Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. |\n| timeInForce | string | 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 |\n| postOnly | boolean | Optional for type is 'limit' order, post only flag, invalid when timeInForce is IOC. When postOnly is true, not allowed to 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 fees, the order will be fully rejected. |\n| hidden | boolean | Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. |\n| iceberg | boolean | Optional for type is 'limit' order, Only visible portion of the order is displayed in the order book. When iceberg is chose, choosing postOnly is not allowed. |\n| visibleSize | string | 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. |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", "body": { "mode": "raw", "raw": "{\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}", @@ -19051,7 +19612,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470619)\n\n:::info[Description]\nPlace 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.\n\nYou can place two 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.\n\nPlease be noted that the system would hold the fees from the orders entered the orderbook in advance. \n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | 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(-) |\n| side | string | specify if the order is to 'buy' or 'sell' |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| leverage | integer | Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. |\n| type | string | specify if the order is an 'limit' order or 'market' order |\n| remark | string | remark for the order, length cannot exceed 100 utf8 characters |\n| stopPriceType | string | Either 'TP', 'IP' or 'MP' |\n| reduceOnly | boolean | 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. |\n| closeOrder | boolean | 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. |\n| forceHold | boolean | 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. |\n| marginMode | string | Margin mode: ISOLATED, CROSS, default: ISOLATED |\n| price | string | Required for type is 'limit' order, indicating the operating price |\n| size | integer | Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. |\n| timeInForce | string | 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 |\n| postOnly | boolean | 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. |\n| hidden | boolean | Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. |\n| iceberg | boolean | 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. |\n| visibleSize | string | 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. |\n| triggerStopUpPrice | string | Take profit price |\n| triggerStopDownPrice | string | Stop loss price |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order id. |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470619)\n\n:::info[Description]\nPlace 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.\n\nYou can place two 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.\n\nPlease note that the system will hold the fees from the orders entered in the orderbook in advance. \n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | 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 (-). |\n| side | string | Specify if the order is to 'buy' or 'sell'. |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| leverage | integer | Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. |\n| type | string | Specify if the order is a 'limit' order or 'market' order |\n| stopPriceType | string | Either 'TP' or 'MP' |\n| reduceOnly | boolean | 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. |\n| closeOrder | boolean | 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. |\n| marginMode | string | Margin mode: ISOLATED, default: ISOLATED |\n| price | string | Required for type is 'limit' order, indicating the operating price |\n| size | integer | Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. |\n| timeInForce | string | 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 |\n| postOnly | boolean | 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. |\n| hidden | boolean | Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. |\n| iceberg | boolean | 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. |\n| visibleSize | string | 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. |\n| triggerStopUpPrice | string | Take profit price |\n| triggerStopDownPrice | string | Stop loss price |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| orderId | string | The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. |\n| clientOid | string | The user self-defined order ID. |\n\n---\n", "body": { "mode": "raw", "raw": "{\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}", @@ -19140,11 +19701,11 @@ { "key": "orderId", "value": "263485113055133696", - "description": "Order id" + "description": "Order ID" } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470620)\n\n:::info[Description]\nCancel an order (including a stop order).\n\nYou will receive success message once the system has received the cancellation request. The cancellation request will be processed by matching engine in sequence. To know if the request has been processed, you may check the order status or update message from the websocket pushes.\n\nThe `orderId` is the server-assigned order id, not the specified clientOid.\n\nIf the order can not be canceled (already filled or previously canceled, etc), then an error response will indicate the reason in the message field.\n:::\n\n**API KEY PERMISSIONS**\nThis endpoint requires the Futures Trading permission.\n\n**REQUEST URL**\nThis endpoint support Futures URL\n\n**REQUEST RATE LIMIT**\nFutures weight:1\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| cancelledOrderIds | array | Refer to the schema section of cancelledOrderIds |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470620)\n\n:::info[Description]\nCancel an order (including a stop order).\n\nYou will receive a success message once the system has received the cancellation request. The cancellation request will be processed by matching engine in sequence. To know if the request has been processed, you may check the order status or update message from the Websocket pushes.\n\nThe ‘orderId’ is the server-assigned order ID, not the specified clientOid.\n\nIf the order can not be canceled (already filled or previously canceled, etc.), then an error response will indicate the reason in the message field.\n:::\n\n**API KEY PERMISSIONS**\nThis endpoint requires the Futures Trading permission.\n\n**REQUEST URL**\nThis endpoint support Futures URL\n\n**REQUEST RATE LIMIT**\nFutures weight: 1\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| cancelledOrderIds | array | Refer to the schema section of cancelledOrderIds |\n\n---\n", "body": {} }, "response": [ @@ -19170,7 +19731,7 @@ { "key": "orderId", "value": "263485113055133696", - "description": "Order id" + "description": "Order ID" } ] } @@ -19232,16 +19793,16 @@ { "key": "symbol", "value": "XBTUSDTM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "clientOid", "value": "5c52e11203aa677f331e493fb", - "description": "The user self-defined order id." + "description": "The user self-defined order ID." } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470621)\n\n:::info[Description]\nCancel an order (including a stop order).\n\nYou will receive success message once the system has received the cancellation request. The cancellation request will be processed by matching engine in sequence. To know if the request has been processed, you may check the order status or update message from the pushes.\n\nResponse the ID created by the client (clientOid).\n\nIf the order can not be canceled (already filled or previously canceled, etc), then an error response will indicate the reason in the message field.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | |\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470621)\n\n:::info[Description]\nCancel an order (including a stop order).\n\nYou will receive a success message once the system has received the cancellation request. The cancellation request will be processed by matching engine in sequence. To know if the request has been processed, you may check the order status or update message from the pushes.\n\nReturn the client-generated order ID (clientOid).\n\nIf the order can not be canceled (already filled or previously canceled, etc.), then an error response will indicate the reason in the message field.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| clientOid | string | |\n\n---\n", "body": {} }, "response": [ @@ -19268,12 +19829,12 @@ { "key": "symbol", "value": "XBTUSDTM", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "clientOid", "value": "5c52e11203aa677f331e493fb", - "description": "The user self-defined order id." + "description": "The user self-defined order ID." } ] } @@ -19334,12 +19895,12 @@ { "key": "symbol", "value": null, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "price", "value": null, - "description": "Order price\n" + "description": "Order Price\n" }, { "key": "leverage", @@ -19348,7 +19909,7 @@ } ] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470612)\n\n:::info[Description]\nGet Maximum Open Position Size.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| maxBuyOpenSize | string | Maximum buy size
|\n| maxSellOpenSize | string | Maximum buy size
|\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470612)\n\n:::info[Description]\nGet Maximum Open Position Size.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n **None** \n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | object | Refer to the schema section of data |\n\n**root.data Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| maxBuyOpenSize | string | Maximum buy size
|\n| maxSellOpenSize | string | Maximum buy size
|\n\n---\n", "body": {} }, "response": [ @@ -19374,12 +19935,12 @@ { "key": "symbol", "value": null, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " }, { "key": "price", "value": null, - "description": "Order price\n" + "description": "Order Price\n" }, { "key": "leverage", @@ -19419,7 +19980,7 @@ } ], "cookie": [], - "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"XBTUSDTM\",\n \"maxBuyOpenSize\": \"8\",\n \"maxSellOpenSize\": \"5\"\n }\n}" + "body": "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"XBTUSDTM\",\n \"maxBuyOpenSize\": \"1000000\",\n \"maxSellOpenSize\": \"51\"\n }\n}" } ] }, @@ -19631,10 +20192,10 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470615)\n\n:::info[Description]\nRemove Isolated Margin Manually.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| withdrawAmount | string | 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\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | string | 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\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470615)\n\n:::info[Description]\nRemove Isolated Margin Manually.\n:::\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| withdrawAmount | number | 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\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | string | 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\n---\n", "body": { "mode": "raw", - "raw": "{\n \"symbol\": \"XBTUSDTM\",\n \"withdrawAmount\": \"0.0000001\"\n}", + "raw": "{\n \"symbol\": \"XBTUSDTM\",\n \"withdrawAmount\": 0.0000001\n}", "options": { "raw": { "language": "json" @@ -19722,7 +20283,7 @@ ], "query": [] }, - "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470613)\n\n:::info[Description]\nThis interface is for the adjustment of the risk limit level(Only valid for isolated Margin). To adjust the level will cancel the open order, the response can only indicate whether the submit of the adjustment request is successful or not. The result of the adjustment can be achieved by WebSocket information: Position Change Events\n:::\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| level | integer | level |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | boolean | To adjust the level will cancel the open order, the response can only indicate whether the submit of the adjustment request is successful or not.
|\n\n---\n", + "description": "# API Description\n\nFor the complete API documentation, please refer to [doc](https://www.kucoin.com/docs-new/api-3470613)\n\n:::info[Description]\nThis interface is for adjusting the risk limit level (only valid for Isolated Margin). Adjusting the level will result in the cancellation of any open orders. The response will indicate only whether the adjustment request was successfully submitted. The result of the adjustment can be obtained with information from Websocket: Position Change Events.\n:::\n\n\n# API Schema\n\n## Request Schema\n\n\n**Request Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| symbol | string | Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) |\n| level | integer | Level |\n\n---\n## Response Schema\n\n\n**Response Body**\n\n---\n**root Schema**\n\n| name | type | description |\n| --- | --- | --- |\n| code | string | |\n| data | boolean | 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\n---\n", "body": { "mode": "raw", "raw": "{\n \"symbol\" : \"XBTUSDTM\",\n \"level\" : 1\n}", @@ -19931,7 +20492,7 @@ "type": "text/javascript", "packages": {}, "exec": [ - "function extractPathVariable(str) {\n const regex = /^\\{\\{(.+?)\\}\\}$/;\n const match = str.match(regex);\n if (match) {\n return match[1];\n }\n return null;\n}\n\nfunction hasAnyFieldEmpty(obj) {\n for (const key in obj) {\n if (obj[key] === \"\" || obj[key] === null || obj[key] === undefined) {\n return true;\n }\n }\n return false;\n}\n\nfunction sign(text, secret) {\n const hash = CryptoJS.HmacSHA256(text, secret);\n return CryptoJS.enc.Base64.stringify(hash)\n}\n\nfunction auth(apiKey, method, url, data) {\n if (hasAnyFieldEmpty(apiKey)) {\n console.warn('The API key-related information is not configured; only the public channel API is accessible.')\n return {'User-Agent': `Kucoin-Universal-Postman-SDK/v1.1.0`}\n }\n\n const timestamp = Date.now();\n const text = timestamp + method.toUpperCase() + url + data;\n const signature = sign(text, apiKey.secret);\n return {\n 'KC-API-KEY': apiKey.key,\n 'KC-API-SIGN': signature,\n 'KC-API-TIMESTAMP': timestamp.toString(),\n 'KC-API-PASSPHRASE': sign(apiKey.passphrase || '', apiKey.secret),\n 'Content-Type': 'application/json',\n 'User-Agent': `Kucoin-Universal-Postman-SDK/v1.1.0`,\n 'KC-API-KEY-VERSION': 2,\n };\n}\n\nlet key = pm.environment.get('API_KEY')\nlet secret = pm.environment.get('API_SECRET')\nlet passphrase = pm.environment.get('API_PASSPHRASE')\n\nlet url = pm.request.url.getPathWithQuery()\nlet method = pm.request.method\nlet body = pm.request.body ? pm.request.body.toString() : ''\n\nfor (const index in pm.request.url.path) {\n path = pm.request.url.path[index]\n pathVar = extractPathVariable(path)\n if (pathVar != null) {\n let collectionVariable = pm.collectionVariables.get(pathVar);\n if (collectionVariable != null) {\n url = url.replace(path, collectionVariable)\n } else {\n console.warn('no path variable set: ' + path)\n }\n }\n}\n\nheader = auth({ key: key, passphrase: passphrase, secret: secret }, method, url, body)\n\nfor (const [headerName, headerValue] of Object.entries(header)) {\n pm.request.headers.add({ key: headerName, value: headerValue })\n}" + "function extractPathVariable(str) {\n const regex = /^\\{\\{(.+?)\\}\\}$/;\n const match = str.match(regex);\n if (match) {\n return match[1];\n }\n return null;\n}\n\nfunction hasAnyFieldEmpty(obj) {\n for (const key in obj) {\n if (obj[key] === \"\" || obj[key] === null || obj[key] === undefined) {\n return true;\n }\n }\n return false;\n}\n\nfunction sign(text, secret) {\n const hash = CryptoJS.HmacSHA256(text, secret);\n return CryptoJS.enc.Base64.stringify(hash)\n}\n\nfunction auth(apiKey, method, url, data) {\n if (hasAnyFieldEmpty(apiKey)) {\n console.warn('The API key-related information is not configured; only the public channel API is accessible.')\n return {'User-Agent': `Kucoin-Universal-Postman-SDK/v1.2.0`}\n }\n\n const timestamp = Date.now();\n const text = timestamp + method.toUpperCase() + url + data;\n const signature = sign(text, apiKey.secret);\n return {\n 'KC-API-KEY': apiKey.key,\n 'KC-API-SIGN': signature,\n 'KC-API-TIMESTAMP': timestamp.toString(),\n 'KC-API-PASSPHRASE': sign(apiKey.passphrase || '', apiKey.secret),\n 'Content-Type': 'application/json',\n 'User-Agent': `Kucoin-Universal-Postman-SDK/v1.2.0`,\n 'KC-API-KEY-VERSION': 3,\n };\n}\n\nlet key = pm.environment.get('API_KEY')\nlet secret = pm.environment.get('API_SECRET')\nlet passphrase = pm.environment.get('API_PASSPHRASE')\n\nlet url = pm.request.url.getPathWithQuery()\nlet method = pm.request.method\nlet body = pm.request.body ? pm.request.body.toString() : ''\n\nfor (const index in pm.request.url.path) {\n path = pm.request.url.path[index]\n pathVar = extractPathVariable(path)\n if (pathVar != null) {\n let collectionVariable = pm.collectionVariables.get(pathVar);\n if (collectionVariable != null) {\n url = url.replace(path, collectionVariable)\n } else {\n console.warn('no path variable set: ' + path)\n }\n }\n}\n\nheader = auth({ key: key, passphrase: passphrase, secret: secret }, method, url, body)\n\nfor (const [headerName, headerValue] of Object.entries(header)) {\n pm.request.headers.add({ key: headerName, value: headerValue })\n}" ] } }, diff --git a/sdk/postman/run_test.sh b/sdk/postman/run_test.sh new file mode 100644 index 00000000..e69de29b diff --git a/sdk/python/CHANGELOG.md b/sdk/python/CHANGELOG.md index 2e4aa90e..421cd2f9 100644 --- a/sdk/python/CHANGELOG.md +++ b/sdk/python/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +API documentation [Changelog](https://www.kucoin.com/docs-new/change-log) + +Current synchronized API documentation version [20250313](https://www.kucoin.com/docs-new/change-log#20250313) + +## 2025-03-21(1.2.0) +- Update the latest APIs, documentation, etc +- Remove range validation in Python +- Update API KEY verification version to 3 +- Fix the bug related to resubscribing +- The Node.js SDK has been changed to the official unified version +- Fix issues with automated test execution. + ## 2025-03-04(Python 1.1.1) - Update __init__.py to enhance the import experience - Reduce unnecessary log output diff --git a/sdk/python/README.md b/sdk/python/README.md index 9e9cfd45..bdae8a31 100644 --- a/sdk/python/README.md +++ b/sdk/python/README.md @@ -8,7 +8,7 @@ For an overview of the project and SDKs in other languages, refer to the [Main R ## 📦 Installation -### Latest Version: `1.1.1` +### Latest Version: `1.2.0` Install the Python SDK using `pip`: ```bash diff --git a/sdk/python/example/example_sign.py b/sdk/python/example/example_sign.py index d042d147..6d56ac56 100644 --- a/sdk/python/example/example_sign.py +++ b/sdk/python/example/example_sign.py @@ -44,7 +44,7 @@ def headers(self, plain: str) -> dict: "KC-API-PASSPHRASE": self.api_passphrase, "KC-API-TIMESTAMP": timestamp, "KC-API-SIGN": signature, - "KC-API-KEY-VERSION": "2" + "KC-API-KEY-VERSION": "3" } diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/api_account.py b/sdk/python/kucoin_universal_sdk/generate/account/account/api_account.py index c9bc1f61..02c2d053 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/api_account.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/api_account.py @@ -40,15 +40,15 @@ def get_account_info(self, **kwargs: Any) -> GetAccountInfoResp: summary: Get Account Summary Info description: This endpoint can be used to obtain account summary information. documentation: https://www.kucoin.com/docs-new/api-3470119 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -56,17 +56,17 @@ def get_account_info(self, **kwargs: Any) -> GetAccountInfoResp: def get_apikey_info(self, **kwargs: Any) -> GetApikeyInfoResp: """ summary: Get Apikey Info - description: Get the information of the api key. Use the api key pending to be checked to call the endpoint. Both master and sub user's api key are applicable. + description: Get the api key information. Use the api key awaiting checking to call the endpoint. Both master and sub user's api key are applicable. documentation: https://www.kucoin.com/docs-new/api-3470130 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -76,15 +76,15 @@ def get_spot_account_type(self, **kwargs: Any) -> GetSpotAccountTypeResp: summary: Get Account Type - Spot description: This interface determines whether the current user is a spot high-frequency user or a spot low-frequency user. documentation: https://www.kucoin.com/docs-new/api-3470120 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 30 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 30 | + +-----------------------+---------+ """ pass @@ -93,17 +93,17 @@ def get_spot_account_list(self, req: GetSpotAccountListReq, **kwargs: Any) -> GetSpotAccountListResp: """ summary: Get Account List - Spot - description: Get a list of accounts. Please Deposit to the main account firstly, then transfer the funds to the trade account via Inner Transfer before transaction. + description: Get a list of accounts. Please deposit funds into the main account first, then use the Transfer function to move them to the trade account before trading. documentation: https://www.kucoin.com/docs-new/api-3470125 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 5 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+------------+ """ pass @@ -112,17 +112,17 @@ def get_spot_account_detail(self, req: GetSpotAccountDetailReq, **kwargs: Any) -> GetSpotAccountDetailResp: """ summary: Get Account Detail - Spot - description: get Information for a single spot account. Use this endpoint when you know the accountId. + description: Get information for a single spot account. Use this endpoint when you know the accountId. documentation: https://www.kucoin.com/docs-new/api-3470126 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 5 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+------------+ """ pass @@ -131,17 +131,17 @@ def get_cross_margin_account(self, req: GetCrossMarginAccountReq, **kwargs: Any) -> GetCrossMarginAccountResp: """ summary: Get Account - Cross Margin - description: Request via this endpoint to get the info of the cross margin account. + description: Request cross margin account info via this endpoint. documentation: https://www.kucoin.com/docs-new/api-3470127 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 15 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 15 | + +-----------------------+---------+ """ pass @@ -151,17 +151,17 @@ def get_isolated_margin_account( **kwargs: Any) -> GetIsolatedMarginAccountResp: """ summary: Get Account - Isolated Margin - description: Request via this endpoint to get the info of the isolated margin account. + description: Request isolated margin account info via this endpoint. documentation: https://www.kucoin.com/docs-new/api-3470128 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 15 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 15 | + +-----------------------+---------+ """ pass @@ -170,17 +170,17 @@ def get_futures_account(self, req: GetFuturesAccountReq, **kwargs: Any) -> GetFuturesAccountResp: """ summary: Get Account - Futures - description: Request via this endpoint to get the info of the futures account. + description: Request futures account info via this endpoint. documentation: https://www.kucoin.com/docs-new/api-3470129 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -189,17 +189,17 @@ def get_spot_ledger(self, req: GetSpotLedgerReq, **kwargs: Any) -> GetSpotLedgerResp: """ summary: Get Account Ledgers - Spot/Margin - description: This interface is for transaction records from all types of your accounts, supporting inquiry of various currencies. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. + description: This interface is for transaction records from all your account types, supporting various currency inquiries. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. documentation: https://www.kucoin.com/docs-new/api-3470121 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 2 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+------------+ """ pass @@ -208,17 +208,17 @@ def get_spot_hf_ledger(self, req: GetSpotHfLedgerReq, **kwargs: Any) -> GetSpotHfLedgerResp: """ summary: Get Account Ledgers - Trade_hf - description: This API endpoint returns all transfer (in and out) records in high-frequency trading account and supports multi-coin queries. The query results are sorted in descending order by createdAt and id. + description: This API endpoint returns all transfer (in and out) records in high-frequency trading accounts and supports multi-coin queries. The query results are sorted in descending order by createdAt and ID. documentation: https://www.kucoin.com/docs-new/api-3470122 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -227,17 +227,17 @@ def get_margin_hf_ledger(self, req: GetMarginHfLedgerReq, **kwargs: Any) -> GetMarginHfLedgerResp: """ summary: Get Account Ledgers - Margin_hf - description: This API endpoint returns all transfer (in and out) records in high-frequency margin trading account and supports multi-coin queries. The query results are sorted in descending order by createdAt and id. + description: This API endpoint returns all transfer (in and out) records in high-frequency margin trading accounts and supports multi-coin queries. The query results are sorted in descending order by createdAt and ID. documentation: https://www.kucoin.com/docs-new/api-3470123 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -246,17 +246,17 @@ def get_futures_ledger(self, req: GetFuturesLedgerReq, **kwargs: Any) -> GetFuturesLedgerResp: """ summary: Get Account Ledgers - Futures - description: This interface can query the ledger records of the futures business line + description: This interface can query the ledger records of the futures business line. documentation: https://www.kucoin.com/docs-new/api-3470124 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -266,17 +266,17 @@ def get_margin_account_detail(self, **kwargs: Any) -> GetMarginAccountDetailResp: """ summary: Get Account Detail - Margin - description: Request via this endpoint to get the info of the margin account. + description: Request margin account info via this endpoint. documentation: https://www.kucoin.com/docs-new/api-3470311 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 40 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 40 | + +-----------------------+---------+ """ pass @@ -287,17 +287,17 @@ def get_isolated_margin_account_list_v1( **kwargs: Any) -> GetIsolatedMarginAccountListV1Resp: """ summary: Get Account List - Isolated Margin - V1 - description: Request via this endpoint to get the info list of the isolated margin account. + description: Request the isolated margin account info list via this endpoint. documentation: https://www.kucoin.com/docs-new/api-3470314 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 50 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 50 | + +-----------------------+---------+ """ pass @@ -308,17 +308,17 @@ def get_isolated_margin_account_detail_v1( **kwargs: Any) -> GetIsolatedMarginAccountDetailV1Resp: """ summary: Get Account Detail - Isolated Margin - V1 - description: Request via this endpoint to get the info of the isolated margin account. + description: Request isolated margin account info via this endpoint. documentation: https://www.kucoin.com/docs-new/api-3470315 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 50 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 50 | + +-----------------------+---------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/api_account_test.py b/sdk/python/kucoin_universal_sdk/generate/account/account/api_account_test.py index faf064a4..0218cabb 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/api_account_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/api_account_test.py @@ -173,7 +173,7 @@ def test_get_futures_account_resp_model(self): Get Account - Futures /api/v1/account-overview """ - data = "{\n \"code\": \"200000\",\n \"data\": {\n \"currency\": \"USDT\",\n \"accountEquity\": 48.921913718,\n \"unrealisedPNL\": 1.59475,\n \"marginBalance\": 47.548728628,\n \"positionMargin\": 34.1577964733,\n \"orderMargin\": 0,\n \"frozenFunds\": 0,\n \"availableBalance\": 14.7876172447,\n \"riskRatio\": 0.0090285199\n }\n}" + data = "{\n \"code\": \"200000\",\n \"data\": {\n \"accountEquity\": 394.439280806,\n \"unrealisedPNL\": 20.15278,\n \"marginBalance\": 371.394298816,\n \"positionMargin\": 102.20664159,\n \"orderMargin\": 10.06002012,\n \"frozenFunds\": 0.0,\n \"availableBalance\": 290.326799096,\n \"currency\": \"USDT\",\n \"riskRatio\": 0.0065289525,\n \"maxWithdrawAmount\": 290.326419096\n }\n}" common_response = RestResponse.from_json(data) resp = GetFuturesAccountResp.from_dict(common_response.data) diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_account_info_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_account_info_resp.py index ebc8bcbe..11ddeb8b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_account_info_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_account_info_resp.py @@ -23,12 +23,12 @@ class GetAccountInfoResp(BaseModel, Response): margin_sub_quantity (int): Number of sub-accounts with margin trading permissions enabled futures_sub_quantity (int): Number of sub-accounts with futures trading permissions enabled option_sub_quantity (int): Number of sub-accounts with option trading permissions enabled - max_sub_quantity (int): Max number of sub-accounts = maxDefaultSubQuantity + maxSpotSubQuantity - max_default_sub_quantity (int): Max number of default open sub-accounts (according to VIP level) - max_spot_sub_quantity (int): Max number of sub-accounts with additional Spot trading permissions - max_margin_sub_quantity (int): Max number of sub-accounts with additional margin trading permissions - max_futures_sub_quantity (int): Max number of sub-accounts with additional futures trading permissions - max_option_sub_quantity (int): Max number of sub-accounts with additional Option trading permissions + max_sub_quantity (int): Max. number of sub-accounts = maxDefaultSubQuantity + maxSpotSubQuantity + max_default_sub_quantity (int): Max. number of default open sub-accounts (according to VIP level) + max_spot_sub_quantity (int): Max. number of sub-accounts with additional spot trading permissions + max_margin_sub_quantity (int): Max. number of sub-accounts with additional margin trading permissions + max_futures_sub_quantity (int): Max. number of sub-accounts with additional futures trading permissions + max_option_sub_quantity (int): Max. number of sub-accounts with additional option trading permissions """ common_response: Optional[RestResponse] = Field( @@ -60,32 +60,32 @@ class GetAccountInfoResp(BaseModel, Response): max_sub_quantity: Optional[int] = Field( default=None, description= - "Max number of sub-accounts = maxDefaultSubQuantity + maxSpotSubQuantity", + "Max. number of sub-accounts = maxDefaultSubQuantity + maxSpotSubQuantity", alias="maxSubQuantity") max_default_sub_quantity: Optional[int] = Field( default=None, description= - "Max number of default open sub-accounts (according to VIP level)", + "Max. number of default open sub-accounts (according to VIP level)", alias="maxDefaultSubQuantity") max_spot_sub_quantity: Optional[int] = Field( default=None, description= - "Max number of sub-accounts with additional Spot trading permissions", + "Max. number of sub-accounts with additional spot trading permissions", alias="maxSpotSubQuantity") max_margin_sub_quantity: Optional[int] = Field( default=None, description= - "Max number of sub-accounts with additional margin trading permissions", + "Max. number of sub-accounts with additional margin trading permissions", alias="maxMarginSubQuantity") max_futures_sub_quantity: Optional[int] = Field( default=None, description= - "Max number of sub-accounts with additional futures trading permissions", + "Max. number of sub-accounts with additional futures trading permissions", alias="maxFuturesSubQuantity") max_option_sub_quantity: Optional[int] = Field( default=None, description= - "Max number of sub-accounts with additional Option trading permissions", + "Max. number of sub-accounts with additional option trading permissions", alias="maxOptionSubQuantity") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_cross_margin_account_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_cross_margin_account_resp.py index f67a631a..b501e6b5 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_cross_margin_account_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_cross_margin_account_resp.py @@ -22,7 +22,7 @@ class GetCrossMarginAccountResp(BaseModel, Response): total_asset_of_quote_currency (str): Total Assets in Quote Currency total_liability_of_quote_currency (str): Total Liability in Quote Currency debt_ratio (str): debt ratio - status (StatusEnum): Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW borrowing + status (StatusEnum): Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW-borrowing accounts (list[GetCrossMarginAccountAccounts]): Margin account list """ @@ -57,7 +57,7 @@ class StatusEnum(Enum): status: Optional[StatusEnum] = Field( default=None, description= - "Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW borrowing" + "Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW-borrowing" ) accounts: Optional[List[GetCrossMarginAccountAccounts]] = Field( default=None, description="Margin account list") diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_account_req.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_account_req.py index cded47ed..f22581e2 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_account_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_account_req.py @@ -15,11 +15,11 @@ class GetFuturesAccountReq(BaseModel): GetFuturesAccountReq Attributes: - currency (str): Currecny, Default XBT + currency (str): Currency, Default XBT """ currency: Optional[str] = Field(default='XBT', - description="Currecny, Default XBT") + description="Currency, Default XBT") __properties: ClassVar[List[str]] = ["currency"] @@ -70,7 +70,7 @@ def __init__(self): def set_currency(self, value: str) -> GetFuturesAccountReqBuilder: """ - Currecny, Default XBT + Currency, Default XBT """ self.obj['currency'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_account_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_account_resp.py index 61ed19fe..88ee558f 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_account_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_account_resp.py @@ -17,31 +17,32 @@ class GetFuturesAccountResp(BaseModel, Response): GetFuturesAccountResp Attributes: - account_equity (float): Account equity = marginBalance + Unrealised PNL - unrealised_pnl (float): Unrealised profit and loss - margin_balance (float): Margin balance = positionMargin + orderMargin + frozenFunds + availableBalance - unrealisedPNL + account_equity (float): Account equity = marginBalance + unrealizedPNL + unrealised_pnl (float): Unrealized profit and loss + margin_balance (float): Margin balance = positionMargin + orderMargin + frozenFunds + availableBalance - unrealizedPNL position_margin (float): Position margin order_margin (float): Order margin frozen_funds (float): Frozen funds for out-transfer available_balance (float): Available balance currency (str): Currency risk_ratio (float): Cross margin risk rate + max_withdraw_amount (float): Maximum amount that can be withdrawn/transferred. """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") account_equity: Optional[float] = Field( default=None, - description="Account equity = marginBalance + Unrealised PNL", + description="Account equity = marginBalance + unrealizedPNL", alias="accountEquity") unrealised_pnl: Optional[float] = Field( default=None, - description="Unrealised profit and loss", + description="Unrealized profit and loss", alias="unrealisedPNL") margin_balance: Optional[float] = Field( default=None, description= - "Margin balance = positionMargin + orderMargin + frozenFunds + availableBalance - unrealisedPNL", + "Margin balance = positionMargin + orderMargin + frozenFunds + availableBalance - unrealizedPNL", alias="marginBalance") position_margin: Optional[float] = Field(default=None, description="Position margin", @@ -60,11 +61,15 @@ class GetFuturesAccountResp(BaseModel, Response): risk_ratio: Optional[float] = Field(default=None, description="Cross margin risk rate", alias="riskRatio") + max_withdraw_amount: Optional[float] = Field( + default=None, + description="Maximum amount that can be withdrawn/transferred.", + alias="maxWithdrawAmount") __properties: ClassVar[List[str]] = [ "accountEquity", "unrealisedPNL", "marginBalance", "positionMargin", "orderMargin", "frozenFunds", "availableBalance", "currency", - "riskRatio" + "riskRatio", "maxWithdrawAmount" ] model_config = ConfigDict( @@ -118,7 +123,9 @@ def from_dict( "currency": obj.get("currency"), "riskRatio": - obj.get("riskRatio") + obj.get("riskRatio"), + "maxWithdrawAmount": + obj.get("maxWithdrawAmount") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_ledger_data_list.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_ledger_data_list.py index 15007914..ee530a06 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_ledger_data_list.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_ledger_data_list.py @@ -15,7 +15,7 @@ class GetFuturesLedgerDataList(BaseModel): GetFuturesLedgerDataList Attributes: - time (int): ledger time + time (int): Ledger time type (str): Type: RealisedPNL, Deposit, Withdrawal, TransferIn, TransferOut amount (float): Transaction amount fee (float): Fee @@ -26,7 +26,7 @@ class GetFuturesLedgerDataList(BaseModel): currency (str): Currency """ - time: Optional[int] = Field(default=None, description="ledger time") + time: Optional[int] = Field(default=None, description="Ledger time") type: Optional[str] = Field( default=None, description= diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_ledger_req.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_ledger_req.py index 43048e84..39632bae 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_ledger_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_ledger_req.py @@ -16,12 +16,12 @@ class GetFuturesLedgerReq(BaseModel): Attributes: currency (str): Currency of transaction history, XBT or USDT - type (str): Type RealisedPNL-Realised profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out - offset (int): Start offset. Generally, the only attribute of the last returned result of the previous request is used, and the first page is returned by default - forward (bool): 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 + type (str): Type RealizedPNL-Realized profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out + offset (int): Start offset. Generally, only the attributes of the last returned result of the previous request are used, and the first page is returned by default + forward (bool): 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. max_count (int): Displayed size per page. The default size is 50 - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) """ currency: Optional[str] = Field( @@ -30,27 +30,27 @@ class GetFuturesLedgerReq(BaseModel): type: Optional[str] = Field( default=None, description= - "Type RealisedPNL-Realised profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out" + "Type RealizedPNL-Realized profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out" ) offset: Optional[int] = Field( default=None, description= - "Start offset. Generally, the only attribute of the last returned result of the previous request is used, and the first page is returned by default" + "Start offset. Generally, only the attributes of the last returned result of the previous request are used, and the first page is returned by default" ) forward: Optional[bool] = Field( default=True, 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" + "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." ) max_count: Optional[int] = Field( default=50, description="Displayed size per page. The default size is 50", alias="maxCount") start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") __properties: ClassVar[List[str]] = [ @@ -123,21 +123,21 @@ def set_currency(self, value: str) -> GetFuturesLedgerReqBuilder: def set_type(self, value: str) -> GetFuturesLedgerReqBuilder: """ - Type RealisedPNL-Realised profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out + Type RealizedPNL-Realized profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out """ self.obj['type'] = value return self def set_offset(self, value: int) -> GetFuturesLedgerReqBuilder: """ - Start offset. Generally, the only attribute of the last returned result of the previous request is used, and the first page is returned by default + Start offset. Generally, only the attributes of the last returned result of the previous request are used, and the first page is returned by default """ self.obj['offset'] = value return self def set_forward(self, value: bool) -> GetFuturesLedgerReqBuilder: """ - 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 + 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. """ self.obj['forward'] = value return self @@ -151,14 +151,14 @@ def set_max_count(self, value: int) -> GetFuturesLedgerReqBuilder: def set_start_at(self, value: int) -> GetFuturesLedgerReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetFuturesLedgerReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_ledger_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_ledger_resp.py index 859a7f82..85b2323e 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_ledger_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_futures_ledger_resp.py @@ -19,7 +19,7 @@ class GetFuturesLedgerResp(BaseModel, Response): Attributes: data_list (list[GetFuturesLedgerDataList]): - has_more (bool): Is it the last page. If it is false, it means it is the last page, and if it is true, it means need to turn the page. + has_more (bool): Is it the last page? If it is false, it means it is the last page, and if it is true, it means you need to move to the next page. """ common_response: Optional[RestResponse] = Field( @@ -29,7 +29,7 @@ class GetFuturesLedgerResp(BaseModel, Response): has_more: Optional[bool] = Field( default=None, description= - "Is it the last page. If it is false, it means it is the last page, and if it is true, it means need to turn the page.", + "Is it the last page? If it is false, it means it is the last page, and if it is true, it means you need to move to the next page.", alias="hasMore") __properties: ClassVar[List[str]] = ["dataList", "hasMore"] diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_assets.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_assets.py index 7a60535f..59e85312 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_assets.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_assets.py @@ -19,7 +19,7 @@ class GetIsolatedMarginAccountAssets(BaseModel): Attributes: symbol (str): Symbol - status (StatusEnum): Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW borrowing + status (StatusEnum): Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW-borrowing debt_ratio (str): debt ratio base_asset (GetIsolatedMarginAccountAssetsBaseAsset): quote_asset (GetIsolatedMarginAccountAssetsQuoteAsset): @@ -44,7 +44,7 @@ class StatusEnum(Enum): status: Optional[StatusEnum] = Field( default=None, description= - "Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW borrowing" + "Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW-borrowing" ) debt_ratio: Optional[str] = Field(default=None, description="debt ratio", diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_detail_v1_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_detail_v1_resp.py index e723847f..9469a5ce 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_detail_v1_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_detail_v1_resp.py @@ -21,7 +21,7 @@ class GetIsolatedMarginAccountDetailV1Resp(BaseModel, Response): Attributes: symbol (str): Symbol - status (StatusEnum): The position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW . + status (StatusEnum): Position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW . debt_ratio (str): debt ratio base_asset (GetIsolatedMarginAccountDetailV1BaseAsset): quote_asset (GetIsolatedMarginAccountDetailV1QuoteAsset): @@ -52,7 +52,7 @@ class StatusEnum(Enum): status: Optional[StatusEnum] = Field( default=None, description= - "The position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW ." + "Position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW ." ) debt_ratio: Optional[str] = Field(default=None, description="debt ratio", diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_list_v1_assets.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_list_v1_assets.py index d750a656..508a21f3 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_list_v1_assets.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_list_v1_assets.py @@ -19,7 +19,7 @@ class GetIsolatedMarginAccountListV1Assets(BaseModel): Attributes: symbol (str): Symbol - status (StatusEnum): The position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW . + status (StatusEnum): Position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW . debt_ratio (str): debt ratio base_asset (GetIsolatedMarginAccountListV1AssetsBaseAsset): quote_asset (GetIsolatedMarginAccountListV1AssetsQuoteAsset): @@ -48,7 +48,7 @@ class StatusEnum(Enum): status: Optional[StatusEnum] = Field( default=None, description= - "The position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW ." + "Position status: Existing liabilities-DEBT, No liabilities-CLEAR, Bankrupcy (after position enters a negative balance)-BANKRUPTCY, Existing borrowings-IN_BORROW, Existing repayments-IN_REPAY, Under liquidation-IN_LIQUIDATION, Under auto-renewal assets-IN_AUTO_RENEW ." ) debt_ratio: Optional[str] = Field(default=None, description="debt ratio", diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_list_v1_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_list_v1_resp.py index fc72818d..6269a23c 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_list_v1_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_isolated_margin_account_list_v1_resp.py @@ -18,8 +18,8 @@ class GetIsolatedMarginAccountListV1Resp(BaseModel, Response): GetIsolatedMarginAccountListV1Resp Attributes: - total_conversion_balance (str): The total balance of the isolated margin account(in the request coin) - liability_conversion_balance (str): Total liabilities of the isolated margin account(in the request coin) + total_conversion_balance (str): The total balance of the isolated margin account (in the request coin) + liability_conversion_balance (str): Total liabilities of the isolated margin account (in the request coin) assets (list[GetIsolatedMarginAccountListV1Assets]): Account list """ @@ -28,12 +28,12 @@ class GetIsolatedMarginAccountListV1Resp(BaseModel, Response): total_conversion_balance: Optional[str] = Field( default=None, description= - "The total balance of the isolated margin account(in the request coin)", + "The total balance of the isolated margin account (in the request coin)", alias="totalConversionBalance") liability_conversion_balance: Optional[str] = Field( default=None, description= - "Total liabilities of the isolated margin account(in the request coin)", + "Total liabilities of the isolated margin account (in the request coin)", alias="liabilityConversionBalance") assets: Optional[List[GetIsolatedMarginAccountListV1Assets]] = Field( default=None, description="Account list") diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_margin_hf_ledger_data.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_margin_hf_ledger_data.py index 24d442a7..19cad1a6 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_margin_hf_ledger_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_margin_hf_ledger_data.py @@ -18,11 +18,11 @@ class GetMarginHfLedgerData(BaseModel): id (int): currency (str): currency amount (str): Change in funds balance - fee (str): Deposit or withdrawal fee + fee (str): Transaction, Deposit or withdrawal fee balance (str): Total balance of funds after change account_type (str): Master account type TRADE_HF - biz_type (str): Trnasaction type,such as TRANSFER, TRADE_EXCHANGE, etc. - direction (str): Direction of transfer( out or in) + biz_type (str): Trnasaction type, such as TRANSFER, TRADE_EXCHANGE, etc. + direction (str): Direction of transfer (out or in) created_at (int): Ledger creation time context (str): Core transaction parameter tax (str): @@ -32,8 +32,8 @@ class GetMarginHfLedgerData(BaseModel): currency: Optional[str] = Field(default=None, description="currency") amount: Optional[str] = Field(default=None, description="Change in funds balance") - fee: Optional[str] = Field(default=None, - description="Deposit or withdrawal fee") + fee: Optional[str] = Field( + default=None, description="Transaction, Deposit or withdrawal fee") balance: Optional[str] = Field( default=None, description="Total balance of funds after change") account_type: Optional[str] = Field( @@ -42,10 +42,10 @@ class GetMarginHfLedgerData(BaseModel): alias="accountType") biz_type: Optional[str] = Field( default=None, - description="Trnasaction type,such as TRANSFER, TRADE_EXCHANGE, etc.", + description="Trnasaction type, such as TRANSFER, TRADE_EXCHANGE, etc.", alias="bizType") direction: Optional[str] = Field( - default=None, description="Direction of transfer( out or in)") + default=None, description="Direction of transfer (out or in)") created_at: Optional[int] = Field(default=None, description="Ledger creation time", alias="createdAt") diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_margin_hf_ledger_req.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_margin_hf_ledger_req.py index b6412d02..f16d10cc 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_margin_hf_ledger_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_margin_hf_ledger_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetMarginHfLedgerReq(BaseModel): @@ -17,13 +16,13 @@ class GetMarginHfLedgerReq(BaseModel): GetMarginHfLedgerReq Attributes: - currency (str): currency, optional,can select more than one,separate with commas,select no more than 10 currencys,the default will be to query for all currencys if left empty + currency (str): Currency optional; more than one can be selected; separate using commas; select no more than 10 currencies; the default will be to query for all currencies if left empty direction (DirectionEnum): direction: in, out - biz_type (str): Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE - cross margin trade, ISOLATED_EXCHANGE - isolated margin trade, LIQUIDATION - liquidation, ASSERT_RETURN - forced liquidation asset return - last_id (int): The id of the last set of data from the previous batch of data. By default, the latest information is given. - limit (int): Default100,Max200 - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) + biz_type (str): Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE-cross margin trade, ISOLATED_EXCHANGE-isolated margin trade, LIQUIDATION-liquidation, ASSERT_RETURN-forced liquidation asset return + last_id (int): The ID of the last set of data from the previous data batch. By default, the latest information is given. + limit (int): Default100, Max200 + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) """ class DirectionEnum(Enum): @@ -38,27 +37,26 @@ class DirectionEnum(Enum): currency: Optional[str] = Field( default=None, description= - "currency, optional,can select more than one,separate with commas,select no more than 10 currencys,the default will be to query for all currencys if left empty" + "Currency optional; more than one can be selected; separate using commas; select no more than 10 currencies; the default will be to query for all currencies if left empty" ) direction: Optional[DirectionEnum] = Field( default=None, description="direction: in, out") biz_type: Optional[str] = Field( default=None, description= - "Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE - cross margin trade, ISOLATED_EXCHANGE - isolated margin trade, LIQUIDATION - liquidation, ASSERT_RETURN - forced liquidation asset return", + "Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE-cross margin trade, ISOLATED_EXCHANGE-isolated margin trade, LIQUIDATION-liquidation, ASSERT_RETURN-forced liquidation asset return", alias="bizType") last_id: Optional[int] = Field( default=None, description= - "The id of the last set of data from the previous batch of data. By default, the latest information is given.", + "The ID of the last set of data from the previous data batch. By default, the latest information is given.", alias="lastId") - limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = Field( - default=100, description="Default100,Max200") + limit: Optional[int] = Field(default=100, description="Default100, Max200") start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") __properties: ClassVar[List[str]] = [ @@ -125,7 +123,7 @@ def __init__(self): def set_currency(self, value: str) -> GetMarginHfLedgerReqBuilder: """ - currency, optional,can select more than one,separate with commas,select no more than 10 currencys,the default will be to query for all currencys if left empty + Currency optional; more than one can be selected; separate using commas; select no more than 10 currencies; the default will be to query for all currencies if left empty """ self.obj['currency'] = value return self @@ -141,35 +139,35 @@ def set_direction( def set_biz_type(self, value: str) -> GetMarginHfLedgerReqBuilder: """ - Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE - cross margin trade, ISOLATED_EXCHANGE - isolated margin trade, LIQUIDATION - liquidation, ASSERT_RETURN - forced liquidation asset return + Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE-cross margin trade, ISOLATED_EXCHANGE-isolated margin trade, LIQUIDATION-liquidation, ASSERT_RETURN-forced liquidation asset return """ self.obj['bizType'] = value return self def set_last_id(self, value: int) -> GetMarginHfLedgerReqBuilder: """ - The id of the last set of data from the previous batch of data. By default, the latest information is given. + The ID of the last set of data from the previous data batch. By default, the latest information is given. """ self.obj['lastId'] = value return self def set_limit(self, value: int) -> GetMarginHfLedgerReqBuilder: """ - Default100,Max200 + Default100, Max200 """ self.obj['limit'] = value return self def set_start_at(self, value: int) -> GetMarginHfLedgerReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetMarginHfLedgerReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_account_list_data.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_account_list_data.py index a455c8bd..a30c6966 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_account_list_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_account_list_data.py @@ -18,7 +18,7 @@ class GetSpotAccountListData(BaseModel): Attributes: id (str): Account ID currency (str): Currency - type (TypeEnum): Account type:,main、trade、isolated(abandon)、margin(abandon) + type (TypeEnum): Account type: main, trade, isolated (abandon), margin (abandon) balance (str): Total funds in the account available (str): Funds available to withdraw or trade holds (str): Funds on hold (not available for use) @@ -38,7 +38,7 @@ class TypeEnum(Enum): type: Optional[TypeEnum] = Field( default=None, description= - "Account type:,main、trade、isolated(abandon)、margin(abandon) ") + "Account type: main, trade, isolated (abandon), margin (abandon) ") balance: Optional[str] = Field(default=None, description="Total funds in the account") available: Optional[str] = Field( diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_account_list_req.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_account_list_req.py index 85a18c2a..d3c73a86 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_account_list_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_account_list_req.py @@ -17,7 +17,7 @@ class GetSpotAccountListReq(BaseModel): Attributes: currency (str): currency - type (TypeEnum): Account type main、trade + type (TypeEnum): Account type """ class TypeEnum(Enum): @@ -25,13 +25,14 @@ class TypeEnum(Enum): Attributes: MAIN: Funding account TRADE: Spot account + OPTION: Option account """ MAIN = 'main' TRADE = 'trade' + OPTION = 'option' currency: Optional[str] = Field(default=None, description="currency") - type: Optional[TypeEnum] = Field(default=None, - description="Account type main、trade") + type: Optional[TypeEnum] = Field(default=None, description="Account type") __properties: ClassVar[List[str]] = ["currency", "type"] @@ -91,7 +92,7 @@ def set_type( self, value: GetSpotAccountListReq.TypeEnum ) -> GetSpotAccountListReqBuilder: """ - Account type main、trade + Account type """ self.obj['type'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_hf_ledger_data.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_hf_ledger_data.py index b00926e9..71aae826 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_hf_ledger_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_hf_ledger_data.py @@ -16,15 +16,15 @@ class GetSpotHfLedgerData(BaseModel): GetSpotHfLedgerData Attributes: - id (str): Unique id + id (str): Unique ID currency (str): currency amount (str): Change in funds balance - fee (str): Deposit or withdrawal fee + fee (str): Transaction, Deposit or withdrawal fee tax (str): balance (str): Total balance of funds after change account_type (str): Master account type TRADE_HF - biz_type (str): Trnasaction type,such as TRANSFER, TRADE_EXCHANGE, etc. - direction (DirectionEnum): Direction of transfer( out or in) + biz_type (str): Trnasaction type, such as TRANSFER, TRADE_EXCHANGE, etc. + direction (DirectionEnum): Direction of transfer (out or in) created_at (str): Created time context (str): Core transaction parameter """ @@ -38,12 +38,12 @@ class DirectionEnum(Enum): IN_ = 'in' OUT = 'out' - id: Optional[str] = Field(default=None, description="Unique id") + id: Optional[str] = Field(default=None, description="Unique ID") currency: Optional[str] = Field(default=None, description="currency") amount: Optional[str] = Field(default=None, description="Change in funds balance") - fee: Optional[str] = Field(default=None, - description="Deposit or withdrawal fee") + fee: Optional[str] = Field( + default=None, description="Transaction, Deposit or withdrawal fee") tax: Optional[str] = None balance: Optional[str] = Field( default=None, description="Total balance of funds after change") @@ -53,10 +53,10 @@ class DirectionEnum(Enum): alias="accountType") biz_type: Optional[str] = Field( default=None, - description="Trnasaction type,such as TRANSFER, TRADE_EXCHANGE, etc.", + description="Trnasaction type, such as TRANSFER, TRADE_EXCHANGE, etc.", alias="bizType") direction: Optional[DirectionEnum] = Field( - default=None, description="Direction of transfer( out or in)") + default=None, description="Direction of transfer (out or in)") created_at: Optional[str] = Field(default=None, description="Created time", alias="createdAt") diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_hf_ledger_req.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_hf_ledger_req.py index a377074c..3affb6c7 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_hf_ledger_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_hf_ledger_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetSpotHfLedgerReq(BaseModel): @@ -17,13 +16,13 @@ class GetSpotHfLedgerReq(BaseModel): GetSpotHfLedgerReq Attributes: - currency (str): Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default. + currency (str): Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default. direction (DirectionEnum): direction: in, out - biz_type (BizTypeEnum): Transaction type: TRANSFER-transfer funds,TRADE_EXCHANGE-Trade - last_id (int): The id of the last set of data from the previous batch of data. By default, the latest information is given. - limit (int): Default100,Max200 - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) + biz_type (BizTypeEnum): Transaction type + last_id (int): The ID of the last set of data from the previous data batch. By default, the latest information is given. + limit (int): Default100, Max200 + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) """ class DirectionEnum(Enum): @@ -38,36 +37,39 @@ class DirectionEnum(Enum): class BizTypeEnum(Enum): """ Attributes: - TRADE_EXCHANGE: - TRANSFER: + TRADE_EXCHANGE: trade exchange + TRANSFER: transfer + RETURNED_FEES: returned fees + DEDUCTION_FEES: deduction fees + OTHER: other """ TRADE_EXCHANGE = 'TRADE_EXCHANGE' TRANSFER = 'TRANSFER' + RETURNED_FEES = 'RETURNED_FEES' + DEDUCTION_FEES = 'DEDUCTION_FEES' + OTHER = 'OTHER' currency: Optional[str] = Field( default=None, description= - "Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default." + "Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default." ) direction: Optional[DirectionEnum] = Field( default=None, description="direction: in, out") - biz_type: Optional[BizTypeEnum] = Field( - default=None, - description= - "Transaction type: TRANSFER-transfer funds,TRADE_EXCHANGE-Trade", - alias="bizType") + biz_type: Optional[BizTypeEnum] = Field(default=None, + description="Transaction type", + alias="bizType") last_id: Optional[int] = Field( default=None, description= - "The id of the last set of data from the previous batch of data. By default, the latest information is given.", + "The ID of the last set of data from the previous data batch. By default, the latest information is given.", alias="lastId") - limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = Field( - default=100, description="Default100,Max200") + limit: Optional[int] = Field(default=100, description="Default100, Max200") start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") __properties: ClassVar[List[str]] = [ @@ -134,7 +136,7 @@ def __init__(self): def set_currency(self, value: str) -> GetSpotHfLedgerReqBuilder: """ - Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default. + Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default. """ self.obj['currency'] = value return self @@ -152,35 +154,35 @@ def set_biz_type( self, value: GetSpotHfLedgerReq.BizTypeEnum ) -> GetSpotHfLedgerReqBuilder: """ - Transaction type: TRANSFER-transfer funds,TRADE_EXCHANGE-Trade + Transaction type """ self.obj['bizType'] = value return self def set_last_id(self, value: int) -> GetSpotHfLedgerReqBuilder: """ - The id of the last set of data from the previous batch of data. By default, the latest information is given. + The ID of the last set of data from the previous data batch. By default, the latest information is given. """ self.obj['lastId'] = value return self def set_limit(self, value: int) -> GetSpotHfLedgerReqBuilder: """ - Default100,Max200 + Default100, Max200 """ self.obj['limit'] = value return self def set_start_at(self, value: int) -> GetSpotHfLedgerReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetSpotHfLedgerReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_ledger_items.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_ledger_items.py index 307af6fd..c74f27f0 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_ledger_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_ledger_items.py @@ -16,49 +16,51 @@ class GetSpotLedgerItems(BaseModel): Attributes: id (str): unique id - currency (str): The currency of an account - amount (str): The total amount of assets (fees included) involved in assets changes such as transaction, withdrawal and bonus distribution. + currency (str): Currency + amount (str): The total amount of assets (fees included) involved in assets changes such as transactions, withdrawals and bonus distributions. fee (str): Fees generated in transaction, withdrawal, etc. - balance (str): Remaining funds after the transaction. - account_type (str): The account type of the master user: MAIN, TRADE, MARGIN or CONTRACT. - biz_type (str): Business type leading to the changes in funds, such as exchange, withdrawal, deposit, KUCOIN_BONUS, REFERRAL_BONUS, Lendings etc. + balance (str): Remaining funds after the transaction. (Deprecated field, no actual use of the value field) + account_type (str): Master user account types: MAIN, TRADE, MARGIN or CONTRACT. + biz_type (str): Business type leading to changes in funds, such as exchange, withdrawal, deposit, KUCOIN_BONUS, REFERRAL_BONUS, Lendings, etc. direction (str): Side, out or in - created_at (int): Time of the event - context (str): Business related information such as order ID, serial No., etc. + created_at (int): Time of event + context (str): Business related information such as order ID, serial no., etc. """ id: Optional[str] = Field(default=None, description="unique id") - currency: Optional[str] = Field(default=None, - description="The currency of an account") + currency: Optional[str] = Field(default=None, description="Currency") amount: Optional[str] = Field( default=None, description= - "The total amount of assets (fees included) involved in assets changes such as transaction, withdrawal and bonus distribution." + "The total amount of assets (fees included) involved in assets changes such as transactions, withdrawals and bonus distributions." ) fee: Optional[str] = Field( default=None, description="Fees generated in transaction, withdrawal, etc.") balance: Optional[str] = Field( - default=None, description="Remaining funds after the transaction.") + default=None, + description= + "Remaining funds after the transaction. (Deprecated field, no actual use of the value field)" + ) account_type: Optional[str] = Field( default=None, description= - "The account type of the master user: MAIN, TRADE, MARGIN or CONTRACT.", + "Master user account types: MAIN, TRADE, MARGIN or CONTRACT.", alias="accountType") biz_type: Optional[str] = Field( default=None, description= - "Business type leading to the changes in funds, such as exchange, withdrawal, deposit, KUCOIN_BONUS, REFERRAL_BONUS, Lendings etc.", + "Business type leading to changes in funds, such as exchange, withdrawal, deposit, KUCOIN_BONUS, REFERRAL_BONUS, Lendings, etc.", alias="bizType") direction: Optional[str] = Field(default=None, description="Side, out or in") created_at: Optional[int] = Field(default=None, - description="Time of the event", + description="Time of event", alias="createdAt") context: Optional[str] = Field( default=None, description= - "Business related information such as order ID, serial No., etc.") + "Business related information such as order ID, serial no., etc.") __properties: ClassVar[List[str]] = [ "id", "currency", "amount", "fee", "balance", "accountType", "bizType", diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_ledger_req.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_ledger_req.py index 213bbf3a..a4805a18 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_ledger_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_ledger_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetSpotLedgerReq(BaseModel): @@ -17,11 +16,11 @@ class GetSpotLedgerReq(BaseModel): GetSpotLedgerReq Attributes: - currency (str): Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default. + currency (str): Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default. direction (DirectionEnum): direction: in, out - biz_type (str): Type: DEPOSIT -deposit, WITHDRAW -withdraw, TRANSFER -transfer, SUB_TRANSFER -subaccount transfer,TRADE_EXCHANGE -trade, MARGIN_EXCHANGE -margin trade, KUCOIN_BONUS -bonus, BROKER_TRANSFER -Broker transfer record - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) + biz_type (str): Type: DEPOSIT-deposit, WITHDRAW-withdraw, TRANSFER-transfer, SUB_TRANSFER-sub-account transfer, TRADE_EXCHANGE-trade, MARGIN_EXCHANGE-margin trade, KUCOIN_BONUS-bonus, BROKER_TRANSFER-Broker transfer record + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) current_page (int): Current request page. page_size (int): Number of results per request. Minimum is 10, maximum is 500. """ @@ -29,8 +28,8 @@ class GetSpotLedgerReq(BaseModel): class DirectionEnum(Enum): """ Attributes: - IN_: - OUT: + IN_: Funds in + OUT: Funds out """ IN_ = 'in' OUT = 'out' @@ -38,30 +37,29 @@ class DirectionEnum(Enum): currency: Optional[str] = Field( default=None, description= - "Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default." + "Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default." ) direction: Optional[DirectionEnum] = Field( default=None, description="direction: in, out") biz_type: Optional[str] = Field( default=None, description= - "Type: DEPOSIT -deposit, WITHDRAW -withdraw, TRANSFER -transfer, SUB_TRANSFER -subaccount transfer,TRADE_EXCHANGE -trade, MARGIN_EXCHANGE -margin trade, KUCOIN_BONUS -bonus, BROKER_TRANSFER -Broker transfer record", + "Type: DEPOSIT-deposit, WITHDRAW-withdraw, TRANSFER-transfer, SUB_TRANSFER-sub-account transfer, TRADE_EXCHANGE-trade, MARGIN_EXCHANGE-margin trade, KUCOIN_BONUS-bonus, BROKER_TRANSFER-Broker transfer record", alias="bizType") start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") current_page: Optional[int] = Field(default=1, description="Current request page.", alias="currentPage") - page_size: Optional[Annotated[ - int, Field(le=500, strict=True, ge=10)]] = Field( - default=50, - description= - "Number of results per request. Minimum is 10, maximum is 500.", - alias="pageSize") + page_size: Optional[int] = Field( + default=50, + description= + "Number of results per request. Minimum is 10, maximum is 500.", + alias="pageSize") __properties: ClassVar[List[str]] = [ "currency", "direction", "bizType", "startAt", "endAt", "currentPage", @@ -127,7 +125,7 @@ def __init__(self): def set_currency(self, value: str) -> GetSpotLedgerReqBuilder: """ - Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default. + Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default. """ self.obj['currency'] = value return self @@ -143,21 +141,21 @@ def set_direction( def set_biz_type(self, value: str) -> GetSpotLedgerReqBuilder: """ - Type: DEPOSIT -deposit, WITHDRAW -withdraw, TRANSFER -transfer, SUB_TRANSFER -subaccount transfer,TRADE_EXCHANGE -trade, MARGIN_EXCHANGE -margin trade, KUCOIN_BONUS -bonus, BROKER_TRANSFER -Broker transfer record + Type: DEPOSIT-deposit, WITHDRAW-withdraw, TRANSFER-transfer, SUB_TRANSFER-sub-account transfer, TRADE_EXCHANGE-trade, MARGIN_EXCHANGE-margin trade, KUCOIN_BONUS-bonus, BROKER_TRANSFER-Broker transfer record """ self.obj['bizType'] = value return self def set_start_at(self, value: int) -> GetSpotLedgerReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetSpotLedgerReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_ledger_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_ledger_resp.py index 6918c3a2..97bfcbd8 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_ledger_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/account/model_get_spot_ledger_resp.py @@ -21,7 +21,7 @@ class GetSpotLedgerResp(BaseModel, Response): current_page (int): current page page_size (int): page size total_num (int): total number - total_page (int): total page + total_page (int): total pages items (list[GetSpotLedgerItems]): """ @@ -37,7 +37,7 @@ class GetSpotLedgerResp(BaseModel, Response): description="total number", alias="totalNum") total_page: Optional[int] = Field(default=None, - description="total page", + description="total pages", alias="totalPage") items: Optional[List[GetSpotLedgerItems]] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/api_deposit.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/api_deposit.py index cc5aa1ca..9222fe02 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/api_deposit.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/api_deposit.py @@ -26,18 +26,18 @@ class DepositAPI(ABC): def add_deposit_address_v3(self, req: AddDepositAddressV3Req, **kwargs: Any) -> AddDepositAddressV3Resp: """ - summary: Add Deposit Address(V3) - description: Request via this endpoint to create a deposit address for a currency you intend to deposit. + summary: Add Deposit Address (V3) + description: Request via this endpoint the creation of a deposit address for a currency you intend to deposit. documentation: https://www.kucoin.com/docs-new/api-3470142 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -45,18 +45,18 @@ def add_deposit_address_v3(self, req: AddDepositAddressV3Req, def get_deposit_address_v3(self, req: GetDepositAddressV3Req, **kwargs: Any) -> GetDepositAddressV3Resp: """ - summary: Get Deposit Address(V3) - description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to Add Deposit Address first. + summary: Get Deposit Address (V3) + description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to add the deposit address first. documentation: https://www.kucoin.com/docs-new/api-3470140 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 5 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+------------+ """ pass @@ -65,17 +65,17 @@ def get_deposit_history(self, req: GetDepositHistoryReq, **kwargs: Any) -> GetDepositHistoryResp: """ summary: Get Deposit History - description: Request via this endpoint to get deposit list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. + description: Request a deposit list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. documentation: https://www.kucoin.com/docs-new/api-3470141 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 5 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+------------+ """ pass @@ -84,18 +84,18 @@ def get_deposit_history(self, req: GetDepositHistoryReq, def get_deposit_address_v2(self, req: GetDepositAddressV2Req, **kwargs: Any) -> GetDepositAddressV2Resp: """ - summary: Get Deposit Addresses(V2) - description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to Add Deposit Address first. + summary: Get Deposit Addresses (V2) + description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to add the deposit address first. documentation: https://www.kucoin.com/docs-new/api-3470300 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 5 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+------------+ """ pass @@ -105,17 +105,17 @@ def get_deposit_address_v1(self, req: GetDepositAddressV1Req, **kwargs: Any) -> GetDepositAddressV1Resp: """ summary: Get Deposit Addresses - V1 - description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to Add Deposit Address first. + description: Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to add the deposit address first. documentation: https://www.kucoin.com/docs-new/api-3470305 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 5 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+------------+ """ pass @@ -125,17 +125,17 @@ def get_deposit_history_old(self, req: GetDepositHistoryOldReq, **kwargs: Any) -> GetDepositHistoryOldResp: """ summary: Get Deposit History - Old - description: Request via this endpoint to get the V1 historical deposits list on KuCoin. The return value is the data after Pagination, sorted in descending order according to time. + description: Request the V1 historical deposits list on KuCoin via this endpoint. The return value is the data after Pagination, sorted in descending order according to time. documentation: https://www.kucoin.com/docs-new/api-3470306 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 5 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+------------+ """ pass @@ -145,17 +145,17 @@ def add_deposit_address_v1(self, req: AddDepositAddressV1Req, **kwargs: Any) -> AddDepositAddressV1Resp: """ summary: Add Deposit Address - V1 - description: Request via this endpoint to create a deposit address for a currency you intend to deposit. + description: Request via this endpoint the creation of a deposit address for a currency you intend to deposit. documentation: https://www.kucoin.com/docs-new/api-3470309 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/api_deposit.template b/sdk/python/kucoin_universal_sdk/generate/account/deposit/api_deposit.template index 8f7eb611..01699ab1 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/api_deposit.template +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/api_deposit.template @@ -4,7 +4,7 @@ def test_add_deposit_address_v3_req(self): """ add_deposit_address_v3 - Add Deposit Address(V3) + Add Deposit Address (V3) /api/v3/deposit-address/create """ @@ -23,7 +23,7 @@ def test_add_deposit_address_v3_req(self): def test_get_deposit_address_v3_req(self): """ get_deposit_address_v3 - Get Deposit Address(V3) + Get Deposit Address (V3) /api/v3/deposit-addresses """ @@ -61,12 +61,12 @@ def test_get_deposit_history_req(self): def test_get_deposit_address_v2_req(self): """ get_deposit_address_v2 - Get Deposit Addresses(V2) + Get Deposit Addresses (V2) /api/v2/deposit-addresses """ builder = GetDepositAddressV2ReqBuilder() - builder.set_currency(?) + builder.set_currency(?).set_chain(?) req = builder.build() try: resp = self.api.get_deposit_address_v2(req) @@ -123,7 +123,7 @@ def test_add_deposit_address_v1_req(self): """ builder = AddDepositAddressV1ReqBuilder() - builder.set_currency(?).set_chain(?) + builder.set_currency(?).set_chain(?).set_to(?) req = builder.build() try: resp = self.api.add_deposit_address_v1(req) diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/api_deposit_test.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/api_deposit_test.py index 5d7006e2..df87a721 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/api_deposit_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/api_deposit_test.py @@ -22,7 +22,7 @@ class DepositAPITest(unittest.TestCase): def test_add_deposit_address_v3_req_model(self): """ add_deposit_address_v3 - Add Deposit Address(V3) + Add Deposit Address (V3) /api/v3/deposit-address/create """ data = "{\"currency\": \"TON\", \"chain\": \"ton\", \"to\": \"trade\"}" @@ -31,7 +31,7 @@ def test_add_deposit_address_v3_req_model(self): def test_add_deposit_address_v3_resp_model(self): """ add_deposit_address_v3 - Add Deposit Address(V3) + Add Deposit Address (V3) /api/v3/deposit-address/create """ data = "{\"code\":\"200000\",\"data\":{\"address\":\"EQCA1BI4QRZ8qYmskSRDzJmkucGodYRTZCf_b9hckjla6dZl\",\"memo\":\"2090821203\",\"chainId\":\"ton\",\"to\":\"TRADE\",\"expirationDate\":0,\"currency\":\"TON\",\"chainName\":\"TON\"}}" @@ -41,16 +41,16 @@ def test_add_deposit_address_v3_resp_model(self): def test_get_deposit_address_v3_req_model(self): """ get_deposit_address_v3 - Get Deposit Address(V3) + Get Deposit Address (V3) /api/v3/deposit-addresses """ - data = "{\"currency\": \"BTC\", \"amount\": \"example_string_default_value\", \"chain\": \"example_string_default_value\"}" + data = "{\"currency\": \"BTC\", \"amount\": \"example_string_default_value\", \"chain\": \"eth\"}" req = GetDepositAddressV3Req.from_json(data) def test_get_deposit_address_v3_resp_model(self): """ get_deposit_address_v3 - Get Deposit Address(V3) + Get Deposit Address (V3) /api/v3/deposit-addresses """ data = "{\"code\":\"200000\",\"data\":[{\"address\":\"TSv3L1fS7yA3SxzKD8c1qdX4nLP6rqNxYz\",\"memo\":\"\",\"chainId\":\"trx\",\"to\":\"TRADE\",\"expirationDate\":0,\"currency\":\"USDT\",\"contractAddress\":\"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\",\"chainName\":\"TRC20\"},{\"address\":\"0x551e823a3b36865e8c5dc6e6ac6cc0b00d98533e\",\"memo\":\"\",\"chainId\":\"kcc\",\"to\":\"TRADE\",\"expirationDate\":0,\"currency\":\"USDT\",\"contractAddress\":\"0x0039f574ee5cc39bdd162e9a88e3eb1f111baf48\",\"chainName\":\"KCC\"},{\"address\":\"EQCA1BI4QRZ8qYmskSRDzJmkucGodYRTZCf_b9hckjla6dZl\",\"memo\":\"2085202643\",\"chainId\":\"ton\",\"to\":\"TRADE\",\"expirationDate\":0,\"currency\":\"USDT\",\"contractAddress\":\"EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs\",\"chainName\":\"TON\"},{\"address\":\"0x0a2586d5a901c8e7e68f6b0dc83bfd8bd8600ff5\",\"memo\":\"\",\"chainId\":\"eth\",\"to\":\"MAIN\",\"expirationDate\":0,\"currency\":\"USDT\",\"contractAddress\":\"0xdac17f958d2ee523a2206206994597c13d831ec7\",\"chainName\":\"ERC20\"}]}" @@ -79,16 +79,16 @@ def test_get_deposit_history_resp_model(self): def test_get_deposit_address_v2_req_model(self): """ get_deposit_address_v2 - Get Deposit Addresses(V2) + Get Deposit Addresses (V2) /api/v2/deposit-addresses """ - data = "{\"currency\": \"BTC\"}" + data = "{\"currency\": \"BTC\", \"chain\": \"eth\"}" req = GetDepositAddressV2Req.from_json(data) def test_get_deposit_address_v2_resp_model(self): """ get_deposit_address_v2 - Get Deposit Addresses(V2) + Get Deposit Addresses (V2) /api/v2/deposit-addresses """ data = "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"address\": \"0x02028456*****87ede7a73d7c\",\n \"memo\": \"\",\n \"chain\": \"ERC20\",\n \"chainId\": \"eth\",\n \"to\": \"MAIN\",\n \"currency\": \"ETH\",\n \"contractAddress\": \"\"\n }\n ]\n}" diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v1_req.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v1_req.py index 9f45fcf0..83b9a820 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v1_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v1_req.py @@ -6,6 +6,7 @@ import pprint import json +from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional @@ -16,17 +17,32 @@ class AddDepositAddressV1Req(BaseModel): Attributes: currency (str): currency - chain (str): The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + chain (str): The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. + to (ToEnum): Deposit account type: main (funding account), trade (spot trading account); the default is main """ + class ToEnum(Enum): + """ + Attributes: + MAIN: Funding account + TRADE: Spot account + """ + MAIN = 'main' + TRADE = 'trade' + currency: Optional[str] = Field(default=None, description="currency") chain: Optional[str] = Field( default='eth', description= - "The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency." + "The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies." + ) + to: Optional[ToEnum] = Field( + default=ToEnum.MAIN, + description= + "Deposit account type: main (funding account), trade (spot trading account); the default is main" ) - __properties: ClassVar[List[str]] = ["currency", "chain"] + __properties: ClassVar[List[str]] = ["currency", "chain", "to"] model_config = ConfigDict( populate_by_name=True, @@ -65,7 +81,10 @@ def from_dict( "currency": obj.get("currency"), "chain": - obj.get("chain") if obj.get("chain") is not None else 'eth' + obj.get("chain") if obj.get("chain") is not None else 'eth', + "to": + obj.get("to") if obj.get("to") is not None else + AddDepositAddressV1Req.ToEnum.MAIN }) return _obj @@ -84,10 +103,19 @@ def set_currency(self, value: str) -> AddDepositAddressV1ReqBuilder: def set_chain(self, value: str) -> AddDepositAddressV1ReqBuilder: """ - The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. """ self.obj['chain'] = value return self + def set_to( + self, value: AddDepositAddressV1Req.ToEnum + ) -> AddDepositAddressV1ReqBuilder: + """ + Deposit account type: main (funding account), trade (spot trading account); the default is main + """ + self.obj['to'] = value + return self + def build(self) -> AddDepositAddressV1Req: return AddDepositAddressV1Req(**self.obj) diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v1_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v1_resp.py index 66b24788..1c833dd4 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v1_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v1_resp.py @@ -19,7 +19,7 @@ class AddDepositAddressV1Resp(BaseModel, Response): Attributes: address (str): Deposit address - memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. chain (str): The chainName of currency chain_id (str): The chainId of currency to (ToEnum): Deposit account type: main (funding account), trade (spot trading account) @@ -41,7 +41,7 @@ class ToEnum(Enum): memo: Optional[str] = Field( default=None, description= - "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious." + "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available." ) chain: Optional[str] = Field(default=None, description="The chainName of currency") diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v3_req.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v3_req.py index ed5431a1..a617fdf5 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v3_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v3_req.py @@ -17,16 +17,16 @@ class AddDepositAddressV3Req(BaseModel): Attributes: currency (str): currency - chain (str): The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. - to (ToEnum): Deposit account type: main (funding account), trade (spot trading account), the default is main + chain (str): The currency chainId, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. + to (ToEnum): Deposit account type: MAIN (funding account), TRADE (spot trading account); the default is MAIN amount (str): Deposit amount. This parameter is only used when applying for invoices on the Lightning Network. This parameter is invalid if it is not passed through the Lightning Network. """ class ToEnum(Enum): """ Attributes: - MAIN: - TRADE: + MAIN: Funding account + TRADE: Spot account """ MAIN = 'main' TRADE = 'trade' @@ -35,12 +35,12 @@ class ToEnum(Enum): chain: Optional[str] = Field( default='eth', description= - "The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency." + "The currency chainId, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. " ) to: Optional[ToEnum] = Field( default=ToEnum.MAIN, description= - "Deposit account type: main (funding account), trade (spot trading account), the default is main" + "Deposit account type: MAIN (funding account), TRADE (spot trading account); the default is MAIN" ) amount: Optional[str] = Field( default=None, @@ -111,7 +111,7 @@ def set_currency(self, value: str) -> AddDepositAddressV3ReqBuilder: def set_chain(self, value: str) -> AddDepositAddressV3ReqBuilder: """ - The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + The currency chainId, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. """ self.obj['chain'] = value return self @@ -120,7 +120,7 @@ def set_to( self, value: AddDepositAddressV3Req.ToEnum ) -> AddDepositAddressV3ReqBuilder: """ - Deposit account type: main (funding account), trade (spot trading account), the default is main + Deposit account type: MAIN (funding account), TRADE (spot trading account); the default is MAIN """ self.obj['to'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v3_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v3_resp.py index 549e2449..43629761 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v3_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_add_deposit_address_v3_resp.py @@ -18,10 +18,10 @@ class AddDepositAddressV3Resp(BaseModel, Response): Attributes: address (str): Deposit address - memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. chain_id (str): The chainId of currency - to (str): Deposit account type: main (funding account), trade (spot trading account) - expiration_date (int): Expiration time, Lightning network expiration time, non-Lightning network this field is invalid + to (str): Deposit account type: MAIN (funding account), TRADE (spot trading account) + expiration_date (int): Expiration time; Lightning network expiration time; this field is not applicable to non-Lightning networks currency (str): currency chain_name (str): The chainName of currency """ @@ -32,7 +32,7 @@ class AddDepositAddressV3Resp(BaseModel, Response): memo: Optional[str] = Field( default=None, description= - "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious." + "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available." ) chain_id: Optional[str] = Field(default=None, description="The chainId of currency", @@ -40,12 +40,12 @@ class AddDepositAddressV3Resp(BaseModel, Response): to: Optional[str] = Field( default=None, description= - "Deposit account type: main (funding account), trade (spot trading account)" + "Deposit account type: MAIN (funding account), TRADE (spot trading account)" ) expiration_date: Optional[int] = Field( default=None, description= - "Expiration time, Lightning network expiration time, non-Lightning network this field is invalid", + "Expiration time; Lightning network expiration time; this field is not applicable to non-Lightning networks", alias="expirationDate") currency: Optional[str] = Field(default=None, description="currency") chain_name: Optional[str] = Field(default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v1_req.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v1_req.py index 58ea226e..d297dba8 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v1_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v1_req.py @@ -16,14 +16,14 @@ class GetDepositAddressV1Req(BaseModel): Attributes: currency (str): currency - chain (str): The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + chain (str): The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. """ currency: Optional[str] = Field(default=None, description="currency") chain: Optional[str] = Field( default='eth', description= - "The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency." + "The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies." ) __properties: ClassVar[List[str]] = ["currency", "chain"] @@ -84,7 +84,7 @@ def set_currency(self, value: str) -> GetDepositAddressV1ReqBuilder: def set_chain(self, value: str) -> GetDepositAddressV1ReqBuilder: """ - The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. """ self.obj['chain'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v1_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v1_resp.py index 60770ba0..13b20203 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v1_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v1_resp.py @@ -19,7 +19,7 @@ class GetDepositAddressV1Resp(BaseModel, Response): Attributes: address (str): Deposit address - memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. chain (str): The chainName of currency chain_id (str): The chainId of currency to (ToEnum): Deposit account type: main (funding account), trade (spot trading account) @@ -42,7 +42,7 @@ class ToEnum(Enum): memo: Optional[str] = Field( default=None, description= - "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious." + "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available." ) chain: Optional[str] = Field(default=None, description="The chainName of currency") diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v2_data.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v2_data.py index 7610edcb..fb2cd41e 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v2_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v2_data.py @@ -17,7 +17,7 @@ class GetDepositAddressV2Data(BaseModel): Attributes: address (str): Deposit address - memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. chain (str): The chainName of currency chain_id (str): The chainId of currency to (ToEnum): Deposit account type: main (funding account), trade (spot trading account) @@ -38,7 +38,7 @@ class ToEnum(Enum): memo: Optional[str] = Field( default=None, description= - "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious." + "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available." ) chain: Optional[str] = Field(default=None, description="The chainName of currency") diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v2_req.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v2_req.py index c089a3be..404c1828 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v2_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v2_req.py @@ -16,11 +16,14 @@ class GetDepositAddressV2Req(BaseModel): Attributes: currency (str): currency + chain (str): Chain ID of currency """ currency: Optional[str] = Field(default=None, description="currency") + chain: Optional[str] = Field(default=None, + description="Chain ID of currency") - __properties: ClassVar[List[str]] = ["currency"] + __properties: ClassVar[List[str]] = ["currency", "chain"] model_config = ConfigDict( populate_by_name=True, @@ -55,7 +58,10 @@ def from_dict( if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"currency": obj.get("currency")}) + _obj = cls.model_validate({ + "currency": obj.get("currency"), + "chain": obj.get("chain") + }) return _obj @@ -71,5 +77,12 @@ def set_currency(self, value: str) -> GetDepositAddressV2ReqBuilder: self.obj['currency'] = value return self + def set_chain(self, value: str) -> GetDepositAddressV2ReqBuilder: + """ + Chain ID of currency + """ + self.obj['chain'] = value + return self + def build(self) -> GetDepositAddressV2Req: return GetDepositAddressV2Req(**self.obj) diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v3_data.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v3_data.py index b303fc4e..a1d79dc4 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v3_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_address_v3_data.py @@ -6,6 +6,7 @@ import pprint import json +from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional @@ -16,33 +17,42 @@ class GetDepositAddressV3Data(BaseModel): Attributes: address (str): Deposit address - memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. chain_id (str): The chainId of currency - to (str): Deposit account type: main (funding account), trade (spot trading account) - expiration_date (int): Expiration time, Lightning network expiration time, non-Lightning network this field is invalid + to (ToEnum): Deposit account type: MAIN (funding account), TRADE (spot trading account) + expiration_date (int): Expiration time; Lightning network expiration time; this field is not applicable to non-Lightning networks currency (str): currency contract_address (str): The token contract address. chain_name (str): The chainName of currency """ + class ToEnum(Enum): + """ + Attributes: + MAIN: Funding account + TRADE: Spot account + """ + MAIN = 'MAIN' + TRADE = 'TRADE' + address: Optional[str] = Field(default=None, description="Deposit address") memo: Optional[str] = Field( default=None, description= - "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious." + "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available." ) chain_id: Optional[str] = Field(default=None, description="The chainId of currency", alias="chainId") - to: Optional[str] = Field( + to: Optional[ToEnum] = Field( default=None, description= - "Deposit account type: main (funding account), trade (spot trading account)" + "Deposit account type: MAIN (funding account), TRADE (spot trading account)" ) expiration_date: Optional[int] = Field( default=None, description= - "Expiration time, Lightning network expiration time, non-Lightning network this field is invalid", + "Expiration time; Lightning network expiration time; this field is not applicable to non-Lightning networks", alias="expirationDate") currency: Optional[str] = Field(default=None, description="currency") contract_address: Optional[str] = Field( diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_items.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_items.py index 4115bbe6..4c6bc188 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_items.py @@ -25,7 +25,7 @@ class GetDepositHistoryItems(BaseModel): amount (str): Deposit amount fee (str): Fees charged for deposit wallet_tx_id (str): Wallet Txid - created_at (int): Creation time of the database record + created_at (int): Database record creation time updated_at (int): Update time of the database record remark (str): remark arrears (bool): Whether there is any debt.A quick rollback will cause the deposit to fail. If the deposit fails, you will need to repay the balance. @@ -61,7 +61,7 @@ class StatusEnum(Enum): alias="walletTxId") created_at: Optional[int] = Field( default=None, - description="Creation time of the database record", + description="Database record creation time", alias="createdAt") updated_at: Optional[int] = Field( default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_old_items.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_old_items.py index 90ec91a3..c82d2011 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_old_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_old_items.py @@ -17,7 +17,7 @@ class GetDepositHistoryOldItems(BaseModel): Attributes: currency (str): Currency - create_at (int): Creation time of the database record + create_at (int): Database record creation time amount (str): Deposit amount wallet_tx_id (str): Wallet Txid is_inner (bool): Internal deposit or not @@ -38,7 +38,7 @@ class StatusEnum(Enum): currency: Optional[str] = Field(default=None, description="Currency") create_at: Optional[int] = Field( default=None, - description="Creation time of the database record", + description="Database record creation time", alias="createAt") amount: Optional[str] = Field(default=None, description="Deposit amount") wallet_tx_id: Optional[str] = Field(default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_old_req.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_old_req.py index 73f5887e..07469210 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_old_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_old_req.py @@ -18,8 +18,8 @@ class GetDepositHistoryOldReq(BaseModel): Attributes: currency (str): currency status (StatusEnum): Status. Available value: PROCESSING, SUCCESS, and FAILURE - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) """ class StatusEnum(Enum): @@ -39,10 +39,10 @@ class StatusEnum(Enum): description="Status. Available value: PROCESSING, SUCCESS, and FAILURE" ) start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") __properties: ClassVar[List[str]] = [ @@ -115,14 +115,14 @@ def set_status( def set_start_at(self, value: int) -> GetDepositHistoryOldReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetDepositHistoryOldReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_old_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_old_resp.py index e5b43195..4e228db0 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_old_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_old_resp.py @@ -21,7 +21,7 @@ class GetDepositHistoryOldResp(BaseModel, Response): current_page (int): current page page_size (int): page size total_num (int): total number - total_page (int): total page + total_page (int): total pages items (list[GetDepositHistoryOldItems]): """ @@ -37,7 +37,7 @@ class GetDepositHistoryOldResp(BaseModel, Response): description="total number", alias="totalNum") total_page: Optional[int] = Field(default=None, - description="total page", + description="total pages", alias="totalPage") items: Optional[List[GetDepositHistoryOldItems]] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_req.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_req.py index 56f84f9d..7534384f 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetDepositHistoryReq(BaseModel): @@ -19,8 +18,8 @@ class GetDepositHistoryReq(BaseModel): Attributes: currency (str): currency status (StatusEnum): Status. Available value: PROCESSING, SUCCESS, and FAILURE - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) current_page (int): Current request page. page_size (int): Number of results per request. Minimum is 10, maximum is 500. """ @@ -28,9 +27,9 @@ class GetDepositHistoryReq(BaseModel): class StatusEnum(Enum): """ Attributes: - PROCESSING: - SUCCESS: - FAILURE: + PROCESSING: Deposit processing + SUCCESS: Deposit success + FAILURE: Deposit fail """ PROCESSING = 'PROCESSING' SUCCESS = 'SUCCESS' @@ -42,20 +41,19 @@ class StatusEnum(Enum): description="Status. Available value: PROCESSING, SUCCESS, and FAILURE" ) start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") current_page: Optional[int] = Field(default=None, description="Current request page.", alias="currentPage") - page_size: Optional[Annotated[ - int, Field(le=500, strict=True, ge=10)]] = Field( - default=50, - description= - "Number of results per request. Minimum is 10, maximum is 500.", - alias="pageSize") + page_size: Optional[int] = Field( + default=50, + description= + "Number of results per request. Minimum is 10, maximum is 500.", + alias="pageSize") __properties: ClassVar[List[str]] = [ "currency", "status", "startAt", "endAt", "currentPage", "pageSize" @@ -134,14 +132,14 @@ def set_status( def set_start_at(self, value: int) -> GetDepositHistoryReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetDepositHistoryReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_resp.py index 445361e8..0c94fb22 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/deposit/model_get_deposit_history_resp.py @@ -21,7 +21,7 @@ class GetDepositHistoryResp(BaseModel, Response): current_page (int): current page page_size (int): page size total_num (int): total number - total_page (int): total page + total_page (int): total pages items (list[GetDepositHistoryItems]): """ @@ -37,7 +37,7 @@ class GetDepositHistoryResp(BaseModel, Response): description="total number", alias="totalNum") total_page: Optional[int] = Field(default=None, - description="total page", + description="total pages", alias="totalPage") items: Optional[List[GetDepositHistoryItems]] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/account/fee/api_fee.py b/sdk/python/kucoin_universal_sdk/generate/account/fee/api_fee.py index dd7d7716..c7b8209a 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/fee/api_fee.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/fee/api_fee.py @@ -18,17 +18,17 @@ def get_basic_fee(self, req: GetBasicFeeReq, **kwargs: Any) -> GetBasicFeeResp: """ summary: Get Basic Fee - Spot/Margin - description: This interface is for the spot/margin basic fee rate of users + description: This interface is for the user’s spot/margin basic fee rate. documentation: https://www.kucoin.com/docs-new/api-3470149 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -37,17 +37,17 @@ def get_spot_actual_fee(self, req: GetSpotActualFeeReq, **kwargs: Any) -> GetSpotActualFeeResp: """ summary: Get Actual Fee - Spot/Margin - description: This interface is for the actual fee rate of the trading pair. You can inquire about fee rates of 10 trading pairs each time at most. The fee rate of your sub-account is the same as that of the master account. + description: This interface is for the trading pair’s actual fee rate. You can inquire about fee rates of 10 trading pairs each time at most. The fee rate of your sub-account is the same as that of the master account. documentation: https://www.kucoin.com/docs-new/api-3470150 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -56,17 +56,17 @@ def get_futures_actual_fee(self, req: GetFuturesActualFeeReq, **kwargs: Any) -> GetFuturesActualFeeResp: """ summary: Get Actual Fee - Futures - description: This interface is for the actual futures fee rate of the trading pair. The fee rate of your sub-account is the same as that of the master account. + description: This interface is for the trading pair’s actual futures fee rate. The fee rate of your sub-account is the same as that of the master account. documentation: https://www.kucoin.com/docs-new/api-3470151 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_basic_fee_req.py b/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_basic_fee_req.py index f5e11091..c7c32421 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_basic_fee_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_basic_fee_req.py @@ -16,13 +16,13 @@ class GetBasicFeeReq(BaseModel): GetBasicFeeReq Attributes: - currency_type (CurrencyTypeEnum): Currency type: 0-crypto currency, 1-fiat currency. default is 0-crypto currency + currency_type (CurrencyTypeEnum): Currency type: 0-crypto currency, 1-fiat currency. Default is 0-crypto currency """ class CurrencyTypeEnum(Enum): """ Attributes: - T_0: crypto currency + T_0: cryptocurrency T_1: fiat currency """ T_0 = 0 @@ -31,7 +31,7 @@ class CurrencyTypeEnum(Enum): currency_type: Optional[CurrencyTypeEnum] = Field( default=CurrencyTypeEnum.T_0, description= - "Currency type: 0-crypto currency, 1-fiat currency. default is 0-crypto currency ", + "Currency type: 0-crypto currency, 1-fiat currency. Default is 0-crypto currency", alias="currencyType") __properties: ClassVar[List[str]] = ["currencyType"] @@ -85,7 +85,7 @@ def set_currency_type( self, value: GetBasicFeeReq.CurrencyTypeEnum) -> GetBasicFeeReqBuilder: """ - Currency type: 0-crypto currency, 1-fiat currency. default is 0-crypto currency + Currency type: 0-crypto currency, 1-fiat currency. Default is 0-crypto currency """ self.obj['currencyType'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_futures_actual_fee_req.py b/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_futures_actual_fee_req.py index 3c03b2df..e35917ff 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_futures_actual_fee_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_futures_actual_fee_req.py @@ -15,10 +15,14 @@ class GetFuturesActualFeeReq(BaseModel): GetFuturesActualFeeReq Attributes: - symbol (str): Trading pair + symbol (str): The unique identity of the trading pair; will not change even if the trading pair is renamed """ - symbol: Optional[str] = Field(default=None, description="Trading pair") + symbol: Optional[str] = Field( + default=None, + description= + "The unique identity of the trading pair; will not change even if the trading pair is renamed" + ) __properties: ClassVar[List[str]] = ["symbol"] @@ -66,7 +70,7 @@ def __init__(self): def set_symbol(self, value: str) -> GetFuturesActualFeeReqBuilder: """ - Trading pair + The unique identity of the trading pair; will not change even if the trading pair is renamed """ self.obj['symbol'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_futures_actual_fee_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_futures_actual_fee_resp.py index e53139df..6343545f 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_futures_actual_fee_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_futures_actual_fee_resp.py @@ -17,7 +17,7 @@ class GetFuturesActualFeeResp(BaseModel, Response): GetFuturesActualFeeResp Attributes: - symbol (str): The unique identity of the trading pair and will not change even if the trading pair is renamed + symbol (str): The unique identity of the trading pair; will not change even if the trading pair is renamed taker_fee_rate (str): Actual taker fee rate of the trading pair maker_fee_rate (str): Actual maker fee rate of the trading pair """ @@ -27,7 +27,7 @@ class GetFuturesActualFeeResp(BaseModel, Response): symbol: Optional[str] = Field( default=None, description= - "The unique identity of the trading pair and will not change even if the trading pair is renamed" + "The unique identity of the trading pair; will not change even if the trading pair is renamed" ) taker_fee_rate: Optional[str] = Field( default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_spot_actual_fee_data.py b/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_spot_actual_fee_data.py index 260f4c25..92d2c255 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_spot_actual_fee_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_spot_actual_fee_data.py @@ -15,15 +15,17 @@ class GetSpotActualFeeData(BaseModel): GetSpotActualFeeData Attributes: - symbol (str): The unique identity of the trading pair and will not change even if the trading pair is renamed + symbol (str): The unique identity of the trading pair; will not change even if the trading pair is renamed taker_fee_rate (str): Actual taker fee rate of the symbol maker_fee_rate (str): Actual maker fee rate of the symbol + sell_tax_rate (str): Buy tax rate; this field is visible to users in certain countries + buy_tax_rate (str): Sell tax rate; this field is visible to users in certain countries """ symbol: Optional[str] = Field( default=None, description= - "The unique identity of the trading pair and will not change even if the trading pair is renamed" + "The unique identity of the trading pair; will not change even if the trading pair is renamed" ) taker_fee_rate: Optional[str] = Field( default=None, @@ -33,9 +35,19 @@ class GetSpotActualFeeData(BaseModel): default=None, description="Actual maker fee rate of the symbol", alias="makerFeeRate") + sell_tax_rate: Optional[str] = Field( + default=None, + description= + "Buy tax rate; this field is visible to users in certain countries", + alias="sellTaxRate") + buy_tax_rate: Optional[str] = Field( + default=None, + description= + "Sell tax rate; this field is visible to users in certain countries", + alias="buyTaxRate") __properties: ClassVar[List[str]] = [ - "symbol", "takerFeeRate", "makerFeeRate" + "symbol", "takerFeeRate", "makerFeeRate", "sellTaxRate", "buyTaxRate" ] model_config = ConfigDict( @@ -74,6 +86,8 @@ def from_dict( _obj = cls.model_validate({ "symbol": obj.get("symbol"), "takerFeeRate": obj.get("takerFeeRate"), - "makerFeeRate": obj.get("makerFeeRate") + "makerFeeRate": obj.get("makerFeeRate"), + "sellTaxRate": obj.get("sellTaxRate"), + "buyTaxRate": obj.get("buyTaxRate") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_spot_actual_fee_req.py b/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_spot_actual_fee_req.py index 602c23aa..e656fda7 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_spot_actual_fee_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/fee/model_get_spot_actual_fee_req.py @@ -15,13 +15,13 @@ class GetSpotActualFeeReq(BaseModel): GetSpotActualFeeReq Attributes: - symbols (str): Trading pair (optional, you can inquire fee rates of 10 trading pairs each time at most) + symbols (str): Trading pair (optional; you can inquire fee rates of 10 trading pairs each time at most) """ symbols: Optional[str] = Field( default=None, description= - "Trading pair (optional, you can inquire fee rates of 10 trading pairs each time at most)" + "Trading pair (optional; you can inquire fee rates of 10 trading pairs each time at most)" ) __properties: ClassVar[List[str]] = ["symbols"] @@ -70,7 +70,7 @@ def __init__(self): def set_symbols(self, value: str) -> GetSpotActualFeeReqBuilder: """ - Trading pair (optional, you can inquire fee rates of 10 trading pairs each time at most) + Trading pair (optional; you can inquire fee rates of 10 trading pairs each time at most) """ self.obj['symbols'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/api_sub_account.py b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/api_sub_account.py index dab6df9d..3ff2c700 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/api_sub_account.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/api_sub_account.py @@ -36,18 +36,18 @@ class SubAccountAPI(ABC): def add_sub_account(self, req: AddSubAccountReq, **kwargs: Any) -> AddSubAccountResp: """ - summary: Add SubAccount + summary: Add sub-account description: This endpoint can be used to create sub-accounts. documentation: https://www.kucoin.com/docs-new/api-3470135 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 15 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 15 | + +-----------------------+------------+ """ pass @@ -56,18 +56,18 @@ def add_sub_account_margin_permission( self, req: AddSubAccountMarginPermissionReq, **kwargs: Any) -> AddSubAccountMarginPermissionResp: """ - summary: Add SubAccount Margin Permission - description: This endpoint can be used to add sub-accounts Margin permission. Before using this endpoints, you need to ensure that the master account apikey has Margin permissions and the Margin function has been activated. + summary: Add sub-account Margin Permission + description: This endpoint can be used to add sub-account Margin permissions. Before using this endpoint, you need to ensure that the master account apikey has Margin permissions and the Margin function has been activated. documentation: https://www.kucoin.com/docs-new/api-3470331 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 15 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 15 | + +-----------------------+------------+ """ pass @@ -76,18 +76,18 @@ def add_sub_account_futures_permission( self, req: AddSubAccountFuturesPermissionReq, **kwargs: Any) -> AddSubAccountFuturesPermissionResp: """ - summary: Add SubAccount Futures Permission - description: This endpoint can be used to add sub-accounts Futures permission. Before using this endpoints, you need to ensure that the master account apikey has Futures permissions and the Futures function has been activated. + summary: Add sub-account Futures Permission + description: This endpoint can be used to add sub-account Futures permissions. Before using this endpoint, you need to ensure that the master account apikey has Futures permissions and the Futures function has been activated. documentation: https://www.kucoin.com/docs-new/api-3470332 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 15 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 15 | + +-----------------------+------------+ """ pass @@ -96,18 +96,18 @@ def get_spot_sub_accounts_summary_v2( self, req: GetSpotSubAccountsSummaryV2Req, **kwargs: Any) -> GetSpotSubAccountsSummaryV2Resp: """ - summary: Get SubAccount List - Summary Info + summary: Get sub-account List - Summary Info description: This endpoint can be used to get a paginated list of sub-accounts. Pagination is required. documentation: https://www.kucoin.com/docs-new/api-3470131 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -116,18 +116,18 @@ def get_spot_sub_account_detail( self, req: GetSpotSubAccountDetailReq, **kwargs: Any) -> GetSpotSubAccountDetailResp: """ - summary: Get SubAccount Detail - Balance + summary: Get sub-account Detail - Balance description: This endpoint returns the account info of a sub-user specified by the subUserId. documentation: https://www.kucoin.com/docs-new/api-3470132 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 15 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 15 | + +-----------------------+------------+ """ pass @@ -136,18 +136,18 @@ def get_spot_sub_account_list_v2( self, req: GetSpotSubAccountListV2Req, **kwargs: Any) -> GetSpotSubAccountListV2Resp: """ - summary: Get SubAccount List - Spot Balance(V2) + summary: Get sub-account List - Spot Balance (V2) description: This endpoint can be used to get paginated Spot sub-account information. Pagination is required. documentation: https://www.kucoin.com/docs-new/api-3470133 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -156,18 +156,18 @@ def get_futures_sub_account_list_v2( self, req: GetFuturesSubAccountListV2Req, **kwargs: Any) -> GetFuturesSubAccountListV2Resp: """ - summary: Get SubAccount List - Futures Balance(V2) + summary: Get sub-account List - Futures Balance (V2) description: This endpoint can be used to get Futures sub-account information. documentation: https://www.kucoin.com/docs-new/api-3470134 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 6 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 6 | + +-----------------------+---------+ """ pass @@ -175,18 +175,18 @@ def get_futures_sub_account_list_v2( def add_sub_account_api(self, req: AddSubAccountApiReq, **kwargs: Any) -> AddSubAccountApiResp: """ - summary: Add SubAccount API + summary: Add sub-account API description: This endpoint can be used to create APIs for sub-accounts. documentation: https://www.kucoin.com/docs-new/api-3470138 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -194,18 +194,18 @@ def add_sub_account_api(self, req: AddSubAccountApiReq, def modify_sub_account_api(self, req: ModifySubAccountApiReq, **kwargs: Any) -> ModifySubAccountApiResp: """ - summary: Modify SubAccount API + summary: Modify sub-account API description: This endpoint can be used to modify sub-account APIs. documentation: https://www.kucoin.com/docs-new/api-3470139 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 30 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 30 | + +-----------------------+------------+ """ pass @@ -213,18 +213,18 @@ def modify_sub_account_api(self, req: ModifySubAccountApiReq, def get_sub_account_api_list(self, req: GetSubAccountApiListReq, **kwargs: Any) -> GetSubAccountApiListResp: """ - summary: Get SubAccount API List - description: This endpoint can be used to obtain a list of APIs pertaining to a sub-account.(Not contain ND Broker Sub Account) + summary: Get sub-account API List + description: This endpoint can be used to obtain a list of APIs pertaining to a sub-account (not including ND broker sub-accounts). documentation: https://www.kucoin.com/docs-new/api-3470136 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -232,18 +232,18 @@ def get_sub_account_api_list(self, req: GetSubAccountApiListReq, def delete_sub_account_api(self, req: DeleteSubAccountApiReq, **kwargs: Any) -> DeleteSubAccountApiResp: """ - summary: Delete SubAccount API + summary: Delete sub-account API description: This endpoint can be used to delete sub-account APIs. documentation: https://www.kucoin.com/docs-new/api-3470137 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 30 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 30 | + +-----------------------+------------+ """ pass @@ -252,18 +252,18 @@ def delete_sub_account_api(self, req: DeleteSubAccountApiReq, def get_spot_sub_accounts_summary_v1( self, **kwargs: Any) -> GetSpotSubAccountsSummaryV1Resp: """ - summary: Get SubAccount List - Summary Info(V1) - description: You can get the user info of all sub-account via this interface It is recommended to use the GET /api/v2/sub/user interface for paging query + summary: Get sub-account List - Summary Info (V1) + description: You can get the user info of all sub-account via this interface; it is recommended to use the GET /api/v2/sub/user interface for paging query documentation: https://www.kucoin.com/docs-new/api-3470298 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -272,18 +272,18 @@ def get_spot_sub_accounts_summary_v1( def get_spot_sub_account_list_v1( self, **kwargs: Any) -> GetSpotSubAccountListV1Resp: """ - summary: Get SubAccount List - Spot Balance(V1) + summary: Get sub-account List - Spot Balance (V1) description: This endpoint returns the account info of all sub-users. documentation: https://www.kucoin.com/docs-new/api-3470299 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/api_sub_account.template b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/api_sub_account.template index ab5bd448..ac154b20 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/api_sub_account.template +++ b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/api_sub_account.template @@ -4,7 +4,7 @@ def test_add_sub_account_req(self): """ add_sub_account - Add SubAccount + Add sub-account /api/v2/sub/user/created """ @@ -23,7 +23,7 @@ def test_add_sub_account_req(self): def test_add_sub_account_margin_permission_req(self): """ add_sub_account_margin_permission - Add SubAccount Margin Permission + Add sub-account Margin Permission /api/v3/sub/user/margin/enable """ @@ -42,7 +42,7 @@ def test_add_sub_account_margin_permission_req(self): def test_add_sub_account_futures_permission_req(self): """ add_sub_account_futures_permission - Add SubAccount Futures Permission + Add sub-account Futures Permission /api/v3/sub/user/futures/enable """ @@ -61,7 +61,7 @@ def test_add_sub_account_futures_permission_req(self): def test_get_spot_sub_accounts_summary_v2_req(self): """ get_spot_sub_accounts_summary_v2 - Get SubAccount List - Summary Info + Get sub-account List - Summary Info /api/v2/sub/user """ @@ -80,12 +80,12 @@ def test_get_spot_sub_accounts_summary_v2_req(self): def test_get_spot_sub_account_detail_req(self): """ get_spot_sub_account_detail - Get SubAccount Detail - Balance + Get sub-account Detail - Balance /api/v1/sub-accounts/{subUserId} """ builder = GetSpotSubAccountDetailReqBuilder() - builder.set_sub_user_id(?).set_include_base_amount(?) + builder.set_sub_user_id(?).set_include_base_amount(?).set_base_currency(?).set_base_amount(?) req = builder.build() try: resp = self.api.get_spot_sub_account_detail(req) @@ -99,7 +99,7 @@ def test_get_spot_sub_account_detail_req(self): def test_get_spot_sub_account_list_v2_req(self): """ get_spot_sub_account_list_v2 - Get SubAccount List - Spot Balance(V2) + Get sub-account List - Spot Balance (V2) /api/v2/sub-accounts """ @@ -118,7 +118,7 @@ def test_get_spot_sub_account_list_v2_req(self): def test_get_futures_sub_account_list_v2_req(self): """ get_futures_sub_account_list_v2 - Get SubAccount List - Futures Balance(V2) + Get sub-account List - Futures Balance (V2) /api/v1/account-overview-all """ @@ -137,7 +137,7 @@ def test_get_futures_sub_account_list_v2_req(self): def test_add_sub_account_api_req(self): """ add_sub_account_api - Add SubAccount API + Add sub-account API /api/v1/sub/api-key """ @@ -156,7 +156,7 @@ def test_add_sub_account_api_req(self): def test_modify_sub_account_api_req(self): """ modify_sub_account_api - Modify SubAccount API + Modify sub-account API /api/v1/sub/api-key/update """ @@ -175,7 +175,7 @@ def test_modify_sub_account_api_req(self): def test_get_sub_account_api_list_req(self): """ get_sub_account_api_list - Get SubAccount API List + Get sub-account API List /api/v1/sub/api-key """ @@ -194,7 +194,7 @@ def test_get_sub_account_api_list_req(self): def test_delete_sub_account_api_req(self): """ delete_sub_account_api - Delete SubAccount API + Delete sub-account API /api/v1/sub/api-key """ @@ -213,7 +213,7 @@ def test_delete_sub_account_api_req(self): def test_get_spot_sub_accounts_summary_v1_req(self): """ get_spot_sub_accounts_summary_v1 - Get SubAccount List - Summary Info(V1) + Get sub-account List - Summary Info (V1) /api/v1/sub/user """ @@ -229,7 +229,7 @@ def test_get_spot_sub_accounts_summary_v1_req(self): def test_get_spot_sub_account_list_v1_req(self): """ get_spot_sub_account_list_v1 - Get SubAccount List - Spot Balance(V1) + Get sub-account List - Spot Balance (V1) /api/v1/sub-accounts """ diff --git a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/api_sub_account_test.py b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/api_sub_account_test.py index 3c3c7fb5..858f8da1 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/api_sub_account_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/api_sub_account_test.py @@ -32,7 +32,7 @@ class SubAccountAPITest(unittest.TestCase): def test_add_sub_account_req_model(self): """ add_sub_account - Add SubAccount + Add sub-account /api/v2/sub/user/created """ data = "{\"password\": \"1234567\", \"remarks\": \"TheRemark\", \"subName\": \"Name1234567\", \"access\": \"Spot\"}" @@ -41,7 +41,7 @@ def test_add_sub_account_req_model(self): def test_add_sub_account_resp_model(self): """ add_sub_account - Add SubAccount + Add sub-account /api/v2/sub/user/created """ data = "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 10,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"userId\": \"63743f07e0c5230001761d08\",\n \"uid\": 169579801,\n \"subName\": \"testapi6\",\n \"status\": 2,\n \"type\": 0,\n \"access\": \"All\",\n \"createdAt\": 1668562696000,\n \"remarks\": \"remarks\",\n \"tradeTypes\": [\n \"Spot\",\n \"Futures\",\n \"Margin\"\n ],\n \"openedTradeTypes\": [\n \"Spot\"\n ],\n \"hostedStatus\": null\n }\n ]\n }\n}" @@ -51,7 +51,7 @@ def test_add_sub_account_resp_model(self): def test_add_sub_account_margin_permission_req_model(self): """ add_sub_account_margin_permission - Add SubAccount Margin Permission + Add sub-account Margin Permission /api/v3/sub/user/margin/enable """ data = "{\"uid\": \"169579801\"}" @@ -60,7 +60,7 @@ def test_add_sub_account_margin_permission_req_model(self): def test_add_sub_account_margin_permission_resp_model(self): """ add_sub_account_margin_permission - Add SubAccount Margin Permission + Add sub-account Margin Permission /api/v3/sub/user/margin/enable """ data = "{\n \"code\": \"200000\",\n \"data\": null\n}" @@ -71,7 +71,7 @@ def test_add_sub_account_margin_permission_resp_model(self): def test_add_sub_account_futures_permission_req_model(self): """ add_sub_account_futures_permission - Add SubAccount Futures Permission + Add sub-account Futures Permission /api/v3/sub/user/futures/enable """ data = "{\"uid\": \"169579801\"}" @@ -80,7 +80,7 @@ def test_add_sub_account_futures_permission_req_model(self): def test_add_sub_account_futures_permission_resp_model(self): """ add_sub_account_futures_permission - Add SubAccount Futures Permission + Add sub-account Futures Permission /api/v3/sub/user/futures/enable """ data = "{\n \"code\": \"200000\",\n \"data\": null\n}" @@ -91,7 +91,7 @@ def test_add_sub_account_futures_permission_resp_model(self): def test_get_spot_sub_accounts_summary_v2_req_model(self): """ get_spot_sub_accounts_summary_v2 - Get SubAccount List - Summary Info + Get sub-account List - Summary Info /api/v2/sub/user """ data = "{\"currentPage\": 1, \"pageSize\": 10}" @@ -100,7 +100,7 @@ def test_get_spot_sub_accounts_summary_v2_req_model(self): def test_get_spot_sub_accounts_summary_v2_resp_model(self): """ get_spot_sub_accounts_summary_v2 - Get SubAccount List - Summary Info + Get sub-account List - Summary Info /api/v2/sub/user """ data = "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 10,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"userId\": \"63743f07e0c5230001761d08\",\n \"uid\": 169579801,\n \"subName\": \"testapi6\",\n \"status\": 2,\n \"type\": 0,\n \"access\": \"All\",\n \"createdAt\": 1668562696000,\n \"remarks\": \"remarks\",\n \"tradeTypes\": [\n \"Spot\",\n \"Futures\",\n \"Margin\"\n ],\n \"openedTradeTypes\": [\n \"Spot\"\n ],\n \"hostedStatus\": null\n }\n ]\n }\n}" @@ -110,16 +110,16 @@ def test_get_spot_sub_accounts_summary_v2_resp_model(self): def test_get_spot_sub_account_detail_req_model(self): """ get_spot_sub_account_detail - Get SubAccount Detail - Balance + Get sub-account Detail - Balance /api/v1/sub-accounts/{subUserId} """ - data = "{\"subUserId\": \"63743f07e0c5230001761d08\", \"includeBaseAmount\": true}" + data = "{\"subUserId\": \"63743f07e0c5230001761d08\", \"includeBaseAmount\": true, \"baseCurrency\": \"example_string_default_value\", \"baseAmount\": \"example_string_default_value\"}" req = GetSpotSubAccountDetailReq.from_json(data) def test_get_spot_sub_account_detail_resp_model(self): """ get_spot_sub_account_detail - Get SubAccount Detail - Balance + Get sub-account Detail - Balance /api/v1/sub-accounts/{subUserId} """ data = "{\n \"code\": \"200000\",\n \"data\": {\n \"subUserId\": \"63743f07e0c5230001761d08\",\n \"subName\": \"testapi6\",\n \"mainAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62384.3\",\n \"baseAmount\": \"0.00000016\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"tradeAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62384.3\",\n \"baseAmount\": \"0.00000016\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"marginAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62384.3\",\n \"baseAmount\": \"0.00000016\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"tradeHFAccounts\": []\n }\n}" @@ -129,7 +129,7 @@ def test_get_spot_sub_account_detail_resp_model(self): def test_get_spot_sub_account_list_v2_req_model(self): """ get_spot_sub_account_list_v2 - Get SubAccount List - Spot Balance(V2) + Get sub-account List - Spot Balance (V2) /api/v2/sub-accounts """ data = "{\"currentPage\": 1, \"pageSize\": 10}" @@ -138,7 +138,7 @@ def test_get_spot_sub_account_list_v2_req_model(self): def test_get_spot_sub_account_list_v2_resp_model(self): """ get_spot_sub_account_list_v2 - Get SubAccount List - Spot Balance(V2) + Get sub-account List - Spot Balance (V2) /api/v2/sub-accounts """ data = "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 10,\n \"totalNum\": 3,\n \"totalPage\": 1,\n \"items\": [\n {\n \"subUserId\": \"63743f07e0c5230001761d08\",\n \"subName\": \"testapi6\",\n \"mainAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62514.5\",\n \"baseAmount\": \"0.00000015\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"tradeAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62514.5\",\n \"baseAmount\": \"0.00000015\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"marginAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62514.5\",\n \"baseAmount\": \"0.00000015\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"tradeHFAccounts\": []\n },\n {\n \"subUserId\": \"670538a31037eb000115b076\",\n \"subName\": \"Name1234567\",\n \"mainAccounts\": [],\n \"tradeAccounts\": [],\n \"marginAccounts\": [],\n \"tradeHFAccounts\": []\n },\n {\n \"subUserId\": \"66b0c0905fc1480001c14c36\",\n \"subName\": \"LTkucoin1491\",\n \"mainAccounts\": [],\n \"tradeAccounts\": [],\n \"marginAccounts\": [],\n \"tradeHFAccounts\": []\n }\n ]\n }\n}" @@ -148,7 +148,7 @@ def test_get_spot_sub_account_list_v2_resp_model(self): def test_get_futures_sub_account_list_v2_req_model(self): """ get_futures_sub_account_list_v2 - Get SubAccount List - Futures Balance(V2) + Get sub-account List - Futures Balance (V2) /api/v1/account-overview-all """ data = "{\"currency\": \"USDT\"}" @@ -157,7 +157,7 @@ def test_get_futures_sub_account_list_v2_req_model(self): def test_get_futures_sub_account_list_v2_resp_model(self): """ get_futures_sub_account_list_v2 - Get SubAccount List - Futures Balance(V2) + Get sub-account List - Futures Balance (V2) /api/v1/account-overview-all """ data = "{\n \"code\": \"200000\",\n \"data\": {\n \"summary\": {\n \"accountEquityTotal\": 103.899081508,\n \"unrealisedPNLTotal\": 38.81075,\n \"marginBalanceTotal\": 65.336985668,\n \"positionMarginTotal\": 68.9588320683,\n \"orderMarginTotal\": 0,\n \"frozenFundsTotal\": 0,\n \"availableBalanceTotal\": 67.2492494397,\n \"currency\": \"USDT\"\n },\n \"accounts\": [\n {\n \"accountName\": \"Name1234567\",\n \"accountEquity\": 0,\n \"unrealisedPNL\": 0,\n \"marginBalance\": 0,\n \"positionMargin\": 0,\n \"orderMargin\": 0,\n \"frozenFunds\": 0,\n \"availableBalance\": 0,\n \"currency\": \"USDT\"\n },\n {\n \"accountName\": \"LTkucoin1491\",\n \"accountEquity\": 0,\n \"unrealisedPNL\": 0,\n \"marginBalance\": 0,\n \"positionMargin\": 0,\n \"orderMargin\": 0,\n \"frozenFunds\": 0,\n \"availableBalance\": 0,\n \"currency\": \"USDT\"\n },\n {\n \"accountName\": \"manage112233\",\n \"accountEquity\": 0,\n \"unrealisedPNL\": 0,\n \"marginBalance\": 0,\n \"positionMargin\": 0,\n \"orderMargin\": 0,\n \"frozenFunds\": 0,\n \"availableBalance\": 0,\n \"currency\": \"USDT\"\n },\n {\n \"accountName\": \"testapi6\",\n \"accountEquity\": 27.30545128,\n \"unrealisedPNL\": 22.549,\n \"marginBalance\": 4.75645128,\n \"positionMargin\": 24.1223749975,\n \"orderMargin\": 0,\n \"frozenFunds\": 0,\n \"availableBalance\": 25.7320762825,\n \"currency\": \"USDT\"\n },\n {\n \"accountName\": \"main\",\n \"accountEquity\": 76.593630228,\n \"unrealisedPNL\": 16.26175,\n \"marginBalance\": 60.580534388,\n \"positionMargin\": 44.8364570708,\n \"orderMargin\": 0,\n \"frozenFunds\": 0,\n \"availableBalance\": 41.5171731572,\n \"currency\": \"USDT\"\n }\n ]\n }\n}" @@ -167,7 +167,7 @@ def test_get_futures_sub_account_list_v2_resp_model(self): def test_add_sub_account_api_req_model(self): """ add_sub_account_api - Add SubAccount API + Add sub-account API /api/v1/sub/api-key """ data = "{\"subName\": \"testapi6\", \"passphrase\": \"11223344\", \"remark\": \"TheRemark\", \"permission\": \"General,Spot,Futures\"}" @@ -176,7 +176,7 @@ def test_add_sub_account_api_req_model(self): def test_add_sub_account_api_resp_model(self): """ add_sub_account_api - Add SubAccount API + Add sub-account API /api/v1/sub/api-key """ data = "{\n \"code\": \"200000\",\n \"data\": {\n \"subName\": \"testapi6\",\n \"remark\": \"TheRemark\",\n \"apiKey\": \"670621e3a25958000159c82f\",\n \"apiSecret\": \"46fd8974******896f005b2340\",\n \"apiVersion\": 3,\n \"passphrase\": \"11223344\",\n \"permission\": \"General,Futures\",\n \"createdAt\": 1728455139000\n }\n}" @@ -186,7 +186,7 @@ def test_add_sub_account_api_resp_model(self): def test_modify_sub_account_api_req_model(self): """ modify_sub_account_api - Modify SubAccount API + Modify sub-account API /api/v1/sub/api-key/update """ data = "{\"subName\": \"testapi6\", \"apiKey\": \"670621e3a25958000159c82f\", \"passphrase\": \"11223344\", \"permission\": \"General,Spot,Futures\"}" @@ -195,7 +195,7 @@ def test_modify_sub_account_api_req_model(self): def test_modify_sub_account_api_resp_model(self): """ modify_sub_account_api - Modify SubAccount API + Modify sub-account API /api/v1/sub/api-key/update """ data = "{\n \"code\": \"200000\",\n \"data\": {\n \"subName\": \"testapi6\",\n \"apiKey\": \"670621e3a25958000159c82f\",\n \"permission\": \"General,Futures,Spot\"\n }\n}" @@ -205,7 +205,7 @@ def test_modify_sub_account_api_resp_model(self): def test_get_sub_account_api_list_req_model(self): """ get_sub_account_api_list - Get SubAccount API List + Get sub-account API List /api/v1/sub/api-key """ data = "{\"apiKey\": \"example_string_default_value\", \"subName\": \"testapi6\"}" @@ -214,7 +214,7 @@ def test_get_sub_account_api_list_req_model(self): def test_get_sub_account_api_list_resp_model(self): """ get_sub_account_api_list - Get SubAccount API List + Get sub-account API List /api/v1/sub/api-key """ data = "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"subName\": \"apiSdkTest\",\n \"remark\": \"sdk_test_integration\",\n \"apiKey\": \"673eab2a955ebf000195d7e4\",\n \"apiVersion\": 3,\n \"permission\": \"General\",\n \"ipWhitelist\": \"10.**.1\",\n \"createdAt\": 1732160298000,\n \"uid\": 215112467,\n \"isMaster\": false\n }\n ]\n}" @@ -224,7 +224,7 @@ def test_get_sub_account_api_list_resp_model(self): def test_delete_sub_account_api_req_model(self): """ delete_sub_account_api - Delete SubAccount API + Delete sub-account API /api/v1/sub/api-key """ data = "{\"apiKey\": \"670621e3a25958000159c82f\", \"subName\": \"testapi6\", \"passphrase\": \"11223344\"}" @@ -233,7 +233,7 @@ def test_delete_sub_account_api_req_model(self): def test_delete_sub_account_api_resp_model(self): """ delete_sub_account_api - Delete SubAccount API + Delete sub-account API /api/v1/sub/api-key """ data = "{\"code\":\"200000\",\"data\":{\"subName\":\"testapi6\",\"apiKey\":\"670621e3a25958000159c82f\"}}" @@ -243,14 +243,14 @@ def test_delete_sub_account_api_resp_model(self): def test_get_spot_sub_accounts_summary_v1_req_model(self): """ get_spot_sub_accounts_summary_v1 - Get SubAccount List - Summary Info(V1) + Get sub-account List - Summary Info (V1) /api/v1/sub/user """ def test_get_spot_sub_accounts_summary_v1_resp_model(self): """ get_spot_sub_accounts_summary_v1 - Get SubAccount List - Summary Info(V1) + Get sub-account List - Summary Info (V1) /api/v1/sub/user """ data = "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"userId\": \"63743f07e0c5230001761d08\",\n \"uid\": 169579801,\n \"subName\": \"testapi6\",\n \"type\": 0,\n \"remarks\": \"remarks\",\n \"access\": \"All\"\n },\n {\n \"userId\": \"670538a31037eb000115b076\",\n \"uid\": 225139445,\n \"subName\": \"Name1234567\",\n \"type\": 0,\n \"remarks\": \"TheRemark\",\n \"access\": \"All\"\n }\n ]\n}" @@ -260,14 +260,14 @@ def test_get_spot_sub_accounts_summary_v1_resp_model(self): def test_get_spot_sub_account_list_v1_req_model(self): """ get_spot_sub_account_list_v1 - Get SubAccount List - Spot Balance(V1) + Get sub-account List - Spot Balance (V1) /api/v1/sub-accounts """ def test_get_spot_sub_account_list_v1_resp_model(self): """ get_spot_sub_account_list_v1 - Get SubAccount List - Spot Balance(V1) + Get sub-account List - Spot Balance (V1) /api/v1/sub-accounts """ data = "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"subUserId\": \"63743f07e0c5230001761d08\",\n \"subName\": \"testapi6\",\n \"mainAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62489.8\",\n \"baseAmount\": \"0.00000016\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"tradeAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62489.8\",\n \"baseAmount\": \"0.00000016\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"marginAccounts\": [\n {\n \"currency\": \"USDT\",\n \"balance\": \"0.01\",\n \"available\": \"0.01\",\n \"holds\": \"0\",\n \"baseCurrency\": \"BTC\",\n \"baseCurrencyPrice\": \"62489.8\",\n \"baseAmount\": \"0.00000016\",\n \"tag\": \"DEFAULT\"\n }\n ],\n \"tradeHFAccounts\": []\n },\n {\n \"subUserId\": \"670538a31037eb000115b076\",\n \"subName\": \"Name1234567\",\n \"mainAccounts\": [],\n \"tradeAccounts\": [],\n \"marginAccounts\": [],\n \"tradeHFAccounts\": []\n },\n {\n \"subUserId\": \"66b0c0905fc1480001c14c36\",\n \"subName\": \"LTkucoin1491\",\n \"mainAccounts\": [],\n \"tradeAccounts\": [],\n \"marginAccounts\": [],\n \"tradeHFAccounts\": []\n }\n ]\n}" diff --git a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_add_sub_account_api_req.py b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_add_sub_account_api_req.py index c1192439..e6a393c2 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_add_sub_account_api_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_add_sub_account_api_req.py @@ -16,11 +16,11 @@ class AddSubAccountApiReq(BaseModel): AddSubAccountApiReq Attributes: - passphrase (str): Password(Must contain 7-32 characters. Cannot contain any spaces.) - remark (str): Remarks(1~24 characters) - permission (str): [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") - ip_whitelist (str): IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) - expire (ExpireEnum): API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 + passphrase (str): Password (Must contain 7–32 characters. Cannot contain any spaces.) + remark (str): Remarks (1–24 characters) + permission (str): [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") + ip_whitelist (str): IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) + expire (ExpireEnum): API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 sub_name (str): Sub-account name, create sub account name of API Key. """ @@ -42,23 +42,23 @@ class ExpireEnum(Enum): passphrase: Optional[str] = Field( default=None, description= - "Password(Must contain 7-32 characters. Cannot contain any spaces.)") + "Password (Must contain 7–32 characters. Cannot contain any spaces.)") remark: Optional[str] = Field(default=None, - description="Remarks(1~24 characters)") + description="Remarks (1–24 characters)") permission: Optional[str] = Field( default='General', description= - "[Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\")" + "[Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\")" ) ip_whitelist: Optional[str] = Field( default=None, description= - "IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP)", + "IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP)", alias="ipWhitelist") expire: Optional[ExpireEnum] = Field( default=ExpireEnum.T_1, description= - "API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360" + "API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360" ) sub_name: Optional[str] = Field( default=None, @@ -129,28 +129,28 @@ def __init__(self): def set_passphrase(self, value: str) -> AddSubAccountApiReqBuilder: """ - Password(Must contain 7-32 characters. Cannot contain any spaces.) + Password (Must contain 7–32 characters. Cannot contain any spaces.) """ self.obj['passphrase'] = value return self def set_remark(self, value: str) -> AddSubAccountApiReqBuilder: """ - Remarks(1~24 characters) + Remarks (1–24 characters) """ self.obj['remark'] = value return self def set_permission(self, value: str) -> AddSubAccountApiReqBuilder: """ - [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") + [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") """ self.obj['permission'] = value return self def set_ip_whitelist(self, value: str) -> AddSubAccountApiReqBuilder: """ - IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) + IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) """ self.obj['ipWhitelist'] = value return self @@ -159,7 +159,7 @@ def set_expire( self, value: AddSubAccountApiReq.ExpireEnum ) -> AddSubAccountApiReqBuilder: """ - API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 + API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 """ self.obj['expire'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_add_sub_account_api_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_add_sub_account_api_resp.py index fc5b20e7..36a8bc54 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_add_sub_account_api_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_add_sub_account_api_resp.py @@ -25,7 +25,7 @@ class AddSubAccountApiResp(BaseModel, Response): passphrase (str): Password permission (str): [Permissions](https://www.kucoin.com/docs-new/doc-338144) ip_whitelist (str): IP whitelist - created_at (int): Time of the event + created_at (int): Time of event """ common_response: Optional[RestResponse] = Field( @@ -52,7 +52,7 @@ class AddSubAccountApiResp(BaseModel, Response): description="IP whitelist", alias="ipWhitelist") created_at: Optional[int] = Field(default=None, - description="Time of the event", + description="Time of event", alias="createdAt") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_add_sub_account_req.py b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_add_sub_account_req.py index d90d0d64..cd61bcf7 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_add_sub_account_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_add_sub_account_req.py @@ -16,9 +16,9 @@ class AddSubAccountReq(BaseModel): AddSubAccountReq Attributes: - password (str): Password(7-24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) - remarks (str): Remarks(1~24 characters) - sub_name (str): Sub-account name(must contain 7-32 characters, at least one number and one letter. Cannot contain any spaces.) + password (str): Password (7–24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) + remarks (str): Remarks (1–24 characters) + sub_name (str): Sub-account name (must contain 7–32 characters, at least one number and one letter. Cannot contain any spaces.) access (AccessEnum): Permission (types include Spot, Futures, Margin permissions, which can be used alone or in combination). """ @@ -36,14 +36,14 @@ class AccessEnum(Enum): password: Optional[str] = Field( default=None, description= - "Password(7-24 characters, must contain letters and numbers, cannot only contain numbers or include special characters)" + "Password (7–24 characters, must contain letters and numbers, cannot only contain numbers or include special characters)" ) remarks: Optional[str] = Field(default=None, - description="Remarks(1~24 characters)") + description="Remarks (1–24 characters)") sub_name: Optional[str] = Field( default=None, description= - "Sub-account name(must contain 7-32 characters, at least one number and one letter. Cannot contain any spaces.)", + "Sub-account name (must contain 7–32 characters, at least one number and one letter. Cannot contain any spaces.)", alias="subName") access: Optional[AccessEnum] = Field( default=None, @@ -103,21 +103,21 @@ def __init__(self): def set_password(self, value: str) -> AddSubAccountReqBuilder: """ - Password(7-24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) + Password (7–24 characters, must contain letters and numbers, cannot only contain numbers or include special characters) """ self.obj['password'] = value return self def set_remarks(self, value: str) -> AddSubAccountReqBuilder: """ - Remarks(1~24 characters) + Remarks (1–24 characters) """ self.obj['remarks'] = value return self def set_sub_name(self, value: str) -> AddSubAccountReqBuilder: """ - Sub-account name(must contain 7-32 characters, at least one number and one letter. Cannot contain any spaces.) + Sub-account name (must contain 7–32 characters, at least one number and one letter. Cannot contain any spaces.) """ self.obj['subName'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_delete_sub_account_api_req.py b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_delete_sub_account_api_req.py index 5ee514bf..1b1939bf 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_delete_sub_account_api_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_delete_sub_account_api_req.py @@ -17,7 +17,7 @@ class DeleteSubAccountApiReq(BaseModel): Attributes: api_key (str): API-Key sub_name (str): Sub-account name. - passphrase (str): Password(Password of the API key) + passphrase (str): Password (password of the API key) """ api_key: Optional[str] = Field(default=None, @@ -27,7 +27,7 @@ class DeleteSubAccountApiReq(BaseModel): description="Sub-account name.", alias="subName") passphrase: Optional[str] = Field( - default=None, description="Password(Password of the API key)") + default=None, description="Password (password of the API key)") __properties: ClassVar[List[str]] = ["apiKey", "subName", "passphrase"] @@ -93,7 +93,7 @@ def set_sub_name(self, value: str) -> DeleteSubAccountApiReqBuilder: def set_passphrase(self, value: str) -> DeleteSubAccountApiReqBuilder: """ - Password(Password of the API key) + Password (password of the API key) """ self.obj['passphrase'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_futures_sub_account_list_v2_req.py b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_futures_sub_account_list_v2_req.py index fe845b48..747f906e 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_futures_sub_account_list_v2_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_futures_sub_account_list_v2_req.py @@ -15,11 +15,11 @@ class GetFuturesSubAccountListV2Req(BaseModel): GetFuturesSubAccountListV2Req Attributes: - currency (str): Currecny, Default XBT + currency (str): Currency, Default XBT """ currency: Optional[str] = Field(default='XBT', - description="Currecny, Default XBT") + description="Currency, Default XBT") __properties: ClassVar[List[str]] = ["currency"] @@ -72,7 +72,7 @@ def __init__(self): def set_currency(self, value: str) -> GetFuturesSubAccountListV2ReqBuilder: """ - Currecny, Default XBT + Currency, Default XBT """ self.obj['currency'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_futures_sub_account_list_v2_summary.py b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_futures_sub_account_list_v2_summary.py index 06b1c6bf..63d09179 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_futures_sub_account_list_v2_summary.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_futures_sub_account_list_v2_summary.py @@ -16,12 +16,12 @@ class GetFuturesSubAccountListV2Summary(BaseModel): Attributes: account_equity_total (float): Total Account Equity - unrealised_pnl_total (float): Total unrealisedPNL + unrealised_pnl_total (float): Total unrealizedPNL margin_balance_total (float): Total Margin Balance position_margin_total (float): Total Position margin order_margin_total (float): frozen_funds_total (float): Total frozen funds for withdrawal and out-transfer - available_balance_total (float): total available balance + available_balance_total (float): Total available balance currency (str): """ @@ -31,7 +31,7 @@ class GetFuturesSubAccountListV2Summary(BaseModel): alias="accountEquityTotal") unrealised_pnl_total: Optional[float] = Field( default=None, - description="Total unrealisedPNL", + description="Total unrealizedPNL", alias="unrealisedPNLTotal") margin_balance_total: Optional[float] = Field( default=None, @@ -49,7 +49,7 @@ class GetFuturesSubAccountListV2Summary(BaseModel): alias="frozenFundsTotal") available_balance_total: Optional[float] = Field( default=None, - description="total available balance", + description="Total available balance", alias="availableBalanceTotal") currency: Optional[str] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_account_detail_req.py b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_account_detail_req.py index ed5be684..b1ac6eb2 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_account_detail_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_account_detail_req.py @@ -16,7 +16,9 @@ class GetSpotSubAccountDetailReq(BaseModel): Attributes: sub_user_id (str): the userID of a sub-account. - include_base_amount (bool): false: do not display the currency which asset is 0, true: display all currency + include_base_amount (bool): False: Do not display currencies with 0 assets; True: display all currencies + base_currency (str): Specify the currency used to convert assets + base_amount (str): The currency balance specified must be greater than or equal to the amount """ sub_user_id: Optional[str] = Field( @@ -25,12 +27,23 @@ class GetSpotSubAccountDetailReq(BaseModel): description="the userID of a sub-account.", alias="subUserId") include_base_amount: Optional[bool] = Field( - default=None, + default=False, description= - "false: do not display the currency which asset is 0, true: display all currency", + "False: Do not display currencies with 0 assets; True: display all currencies", alias="includeBaseAmount") + base_currency: Optional[str] = Field( + default=None, + description="Specify the currency used to convert assets", + alias="baseCurrency") + base_amount: Optional[str] = Field( + default=None, + description= + "The currency balance specified must be greater than or equal to the amount", + alias="baseAmount") - __properties: ClassVar[List[str]] = ["subUserId", "includeBaseAmount"] + __properties: ClassVar[List[str]] = [ + "subUserId", "includeBaseAmount", "baseCurrency", "baseAmount" + ] model_config = ConfigDict( populate_by_name=True, @@ -71,6 +84,11 @@ def from_dict( obj.get("subUserId"), "includeBaseAmount": obj.get("includeBaseAmount") + if obj.get("includeBaseAmount") is not None else False, + "baseCurrency": + obj.get("baseCurrency"), + "baseAmount": + obj.get("baseAmount") }) return _obj @@ -90,10 +108,25 @@ def set_sub_user_id(self, value: str) -> GetSpotSubAccountDetailReqBuilder: def set_include_base_amount( self, value: bool) -> GetSpotSubAccountDetailReqBuilder: """ - false: do not display the currency which asset is 0, true: display all currency + False: Do not display currencies with 0 assets; True: display all currencies """ self.obj['includeBaseAmount'] = value return self + def set_base_currency(self, + value: str) -> GetSpotSubAccountDetailReqBuilder: + """ + Specify the currency used to convert assets + """ + self.obj['baseCurrency'] = value + return self + + def set_base_amount(self, value: str) -> GetSpotSubAccountDetailReqBuilder: + """ + The currency balance specified must be greater than or equal to the amount + """ + self.obj['baseAmount'] = value + return self + def build(self) -> GetSpotSubAccountDetailReq: return GetSpotSubAccountDetailReq(**self.obj) diff --git a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_account_list_v2_req.py b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_account_list_v2_req.py index b4f824e9..bdcf90c0 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_account_list_v2_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_account_list_v2_req.py @@ -8,7 +8,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetSpotSubAccountListV2Req(BaseModel): @@ -24,9 +23,7 @@ class GetSpotSubAccountListV2Req(BaseModel): default=1, description="Current request page. Default is 1", alias="currentPage") - page_size: Optional[Annotated[int, Field( - le=100, strict=True, ge=10 - )]] = Field( + page_size: Optional[int] = Field( default=10, description= "Number of results per request. Minimum is 10, maximum is 100, default is 10. ", diff --git a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_items.py b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_items.py index b22fc01f..c3b50b97 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_items.py @@ -16,16 +16,16 @@ class GetSpotSubAccountsSummaryV2Items(BaseModel): GetSpotSubAccountsSummaryV2Items Attributes: - user_id (str): Sub-account User Id + user_id (str): Sub-account User ID uid (int): Sub-account UID sub_name (str): Sub-account name status (StatusEnum): Sub-account; 2:Enable, 3:Frozen type (TypeEnum): Sub-account type access (str): Sub-account Permission - created_at (int): Time of the event + created_at (int): Time of event remarks (str): Remarks - trade_types (list[str]): Subaccount Permissions - opened_trade_types (list[str]): Subaccount active permissions,If do not have the corresponding permissions, need to log in to the sub-account and go to the corresponding web page to activate + trade_types (list[str]): Sub-account Permissions + opened_trade_types (list[str]): Sub-account active permissions: If you do not have the corresponding permissions, you must log in to the sub-account and go to the corresponding web page to activate. hosted_status (str): """ @@ -41,10 +41,10 @@ class StatusEnum(Enum): class TypeEnum(Enum): """ Attributes: - NORMAL: Normal subaccount - ROBOT: Robot subaccount + NORMAL: Normal sub-account + ROBOT: Robot sub-account NOVICE: New financial sub-account - HOSTED: Asset management subaccount + HOSTED: Asset management sub-account """ NORMAL = 0 ROBOT = 1 @@ -52,7 +52,7 @@ class TypeEnum(Enum): HOSTED = 5 user_id: Optional[str] = Field(default=None, - description="Sub-account User Id", + description="Sub-account User ID", alias="userId") uid: Optional[int] = Field(default=None, description="Sub-account UID") sub_name: Optional[str] = Field(default=None, @@ -65,15 +65,17 @@ class TypeEnum(Enum): access: Optional[str] = Field(default=None, description="Sub-account Permission") created_at: Optional[int] = Field(default=None, - description="Time of the event", + description="Time of event", alias="createdAt") remarks: Optional[str] = Field(default=None, description="Remarks") trade_types: Optional[List[str]] = Field( - default=None, description="Subaccount Permissions", alias="tradeTypes") + default=None, + description="Sub-account Permissions", + alias="tradeTypes") opened_trade_types: Optional[List[str]] = Field( default=None, description= - "Subaccount active permissions,If do not have the corresponding permissions, need to log in to the sub-account and go to the corresponding web page to activate", + "Sub-account active permissions: If you do not have the corresponding permissions, you must log in to the sub-account and go to the corresponding web page to activate.", alias="openedTradeTypes") hosted_status: Optional[str] = Field(default=None, alias="hostedStatus") diff --git a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_req.py b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_req.py index c7540ffe..4014ff4b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_req.py @@ -8,7 +8,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetSpotSubAccountsSummaryV2Req(BaseModel): @@ -24,9 +23,7 @@ class GetSpotSubAccountsSummaryV2Req(BaseModel): default=None, description="Current request page. Default is 1", alias="currentPage") - page_size: Optional[Annotated[int, Field( - le=100, strict=True, ge=1 - )]] = Field( + page_size: Optional[int] = Field( default=10, description= "Number of results per request. Minimum is 1, maximum is 100, default is 10.", diff --git a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_resp.py index 7b5e2497..f7a96b55 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_get_spot_sub_accounts_summary_v2_resp.py @@ -21,7 +21,7 @@ class GetSpotSubAccountsSummaryV2Resp(BaseModel, Response): current_page (int): Current request page page_size (int): Number of results per request. Minimum is 1, maximum is 100 total_num (int): Total number of messages - total_page (int): Total number of page + total_page (int): Total number of pages items (list[GetSpotSubAccountsSummaryV2Items]): """ @@ -39,7 +39,7 @@ class GetSpotSubAccountsSummaryV2Resp(BaseModel, Response): description="Total number of messages", alias="totalNum") total_page: Optional[int] = Field(default=None, - description="Total number of page", + description="Total number of pages", alias="totalPage") items: Optional[List[GetSpotSubAccountsSummaryV2Items]] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_modify_sub_account_api_req.py b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_modify_sub_account_api_req.py index 4f4c43b5..e8f13c62 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_modify_sub_account_api_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/subaccount/model_modify_sub_account_api_req.py @@ -16,12 +16,12 @@ class ModifySubAccountApiReq(BaseModel): ModifySubAccountApiReq Attributes: - passphrase (str): Password(Must contain 7-32 characters. Cannot contain any spaces.) - permission (str): [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") - ip_whitelist (str): IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) - expire (ExpireEnum): API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 + passphrase (str): Password (Must contain 7–32 characters. Cannot contain any spaces.) + permission (str): [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") + ip_whitelist (str): IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) + expire (ExpireEnum): API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 sub_name (str): Sub-account name, create sub account name of API Key. - api_key (str): API-Key(Sub-account APIKey) + api_key (str): API-Key (Sub-account APIKey) """ class ExpireEnum(Enum): @@ -42,28 +42,28 @@ class ExpireEnum(Enum): passphrase: Optional[str] = Field( default=None, description= - "Password(Must contain 7-32 characters. Cannot contain any spaces.)") + "Password (Must contain 7–32 characters. Cannot contain any spaces.)") permission: Optional[str] = Field( default='General', description= - "[Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\")" + "[Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\")" ) ip_whitelist: Optional[str] = Field( default=None, description= - "IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP)", + "IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP)", alias="ipWhitelist") expire: Optional[ExpireEnum] = Field( default=ExpireEnum.T_1, description= - "API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360" + "API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360" ) sub_name: Optional[str] = Field( default=None, description="Sub-account name, create sub account name of API Key.", alias="subName") api_key: Optional[str] = Field(default=None, - description="API-Key(Sub-account APIKey)", + description="API-Key (Sub-account APIKey)", alias="apiKey") __properties: ClassVar[List[str]] = [ @@ -130,21 +130,21 @@ def __init__(self): def set_passphrase(self, value: str) -> ModifySubAccountApiReqBuilder: """ - Password(Must contain 7-32 characters. Cannot contain any spaces.) + Password (Must contain 7–32 characters. Cannot contain any spaces.) """ self.obj['passphrase'] = value return self def set_permission(self, value: str) -> ModifySubAccountApiReqBuilder: """ - [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") + [Permissions](https://www.kucoin.com/docs-new/doc-338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\") """ self.obj['permission'] = value return self def set_ip_whitelist(self, value: str) -> ModifySubAccountApiReqBuilder: """ - IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP) + IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP) """ self.obj['ipWhitelist'] = value return self @@ -153,7 +153,7 @@ def set_expire( self, value: ModifySubAccountApiReq.ExpireEnum ) -> ModifySubAccountApiReqBuilder: """ - API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360 + API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360 """ self.obj['expire'] = value return self @@ -167,7 +167,7 @@ def set_sub_name(self, value: str) -> ModifySubAccountApiReqBuilder: def set_api_key(self, value: str) -> ModifySubAccountApiReqBuilder: """ - API-Key(Sub-account APIKey) + API-Key (Sub-account APIKey) """ self.obj['apiKey'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/transfer/api_transfer.py b/sdk/python/kucoin_universal_sdk/generate/account/transfer/api_transfer.py index e63d4b44..d3c6b1ff 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/transfer/api_transfer.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/transfer/api_transfer.py @@ -29,15 +29,15 @@ def get_transfer_quotas(self, req: GetTransferQuotasReq, summary: Get Transfer Quotas description: This endpoint returns the transferable balance of a specified account. documentation: https://www.kucoin.com/docs-new/api-3470148 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -46,17 +46,17 @@ def flex_transfer(self, req: FlexTransferReq, **kwargs: Any) -> FlexTransferResp: """ summary: Flex Transfer - description: This interface can be used for transfers between master and sub accounts and inner transfers + description: This interface can be used for transfers between master- and sub-accounts and transfers documentation: https://www.kucoin.com/docs-new/api-3470147 - +---------------------+---------------+ - | Extra API Info | Value | - +---------------------+---------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FLEXTRANSFERS | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 4 | - +---------------------+---------------+ + +-----------------------+---------------+ + | Extra API Info | Value | + +-----------------------+---------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FLEXTRANSFERS | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 4 | + +-----------------------+---------------+ """ pass @@ -65,18 +65,18 @@ def flex_transfer(self, req: FlexTransferReq, def sub_account_transfer(self, req: SubAccountTransferReq, **kwargs: Any) -> SubAccountTransferResp: """ - summary: SubAccount Transfer + summary: Sub-account Transfer description: Funds in the main account, trading account and margin account of a Master Account can be transferred to the main account, trading account, futures account and margin account of its Sub-Account. The futures account of both the Master Account and Sub-Account can only accept funds transferred in from the main account, trading account and margin account and cannot transfer out to these accounts. documentation: https://www.kucoin.com/docs-new/api-3470301 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 30 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 30 | + +-----------------------+------------+ """ pass @@ -85,18 +85,39 @@ def sub_account_transfer(self, req: SubAccountTransferReq, def inner_transfer(self, req: InnerTransferReq, **kwargs: Any) -> InnerTransferResp: """ - summary: Inner Transfer - description: This API endpoint can be used to transfer funds between accounts internally. Users can transfer funds between their account free of charge. + summary: Internal Transfer + description: This API endpoint can be used to transfer funds between accounts internally. Users can transfer funds between their accounts free of charge. documentation: https://www.kucoin.com/docs-new/api-3470302 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 10 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+------------+ + """ + pass + + @abstractmethod + @deprecated('') + def get_futures_account_transfer_out_ledger( + self, req: GetFuturesAccountTransferOutLedgerReq, + **kwargs: Any) -> GetFuturesAccountTransferOutLedgerResp: + """ + summary: Get Futures Account Transfer Out Ledger + description: Futures account transfer out ledgers can be obtained at this endpoint. + documentation: https://www.kucoin.com/docs-new/api-3470307 + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -109,15 +130,15 @@ def futures_account_transfer_out( summary: Futures Account Transfer Out description: The amount to be transferred will be deducted from the KuCoin Futures Account. Please ensure that you have sufficient funds in your KuCoin Futures Account, or the transfer will fail. documentation: https://www.kucoin.com/docs-new/api-3470303 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -128,38 +149,17 @@ def futures_account_transfer_in( **kwargs: Any) -> FuturesAccountTransferInResp: """ summary: Futures Account Transfer In - description: The amount to be transferred will be deducted from the payAccount. Please ensure that you have sufficient funds in your payAccount Account, or the transfer will fail. + description: The amount to be transferred will be deducted from the payAccount. Please ensure that you have sufficient funds in your payAccount account, or the transfer will fail. documentation: https://www.kucoin.com/docs-new/api-3470304 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ - """ - pass - - @abstractmethod - @deprecated('') - def get_futures_account_transfer_out_ledger( - self, req: GetFuturesAccountTransferOutLedgerReq, - **kwargs: Any) -> GetFuturesAccountTransferOutLedgerResp: - """ - summary: Get Futures Account Transfer Out Ledger - description: This endpoint can get futures account transfer out ledger - documentation: https://www.kucoin.com/docs-new/api-3470307 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -193,6 +193,14 @@ def inner_transfer(self, req: InnerTransferReq, "/api/v2/accounts/inner-transfer", req, InnerTransferResp(), False, **kwargs) + def get_futures_account_transfer_out_ledger( + self, req: GetFuturesAccountTransferOutLedgerReq, + **kwargs: Any) -> GetFuturesAccountTransferOutLedgerResp: + return self.transport.call("futures", False, "GET", + "/api/v1/transfer-list", req, + GetFuturesAccountTransferOutLedgerResp(), + False, **kwargs) + def futures_account_transfer_out( self, req: FuturesAccountTransferOutReq, **kwargs: Any) -> FuturesAccountTransferOutResp: @@ -208,11 +216,3 @@ def futures_account_transfer_in( "/api/v1/transfer-in", req, FuturesAccountTransferInResp(), False, **kwargs) - - def get_futures_account_transfer_out_ledger( - self, req: GetFuturesAccountTransferOutLedgerReq, - **kwargs: Any) -> GetFuturesAccountTransferOutLedgerResp: - return self.transport.call("futures", False, "GET", - "/api/v1/transfer-list", req, - GetFuturesAccountTransferOutLedgerResp(), - False, **kwargs) diff --git a/sdk/python/kucoin_universal_sdk/generate/account/transfer/api_transfer.template b/sdk/python/kucoin_universal_sdk/generate/account/transfer/api_transfer.template index 1c746942..9c56bdbc 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/transfer/api_transfer.template +++ b/sdk/python/kucoin_universal_sdk/generate/account/transfer/api_transfer.template @@ -42,12 +42,12 @@ def test_flex_transfer_req(self): def test_sub_account_transfer_req(self): """ sub_account_transfer - SubAccount Transfer + Sub-account Transfer /api/v2/accounts/sub-transfer """ builder = SubAccountTransferReqBuilder() - builder.set_client_oid(?).set_currency(?).set_amount(?).set_direction(?).set_account_type(?).set_sub_account_type(?).set_sub_user_id(?) + builder.set_client_oid(?).set_currency(?).set_amount(?).set_direction(?).set_account_type(?).set_sub_account_type(?).set_sub_user_id(?).set_tag(?).set_sub_tag(?) req = builder.build() try: resp = self.api.sub_account_transfer(req) @@ -61,7 +61,7 @@ def test_sub_account_transfer_req(self): def test_inner_transfer_req(self): """ inner_transfer - Inner Transfer + Internal Transfer /api/v2/accounts/inner-transfer """ @@ -77,6 +77,25 @@ def test_inner_transfer_req(self): print("error: ", e) raise e +def test_get_futures_account_transfer_out_ledger_req(self): + """ + get_futures_account_transfer_out_ledger + Get Futures Account Transfer Out Ledger + /api/v1/transfer-list + """ + + builder = GetFuturesAccountTransferOutLedgerReqBuilder() + builder.set_currency(?).set_type(?).set_tag(?).set_start_at(?).set_end_at(?).set_current_page(?).set_page_size(?) + req = builder.build() + try: + resp = self.api.get_futures_account_transfer_out_ledger(req) + print("code: ", resp.common_response.code) + print("msg: ", resp.common_response.message) + print("data: ", resp.to_json()) + except Exception as e: + print("error: ", e) + raise e + def test_futures_account_transfer_out_req(self): """ futures_account_transfer_out @@ -114,22 +133,3 @@ def test_futures_account_transfer_in_req(self): except Exception as e: print("error: ", e) raise e - -def test_get_futures_account_transfer_out_ledger_req(self): - """ - get_futures_account_transfer_out_ledger - Get Futures Account Transfer Out Ledger - /api/v1/transfer-list - """ - - builder = GetFuturesAccountTransferOutLedgerReqBuilder() - builder.set_currency(?).set_type(?).set_tag(?).set_start_at(?).set_end_at(?).set_current_page(?).set_page_size(?) - req = builder.build() - try: - resp = self.api.get_futures_account_transfer_out_ledger(req) - print("code: ", resp.common_response.code) - print("msg: ", resp.common_response.message) - print("data: ", resp.to_json()) - except Exception as e: - print("error: ", e) - raise e diff --git a/sdk/python/kucoin_universal_sdk/generate/account/transfer/api_transfer_test.py b/sdk/python/kucoin_universal_sdk/generate/account/transfer/api_transfer_test.py index a58f8595..dcc2a662 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/transfer/api_transfer_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/transfer/api_transfer_test.py @@ -60,7 +60,7 @@ def test_flex_transfer_resp_model(self): def test_sub_account_transfer_req_model(self): """ sub_account_transfer - SubAccount Transfer + Sub-account Transfer /api/v2/accounts/sub-transfer """ data = "{\"clientOid\": \"64ccc0f164781800010d8c09\", \"currency\": \"USDT\", \"amount\": \"0.01\", \"direction\": \"OUT\", \"accountType\": \"MAIN\", \"subAccountType\": \"MAIN\", \"subUserId\": \"63743f07e0c5230001761d08\"}" @@ -69,7 +69,7 @@ def test_sub_account_transfer_req_model(self): def test_sub_account_transfer_resp_model(self): """ sub_account_transfer - SubAccount Transfer + Sub-account Transfer /api/v2/accounts/sub-transfer """ data = "{\"code\":\"200000\",\"data\":{\"orderId\":\"670be6b0b1b9080007040a9b\"}}" @@ -79,7 +79,7 @@ def test_sub_account_transfer_resp_model(self): def test_inner_transfer_req_model(self): """ inner_transfer - Inner Transfer + Internal Transfer /api/v2/accounts/inner-transfer """ data = "{\"clientOid\": \"64ccc0f164781800010d8c09\", \"currency\": \"USDT\", \"amount\": \"0.01\", \"from\": \"main\", \"to\": \"trade\"}" @@ -88,13 +88,33 @@ def test_inner_transfer_req_model(self): def test_inner_transfer_resp_model(self): """ inner_transfer - Inner Transfer + Internal Transfer /api/v2/accounts/inner-transfer """ data = "{\"code\":\"200000\",\"data\":{\"orderId\":\"670beb3482a1bb0007dec644\"}}" common_response = RestResponse.from_json(data) resp = InnerTransferResp.from_dict(common_response.data) + def test_get_futures_account_transfer_out_ledger_req_model(self): + """ + get_futures_account_transfer_out_ledger + Get Futures Account Transfer Out Ledger + /api/v1/transfer-list + """ + data = "{\"currency\": \"XBT\", \"type\": \"MAIN\", \"tag\": [\"mock_a\", \"mock_b\"], \"startAt\": 1728663338000, \"endAt\": 1728692138000, \"currentPage\": 1, \"pageSize\": 50}" + req = GetFuturesAccountTransferOutLedgerReq.from_json(data) + + def test_get_futures_account_transfer_out_ledger_resp_model(self): + """ + get_futures_account_transfer_out_ledger + Get Futures Account Transfer Out Ledger + /api/v1/transfer-list + """ + data = "{\"code\":\"200000\",\"data\":{\"currentPage\":1,\"pageSize\":50,\"totalNum\":1,\"totalPage\":1,\"items\":[{\"applyId\":\"670bf84c577f6c00017a1c48\",\"currency\":\"USDT\",\"recRemark\":\"\",\"recSystem\":\"KUCOIN\",\"status\":\"SUCCESS\",\"amount\":\"0.01\",\"reason\":\"\",\"offset\":1519769124134806,\"createdAt\":1728837708000,\"remark\":\"\"}]}}" + common_response = RestResponse.from_json(data) + resp = GetFuturesAccountTransferOutLedgerResp.from_dict( + common_response.data) + def test_futures_account_transfer_out_req_model(self): """ futures_account_transfer_out @@ -132,23 +152,3 @@ def test_futures_account_transfer_in_resp_model(self): data = "{\"code\":\"200000\",\"data\":null}" common_response = RestResponse.from_json(data) resp = FuturesAccountTransferInResp.from_dict(common_response.data) - - def test_get_futures_account_transfer_out_ledger_req_model(self): - """ - get_futures_account_transfer_out_ledger - Get Futures Account Transfer Out Ledger - /api/v1/transfer-list - """ - data = "{\"currency\": \"XBT\", \"type\": \"MAIN\", \"tag\": [\"mock_a\", \"mock_b\"], \"startAt\": 1728663338000, \"endAt\": 1728692138000, \"currentPage\": 1, \"pageSize\": 50}" - req = GetFuturesAccountTransferOutLedgerReq.from_json(data) - - def test_get_futures_account_transfer_out_ledger_resp_model(self): - """ - get_futures_account_transfer_out_ledger - Get Futures Account Transfer Out Ledger - /api/v1/transfer-list - """ - data = "{\"code\":\"200000\",\"data\":{\"currentPage\":1,\"pageSize\":50,\"totalNum\":1,\"totalPage\":1,\"items\":[{\"applyId\":\"670bf84c577f6c00017a1c48\",\"currency\":\"USDT\",\"recRemark\":\"\",\"recSystem\":\"KUCOIN\",\"status\":\"SUCCESS\",\"amount\":\"0.01\",\"reason\":\"\",\"offset\":1519769124134806,\"createdAt\":1728837708000,\"remark\":\"\"}]}}" - common_response = RestResponse.from_json(data) - resp = GetFuturesAccountTransferOutLedgerResp.from_dict( - common_response.data) diff --git a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_flex_transfer_req.py b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_flex_transfer_req.py index b43ebdb6..aea106cd 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_flex_transfer_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_flex_transfer_req.py @@ -16,16 +16,16 @@ class FlexTransferReq(BaseModel): FlexTransferReq Attributes: - client_oid (str): Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + client_oid (str): Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits currency (str): currency - amount (str): Transfer amount, the amount is a positive integer multiple of the currency precision. - from_user_id (str): Transfer out UserId, This is required when transferring sub-account to master-account. It is optional for internal transfers. - from_account_type (FromAccountTypeEnum): Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 - from_account_tag (str): Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT - type (TypeEnum): Transfer type:INTERNAL(Transfer within account)、PARENT_TO_SUB(Transfer from master-account to sub-account),SUB_TO_PARENT(Transfer from sub-account to master-account) - to_user_id (str): Transfer in UserId, This is required when transferring master-account to sub-account. It is optional for internal transfers. - to_account_type (ToAccountTypeEnum): Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 - to_account_tag (str): Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT + amount (str): Transfer amount: The amount is a positive integer multiple of the currency precision. + from_user_id (str): Transfer out UserId: This is required when transferring from sub-account to master-account. It is optional for internal transfers. + from_account_type (FromAccountTypeEnum): Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 + from_account_tag (str): Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT + type (TypeEnum): Transfer type: INTERNAL (Transfer within account), PARENT_TO_SUB (Transfer from master-account to sub-account), SUB_TO_PARENT (Transfer from sub-account to master-account) + to_user_id (str): Transfer in UserId: This is required when transferring master-account to sub-account. It is optional for internal transfers. + to_account_type (ToAccountTypeEnum): Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 + to_account_tag (str): Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT """ class FromAccountTypeEnum(Enum): @@ -84,48 +84,48 @@ class ToAccountTypeEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits", + "Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits", alias="clientOid") currency: Optional[str] = Field(default=None, description="currency") amount: Optional[str] = Field( default=None, description= - "Transfer amount, the amount is a positive integer multiple of the currency precision." + "Transfer amount: The amount is a positive integer multiple of the currency precision." ) from_user_id: Optional[str] = Field( default=None, description= - "Transfer out UserId, This is required when transferring sub-account to master-account. It is optional for internal transfers.", + "Transfer out UserId: This is required when transferring from sub-account to master-account. It is optional for internal transfers.", alias="fromUserId") from_account_type: Optional[FromAccountTypeEnum] = Field( default=None, description= - "Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2", + "Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2", alias="fromAccountType") from_account_tag: Optional[str] = Field( default=None, description= - "Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT", + "Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT", alias="fromAccountTag") type: Optional[TypeEnum] = Field( default=None, description= - "Transfer type:INTERNAL(Transfer within account)、PARENT_TO_SUB(Transfer from master-account to sub-account),SUB_TO_PARENT(Transfer from sub-account to master-account)" + "Transfer type: INTERNAL (Transfer within account), PARENT_TO_SUB (Transfer from master-account to sub-account), SUB_TO_PARENT (Transfer from sub-account to master-account)" ) to_user_id: Optional[str] = Field( default=None, description= - "Transfer in UserId, This is required when transferring master-account to sub-account. It is optional for internal transfers.", + "Transfer in UserId: This is required when transferring master-account to sub-account. It is optional for internal transfers.", alias="toUserId") to_account_type: Optional[ToAccountTypeEnum] = Field( default=None, description= - "Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2", + "Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2", alias="toAccountType") to_account_tag: Optional[str] = Field( default=None, description= - "Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT", + "Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT", alias="toAccountTag") __properties: ClassVar[List[str]] = [ @@ -187,7 +187,7 @@ def __init__(self): def set_client_oid(self, value: str) -> FlexTransferReqBuilder: """ - Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits """ self.obj['clientOid'] = value return self @@ -201,14 +201,14 @@ def set_currency(self, value: str) -> FlexTransferReqBuilder: def set_amount(self, value: str) -> FlexTransferReqBuilder: """ - Transfer amount, the amount is a positive integer multiple of the currency precision. + Transfer amount: The amount is a positive integer multiple of the currency precision. """ self.obj['amount'] = value return self def set_from_user_id(self, value: str) -> FlexTransferReqBuilder: """ - Transfer out UserId, This is required when transferring sub-account to master-account. It is optional for internal transfers. + Transfer out UserId: This is required when transferring from sub-account to master-account. It is optional for internal transfers. """ self.obj['fromUserId'] = value return self @@ -217,14 +217,14 @@ def set_from_account_type( self, value: FlexTransferReq.FromAccountTypeEnum ) -> FlexTransferReqBuilder: """ - Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 + Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 """ self.obj['fromAccountType'] = value return self def set_from_account_tag(self, value: str) -> FlexTransferReqBuilder: """ - Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT + Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT """ self.obj['fromAccountTag'] = value return self @@ -232,14 +232,14 @@ def set_from_account_tag(self, value: str) -> FlexTransferReqBuilder: def set_type(self, value: FlexTransferReq.TypeEnum) -> FlexTransferReqBuilder: """ - Transfer type:INTERNAL(Transfer within account)、PARENT_TO_SUB(Transfer from master-account to sub-account),SUB_TO_PARENT(Transfer from sub-account to master-account) + Transfer type: INTERNAL (Transfer within account), PARENT_TO_SUB (Transfer from master-account to sub-account), SUB_TO_PARENT (Transfer from sub-account to master-account) """ self.obj['type'] = value return self def set_to_user_id(self, value: str) -> FlexTransferReqBuilder: """ - Transfer in UserId, This is required when transferring master-account to sub-account. It is optional for internal transfers. + Transfer in UserId: This is required when transferring master-account to sub-account. It is optional for internal transfers. """ self.obj['toUserId'] = value return self @@ -248,14 +248,14 @@ def set_to_account_type( self, value: FlexTransferReq.ToAccountTypeEnum ) -> FlexTransferReqBuilder: """ - Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2 + Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 """ self.obj['toAccountType'] = value return self def set_to_account_tag(self, value: str) -> FlexTransferReqBuilder: """ - Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT + Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT """ self.obj['toAccountTag'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_futures_account_transfer_in_req.py b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_futures_account_transfer_in_req.py index 266e4f19..31e2c6ed 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_futures_account_transfer_in_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_futures_account_transfer_in_req.py @@ -16,9 +16,9 @@ class FuturesAccountTransferInReq(BaseModel): FuturesAccountTransferInReq Attributes: - currency (str): Currency, including XBT,USDT... - amount (float): Amount to be transfered in - pay_account_type (PayAccountTypeEnum): Payment account type, including MAIN,TRADE + currency (str): Currency, including XBT, USDT... + amount (float): Amount to be transferred in + pay_account_type (PayAccountTypeEnum): Payment account type, including MAIN, TRADE """ class PayAccountTypeEnum(Enum): @@ -31,12 +31,12 @@ class PayAccountTypeEnum(Enum): TRADE = 'TRADE' currency: Optional[str] = Field( - default=None, description="Currency, including XBT,USDT...") + default=None, description="Currency, including XBT, USDT...") amount: Optional[float] = Field(default=None, - description="Amount to be transfered in") + description="Amount to be transferred in") pay_account_type: Optional[PayAccountTypeEnum] = Field( default=None, - description="Payment account type, including MAIN,TRADE", + description="Payment account type, including MAIN, TRADE", alias="payAccountType") __properties: ClassVar[List[str]] = [ @@ -92,14 +92,14 @@ def __init__(self): def set_currency(self, value: str) -> FuturesAccountTransferInReqBuilder: """ - Currency, including XBT,USDT... + Currency, including XBT, USDT... """ self.obj['currency'] = value return self def set_amount(self, value: float) -> FuturesAccountTransferInReqBuilder: """ - Amount to be transfered in + Amount to be transferred in """ self.obj['amount'] = value return self @@ -108,7 +108,7 @@ def set_pay_account_type( self, value: FuturesAccountTransferInReq.PayAccountTypeEnum ) -> FuturesAccountTransferInReqBuilder: """ - Payment account type, including MAIN,TRADE + Payment account type, including MAIN, TRADE """ self.obj['payAccountType'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_futures_account_transfer_out_req.py b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_futures_account_transfer_out_req.py index d1014769..972f9de3 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_futures_account_transfer_out_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_futures_account_transfer_out_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class FuturesAccountTransferOutReq(BaseModel): @@ -17,9 +16,9 @@ class FuturesAccountTransferOutReq(BaseModel): FuturesAccountTransferOutReq Attributes: - currency (str): Currency, including XBT,USDT... - amount (float): Amount to be transfered out, the maximum cannot exceed 1000000000 - rec_account_type (RecAccountTypeEnum): Receive account type, including MAIN,TRADE + currency (str): Currency, including XBT, USDT... + amount (float): Amount to be transferred out; cannot exceed 1000000000 + rec_account_type (RecAccountTypeEnum): Receive account type, including MAIN, TRADE """ class RecAccountTypeEnum(Enum): @@ -32,14 +31,13 @@ class RecAccountTypeEnum(Enum): TRADE = 'TRADE' currency: Optional[str] = Field( - default=None, description="Currency, including XBT,USDT...") - amount: Optional[Annotated[float, Field(le=1000000000)]] = Field( + default=None, description="Currency, including XBT, USDT...") + amount: Optional[float] = Field( default=None, - description= - "Amount to be transfered out, the maximum cannot exceed 1000000000") + description="Amount to be transferred out; cannot exceed 1000000000") rec_account_type: Optional[RecAccountTypeEnum] = Field( default=None, - description="Receive account type, including MAIN,TRADE", + description="Receive account type, including MAIN, TRADE", alias="recAccountType") __properties: ClassVar[List[str]] = [ @@ -96,14 +94,14 @@ def __init__(self): def set_currency(self, value: str) -> FuturesAccountTransferOutReqBuilder: """ - Currency, including XBT,USDT... + Currency, including XBT, USDT... """ self.obj['currency'] = value return self def set_amount(self, value: float) -> FuturesAccountTransferOutReqBuilder: """ - Amount to be transfered out, the maximum cannot exceed 1000000000 + Amount to be transferred out; cannot exceed 1000000000 """ self.obj['amount'] = value return self @@ -112,7 +110,7 @@ def set_rec_account_type( self, value: FuturesAccountTransferOutReq.RecAccountTypeEnum ) -> FuturesAccountTransferOutReqBuilder: """ - Receive account type, including MAIN,TRADE + Receive account type, including MAIN, TRADE """ self.obj['recAccountType'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_futures_account_transfer_out_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_futures_account_transfer_out_resp.py index 3570b631..1bd6e447 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_futures_account_transfer_out_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_futures_account_transfer_out_resp.py @@ -28,7 +28,7 @@ class FuturesAccountTransferOutResp(BaseModel, Response): rec_system (str): Receive system status (str): Status:APPLY, PROCESSING, PENDING_APPROVAL, APPROVED, REJECTED, PENDING_CANCEL, CANCEL, SUCCESS currency (str): Currency - amount (str): Transfer amout + amount (str): Transfer amount fee (str): Transfer fee sn (int): Serial number reason (str): Fail Reason @@ -69,7 +69,7 @@ class FuturesAccountTransferOutResp(BaseModel, Response): "Status:APPLY, PROCESSING, PENDING_APPROVAL, APPROVED, REJECTED, PENDING_CANCEL, CANCEL, SUCCESS" ) currency: Optional[str] = Field(default=None, description="Currency") - amount: Optional[str] = Field(default=None, description="Transfer amout") + amount: Optional[str] = Field(default=None, description="Transfer amount") fee: Optional[str] = Field(default=None, description="Transfer fee") sn: Optional[int] = Field(default=None, description="Serial number") reason: Optional[str] = Field(default=None, description="Fail Reason") diff --git a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_futures_account_transfer_out_ledger_items.py b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_futures_account_transfer_out_ledger_items.py index 74ae4923..a6bd6699 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_futures_account_transfer_out_ledger_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_futures_account_transfer_out_ledger_items.py @@ -22,7 +22,7 @@ class GetFuturesAccountTransferOutLedgerItems(BaseModel): rec_system (str): Receive system status (StatusEnum): Status PROCESSING, SUCCESS, FAILURE amount (str): Transaction amount - reason (str): Reason caused the failure + reason (str): Reason for the failure offset (int): Offset created_at (int): Request application time remark (str): User remark @@ -54,7 +54,7 @@ class StatusEnum(Enum): amount: Optional[str] = Field(default=None, description="Transaction amount") reason: Optional[str] = Field(default=None, - description="Reason caused the failure") + description="Reason for the failure") offset: Optional[int] = Field(default=None, description="Offset") created_at: Optional[int] = Field(default=None, description="Request application time", diff --git a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_futures_account_transfer_out_ledger_req.py b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_futures_account_transfer_out_ledger_req.py index 8e93c0bd..64f658ea 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_futures_account_transfer_out_ledger_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_futures_account_transfer_out_ledger_req.py @@ -19,10 +19,10 @@ class GetFuturesAccountTransferOutLedgerReq(BaseModel): currency (str): currency type (TypeEnum): Status PROCESSING, SUCCESS, FAILURE tag (list[str]): Status List PROCESSING, SUCCESS, FAILURE - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) - current_page (int): Current request page, The default currentPage is 1 - page_size (int): pageSize, The default pageSize is 50 + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) + current_page (int): Current request page. The default currentPage is 1 + page_size (int): pageSize; the default pageSize is 50 """ class TypeEnum(Enum): @@ -44,18 +44,18 @@ class TypeEnum(Enum): tag: Optional[List[str]] = Field( default=None, description="Status List PROCESSING, SUCCESS, FAILURE") start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") current_page: Optional[int] = Field( default=1, - description="Current request page, The default currentPage is 1", + description="Current request page. The default currentPage is 1", alias="currentPage") page_size: Optional[int] = Field( default=50, - description="pageSize, The default pageSize is 50", + description="pageSize; the default pageSize is 50", alias="pageSize") __properties: ClassVar[List[str]] = [ @@ -152,7 +152,7 @@ def set_tag( def set_start_at( self, value: int) -> GetFuturesAccountTransferOutLedgerReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self @@ -160,7 +160,7 @@ def set_start_at( def set_end_at(self, value: int) -> GetFuturesAccountTransferOutLedgerReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self @@ -168,7 +168,7 @@ def set_end_at(self, def set_current_page( self, value: int) -> GetFuturesAccountTransferOutLedgerReqBuilder: """ - Current request page, The default currentPage is 1 + Current request page. The default currentPage is 1 """ self.obj['currentPage'] = value return self @@ -176,7 +176,7 @@ def set_current_page( def set_page_size( self, value: int) -> GetFuturesAccountTransferOutLedgerReqBuilder: """ - pageSize, The default pageSize is 50 + pageSize; the default pageSize is 50 """ self.obj['pageSize'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_futures_account_transfer_out_ledger_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_futures_account_transfer_out_ledger_resp.py index 6a9bd65b..5e8eb0ce 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_futures_account_transfer_out_ledger_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_futures_account_transfer_out_ledger_resp.py @@ -21,7 +21,7 @@ class GetFuturesAccountTransferOutLedgerResp(BaseModel, Response): current_page (int): current page page_size (int): page size total_num (int): total number - total_page (int): total page + total_page (int): total pages items (list[GetFuturesAccountTransferOutLedgerItems]): """ @@ -37,7 +37,7 @@ class GetFuturesAccountTransferOutLedgerResp(BaseModel, Response): description="total number", alias="totalNum") total_page: Optional[int] = Field(default=None, - description="total page", + description="total pages", alias="totalPage") items: Optional[List[GetFuturesAccountTransferOutLedgerItems]] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_transfer_quotas_req.py b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_transfer_quotas_req.py index e6a9df3c..279425c5 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_transfer_quotas_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_get_transfer_quotas_req.py @@ -17,8 +17,8 @@ class GetTransferQuotasReq(BaseModel): Attributes: currency (str): currency - type (TypeEnum): The account type:MAIN、TRADE、MARGIN、ISOLATED - tag (str): Trading pair, required when the account type is ISOLATED; other types are not passed, e.g.: BTC-USDT + type (TypeEnum): The account type:MAIN, TRADE, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 + tag (str): Trading pair required when the account type is ISOLATED; other types do not pass, e.g.: BTC-USDT """ class TypeEnum(Enum): @@ -26,24 +26,30 @@ class TypeEnum(Enum): Attributes: MAIN: Funding account TRADE: Spot account - MARGIN: Cross margin account - ISOLATED: Isolated margin account + MARGIN: Spot cross margin account + ISOLATED: Spot isolated margin account OPTION: Option account + MARGIN_V2: Spot cross margin HF account + ISOLATED_V2: Spot isolated margin HF account """ MAIN = 'MAIN' TRADE = 'TRADE' MARGIN = 'MARGIN' ISOLATED = 'ISOLATED' OPTION = 'OPTION' + MARGIN_V2 = 'MARGIN_V2' + ISOLATED_V2 = 'ISOLATED_V2' currency: Optional[str] = Field(default=None, description="currency") type: Optional[TypeEnum] = Field( default=None, - description="The account type:MAIN、TRADE、MARGIN、ISOLATED") + description= + "The account type:MAIN, TRADE, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2" + ) tag: Optional[str] = Field( default='BTC-USDT', description= - "Trading pair, required when the account type is ISOLATED; other types are not passed, e.g.: BTC-USDT" + "Trading pair required when the account type is ISOLATED; other types do not pass, e.g.: BTC-USDT" ) __properties: ClassVar[List[str]] = ["currency", "type", "tag"] @@ -108,14 +114,14 @@ def set_type( self, value: GetTransferQuotasReq.TypeEnum ) -> GetTransferQuotasReqBuilder: """ - The account type:MAIN、TRADE、MARGIN、ISOLATED + The account type:MAIN, TRADE, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 """ self.obj['type'] = value return self def set_tag(self, value: str) -> GetTransferQuotasReqBuilder: """ - Trading pair, required when the account type is ISOLATED; other types are not passed, e.g.: BTC-USDT + Trading pair required when the account type is ISOLATED; other types do not pass, e.g.: BTC-USDT """ self.obj['tag'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_inner_transfer_req.py b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_inner_transfer_req.py index c8ef5b17..03a61b0e 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_inner_transfer_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_inner_transfer_req.py @@ -16,9 +16,9 @@ class InnerTransferReq(BaseModel): InnerTransferReq Attributes: - client_oid (str): Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + client_oid (str): Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits currency (str): currency - amount (str): Transfer amount, the amount is a positive integer multiple of the currency precision. + amount (str): Transfer amount: The amount is a positive integer multiple of the currency precision. to (ToEnum): Receiving Account Type: main, trade, margin, isolated, margin_v2, isolated_v2, contract from_tag (str): Trading pair, required when the payment account type is isolated, e.g.: BTC-USDT to_tag (str): Trading pair, required when the payment account type is isolated, e.g.: BTC-USDT @@ -66,13 +66,13 @@ class FromEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits", + "Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits", alias="clientOid") currency: Optional[str] = Field(default=None, description="currency") amount: Optional[str] = Field( default=None, description= - "Transfer amount, the amount is a positive integer multiple of the currency precision." + "Transfer amount: The amount is a positive integer multiple of the currency precision." ) to: Optional[ToEnum] = Field( default=None, @@ -150,7 +150,7 @@ def __init__(self): def set_client_oid(self, value: str) -> InnerTransferReqBuilder: """ - Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits """ self.obj['clientOid'] = value return self @@ -164,7 +164,7 @@ def set_currency(self, value: str) -> InnerTransferReqBuilder: def set_amount(self, value: str) -> InnerTransferReqBuilder: """ - Transfer amount, the amount is a positive integer multiple of the currency precision. + Transfer amount: The amount is a positive integer multiple of the currency precision. """ self.obj['amount'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_sub_account_transfer_req.py b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_sub_account_transfer_req.py index ee59d5eb..73540b1f 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_sub_account_transfer_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/transfer/model_sub_account_transfer_req.py @@ -16,13 +16,15 @@ class SubAccountTransferReq(BaseModel): SubAccountTransferReq Attributes: - client_oid (str): Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + client_oid (str): Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits currency (str): currency - amount (str): Transfer amount, the amount is a positive integer multiple of the currency precision. - direction (DirectionEnum): OUT — the master user to sub user IN — the sub user to the master user. - account_type (AccountTypeEnum): Account type:MAIN、TRADE、CONTRACT、MARGIN - sub_account_type (SubAccountTypeEnum): Sub Account type:MAIN、TRADE、CONTRACT、MARGIN + amount (str): Transfer amount: The amount is a positive integer multiple of the currency precision. + direction (DirectionEnum): OUT — the master user to sub user IN — the sub user to the master user + account_type (AccountTypeEnum): Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED + sub_account_type (SubAccountTypeEnum): Sub-account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED sub_user_id (str): the user ID of a sub-account. + tag (str): Need to be defined if accountType=ISOLATED. + sub_tag (str): Need to be defined if subAccountType=ISOLATED. """ class DirectionEnum(Enum): @@ -65,35 +67,42 @@ class SubAccountTypeEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits", + "Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits", alias="clientOid") currency: Optional[str] = Field(default=None, description="currency") amount: Optional[str] = Field( default=None, description= - "Transfer amount, the amount is a positive integer multiple of the currency precision." + "Transfer amount: The amount is a positive integer multiple of the currency precision." ) direction: Optional[DirectionEnum] = Field( default=None, description= - "OUT — the master user to sub user IN — the sub user to the master user." + "OUT — the master user to sub user IN — the sub user to the master user" ) account_type: Optional[AccountTypeEnum] = Field( default=AccountTypeEnum.MAIN, - description="Account type:MAIN、TRADE、CONTRACT、MARGIN", + description="Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED", alias="accountType") sub_account_type: Optional[SubAccountTypeEnum] = Field( default=SubAccountTypeEnum.MAIN, - description="Sub Account type:MAIN、TRADE、CONTRACT、MARGIN", + description="Sub-account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED", alias="subAccountType") sub_user_id: Optional[str] = Field( default=None, description="the user ID of a sub-account.", alias="subUserId") + tag: Optional[str] = Field( + default=None, + description=" Need to be defined if accountType=ISOLATED.") + sub_tag: Optional[str] = Field( + default=None, + description=" Need to be defined if subAccountType=ISOLATED.", + alias="subTag") __properties: ClassVar[List[str]] = [ "clientOid", "currency", "amount", "direction", "accountType", - "subAccountType", "subUserId" + "subAccountType", "subUserId", "tag", "subTag" ] model_config = ConfigDict( @@ -145,7 +154,11 @@ def from_dict( obj.get("subAccountType") if obj.get("subAccountType") is not None else SubAccountTransferReq.SubAccountTypeEnum.MAIN, "subUserId": - obj.get("subUserId") + obj.get("subUserId"), + "tag": + obj.get("tag"), + "subTag": + obj.get("subTag") }) return _obj @@ -157,7 +170,7 @@ def __init__(self): def set_client_oid(self, value: str) -> SubAccountTransferReqBuilder: """ - Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits + Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits """ self.obj['clientOid'] = value return self @@ -171,7 +184,7 @@ def set_currency(self, value: str) -> SubAccountTransferReqBuilder: def set_amount(self, value: str) -> SubAccountTransferReqBuilder: """ - Transfer amount, the amount is a positive integer multiple of the currency precision. + Transfer amount: The amount is a positive integer multiple of the currency precision. """ self.obj['amount'] = value return self @@ -180,7 +193,7 @@ def set_direction( self, value: SubAccountTransferReq.DirectionEnum ) -> SubAccountTransferReqBuilder: """ - OUT — the master user to sub user IN — the sub user to the master user. + OUT — the master user to sub user IN — the sub user to the master user """ self.obj['direction'] = value return self @@ -189,7 +202,7 @@ def set_account_type( self, value: SubAccountTransferReq.AccountTypeEnum ) -> SubAccountTransferReqBuilder: """ - Account type:MAIN、TRADE、CONTRACT、MARGIN + Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED """ self.obj['accountType'] = value return self @@ -198,7 +211,7 @@ def set_sub_account_type( self, value: SubAccountTransferReq.SubAccountTypeEnum ) -> SubAccountTransferReqBuilder: """ - Sub Account type:MAIN、TRADE、CONTRACT、MARGIN + Sub-account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED """ self.obj['subAccountType'] = value return self @@ -210,5 +223,19 @@ def set_sub_user_id(self, value: str) -> SubAccountTransferReqBuilder: self.obj['subUserId'] = value return self + def set_tag(self, value: str) -> SubAccountTransferReqBuilder: + """ + Need to be defined if accountType=ISOLATED. + """ + self.obj['tag'] = value + return self + + def set_sub_tag(self, value: str) -> SubAccountTransferReqBuilder: + """ + Need to be defined if subAccountType=ISOLATED. + """ + self.obj['subTag'] = value + return self + def build(self) -> SubAccountTransferReq: return SubAccountTransferReq(**self.obj) diff --git a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/api_withdrawal.py b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/api_withdrawal.py index c3c43d0c..2a261872 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/api_withdrawal.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/api_withdrawal.py @@ -25,17 +25,17 @@ def get_withdrawal_quotas(self, req: GetWithdrawalQuotasReq, **kwargs: Any) -> GetWithdrawalQuotasResp: """ summary: Get Withdrawal Quotas - description: This interface can obtain the withdrawal quotas information of this currency. + description: This interface can obtain the withdrawal quota information of this currency. documentation: https://www.kucoin.com/docs-new/api-3470143 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -43,18 +43,18 @@ def get_withdrawal_quotas(self, req: GetWithdrawalQuotasReq, def withdrawal_v3(self, req: WithdrawalV3Req, **kwargs: Any) -> WithdrawalV3Resp: """ - summary: Withdraw(V3) - description: Use this interface to withdraw the specified currency + summary: Withdraw (V3) + description: Use this interface to withdraw the specified currency. documentation: https://www.kucoin.com/docs-new/api-3470146 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | WITHDRAWAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 5 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | WITHDRAWAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+------------+ """ pass @@ -63,17 +63,17 @@ def cancel_withdrawal(self, req: CancelWithdrawalReq, **kwargs: Any) -> CancelWithdrawalResp: """ summary: Cancel Withdrawal - description: This interface can cancel the withdrawal, Only withdrawals requests of PROCESSING status could be canceled. + description: This interface can cancel the withdrawal. Only withdrawal requests with PROCESSING status can be canceled. documentation: https://www.kucoin.com/docs-new/api-3470144 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | WITHDRAWAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | WITHDRAWAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -82,17 +82,17 @@ def get_withdrawal_history(self, req: GetWithdrawalHistoryReq, **kwargs: Any) -> GetWithdrawalHistoryResp: """ summary: Get Withdrawal History - description: Request via this endpoint to get deposit list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. + description: Request a withdrawal list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. documentation: https://www.kucoin.com/docs-new/api-3470145 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -103,17 +103,17 @@ def get_withdrawal_history_old( **kwargs: Any) -> GetWithdrawalHistoryOldResp: """ summary: Get Withdrawal History - Old - description: Request via this endpoint to get deposit list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. + description: Request a deposit list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. documentation: https://www.kucoin.com/docs-new/api-3470308 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 20 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -123,17 +123,17 @@ def withdrawal_v1(self, req: WithdrawalV1Req, **kwargs: Any) -> WithdrawalV1Resp: """ summary: Withdraw - V1 - description: Use this interface to withdraw the specified currency + description: Use this interface to withdraw the specified currency. documentation: https://www.kucoin.com/docs-new/api-3470310 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | WITHDRAWAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 5 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | WITHDRAWAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+------------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/api_withdrawal.template b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/api_withdrawal.template index 89ca8487..d880fcff 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/api_withdrawal.template +++ b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/api_withdrawal.template @@ -23,7 +23,7 @@ def test_get_withdrawal_quotas_req(self): def test_withdrawal_v3_req(self): """ withdrawal_v3 - Withdraw(V3) + Withdraw (V3) /api/v3/withdrawals """ diff --git a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/api_withdrawal_test.py b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/api_withdrawal_test.py index df40dd3e..ada09f05 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/api_withdrawal_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/api_withdrawal_test.py @@ -39,7 +39,7 @@ def test_get_withdrawal_quotas_resp_model(self): def test_withdrawal_v3_req_model(self): """ withdrawal_v3 - Withdraw(V3) + Withdraw (V3) /api/v3/withdrawals """ data = "{\"currency\": \"USDT\", \"toAddress\": \"TKFRQXSDcY****GmLrjJggwX8\", \"amount\": 3, \"withdrawType\": \"ADDRESS\", \"chain\": \"trx\", \"isInner\": true, \"remark\": \"this is Remark\"}" @@ -48,7 +48,7 @@ def test_withdrawal_v3_req_model(self): def test_withdrawal_v3_resp_model(self): """ withdrawal_v3 - Withdraw(V3) + Withdraw (V3) /api/v3/withdrawals """ data = "{\"code\":\"200000\",\"data\":{\"withdrawalId\":\"670deec84d64da0007d7c946\"}}" diff --git a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_items.py b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_items.py index 499cbf6e..760fb9bf 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_items.py @@ -16,39 +16,45 @@ class GetWithdrawalHistoryItems(BaseModel): GetWithdrawalHistoryItems Attributes: - id (str): Unique id + id (str): Unique ID currency (str): Currency chain (str): The id of currency - status (StatusEnum): Status + status (StatusEnum): Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE address (str): Deposit address memo (str): Address remark. If there’s no remark, it is empty. is_inner (bool): Internal deposit or not amount (str): Deposit amount fee (str): Fees charged for deposit wallet_tx_id (str): Wallet Txid - created_at (int): Creation time of the database record + created_at (int): Database record creation time updated_at (int): Update time of the database record - remark (str): remark + remark (str): Remark """ class StatusEnum(Enum): """ Attributes: + REVIEW: PROCESSING: WALLET_PROCESSING: - SUCCESS: FAILURE: + SUCCESS: """ + REVIEW = 'REVIEW' PROCESSING = 'PROCESSING' WALLET_PROCESSING = 'WALLET_PROCESSING' - SUCCESS = 'SUCCESS' FAILURE = 'FAILURE' + SUCCESS = 'SUCCESS' - id: Optional[str] = Field(default=None, description="Unique id") + id: Optional[str] = Field(default=None, description="Unique ID") currency: Optional[str] = Field(default=None, description="Currency") chain: Optional[str] = Field(default=None, description="The id of currency") - status: Optional[StatusEnum] = Field(default=None, description="Status") + status: Optional[StatusEnum] = Field( + default=None, + description= + "Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE" + ) address: Optional[str] = Field(default=None, description="Deposit address") memo: Optional[str] = Field( default=None, @@ -64,13 +70,13 @@ class StatusEnum(Enum): alias="walletTxId") created_at: Optional[int] = Field( default=None, - description="Creation time of the database record", + description="Database record creation time", alias="createdAt") updated_at: Optional[int] = Field( default=None, description="Update time of the database record", alias="updatedAt") - remark: Optional[str] = Field(default=None, description="remark") + remark: Optional[str] = Field(default=None, description="Remark") __properties: ClassVar[List[str]] = [ "id", "currency", "chain", "status", "address", "memo", "isInner", diff --git a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_old_items.py b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_old_items.py index 9a298659..f62c0373 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_old_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_old_items.py @@ -17,7 +17,7 @@ class GetWithdrawalHistoryOldItems(BaseModel): Attributes: currency (str): Currency - create_at (int): Creation time of the database record + create_at (int): Database record creation time amount (str): Withdrawal amount address (str): Withdrawal address wallet_tx_id (str): Wallet Txid @@ -39,7 +39,7 @@ class StatusEnum(Enum): currency: Optional[str] = Field(default=None, description="Currency") create_at: Optional[int] = Field( default=None, - description="Creation time of the database record", + description="Database record creation time", alias="createAt") amount: Optional[str] = Field(default=None, description="Withdrawal amount") diff --git a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_old_req.py b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_old_req.py index 1dc12883..22a4548c 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_old_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_old_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetWithdrawalHistoryOldReq(BaseModel): @@ -19,8 +18,8 @@ class GetWithdrawalHistoryOldReq(BaseModel): Attributes: currency (str): currency status (StatusEnum): Status. Available value: PROCESSING, SUCCESS, and FAILURE - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) current_page (int): Current request page. page_size (int): Number of results per request. Minimum is 10, maximum is 500. """ @@ -42,20 +41,19 @@ class StatusEnum(Enum): description="Status. Available value: PROCESSING, SUCCESS, and FAILURE" ) start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") current_page: Optional[int] = Field(default=1, description="Current request page.", alias="currentPage") - page_size: Optional[Annotated[ - int, Field(le=500, strict=True, ge=10)]] = Field( - default=50, - description= - "Number of results per request. Minimum is 10, maximum is 500.", - alias="pageSize") + page_size: Optional[int] = Field( + default=50, + description= + "Number of results per request. Minimum is 10, maximum is 500.", + alias="pageSize") __properties: ClassVar[List[str]] = [ "currency", "status", "startAt", "endAt", "currentPage", "pageSize" @@ -136,14 +134,14 @@ def set_status( def set_start_at(self, value: int) -> GetWithdrawalHistoryOldReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetWithdrawalHistoryOldReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_old_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_old_resp.py index 4bc6481b..70357a96 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_old_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_old_resp.py @@ -21,7 +21,7 @@ class GetWithdrawalHistoryOldResp(BaseModel, Response): current_page (int): current page page_size (int): page size total_num (int): total number - total_page (int): total page + total_page (int): total pages items (list[GetWithdrawalHistoryOldItems]): """ @@ -37,7 +37,7 @@ class GetWithdrawalHistoryOldResp(BaseModel, Response): description="total number", alias="totalNum") total_page: Optional[int] = Field(default=None, - description="total page", + description="total pages", alias="totalPage") items: Optional[List[GetWithdrawalHistoryOldItems]] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_req.py b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_req.py index 9bc0db7c..96880553 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetWithdrawalHistoryReq(BaseModel): @@ -18,9 +17,9 @@ class GetWithdrawalHistoryReq(BaseModel): Attributes: currency (str): currency - status (StatusEnum): Status. Available value: PROCESSING, WALLET_PROCESSING, SUCCESS, and FAILURE - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) + status (StatusEnum): Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) current_page (int): Current request page. page_size (int): Number of results per request. Minimum is 10, maximum is 500. """ @@ -29,11 +28,13 @@ class StatusEnum(Enum): """ Attributes: PROCESSING: + REVIEW: WALLET_PROCESSING: SUCCESS: FAILURE: """ PROCESSING = 'PROCESSING' + REVIEW = 'REVIEW' WALLET_PROCESSING = 'WALLET_PROCESSING' SUCCESS = 'SUCCESS' FAILURE = 'FAILURE' @@ -42,23 +43,22 @@ class StatusEnum(Enum): status: Optional[StatusEnum] = Field( default=None, description= - "Status. Available value: PROCESSING, WALLET_PROCESSING, SUCCESS, and FAILURE" + "Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE" ) start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") current_page: Optional[int] = Field(default=1, description="Current request page.", alias="currentPage") - page_size: Optional[Annotated[ - int, Field(le=500, strict=True, ge=10)]] = Field( - default=50, - description= - "Number of results per request. Minimum is 10, maximum is 500.", - alias="pageSize") + page_size: Optional[int] = Field( + default=50, + description= + "Number of results per request. Minimum is 10, maximum is 500.", + alias="pageSize") __properties: ClassVar[List[str]] = [ "currency", "status", "startAt", "endAt", "currentPage", "pageSize" @@ -132,21 +132,21 @@ def set_status( self, value: GetWithdrawalHistoryReq.StatusEnum ) -> GetWithdrawalHistoryReqBuilder: """ - Status. Available value: PROCESSING, WALLET_PROCESSING, SUCCESS, and FAILURE + Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE """ self.obj['status'] = value return self def set_start_at(self, value: int) -> GetWithdrawalHistoryReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetWithdrawalHistoryReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_resp.py index dea2a859..d70fcc67 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_history_resp.py @@ -21,7 +21,7 @@ class GetWithdrawalHistoryResp(BaseModel, Response): current_page (int): current page page_size (int): page size total_num (int): total number - total_page (int): total page + total_page (int): total pages items (list[GetWithdrawalHistoryItems]): """ @@ -37,7 +37,7 @@ class GetWithdrawalHistoryResp(BaseModel, Response): description="total number", alias="totalNum") total_page: Optional[int] = Field(default=None, - description="total page", + description="total pages", alias="totalPage") items: Optional[List[GetWithdrawalHistoryItems]] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_quotas_req.py b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_quotas_req.py index 04c1b848..1050f9db 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_quotas_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_quotas_req.py @@ -16,14 +16,14 @@ class GetWithdrawalQuotasReq(BaseModel): Attributes: currency (str): currency - chain (str): The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + chain (str): The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. """ currency: Optional[str] = Field(default=None, description="currency") chain: Optional[str] = Field( default='eth', description= - "The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency." + "The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies." ) __properties: ClassVar[List[str]] = ["currency", "chain"] @@ -84,7 +84,7 @@ def set_currency(self, value: str) -> GetWithdrawalQuotasReqBuilder: def set_chain(self, value: str) -> GetWithdrawalQuotasReqBuilder: """ - The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency. + The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. """ self.obj['chain'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_quotas_resp.py b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_quotas_resp.py index b59a1110..03688297 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_quotas_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_get_withdrawal_quotas_resp.py @@ -20,18 +20,18 @@ class GetWithdrawalQuotasResp(BaseModel, Response): currency (str): limit_btc_amount (str): used_btc_amount (str): - quota_currency (str): withdrawal limit currency - limit_quota_currency_amount (str): The intraday available withdrawal amount(withdrawal limit currency) - used_quota_currency_amount (str): The intraday cumulative withdrawal amount(withdrawal limit currency) + quota_currency (str): Withdrawal limit currency + limit_quota_currency_amount (str): The intraday available withdrawal amount (withdrawal limit currency) + used_quota_currency_amount (str): The intraday cumulative withdrawal amount (withdrawal limit currency) remain_amount (str): Remaining amount available to withdraw the current day available_amount (str): Current available withdrawal amount withdraw_min_fee (str): Minimum withdrawal fee inner_withdraw_min_fee (str): Fees for internal withdrawal withdraw_min_size (str): Minimum withdrawal amount - is_withdraw_enabled (bool): Is the withdraw function enabled or not + is_withdraw_enabled (bool): Is the withdraw function enabled? precision (int): Floating point precision. chain (str): The chainName of currency - reason (str): Reasons for restriction, Usually empty + reason (str): Reasons for restriction. Usually empty. locked_amount (str): Total locked amount (including the amount locked into USDT for each currency) """ @@ -43,17 +43,17 @@ class GetWithdrawalQuotasResp(BaseModel, Response): used_btc_amount: Optional[str] = Field(default=None, alias="usedBTCAmount") quota_currency: Optional[str] = Field( default=None, - description="withdrawal limit currency", + description="Withdrawal limit currency", alias="quotaCurrency") limit_quota_currency_amount: Optional[str] = Field( default=None, description= - "The intraday available withdrawal amount(withdrawal limit currency)", + "The intraday available withdrawal amount (withdrawal limit currency)", alias="limitQuotaCurrencyAmount") used_quota_currency_amount: Optional[str] = Field( default=None, description= - "The intraday cumulative withdrawal amount(withdrawal limit currency)", + "The intraday cumulative withdrawal amount (withdrawal limit currency)", alias="usedQuotaCurrencyAmount") remain_amount: Optional[str] = Field( default=None, @@ -77,14 +77,14 @@ class GetWithdrawalQuotasResp(BaseModel, Response): alias="withdrawMinSize") is_withdraw_enabled: Optional[bool] = Field( default=None, - description="Is the withdraw function enabled or not", + description="Is the withdraw function enabled?", alias="isWithdrawEnabled") precision: Optional[int] = Field(default=None, description="Floating point precision.") chain: Optional[str] = Field(default=None, description="The chainName of currency") reason: Optional[str] = Field( - default=None, description="Reasons for restriction, Usually empty") + default=None, description="Reasons for restriction. Usually empty.") locked_amount: Optional[str] = Field( default=None, description= diff --git a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_withdrawal_v1_req.py b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_withdrawal_v1_req.py index de37eae7..fcd2e652 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_withdrawal_v1_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_withdrawal_v1_req.py @@ -16,20 +16,20 @@ class WithdrawalV1Req(BaseModel): Attributes: currency (str): currency - chain (str): The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. + chain (str): The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. address (str): Withdrawal address amount (int): Withdrawal amount, a positive number which is a multiple of the amount precision - memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. - is_inner (bool): Internal withdrawal or not. Default : false - remark (str): remark - fee_deduct_type (str): Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. + memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. + is_inner (bool): Internal withdrawal or not. Default: False + remark (str): Remark + fee_deduct_type (str): Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. """ currency: Optional[str] = Field(default=None, description="currency") chain: Optional[str] = Field( default='eth', description= - "The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface." + "The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface." ) address: Optional[str] = Field(default=None, description="Withdrawal address") @@ -41,17 +41,17 @@ class WithdrawalV1Req(BaseModel): memo: Optional[str] = Field( default=None, description= - "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious." + "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available." ) is_inner: Optional[bool] = Field( default=False, - description="Internal withdrawal or not. Default : false", + description="Internal withdrawal or not. Default: False", alias="isInner") - remark: Optional[str] = Field(default=None, description="remark") + remark: Optional[str] = Field(default=None, description="Remark") fee_deduct_type: Optional[str] = Field( default=None, description= - "Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC.", + "Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC.", alias="feeDeductType") __properties: ClassVar[List[str]] = [ @@ -126,7 +126,7 @@ def set_currency(self, value: str) -> WithdrawalV1ReqBuilder: def set_chain(self, value: str) -> WithdrawalV1ReqBuilder: """ - The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. + The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. """ self.obj['chain'] = value return self @@ -147,28 +147,28 @@ def set_amount(self, value: int) -> WithdrawalV1ReqBuilder: def set_memo(self, value: str) -> WithdrawalV1ReqBuilder: """ - Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. """ self.obj['memo'] = value return self def set_is_inner(self, value: bool) -> WithdrawalV1ReqBuilder: """ - Internal withdrawal or not. Default : false + Internal withdrawal or not. Default: False """ self.obj['isInner'] = value return self def set_remark(self, value: str) -> WithdrawalV1ReqBuilder: """ - remark + Remark """ self.obj['remark'] = value return self def set_fee_deduct_type(self, value: str) -> WithdrawalV1ReqBuilder: """ - Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. + Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. """ self.obj['feeDeductType'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_withdrawal_v3_req.py b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_withdrawal_v3_req.py index 52aea7d8..97a05a0f 100644 --- a/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_withdrawal_v3_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/account/withdrawal/model_withdrawal_v3_req.py @@ -17,14 +17,14 @@ class WithdrawalV3Req(BaseModel): Attributes: currency (str): currency - chain (str): The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. + chain (str): The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. amount (int): Withdrawal amount, a positive number which is a multiple of the amount precision - memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. - is_inner (bool): Internal withdrawal or not. Default : false - remark (str): remark - fee_deduct_type (str): Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. + memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. + is_inner (bool): Internal withdrawal or not. Default: False + remark (str): Remark + fee_deduct_type (str): Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. to_address (str): Withdrawal address - withdraw_type (WithdrawTypeEnum): Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will have rate limited: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) + withdraw_type (WithdrawTypeEnum): Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will be rate limits: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) """ class WithdrawTypeEnum(Enum): @@ -44,7 +44,7 @@ class WithdrawTypeEnum(Enum): chain: Optional[str] = Field( default='eth', description= - "The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface." + "The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface." ) amount: Optional[int] = Field( default=None, @@ -54,17 +54,17 @@ class WithdrawTypeEnum(Enum): memo: Optional[str] = Field( default=None, description= - "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious." + "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available." ) is_inner: Optional[bool] = Field( default=False, - description="Internal withdrawal or not. Default : false", + description="Internal withdrawal or not. Default: False", alias="isInner") - remark: Optional[str] = Field(default=None, description="remark") + remark: Optional[str] = Field(default=None, description="Remark") fee_deduct_type: Optional[str] = Field( default=None, description= - "Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC.", + "Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC.", alias="feeDeductType") to_address: Optional[str] = Field(default=None, description="Withdrawal address", @@ -72,7 +72,7 @@ class WithdrawTypeEnum(Enum): withdraw_type: Optional[WithdrawTypeEnum] = Field( default=None, description= - "Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will have rate limited: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time)", + "Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will be rate limits: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time)", alias="withdrawType") __properties: ClassVar[List[str]] = [ @@ -149,7 +149,7 @@ def set_currency(self, value: str) -> WithdrawalV3ReqBuilder: def set_chain(self, value: str) -> WithdrawalV3ReqBuilder: """ - The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. + The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface. """ self.obj['chain'] = value return self @@ -163,28 +163,28 @@ def set_amount(self, value: int) -> WithdrawalV3ReqBuilder: def set_memo(self, value: str) -> WithdrawalV3ReqBuilder: """ - Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. """ self.obj['memo'] = value return self def set_is_inner(self, value: bool) -> WithdrawalV3ReqBuilder: """ - Internal withdrawal or not. Default : false + Internal withdrawal or not. Default: False """ self.obj['isInner'] = value return self def set_remark(self, value: str) -> WithdrawalV3ReqBuilder: """ - remark + Remark """ self.obj['remark'] = value return self def set_fee_deduct_type(self, value: str) -> WithdrawalV3ReqBuilder: """ - Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified 1. INTERNAL- deduct the transaction fees from your withdrawal amount 2. EXTERNAL- deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. + Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified 1. INTERNAL: Deduct the transaction fees from your withdrawal amount 2. EXTERNAL: Deduct the transaction fees from your main account 3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC. """ self.obj['feeDeductType'] = value return self @@ -200,7 +200,7 @@ def set_withdraw_type( self, value: WithdrawalV3Req.WithdrawTypeEnum) -> WithdrawalV3ReqBuilder: """ - Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will have rate limited: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) + Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will be rate limits: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time) """ self.obj['withdrawType'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/affiliate/affiliate/api_affiliate.py b/sdk/python/kucoin_universal_sdk/generate/affiliate/affiliate/api_affiliate.py index 920bb4ba..0dd04f69 100644 --- a/sdk/python/kucoin_universal_sdk/generate/affiliate/affiliate/api_affiliate.py +++ b/sdk/python/kucoin_universal_sdk/generate/affiliate/affiliate/api_affiliate.py @@ -12,17 +12,17 @@ class AffiliateAPI(ABC): def get_account(self, **kwargs: Any) -> GetAccountResp: """ summary: Get Account - description: This endpoint allows getting affiliate user rebate information. + description: Affiliate user rebate information can be obtained at this endpoint. documentation: https://www.kucoin.com/docs-new/api-3470279 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 30 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 30 | + +-----------------------+------------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/affiliate/affiliate/model_get_account_margins.py b/sdk/python/kucoin_universal_sdk/generate/affiliate/affiliate/model_get_account_margins.py index 8151eac8..c43616a2 100644 --- a/sdk/python/kucoin_universal_sdk/generate/affiliate/affiliate/model_get_account_margins.py +++ b/sdk/python/kucoin_universal_sdk/generate/affiliate/affiliate/model_get_account_margins.py @@ -17,7 +17,7 @@ class GetAccountMargins(BaseModel): Attributes: margin_ccy (str): Margin Currency margin_qty (str): Maintenance Quantity (Calculated with Margin Coefficient) - margin_factor (str): Margin Coefficient return real time margin discount rate to USDT + margin_factor (str): Margin Coefficient return real-time margin discount rate to USDT """ margin_ccy: Optional[str] = Field(default=None, @@ -30,7 +30,7 @@ class GetAccountMargins(BaseModel): margin_factor: Optional[str] = Field( default=None, description= - "Margin Coefficient return real time margin discount rate to USDT", + "Margin Coefficient return real-time margin discount rate to USDT", alias="marginFactor") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/apibroker/api_api_broker.py b/sdk/python/kucoin_universal_sdk/generate/broker/apibroker/api_api_broker.py index d30bfa5c..6c4f96f5 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/apibroker/api_api_broker.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/apibroker/api_api_broker.py @@ -13,17 +13,17 @@ class APIBrokerAPI(ABC): def get_rebase(self, req: GetRebaseReq, **kwargs: Any) -> GetRebaseResp: """ summary: Get Broker Rebate - description: This interface supports downloading Broker rebate orders + description: This interface supports the downloading of Broker rebate orders. documentation: https://www.kucoin.com/docs-new/api-3470280 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 3 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+------------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/apibroker/model_get_rebase_req.py b/sdk/python/kucoin_universal_sdk/generate/broker/apibroker/model_get_rebase_req.py index 66d01ce7..433e6435 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/apibroker/model_get_rebase_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/apibroker/model_get_rebase_req.py @@ -18,7 +18,7 @@ class GetRebaseReq(BaseModel): Attributes: begin (str): Start time, for example: 20240610 end (str): End time, for example: 20241010 (query data with a maximum interval of 6 months) - trade_type (TradeTypeEnum): Transaction type, 1: spot 2: futures + trade_type (TradeTypeEnum): Transaction type: 1, spot; 2, futures """ class TradeTypeEnum(Enum): @@ -39,7 +39,7 @@ class TradeTypeEnum(Enum): ) trade_type: Optional[TradeTypeEnum] = Field( default=None, - description="Transaction type, 1: spot 2: futures", + description="Transaction type: 1, spot; 2, futures", alias="tradeType") __properties: ClassVar[List[str]] = ["begin", "end", "tradeType"] @@ -106,7 +106,7 @@ def set_end(self, value: str) -> GetRebaseReqBuilder: def set_trade_type( self, value: GetRebaseReq.TradeTypeEnum) -> GetRebaseReqBuilder: """ - Transaction type, 1: spot 2: futures + Transaction type: 1, spot; 2, futures """ self.obj['tradeType'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/api_nd_broker.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/api_nd_broker.py index 58d7f25a..bf56a416 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/api_nd_broker.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/api_nd_broker.py @@ -38,17 +38,17 @@ def get_broker_info(self, req: GetBrokerInfoReq, **kwargs: Any) -> GetBrokerInfoResp: """ summary: Get Broker Info - description: This endpoint supports querying the basic information of the current Broker + description: This endpoint supports querying the basic information of the current Broker. documentation: https://www.kucoin.com/docs-new/api-3470282 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | BROKER | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | BROKER | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | BROKER | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | BROKER | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -56,18 +56,18 @@ def get_broker_info(self, req: GetBrokerInfoReq, def add_sub_account(self, req: AddSubAccountReq, **kwargs: Any) -> AddSubAccountResp: """ - summary: Add SubAccount - description: This endpoint supports Broker users to create sub-accounts + summary: Add sub-account + description: This endpoint supports Broker users creating sub-accounts. documentation: https://www.kucoin.com/docs-new/api-3470290 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | BROKER | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | BROKER | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | BROKER | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | BROKER | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -75,18 +75,18 @@ def add_sub_account(self, req: AddSubAccountReq, def get_sub_account(self, req: GetSubAccountReq, **kwargs: Any) -> GetSubAccountResp: """ - summary: Get SubAccount - description: This interface supports querying sub-accounts created by Broker + summary: Get sub-account + description: This interface supports querying sub-accounts created by Broker. documentation: https://www.kucoin.com/docs-new/api-3470283 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | BROKER | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | BROKER | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | BROKER | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | BROKER | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -94,18 +94,18 @@ def get_sub_account(self, req: GetSubAccountReq, def add_sub_account_api(self, req: AddSubAccountApiReq, **kwargs: Any) -> AddSubAccountApiResp: """ - summary: Add SubAccount API - description: This interface supports the creation of Broker sub-account APIKEY + summary: Add sub-account API + description: This interface supports the creation of Broker sub-account APIKEY. documentation: https://www.kucoin.com/docs-new/api-3470291 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | BROKER | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | BROKER | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | BROKER | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | BROKER | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -113,18 +113,18 @@ def add_sub_account_api(self, req: AddSubAccountApiReq, def get_sub_account_api(self, req: GetSubAccountApiReq, **kwargs: Any) -> GetSubAccountApiResp: """ - summary: Get SubAccount API - description: This interface supports querying the Broker’s sub-account APIKEY + summary: Get sub-account API + description: This interface supports querying the Broker’s sub-account APIKEY. documentation: https://www.kucoin.com/docs-new/api-3470284 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | BROKER | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | BROKER | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | BROKER | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | BROKER | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -132,18 +132,18 @@ def get_sub_account_api(self, req: GetSubAccountApiReq, def modify_sub_account_api(self, req: ModifySubAccountApiReq, **kwargs: Any) -> ModifySubAccountApiResp: """ - summary: Modify SubAccount API - description: This interface supports modify the Broker’s sub-account APIKEY + summary: Modify sub-account API + description: This interface supports modifying the Broker’s sub-account APIKEY. documentation: https://www.kucoin.com/docs-new/api-3470292 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | BROKER | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | BROKER | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | BROKER | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | BROKER | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -151,18 +151,18 @@ def modify_sub_account_api(self, req: ModifySubAccountApiReq, def delete_sub_account_api(self, req: DeleteSubAccountApiReq, **kwargs: Any) -> DeleteSubAccountApiResp: """ - summary: Delete SubAccount API - description: This interface supports deleting Broker’s sub-account APIKEY + summary: Delete sub-account API + description: This interface supports deleting Broker’s sub-account APIKEY. documentation: https://www.kucoin.com/docs-new/api-3470289 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | BROKER | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | BROKER | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | BROKER | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | BROKER | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -170,17 +170,17 @@ def delete_sub_account_api(self, req: DeleteSubAccountApiReq, def transfer(self, req: TransferReq, **kwargs: Any) -> TransferResp: """ summary: Transfer - description: This endpoint supports fund transfer between Broker account and Broker sub-accounts. Please be aware that withdrawal from sub-account is not directly supported. Broker has to transfer funds from broker sub-account to broker account to initiate the withdrawals. + description: This endpoint supports fund transfer between Broker accounts and Broker sub-accounts. Please be aware that withdrawal from sub-accounts is not directly supported. Broker has to transfer funds from broker sub-account to broker account to initiate the withdrawals. documentation: https://www.kucoin.com/docs-new/api-3470293 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | BROKER | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | BROKER | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | BROKER | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | BROKER | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -189,17 +189,17 @@ def get_transfer_history(self, req: GetTransferHistoryReq, **kwargs: Any) -> GetTransferHistoryResp: """ summary: Get Transfer History - description: This endpoint supports querying transfer records of the broker itself and its created sub-accounts. + description: This endpoint supports querying the transfer records of the broker itself and its created sub-accounts. documentation: https://www.kucoin.com/docs-new/api-3470286 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | BROKER | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | BROKER | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | BROKER | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | BROKER | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -208,17 +208,17 @@ def get_deposit_list(self, req: GetDepositListReq, **kwargs: Any) -> GetDepositListResp: """ summary: Get Deposit List - description: This endpoint can obtain the deposit records of each sub-account under the ND Broker. + description: The deposit records of each sub-account under the ND broker can be obtained at this endpoint. documentation: https://www.kucoin.com/docs-new/api-3470285 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | BROKER | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | BROKER | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | BROKER | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | BROKER | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass @@ -227,17 +227,17 @@ def get_deposit_detail(self, req: GetDepositDetailReq, **kwargs: Any) -> GetDepositDetailResp: """ summary: Get Deposit Detail - description: This endpoint supports querying the deposit record of sub-accounts created by a Broker (excluding main account of nd broker) + description: This endpoint supports querying the deposit record of sub-accounts created by a Broker (excluding main account of ND broker). documentation: https://www.kucoin.com/docs-new/api-3470288 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | BROKER | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | BROKER | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | BROKER | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | BROKER | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -246,17 +246,17 @@ def get_withdraw_detail(self, req: GetWithdrawDetailReq, **kwargs: Any) -> GetWithdrawDetailResp: """ summary: Get Withdraw Detail - description: This endpoint supports querying the withdrawal records of sub-accounts created by a Broker (excluding main account of nd broker). + description: This endpoint supports querying the withdrawal records of sub-accounts created by a Broker (excluding main account of ND broker). documentation: https://www.kucoin.com/docs-new/api-3470287 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | BROKER | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | BROKER | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | BROKER | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | BROKER | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -264,17 +264,17 @@ def get_withdraw_detail(self, req: GetWithdrawDetailReq, def get_rebase(self, req: GetRebaseReq, **kwargs: Any) -> GetRebaseResp: """ summary: Get Broker Rebate - description: This interface supports downloading Broker rebate orders + description: This interface supports the downloading of Broker rebate orders. documentation: https://www.kucoin.com/docs-new/api-3470281 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | BROKER | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | BROKER | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | BROKER | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | BROKER | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/api_nd_broker.template b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/api_nd_broker.template index 16d1c564..960c1552 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/api_nd_broker.template +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/api_nd_broker.template @@ -23,7 +23,7 @@ def test_get_broker_info_req(self): def test_add_sub_account_req(self): """ add_sub_account - Add SubAccount + Add sub-account /api/v1/broker/nd/account """ @@ -42,7 +42,7 @@ def test_add_sub_account_req(self): def test_get_sub_account_req(self): """ get_sub_account - Get SubAccount + Get sub-account /api/v1/broker/nd/account """ @@ -61,7 +61,7 @@ def test_get_sub_account_req(self): def test_add_sub_account_api_req(self): """ add_sub_account_api - Add SubAccount API + Add sub-account API /api/v1/broker/nd/account/apikey """ @@ -80,7 +80,7 @@ def test_add_sub_account_api_req(self): def test_get_sub_account_api_req(self): """ get_sub_account_api - Get SubAccount API + Get sub-account API /api/v1/broker/nd/account/apikey """ @@ -99,7 +99,7 @@ def test_get_sub_account_api_req(self): def test_modify_sub_account_api_req(self): """ modify_sub_account_api - Modify SubAccount API + Modify sub-account API /api/v1/broker/nd/account/update-apikey """ @@ -118,7 +118,7 @@ def test_modify_sub_account_api_req(self): def test_delete_sub_account_api_req(self): """ delete_sub_account_api - Delete SubAccount API + Delete sub-account API /api/v1/broker/nd/account/apikey """ diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/api_nd_broker_test.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/api_nd_broker_test.py index 7d7e5802..087a099a 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/api_nd_broker_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/api_nd_broker_test.py @@ -52,7 +52,7 @@ def test_get_broker_info_resp_model(self): def test_add_sub_account_req_model(self): """ add_sub_account - Add SubAccount + Add sub-account /api/v1/broker/nd/account """ data = "{\"accountName\": \"Account1\"}" @@ -61,7 +61,7 @@ def test_add_sub_account_req_model(self): def test_add_sub_account_resp_model(self): """ add_sub_account - Add SubAccount + Add sub-account /api/v1/broker/nd/account """ data = "{\n \"code\": \"200000\",\n \"data\": {\n \"accountName\": \"Account15\",\n \"uid\": \"226383154\",\n \"createdAt\": 1729819381908,\n \"level\": 0\n }\n}" @@ -71,7 +71,7 @@ def test_add_sub_account_resp_model(self): def test_get_sub_account_req_model(self): """ get_sub_account - Get SubAccount + Get sub-account /api/v1/broker/nd/account """ data = "{\"uid\": \"226383154\", \"currentPage\": 1, \"pageSize\": 20}" @@ -80,7 +80,7 @@ def test_get_sub_account_req_model(self): def test_get_sub_account_resp_model(self): """ get_sub_account - Get SubAccount + Get sub-account /api/v1/broker/nd/account """ data = "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 20,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"accountName\": \"Account15\",\n \"uid\": \"226383154\",\n \"createdAt\": 1729819382000,\n \"level\": 0\n }\n ]\n }\n}" @@ -90,7 +90,7 @@ def test_get_sub_account_resp_model(self): def test_add_sub_account_api_req_model(self): """ add_sub_account_api - Add SubAccount API + Add sub-account API /api/v1/broker/nd/account/apikey """ data = "{\"uid\": \"226383154\", \"passphrase\": \"11223344\", \"ipWhitelist\": [\"127.0.0.1\", \"123.123.123.123\"], \"permissions\": [\"general\", \"spot\"], \"label\": \"This is remarks\"}" @@ -99,7 +99,7 @@ def test_add_sub_account_api_req_model(self): def test_add_sub_account_api_resp_model(self): """ add_sub_account_api - Add SubAccount API + Add sub-account API /api/v1/broker/nd/account/apikey """ data = "{\n \"code\": \"200000\",\n \"data\": {\n \"uid\": \"226383154\",\n \"label\": \"This is remarks\",\n \"apiKey\": \"671afb36cee20f00015cfaf1\",\n \"secretKey\": \"d694df2******5bae05b96\",\n \"apiVersion\": 3,\n \"permissions\": [\n \"General\",\n \"Spot\"\n ],\n \"ipWhitelist\": [\n \"127.0.0.1\",\n \"123.123.123.123\"\n ],\n \"createdAt\": 1729821494000\n }\n}" @@ -109,7 +109,7 @@ def test_add_sub_account_api_resp_model(self): def test_get_sub_account_api_req_model(self): """ get_sub_account_api - Get SubAccount API + Get sub-account API /api/v1/broker/nd/account/apikey """ data = "{\"uid\": \"226383154\", \"apiKey\": \"671afb36cee20f00015cfaf1\"}" @@ -118,7 +118,7 @@ def test_get_sub_account_api_req_model(self): def test_get_sub_account_api_resp_model(self): """ get_sub_account_api - Get SubAccount API + Get sub-account API /api/v1/broker/nd/account/apikey """ data = "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"uid\": \"226383154\",\n \"label\": \"This is remarks\",\n \"apiKey\": \"671afb36cee20f00015cfaf1\",\n \"apiVersion\": 3,\n \"permissions\": [\n \"General\",\n \"Spot\"\n ],\n \"ipWhitelist\": [\n \"127.**.1\",\n \"203.**.154\"\n ],\n \"createdAt\": 1729821494000\n }\n ]\n}" @@ -128,7 +128,7 @@ def test_get_sub_account_api_resp_model(self): def test_modify_sub_account_api_req_model(self): """ modify_sub_account_api - Modify SubAccount API + Modify sub-account API /api/v1/broker/nd/account/update-apikey """ data = "{\"uid\": \"226383154\", \"apiKey\": \"671afb36cee20f00015cfaf1\", \"ipWhitelist\": [\"127.0.0.1\", \"123.123.123.123\"], \"permissions\": [\"general\", \"spot\"], \"label\": \"This is remarks\"}" @@ -137,7 +137,7 @@ def test_modify_sub_account_api_req_model(self): def test_modify_sub_account_api_resp_model(self): """ modify_sub_account_api - Modify SubAccount API + Modify sub-account API /api/v1/broker/nd/account/update-apikey """ data = "{\n \"code\": \"200000\",\n \"data\": {\n \"uid\": \"226383154\",\n \"label\": \"This is remarks\",\n \"apiKey\": \"671afb36cee20f00015cfaf1\",\n \"apiVersion\": 3,\n \"permissions\": [\n \"General\",\n \"Spot\"\n ],\n \"ipWhitelist\": [\n \"127.**.1\",\n \"123.**.123\"\n ],\n \"createdAt\": 1729821494000\n }\n}" @@ -147,7 +147,7 @@ def test_modify_sub_account_api_resp_model(self): def test_delete_sub_account_api_req_model(self): """ delete_sub_account_api - Delete SubAccount API + Delete sub-account API /api/v1/broker/nd/account/apikey """ data = "{\"uid\": \"226383154\", \"apiKey\": \"671afb36cee20f00015cfaf1\"}" @@ -156,7 +156,7 @@ def test_delete_sub_account_api_req_model(self): def test_delete_sub_account_api_resp_model(self): """ delete_sub_account_api - Delete SubAccount API + Delete sub-account API /api/v1/broker/nd/account/apikey """ data = "{\n \"code\": \"200000\",\n \"data\": true\n}" diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_api_req.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_api_req.py index e58b103b..92fb433d 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_api_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_api_req.py @@ -16,10 +16,10 @@ class AddSubAccountApiReq(BaseModel): AddSubAccountApiReq Attributes: - uid (str): Subaccount UID + uid (str): Sub-account UID passphrase (str): API passphrase ip_whitelist (list[str]): IP whitelist list, supports up to 20 IPs - permissions (list[PermissionsEnum]): Permission group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) + permissions (list[PermissionsEnum]): Permission group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). label (str): apikey remarks (length 4~32) """ @@ -34,7 +34,7 @@ class PermissionsEnum(Enum): SPOT = 'spot' FUTURES = 'futures' - uid: Optional[str] = Field(default=None, description="Subaccount UID") + uid: Optional[str] = Field(default=None, description="Sub-account UID") passphrase: Optional[str] = Field(default=None, description="API passphrase") ip_whitelist: Optional[List[str]] = Field( @@ -44,7 +44,7 @@ class PermissionsEnum(Enum): permissions: Optional[List[PermissionsEnum]] = Field( default=None, description= - "Permission group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) " + "Permission group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). " ) label: Optional[str] = Field(default=None, description="apikey remarks (length 4~32) ") @@ -103,7 +103,7 @@ def __init__(self): def set_uid(self, value: str) -> AddSubAccountApiReqBuilder: """ - Subaccount UID + Sub-account UID """ self.obj['uid'] = value return self @@ -126,7 +126,7 @@ def set_permissions( self, value: list[AddSubAccountApiReq.PermissionsEnum] ) -> AddSubAccountApiReqBuilder: """ - Permission group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) + Permission group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). """ self.obj['permissions'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_api_resp.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_api_resp.py index e57e877b..c0213edc 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_api_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_api_resp.py @@ -17,19 +17,19 @@ class AddSubAccountApiResp(BaseModel, Response): AddSubAccountApiResp Attributes: - uid (str): Sub-Account UID + uid (str): Sub-account UID label (str): apikey remarks api_key (str): apiKey secret_key (str): secretKey api_version (int): apiVersion permissions (list[str]): [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list ip_whitelist (list[str]): IP whitelist list - created_at (int): Creation time, unix timestamp (milliseconds) + created_at (int): Creation time, Unix timestamp (milliseconds) """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") - uid: Optional[str] = Field(default=None, description="Sub-Account UID") + uid: Optional[str] = Field(default=None, description="Sub-account UID") label: Optional[str] = Field(default=None, description="apikey remarks") api_key: Optional[str] = Field(default=None, description="apiKey", @@ -49,7 +49,7 @@ class AddSubAccountApiResp(BaseModel, Response): alias="ipWhitelist") created_at: Optional[int] = Field( default=None, - description="Creation time, unix timestamp (milliseconds)", + description="Creation time, Unix timestamp (milliseconds)", alias="createdAt") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_req.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_req.py index 70504d06..f92d867b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_req.py @@ -15,13 +15,13 @@ class AddSubAccountReq(BaseModel): AddSubAccountReq Attributes: - account_name (str): Sub Account Name, Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication. + account_name (str): Sub-account Name. Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication. """ account_name: Optional[str] = Field( default=None, description= - "Sub Account Name, Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication.", + "Sub-account Name. Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication.", alias="accountName") __properties: ClassVar[List[str]] = ["accountName"] @@ -69,7 +69,7 @@ def __init__(self): def set_account_name(self, value: str) -> AddSubAccountReqBuilder: """ - Sub Account Name, Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication. + Sub-account Name. Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication. """ self.obj['accountName'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_resp.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_resp.py index ee751d1a..7a4c8f9b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_add_sub_account_resp.py @@ -17,24 +17,24 @@ class AddSubAccountResp(BaseModel, Response): AddSubAccountResp Attributes: - account_name (str): Sub-Account name - uid (str): Sub-Account UID - created_at (int): Creation time, unix timestamp (milliseconds) - level (int): Subaccount VIP level + account_name (str): Sub-account name + uid (str): Sub-account UID + created_at (int): Creation time, Unix timestamp (milliseconds) + level (int): Sub-account VIP level """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") account_name: Optional[str] = Field(default=None, - description="Sub-Account name ", + description="Sub-account name ", alias="accountName") - uid: Optional[str] = Field(default=None, description="Sub-Account UID") + uid: Optional[str] = Field(default=None, description="Sub-account UID") created_at: Optional[int] = Field( default=None, - description="Creation time, unix timestamp (milliseconds)", + description="Creation time, Unix timestamp (milliseconds)", alias="createdAt") level: Optional[int] = Field(default=None, - description="Subaccount VIP level") + description="Sub-account VIP level") __properties: ClassVar[List[str]] = [ "accountName", "uid", "createdAt", "level" diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_broker_info_req.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_broker_info_req.py index ce008d4b..cd42c330 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_broker_info_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_broker_info_req.py @@ -18,7 +18,7 @@ class GetBrokerInfoReq(BaseModel): Attributes: begin (str): Start time, for example: 20230110 end (str): End time, for example: 20230210 (query data with a maximum interval of 6 months) - trade_type (TradeTypeEnum): Transaction type, 1: spot 2: futures + trade_type (TradeTypeEnum): Transaction type: 1, spot; 2: futures """ class TradeTypeEnum(Enum): @@ -39,7 +39,7 @@ class TradeTypeEnum(Enum): ) trade_type: Optional[TradeTypeEnum] = Field( default=None, - description="Transaction type, 1: spot 2: futures", + description="Transaction type: 1, spot; 2: futures", alias="tradeType") __properties: ClassVar[List[str]] = ["begin", "end", "tradeType"] @@ -107,7 +107,7 @@ def set_trade_type( self, value: GetBrokerInfoReq.TradeTypeEnum) -> GetBrokerInfoReqBuilder: """ - Transaction type, 1: spot 2: futures + Transaction type: 1, spot; 2: futures """ self.obj['tradeType'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_broker_info_resp.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_broker_info_resp.py index 13da5581..9f49daa5 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_broker_info_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_broker_info_resp.py @@ -18,7 +18,7 @@ class GetBrokerInfoResp(BaseModel, Response): Attributes: account_size (int): Number of sub-accounts created - max_account_size (int): The maximum number of sub-accounts allowed to be created, null means no limit + max_account_size (int): The maximum number of sub-accounts allowed to be created; null means no limit level (int): Broker level """ @@ -31,7 +31,7 @@ class GetBrokerInfoResp(BaseModel, Response): max_account_size: Optional[int] = Field( default=None, description= - "The maximum number of sub-accounts allowed to be created, null means no limit", + "The maximum number of sub-accounts allowed to be created; null means no limit", alias="maxAccountSize") level: Optional[int] = Field(default=None, description="Broker level") diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_deposit_detail_resp.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_deposit_detail_resp.py index a20cf63c..5974e12d 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_deposit_detail_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_deposit_detail_resp.py @@ -18,7 +18,7 @@ class GetDepositDetailResp(BaseModel, Response): GetDepositDetailResp Attributes: - chain (str): chain id of currency + chain (str): Chain ID of currency hash (str): Hash wallet_tx_id (str): Wallet Transaction ID uid (int): UID @@ -48,7 +48,7 @@ class StatusEnum(Enum): common_response: Optional[RestResponse] = Field( default=None, description="Common response") chain: Optional[str] = Field(default=None, - description="chain id of currency") + description="Chain ID of currency") hash: Optional[str] = Field(default=None, description="Hash") wallet_tx_id: Optional[str] = Field(default=None, description="Wallet Transaction ID", diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_deposit_list_data.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_deposit_list_data.py index d6bd0fd2..f2bc57c5 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_deposit_list_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_deposit_list_data.py @@ -19,16 +19,16 @@ class GetDepositListData(BaseModel): uid (float): deposit uid hash (str): hash address (str): Deposit address - memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious. + memo (str): Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available. amount (str): Deposit amount fee (str): Fees charged for deposit currency (str): currency is_inner (bool): Internal deposit or not wallet_tx_id (str): Wallet Txid status (StatusEnum): Status. Available value: PROCESSING, SUCCESS, FAILURE - remark (str): remark - chain (str): chain name of currency - created_at (int): Creation time of the database record + remark (str): Remark + chain (str): Chain name of currency + created_at (int): Database record creation time updated_at (int): Update time of the database record """ @@ -49,7 +49,7 @@ class StatusEnum(Enum): memo: Optional[str] = Field( default=None, description= - "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious." + "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available." ) amount: Optional[str] = Field(default=None, description="Deposit amount") fee: Optional[str] = Field(default=None, @@ -64,12 +64,12 @@ class StatusEnum(Enum): status: Optional[StatusEnum] = Field( default=None, description="Status. Available value: PROCESSING, SUCCESS, FAILURE") - remark: Optional[str] = Field(default=None, description="remark") + remark: Optional[str] = Field(default=None, description="Remark") chain: Optional[str] = Field(default=None, - description="chain name of currency") + description="Chain name of currency") created_at: Optional[int] = Field( default=None, - description="Creation time of the database record", + description="Database record creation time", alias="createdAt") updated_at: Optional[int] = Field( default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_deposit_list_req.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_deposit_list_req.py index 75ac0742..68af7d38 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_deposit_list_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_deposit_list_req.py @@ -8,7 +8,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetDepositListReq(BaseModel): @@ -19,8 +18,8 @@ class GetDepositListReq(BaseModel): currency (str): currency status (str): Status. Available value: PROCESSING, SUCCESS, FAILURE hash (str): hash - start_timestamp (int): Start time (milisecond) - end_timestamp (int): End time (milisecond),Default sorting in descending order + start_timestamp (int): Start time (milliseconds) + end_timestamp (int): End time (milliseconds); default sorting in descending order limit (int): Maximum number of returned items, maximum 1000, default 1000 """ @@ -31,13 +30,14 @@ class GetDepositListReq(BaseModel): hash: Optional[str] = Field(default=None, description="hash") start_timestamp: Optional[int] = Field( default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startTimestamp") end_timestamp: Optional[int] = Field( default=None, - description="End time (milisecond),Default sorting in descending order", + description= + "End time (milliseconds); default sorting in descending order", alias="endTimestamp") - limit: Optional[Annotated[int, Field(le=1000, strict=True)]] = Field( + limit: Optional[int] = Field( default=1000, description= "Maximum number of returned items, maximum 1000, default 1000") @@ -123,14 +123,14 @@ def set_hash(self, value: str) -> GetDepositListReqBuilder: def set_start_timestamp(self, value: int) -> GetDepositListReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startTimestamp'] = value return self def set_end_timestamp(self, value: int) -> GetDepositListReqBuilder: """ - End time (milisecond),Default sorting in descending order + End time (milliseconds); default sorting in descending order """ self.obj['endTimestamp'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_rebase_req.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_rebase_req.py index 66d01ce7..433e6435 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_rebase_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_rebase_req.py @@ -18,7 +18,7 @@ class GetRebaseReq(BaseModel): Attributes: begin (str): Start time, for example: 20240610 end (str): End time, for example: 20241010 (query data with a maximum interval of 6 months) - trade_type (TradeTypeEnum): Transaction type, 1: spot 2: futures + trade_type (TradeTypeEnum): Transaction type: 1, spot; 2, futures """ class TradeTypeEnum(Enum): @@ -39,7 +39,7 @@ class TradeTypeEnum(Enum): ) trade_type: Optional[TradeTypeEnum] = Field( default=None, - description="Transaction type, 1: spot 2: futures", + description="Transaction type: 1, spot; 2, futures", alias="tradeType") __properties: ClassVar[List[str]] = ["begin", "end", "tradeType"] @@ -106,7 +106,7 @@ def set_end(self, value: str) -> GetRebaseReqBuilder: def set_trade_type( self, value: GetRebaseReq.TradeTypeEnum) -> GetRebaseReqBuilder: """ - Transaction type, 1: spot 2: futures + Transaction type: 1, spot; 2, futures """ self.obj['tradeType'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_api_data.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_api_data.py index 537848a7..118b5b4a 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_api_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_api_data.py @@ -16,13 +16,13 @@ class GetSubAccountApiData(BaseModel): GetSubAccountApiData Attributes: - uid (str): Sub-Account UID + uid (str): Sub-account UID label (str): apikey remarks api_key (str): apiKey api_version (int): apiVersion permissions (list[PermissionsEnum]): [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list ip_whitelist (list[str]): IP whitelist list - created_at (int): Creation time, unix timestamp (milliseconds) + created_at (int): Creation time, Unix timestamp (milliseconds) """ class PermissionsEnum(Enum): @@ -36,7 +36,7 @@ class PermissionsEnum(Enum): SPOT = 'Spot' FUTURES = 'Futures' - uid: Optional[str] = Field(default=None, description="Sub-Account UID") + uid: Optional[str] = Field(default=None, description="Sub-account UID") label: Optional[str] = Field(default=None, description="apikey remarks") api_key: Optional[str] = Field(default=None, description="apiKey", @@ -53,7 +53,7 @@ class PermissionsEnum(Enum): alias="ipWhitelist") created_at: Optional[int] = Field( default=None, - description="Creation time, unix timestamp (milliseconds)", + description="Creation time, Unix timestamp (milliseconds)", alias="createdAt") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_items.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_items.py index e85ed989..af616737 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_items.py @@ -17,7 +17,7 @@ class GetSubAccountItems(BaseModel): Attributes: account_name (str): Sub-account name uid (str): Sub-account UID - created_at (int): Creation time, unix timestamp (milliseconds) + created_at (int): Creation time, Unix timestamp (milliseconds) level (int): Sub-account VIP level """ @@ -27,7 +27,7 @@ class GetSubAccountItems(BaseModel): uid: Optional[str] = Field(default=None, description="Sub-account UID") created_at: Optional[int] = Field( default=None, - description="Creation time, unix timestamp (milliseconds)", + description="Creation time, Unix timestamp (milliseconds)", alias="createdAt") level: Optional[int] = Field(default=None, description="Sub-account VIP level ") diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_req.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_req.py index ae1170b5..af1d1a2e 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_req.py @@ -8,7 +8,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetSubAccountReq(BaseModel): @@ -26,9 +25,7 @@ class GetSubAccountReq(BaseModel): default=1, description="Current page, default is 1", alias="currentPage") - page_size: Optional[Annotated[int, Field( - le=100, strict=True, ge=1 - )]] = Field( + page_size: Optional[int] = Field( default=20, description= "The number returned per page, the default is 20, the maximum is 100", diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_resp.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_resp.py index 41681d7c..9b42ff7a 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_sub_account_resp.py @@ -21,7 +21,7 @@ class GetSubAccountResp(BaseModel, Response): current_page (int): Current page page_size (int): Page Size total_num (int): Total Number - total_page (int): Total Page + total_page (int): Total Pages items (list[GetSubAccountItems]): """ @@ -37,7 +37,7 @@ class GetSubAccountResp(BaseModel, Response): description="Total Number", alias="totalNum") total_page: Optional[int] = Field(default=None, - description="Total Page", + description="Total Pages", alias="totalPage") items: Optional[List[GetSubAccountItems]] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_transfer_history_resp.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_transfer_history_resp.py index b5978dfa..4b59606e 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_transfer_history_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_transfer_history_resp.py @@ -22,11 +22,11 @@ class GetTransferHistoryResp(BaseModel, Response): currency (str): Currency amount (str): Transfer Amount from_uid (int): UID of the user transferring out - from_account_type (FromAccountTypeEnum): From Account Type:Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED - from_account_tag (str): Trading pair, required if the account type is ISOLATED, e.g., BTC-USDT + from_account_type (FromAccountTypeEnum): From Account Type: Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED + from_account_tag (str): Trading pair (required if the account type is ISOLATED), e.g., BTC-USDT to_uid (int): UID of the user transferring in - to_account_type (ToAccountTypeEnum): Account Type:Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED - to_account_tag (str): To Trading pair, required if the account type is ISOLATED, e.g., BTC-USDT + to_account_type (ToAccountTypeEnum): Account Type: Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED + to_account_tag (str): To Trading pair (required if the account type is ISOLATED), e.g., BTC-USDT status (StatusEnum): Status: PROCESSING (processing), SUCCESS (successful), FAILURE (failed) reason (str): Failure Reason created_at (int): Creation Time (Unix timestamp in milliseconds) @@ -87,12 +87,12 @@ class StatusEnum(Enum): from_account_type: Optional[FromAccountTypeEnum] = Field( default=None, description= - "From Account Type:Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED", + "From Account Type: Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED", alias="fromAccountType") from_account_tag: Optional[str] = Field( default=None, description= - "Trading pair, required if the account type is ISOLATED, e.g., BTC-USDT", + "Trading pair (required if the account type is ISOLATED), e.g., BTC-USDT", alias="fromAccountTag") to_uid: Optional[int] = Field( default=None, @@ -101,12 +101,12 @@ class StatusEnum(Enum): to_account_type: Optional[ToAccountTypeEnum] = Field( default=None, description= - "Account Type:Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED", + "Account Type: Account Type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED", alias="toAccountType") to_account_tag: Optional[str] = Field( default=None, description= - "To Trading pair, required if the account type is ISOLATED, e.g., BTC-USDT", + "To Trading pair (required if the account type is ISOLATED), e.g., BTC-USDT", alias="toAccountTag") status: Optional[StatusEnum] = Field( default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_withdraw_detail_resp.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_withdraw_detail_resp.py index bd95a4de..d5352ca0 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_withdraw_detail_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_get_withdraw_detail_resp.py @@ -19,7 +19,7 @@ class GetWithdrawDetailResp(BaseModel, Response): Attributes: id (str): Withdrawal ID - chain (str): chain id of currency + chain (str): Chain ID of currency wallet_tx_id (str): Wallet Transaction ID uid (int): UID updated_at (int): Update Time (milliseconds) @@ -53,7 +53,7 @@ class StatusEnum(Enum): default=None, description="Common response") id: Optional[str] = Field(default=None, description="Withdrawal ID") chain: Optional[str] = Field(default=None, - description="chain id of currency") + description="Chain ID of currency") wallet_tx_id: Optional[str] = Field(default=None, description="Wallet Transaction ID", alias="walletTxId") diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_modify_sub_account_api_req.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_modify_sub_account_api_req.py index 8a1d705b..c1f95248 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_modify_sub_account_api_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_modify_sub_account_api_req.py @@ -16,11 +16,11 @@ class ModifySubAccountApiReq(BaseModel): ModifySubAccountApiReq Attributes: - uid (str): Subaccount UID + uid (str): Sub-account UID ip_whitelist (list[str]): IP whitelist list, supports up to 20 IPs - permissions (list[PermissionsEnum]): [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) + permissions (list[PermissionsEnum]): [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). label (str): apikey remarks (length 4~32) - api_key (str): Subaccount apiKey + api_key (str): Sub-account apiKey """ class PermissionsEnum(Enum): @@ -34,7 +34,7 @@ class PermissionsEnum(Enum): SPOT = 'spot' FUTURES = 'futures' - uid: Optional[str] = Field(default=None, description="Subaccount UID") + uid: Optional[str] = Field(default=None, description="Sub-account UID") ip_whitelist: Optional[List[str]] = Field( default=None, description="IP whitelist list, supports up to 20 IPs", @@ -42,12 +42,12 @@ class PermissionsEnum(Enum): permissions: Optional[List[PermissionsEnum]] = Field( default=None, description= - "[Permissions](https://www.kucoin.com/docs-new/doc-338144) group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) " + "[Permissions](https://www.kucoin.com/docs-new/doc-338144) group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). " ) label: Optional[str] = Field(default=None, description="apikey remarks (length 4~32) ") api_key: Optional[str] = Field(default=None, - description="Subaccount apiKey", + description="Sub-account apiKey", alias="apiKey") __properties: ClassVar[List[str]] = [ @@ -104,7 +104,7 @@ def __init__(self): def set_uid(self, value: str) -> ModifySubAccountApiReqBuilder: """ - Subaccount UID + Sub-account UID """ self.obj['uid'] = value return self @@ -121,7 +121,7 @@ def set_permissions( self, value: list[ModifySubAccountApiReq.PermissionsEnum] ) -> ModifySubAccountApiReqBuilder: """ - [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list(Only General、Spot、Futures permissions can be set, such as \"General, Trade\". ) + [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). """ self.obj['permissions'] = value return self @@ -135,7 +135,7 @@ def set_label(self, value: str) -> ModifySubAccountApiReqBuilder: def set_api_key(self, value: str) -> ModifySubAccountApiReqBuilder: """ - Subaccount apiKey + Sub-account apiKey """ self.obj['apiKey'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_modify_sub_account_api_resp.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_modify_sub_account_api_resp.py index 1f06f911..b4b4b483 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_modify_sub_account_api_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_modify_sub_account_api_resp.py @@ -17,18 +17,18 @@ class ModifySubAccountApiResp(BaseModel, Response): ModifySubAccountApiResp Attributes: - uid (str): Sub-Account UID + uid (str): Sub-account UID label (str): apikey remarks api_key (str): apiKey api_version (int): apiVersion permissions (list[str]): [Permissions](https://www.kucoin.com/docs-new/doc-338144) group list ip_whitelist (list[str]): IP whitelist list - created_at (int): Creation time, unix timestamp (milliseconds) + created_at (int): Creation time, Unix timestamp (milliseconds) """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") - uid: Optional[str] = Field(default=None, description="Sub-Account UID") + uid: Optional[str] = Field(default=None, description="Sub-account UID") label: Optional[str] = Field(default=None, description="apikey remarks") api_key: Optional[str] = Field(default=None, description="apiKey", @@ -45,7 +45,7 @@ class ModifySubAccountApiResp(BaseModel, Response): alias="ipWhitelist") created_at: Optional[int] = Field( default=None, - description="Creation time, unix timestamp (milliseconds)", + description="Creation time, Unix timestamp (milliseconds)", alias="createdAt") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_transfer_req.py b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_transfer_req.py index 59d7625d..4f689165 100644 --- a/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_transfer_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/broker/ndbroker/model_transfer_req.py @@ -20,9 +20,9 @@ class TransferReq(BaseModel): amount (str): Transfer Amount (must be a positive integer in the currency's precision) direction (DirectionEnum): Fund transfer direction: OUT (Broker account is transferred to Broker sub-account), IN (Broker sub-account is transferred to Broker account) account_type (AccountTypeEnum): Broker account types: MAIN (Funding account), TRADE (Spot trading account) - special_uid (str): Broker subaccount uid, must be the Broker subaccount created by the current Broker user. + special_uid (str): Broker sub-account UID, must be the Broker sub-account created by the current Broker user. special_account_type (SpecialAccountTypeEnum): Broker sub-account types: MAIN (Funding account), TRADE (Spot trading account) - client_oid (str): Client Order Id, The unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. + client_oid (str): Client Order ID, the unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. """ class DirectionEnum(Enum): @@ -71,7 +71,7 @@ class SpecialAccountTypeEnum(Enum): special_uid: Optional[str] = Field( default=None, description= - "Broker subaccount uid, must be the Broker subaccount created by the current Broker user.", + "Broker sub-account UID, must be the Broker sub-account created by the current Broker user.", alias="specialUid") special_account_type: Optional[SpecialAccountTypeEnum] = Field( default=None, @@ -81,7 +81,7 @@ class SpecialAccountTypeEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Client Order Id, The unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits.", + "Client Order ID, the unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits.", alias="clientOid") __properties: ClassVar[List[str]] = [ @@ -176,7 +176,7 @@ def set_account_type( def set_special_uid(self, value: str) -> TransferReqBuilder: """ - Broker subaccount uid, must be the Broker subaccount created by the current Broker user. + Broker sub-account UID, must be the Broker sub-account created by the current Broker user. """ self.obj['specialUid'] = value return self @@ -192,7 +192,7 @@ def set_special_account_type( def set_client_oid(self, value: str) -> TransferReqBuilder: """ - Client Order Id, The unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. + Client Order ID, the unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. """ self.obj['clientOid'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/api_futures.py b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/api_futures.py index 49a3e84e..4e645189 100644 --- a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/api_futures.py +++ b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/api_futures.py @@ -35,15 +35,15 @@ def add_order(self, req: AddOrderReq, **kwargs: Any) -> AddOrderResp: summary: Add Order description: Place 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. documentation: https://www.kucoin.com/docs-new/api-3470363 - +---------------------+------------------+ - | Extra API Info | Value | - +---------------------+------------------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | LEADTRADEFUTURES | - | API-RATE-LIMIT-POOL | COPYTRADING | - | API-RATE-LIMIT | 2 | - +---------------------+------------------+ + +-----------------------+------------------+ + | Extra API Info | Value | + +-----------------------+------------------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | LEADTRADEFUTURES | + | API-RATE-LIMIT-POOL | COPYTRADING | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+------------------+ """ pass @@ -52,17 +52,17 @@ def add_order_test(self, req: AddOrderTestReq, **kwargs: Any) -> AddOrderTestResp: """ summary: Add Order Test - description: Place order to the futures trading system just for validation + description: Place order the futures trading system just for validation documentation: https://www.kucoin.com/docs-new/api-3470618 - +---------------------+-------------+ - | Extra API Info | Value | - +---------------------+-------------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | COPYTRADING | - | API-RATE-LIMIT | 2 | - +---------------------+-------------+ + +-----------------------+------------------+ + | Extra API Info | Value | + +-----------------------+------------------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | LEADTRADEFUTURES | + | API-RATE-LIMIT-POOL | COPYTRADING | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+------------------+ """ pass @@ -73,15 +73,15 @@ def add_tpsl_order(self, req: AddTpslOrderReq, summary: Add Take Profit And Stop Loss Order 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. documentation: https://www.kucoin.com/docs-new/api-3470619 - +---------------------+-------------+ - | Extra API Info | Value | - +---------------------+-------------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | COPYTRADING | - | API-RATE-LIMIT | 2 | - +---------------------+-------------+ + +-----------------------+------------------+ + | Extra API Info | Value | + +-----------------------+------------------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | LEADTRADEFUTURES | + | API-RATE-LIMIT-POOL | COPYTRADING | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+------------------+ """ pass @@ -90,17 +90,17 @@ def cancel_order_by_id(self, req: CancelOrderByIdReq, **kwargs: Any) -> CancelOrderByIdResp: """ summary: Cancel Order By OrderId - description: Cancel order by system generated orderId. + description: Cancel order by system-generated orderId. documentation: https://www.kucoin.com/docs-new/api-3470620 - +---------------------+-------------+ - | Extra API Info | Value | - +---------------------+-------------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | COPYTRADING | - | API-RATE-LIMIT | 1 | - +---------------------+-------------+ + +-----------------------+------------------+ + | Extra API Info | Value | + +-----------------------+------------------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | LEADTRADEFUTURES | + | API-RATE-LIMIT-POOL | COPYTRADING | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+------------------+ """ pass @@ -110,17 +110,17 @@ def cancel_order_by_client_oid( **kwargs: Any) -> CancelOrderByClientOidResp: """ summary: Cancel Order By ClientOid - description: Cancel order by client defined orderId. + description: Cancel order by client-defined orderId. documentation: https://www.kucoin.com/docs-new/api-3470621 - +---------------------+-------------+ - | Extra API Info | Value | - +---------------------+-------------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | COPYTRADING | - | API-RATE-LIMIT | 1 | - +---------------------+-------------+ + +-----------------------+------------------+ + | Extra API Info | Value | + +-----------------------+------------------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | LEADTRADEFUTURES | + | API-RATE-LIMIT-POOL | COPYTRADING | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+------------------+ """ pass @@ -131,15 +131,15 @@ def get_max_open_size(self, req: GetMaxOpenSizeReq, summary: Get Max Open Size description: Get Maximum Open Position Size. documentation: https://www.kucoin.com/docs-new/api-3470612 - +---------------------+-------------+ - | Extra API Info | Value | - +---------------------+-------------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | COPYTRADING | - | API-RATE-LIMIT | 2 | - +---------------------+-------------+ + +-----------------------+------------------+ + | Extra API Info | Value | + +-----------------------+------------------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | LEADTRADEFUTURES | + | API-RATE-LIMIT-POOL | COPYTRADING | + | API-RATE-LIMIT-WEIGHT | 4 | + +-----------------------+------------------+ """ pass @@ -150,15 +150,15 @@ def get_max_withdraw_margin(self, req: GetMaxWithdrawMarginReq, summary: Get Max Withdraw Margin description: This interface can query the maximum amount of margin that the current position supports withdrawal. documentation: https://www.kucoin.com/docs-new/api-3470616 - +---------------------+-------------+ - | Extra API Info | Value | - +---------------------+-------------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | COPYTRADING | - | API-RATE-LIMIT | 10 | - +---------------------+-------------+ + +-----------------------+------------------+ + | Extra API Info | Value | + +-----------------------+------------------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | LEADTRADEFUTURES | + | API-RATE-LIMIT-POOL | COPYTRADING | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+------------------+ """ pass @@ -169,15 +169,15 @@ def add_isolated_margin(self, req: AddIsolatedMarginReq, summary: Add Isolated Margin description: Add Isolated Margin Manually. documentation: https://www.kucoin.com/docs-new/api-3470614 - +---------------------+-------------+ - | Extra API Info | Value | - +---------------------+-------------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | COPYTRADING | - | API-RATE-LIMIT | 4 | - +---------------------+-------------+ + +-----------------------+------------------+ + | Extra API Info | Value | + +-----------------------+------------------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | LEADTRADEFUTURES | + | API-RATE-LIMIT-POOL | COPYTRADING | + | API-RATE-LIMIT-WEIGHT | 4 | + +-----------------------+------------------+ """ pass @@ -188,15 +188,15 @@ def remove_isolated_margin(self, req: RemoveIsolatedMarginReq, summary: Remove Isolated Margin description: Remove Isolated Margin Manually. documentation: https://www.kucoin.com/docs-new/api-3470615 - +---------------------+-------------+ - | Extra API Info | Value | - +---------------------+-------------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | COPYTRADING | - | API-RATE-LIMIT | 10 | - +---------------------+-------------+ + +-----------------------+------------------+ + | Extra API Info | Value | + +-----------------------+------------------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | LEADTRADEFUTURES | + | API-RATE-LIMIT-POOL | COPYTRADING | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+------------------+ """ pass @@ -206,17 +206,17 @@ def modify_isolated_margin_risk_limt( **kwargs: Any) -> ModifyIsolatedMarginRiskLimtResp: """ summary: Modify Isolated Margin Risk Limit - description: This interface can be used to obtain information about risk limit level of a specific contract(Only valid for isolated Margin). + description: This interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin). documentation: https://www.kucoin.com/docs-new/api-3470613 - +---------------------+-------------+ - | Extra API Info | Value | - +---------------------+-------------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | COPYTRADING | - | API-RATE-LIMIT | 4 | - +---------------------+-------------+ + +-----------------------+------------------+ + | Extra API Info | Value | + +-----------------------+------------------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | LEADTRADEFUTURES | + | API-RATE-LIMIT-POOL | COPYTRADING | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+------------------+ """ pass @@ -228,15 +228,15 @@ def modify_auto_deposit_status( summary: Modify Isolated Margin Auto-Deposit Status description: This endpoint is only applicable to isolated margin and is no longer recommended. It is recommended to use cross margin instead. documentation: https://www.kucoin.com/docs-new/api-3470617 - +---------------------+-------------+ - | Extra API Info | Value | - +---------------------+-------------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | COPYTRADING | - | API-RATE-LIMIT | 4 | - +---------------------+-------------+ + +-----------------------+------------------+ + | Extra API Info | Value | + +-----------------------+------------------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | LEADTRADEFUTURES | + | API-RATE-LIMIT-POOL | COPYTRADING | + | API-RATE-LIMIT-WEIGHT | 4 | + +-----------------------+------------------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/api_futures.template b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/api_futures.template index 4a0038d4..9daeff08 100644 --- a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/api_futures.template +++ b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/api_futures.template @@ -9,7 +9,7 @@ def test_add_order_req(self): """ builder = AddOrderReqBuilder() - builder.set_client_oid(?).set_side(?).set_symbol(?).set_leverage(?).set_type(?).set_remark(?).set_stop(?).set_stop_price_type(?).set_stop_price(?).set_reduce_only(?).set_close_order(?).set_force_hold(?).set_margin_mode(?).set_price(?).set_size(?).set_time_in_force(?).set_post_only(?).set_hidden(?).set_iceberg(?).set_visible_size(?) + builder.set_client_oid(?).set_side(?).set_symbol(?).set_leverage(?).set_type(?).set_stop(?).set_stop_price_type(?).set_stop_price(?).set_reduce_only(?).set_close_order(?).set_margin_mode(?).set_price(?).set_size(?).set_time_in_force(?).set_post_only(?).set_hidden(?).set_iceberg(?).set_visible_size(?) req = builder.build() try: resp = self.api.add_order(req) @@ -28,7 +28,7 @@ def test_add_order_test_req(self): """ builder = AddOrderTestReqBuilder() - builder.set_client_oid(?).set_side(?).set_symbol(?).set_leverage(?).set_type(?).set_remark(?).set_stop(?).set_stop_price_type(?).set_stop_price(?).set_reduce_only(?).set_close_order(?).set_force_hold(?).set_margin_mode(?).set_price(?).set_size(?).set_time_in_force(?).set_post_only(?).set_hidden(?).set_iceberg(?).set_visible_size(?) + builder.set_client_oid(?).set_side(?).set_symbol(?).set_leverage(?).set_type(?).set_stop(?).set_stop_price_type(?).set_stop_price(?).set_reduce_only(?).set_close_order(?).set_margin_mode(?).set_price(?).set_size(?).set_time_in_force(?).set_post_only(?).set_hidden(?).set_iceberg(?).set_visible_size(?) req = builder.build() try: resp = self.api.add_order_test(req) @@ -47,7 +47,7 @@ def test_add_tpsl_order_req(self): """ builder = AddTpslOrderReqBuilder() - builder.set_client_oid(?).set_side(?).set_symbol(?).set_leverage(?).set_type(?).set_remark(?).set_stop_price_type(?).set_reduce_only(?).set_close_order(?).set_force_hold(?).set_margin_mode(?).set_price(?).set_size(?).set_time_in_force(?).set_post_only(?).set_hidden(?).set_iceberg(?).set_visible_size(?).set_trigger_stop_up_price(?).set_trigger_stop_down_price(?) + builder.set_client_oid(?).set_side(?).set_symbol(?).set_leverage(?).set_type(?).set_stop_price_type(?).set_reduce_only(?).set_close_order(?).set_margin_mode(?).set_price(?).set_size(?).set_time_in_force(?).set_post_only(?).set_hidden(?).set_iceberg(?).set_visible_size(?).set_trigger_stop_up_price(?).set_trigger_stop_down_price(?) req = builder.build() try: resp = self.api.add_tpsl_order(req) diff --git a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/api_futures_test.py b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/api_futures_test.py index 773ac4b7..8536496a 100644 --- a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/api_futures_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/api_futures_test.py @@ -127,7 +127,7 @@ def test_get_max_open_size_req_model(self): Get Max Open Size /api/v1/copy-trade/futures/get-max-open-size """ - data = "{\"symbol\": \"XBTUSDTM\", \"price\": \"example_string_default_value\", \"leverage\": 123456}" + data = "{\"symbol\": \"XBTUSDTM\", \"price\": 123456.0, \"leverage\": 123456}" req = GetMaxOpenSizeReq.from_json(data) def test_get_max_open_size_resp_model(self): @@ -136,7 +136,7 @@ def test_get_max_open_size_resp_model(self): Get Max Open Size /api/v1/copy-trade/futures/get-max-open-size """ - data = "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"XBTUSDTM\",\n \"maxBuyOpenSize\": \"8\",\n \"maxSellOpenSize\": \"5\"\n }\n}" + data = "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"XBTUSDTM\",\n \"maxBuyOpenSize\": \"1000000\",\n \"maxSellOpenSize\": \"51\"\n }\n}" common_response = RestResponse.from_json(data) resp = GetMaxOpenSizeResp.from_dict(common_response.data) @@ -184,7 +184,7 @@ def test_remove_isolated_margin_req_model(self): Remove Isolated Margin /api/v1/copy-trade/futures/position/margin/withdraw-margin """ - data = "{\"symbol\": \"XBTUSDTM\", \"withdrawAmount\": \"0.0000001\"}" + data = "{\"symbol\": \"XBTUSDTM\", \"withdrawAmount\": 1e-07}" req = RemoveIsolatedMarginReq.from_json(data) def test_remove_isolated_margin_resp_model(self): diff --git a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_order_req.py b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_order_req.py index 10bb68e7..1212f6d0 100644 --- a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_order_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_order_req.py @@ -21,21 +21,19 @@ class AddOrderReq(BaseModel): symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) leverage (int): Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. type (TypeEnum): specify if the order is an 'limit' order or 'market' order - remark (str): remark for the order, length cannot exceed 100 utf8 characters stop (StopEnum): Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. - stop_price_type (StopPriceTypeEnum): Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. + stop_price_type (StopPriceTypeEnum): Either 'TP' or 'MP', Need to be defined if stop is specified. stop_price (str): Need to be defined if stop is specified. reduce_only (bool): 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. close_order (bool): 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. - force_hold (bool): 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. - margin_mode (MarginModeEnum): Margin mode: ISOLATED, CROSS, default: ISOLATED + margin_mode (MarginModeEnum): Margin mode: ISOLATED, default: ISOLATED price (str): Required for type is 'limit' order, indicating the operating price size (int): Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. time_in_force (TimeInForceEnum): 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 post_only (bool): 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. hidden (bool): Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. iceberg (bool): 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. - visible_size (str): 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. + visible_size (str): 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. """ class SideEnum(Enum): @@ -70,20 +68,16 @@ class StopPriceTypeEnum(Enum): Attributes: TRADE_PRICE: 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. MARK_PRICE: MP for mark price, The mark price can be obtained through relevant OPEN API for index services - INDEX_PRICE: IP for index price, The index price can be obtained through relevant OPEN API for index services """ TRADE_PRICE = 'TP' MARK_PRICE = 'MP' - INDEX_PRICE = 'IP' class MarginModeEnum(Enum): """ Attributes: ISOLATED: Isolated Margin - CROSS: Cross Margin """ ISOLATED = 'ISOLATED' - CROSS = 'CROSS' class TimeInForceEnum(Enum): """ @@ -116,10 +110,6 @@ class TimeInForceEnum(Enum): default=TypeEnum.LIMIT, description="specify if the order is an 'limit' order or 'market' order" ) - remark: Optional[str] = Field( - default=None, - description= - "remark for the order, length cannot exceed 100 utf8 characters") stop: Optional[StopEnum] = Field( default=None, description= @@ -128,7 +118,7 @@ class TimeInForceEnum(Enum): stop_price_type: Optional[StopPriceTypeEnum] = Field( default=None, description= - "Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified.", + "Either 'TP' or 'MP', Need to be defined if stop is specified.", alias="stopPriceType") stop_price: Optional[str] = Field( default=None, @@ -144,14 +134,9 @@ class TimeInForceEnum(Enum): 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.", alias="closeOrder") - force_hold: Optional[bool] = Field( - default=False, - 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.", - alias="forceHold") margin_mode: Optional[MarginModeEnum] = Field( default=MarginModeEnum.ISOLATED, - description="Margin mode: ISOLATED, CROSS, default: ISOLATED", + description="Margin mode: ISOLATED, default: ISOLATED", alias="marginMode") price: Optional[str] = Field( default=None, @@ -185,14 +170,14 @@ class TimeInForceEnum(Enum): visible_size: Optional[str] = Field( default=None, 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.", + "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.", alias="visibleSize") __properties: ClassVar[List[str]] = [ - "clientOid", "side", "symbol", "leverage", "type", "remark", "stop", - "stopPriceType", "stopPrice", "reduceOnly", "closeOrder", "forceHold", - "marginMode", "price", "size", "timeInForce", "postOnly", "hidden", - "iceberg", "visibleSize" + "clientOid", "side", "symbol", "leverage", "type", "stop", + "stopPriceType", "stopPrice", "reduceOnly", "closeOrder", "marginMode", + "price", "size", "timeInForce", "postOnly", "hidden", "iceberg", + "visibleSize" ] model_config = ConfigDict( @@ -238,8 +223,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[AddOrderReq]: "type": obj.get("type") if obj.get("type") is not None else AddOrderReq.TypeEnum.LIMIT, - "remark": - obj.get("remark"), "stop": obj.get("stop"), "stopPriceType": @@ -252,9 +235,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[AddOrderReq]: "closeOrder": obj.get("closeOrder") if obj.get("closeOrder") is not None else False, - "forceHold": - obj.get("forceHold") - if obj.get("forceHold") is not None else False, "marginMode": obj.get("marginMode") if obj.get("marginMode") is not None else AddOrderReq.MarginModeEnum.ISOLATED, @@ -317,13 +297,6 @@ def set_type(self, value: AddOrderReq.TypeEnum) -> AddOrderReqBuilder: self.obj['type'] = value return self - def set_remark(self, value: str) -> AddOrderReqBuilder: - """ - remark for the order, length cannot exceed 100 utf8 characters - """ - self.obj['remark'] = value - return self - def set_stop(self, value: AddOrderReq.StopEnum) -> AddOrderReqBuilder: """ Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. @@ -334,7 +307,7 @@ def set_stop(self, value: AddOrderReq.StopEnum) -> AddOrderReqBuilder: def set_stop_price_type( self, value: AddOrderReq.StopPriceTypeEnum) -> AddOrderReqBuilder: """ - Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. + Either 'TP' or 'MP', Need to be defined if stop is specified. """ self.obj['stopPriceType'] = value return self @@ -360,17 +333,10 @@ def set_close_order(self, value: bool) -> AddOrderReqBuilder: self.obj['closeOrder'] = value return self - def set_force_hold(self, value: bool) -> AddOrderReqBuilder: - """ - 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. - """ - self.obj['forceHold'] = value - return self - def set_margin_mode( self, value: AddOrderReq.MarginModeEnum) -> AddOrderReqBuilder: """ - Margin mode: ISOLATED, CROSS, default: ISOLATED + Margin mode: ISOLATED, default: ISOLATED """ self.obj['marginMode'] = value return self @@ -420,7 +386,7 @@ def set_iceberg(self, value: bool) -> AddOrderReqBuilder: def set_visible_size(self, value: str) -> AddOrderReqBuilder: """ - 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. + 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. """ self.obj['visibleSize'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_order_test_req.py b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_order_test_req.py index c09dea7a..d79e42df 100644 --- a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_order_test_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_order_test_req.py @@ -16,26 +16,24 @@ class AddOrderTestReq(BaseModel): AddOrderTestReq Attributes: - client_oid (str): 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(-) - side (SideEnum): specify if the order is to 'buy' or 'sell' - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + client_oid (str): 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 (-). + side (SideEnum): Specify if the order is to 'buy' or 'sell'. + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) leverage (int): Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. - type (TypeEnum): specify if the order is an 'limit' order or 'market' order - remark (str): remark for the order, length cannot exceed 100 utf8 characters - stop (StopEnum): Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. - stop_price_type (StopPriceTypeEnum): Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. - stop_price (str): Need to be defined if stop is specified. + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order + stop (StopEnum): Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. + stop_price_type (StopPriceTypeEnum): Either 'TP' or 'MP' need to be defined if stop is specified. + stop_price (str): Needs to be defined if stop is specified. reduce_only (bool): 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. close_order (bool): 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. - force_hold (bool): 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. - margin_mode (MarginModeEnum): Margin mode: ISOLATED, CROSS, default: ISOLATED + margin_mode (MarginModeEnum): Margin mode: ISOLATED, default: ISOLATED price (str): Required for type is 'limit' order, indicating the operating price - size (int): Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. + size (int): Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. time_in_force (TimeInForceEnum): 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 - post_only (bool): 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. - hidden (bool): Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. - iceberg (bool): 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. - visible_size (str): 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. + post_only (bool): Optional for type is 'limit' order, post only flag, invalid when timeInForce is IOC. When postOnly is true, not allowed to 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 fees, the order will be fully rejected. + hidden (bool): Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. + iceberg (bool): Optional for type is 'limit' order, Only visible portion of the order is displayed in the order book. When iceberg is chose, choosing postOnly is not allowed. + visible_size (str): 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. """ class SideEnum(Enum): @@ -60,7 +58,7 @@ class StopEnum(Enum): """ Attributes: DOWN: Triggers when the price reaches or goes below the stopPrice. - UP: Triggers when the price reaches or goes above the stopPrice + UP: Triggers when the price reaches or goes above the stopPrice. """ DOWN = 'down' UP = 'up' @@ -69,21 +67,17 @@ class StopPriceTypeEnum(Enum): """ Attributes: TRADE_PRICE: 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. - MARK_PRICE: MP for mark price, The mark price can be obtained through relevant OPEN API for index services - INDEX_PRICE: IP for index price, The index price can be obtained through relevant OPEN API for index services + MARK_PRICE: MP for mark price. The mark price can be obtained through relevant OPEN API for index services. """ TRADE_PRICE = 'TP' MARK_PRICE = 'MP' - INDEX_PRICE = 'IP' class MarginModeEnum(Enum): """ Attributes: - ISOLATED: - CROSS: + ISOLATED: Isolated Margin """ ISOLATED = 'ISOLATED' - CROSS = 'CROSS' class TimeInForceEnum(Enum): """ @@ -97,14 +91,15 @@ class TimeInForceEnum(Enum): client_oid: Optional[str] = Field( default=None, 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(-)", + "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 (-).", alias="clientOid") side: Optional[SideEnum] = Field( - default=None, description="specify if the order is to 'buy' or 'sell'") + default=None, + description="Specify if the order is to 'buy' or 'sell'.") symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) leverage: Optional[int] = Field( default=None, @@ -113,25 +108,21 @@ class TimeInForceEnum(Enum): ) type: Optional[TypeEnum] = Field( default=TypeEnum.LIMIT, - description="specify if the order is an 'limit' order or 'market' order" + description="Specify if the order is a 'limit' order or 'market' order" ) - remark: Optional[str] = Field( - default=None, - description= - "remark for the order, length cannot exceed 100 utf8 characters") stop: Optional[StopEnum] = Field( default=None, description= - "Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded." + "Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be provided." ) stop_price_type: Optional[StopPriceTypeEnum] = Field( default=None, description= - "Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified.", + "Either 'TP' or 'MP' need to be defined if stop is specified.", alias="stopPriceType") stop_price: Optional[str] = Field( default=None, - description="Need to be defined if stop is specified. ", + description="Needs to be defined if stop is specified. ", alias="stopPrice") reduce_only: Optional[bool] = Field( default=False, @@ -143,14 +134,9 @@ class TimeInForceEnum(Enum): 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.", alias="closeOrder") - force_hold: Optional[bool] = Field( - default=False, - 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.", - alias="forceHold") margin_mode: Optional[MarginModeEnum] = Field( default=MarginModeEnum.ISOLATED, - description="Margin mode: ISOLATED, CROSS, default: ISOLATED", + description="Margin mode: ISOLATED, default: ISOLATED", alias="marginMode") price: Optional[str] = Field( default=None, @@ -159,7 +145,7 @@ class TimeInForceEnum(Enum): size: Optional[int] = Field( default=None, description= - "Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported." + "Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported." ) time_in_force: Optional[TimeInForceEnum] = Field( default=TimeInForceEnum.GOOD_TILL_CANCELED, @@ -169,29 +155,29 @@ class TimeInForceEnum(Enum): post_only: Optional[bool] = Field( default=False, 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.", + "Optional for type is 'limit' order, post only flag, invalid when timeInForce is IOC. When postOnly is true, not allowed to 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 fees, the order will be fully rejected.", alias="postOnly") hidden: Optional[bool] = Field( default=False, description= - "Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly." + "Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed." ) iceberg: Optional[bool] = Field( default=False, 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." + "Optional for type is 'limit' order, Only visible portion of the order is displayed in the order book. When iceberg is chose, choosing postOnly is not allowed." ) visible_size: Optional[str] = Field( default=None, 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.", + "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.", alias="visibleSize") __properties: ClassVar[List[str]] = [ - "clientOid", "side", "symbol", "leverage", "type", "remark", "stop", - "stopPriceType", "stopPrice", "reduceOnly", "closeOrder", "forceHold", - "marginMode", "price", "size", "timeInForce", "postOnly", "hidden", - "iceberg", "visibleSize" + "clientOid", "side", "symbol", "leverage", "type", "stop", + "stopPriceType", "stopPrice", "reduceOnly", "closeOrder", "marginMode", + "price", "size", "timeInForce", "postOnly", "hidden", "iceberg", + "visibleSize" ] model_config = ConfigDict( @@ -238,8 +224,6 @@ def from_dict(cls, obj: Optional[Dict[str, "type": obj.get("type") if obj.get("type") is not None else AddOrderTestReq.TypeEnum.LIMIT, - "remark": - obj.get("remark"), "stop": obj.get("stop"), "stopPriceType": @@ -252,9 +236,6 @@ def from_dict(cls, obj: Optional[Dict[str, "closeOrder": obj.get("closeOrder") if obj.get("closeOrder") is not None else False, - "forceHold": - obj.get("forceHold") - if obj.get("forceHold") is not None else False, "marginMode": obj.get("marginMode") if obj.get("marginMode") is not None else AddOrderTestReq.MarginModeEnum.ISOLATED, @@ -284,7 +265,7 @@ def __init__(self): def set_client_oid(self, value: str) -> AddOrderTestReqBuilder: """ - 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(-) + 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 (-). """ self.obj['clientOid'] = value return self @@ -292,14 +273,14 @@ def set_client_oid(self, value: str) -> AddOrderTestReqBuilder: def set_side(self, value: AddOrderTestReq.SideEnum) -> AddOrderTestReqBuilder: """ - specify if the order is to 'buy' or 'sell' + Specify if the order is to 'buy' or 'sell'. """ self.obj['side'] = value return self def set_symbol(self, value: str) -> AddOrderTestReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self @@ -314,22 +295,15 @@ def set_leverage(self, value: int) -> AddOrderTestReqBuilder: def set_type(self, value: AddOrderTestReq.TypeEnum) -> AddOrderTestReqBuilder: """ - specify if the order is an 'limit' order or 'market' order + Specify if the order is a 'limit' order or 'market' order """ self.obj['type'] = value return self - def set_remark(self, value: str) -> AddOrderTestReqBuilder: - """ - remark for the order, length cannot exceed 100 utf8 characters - """ - self.obj['remark'] = value - return self - def set_stop(self, value: AddOrderTestReq.StopEnum) -> AddOrderTestReqBuilder: """ - Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. + Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. """ self.obj['stop'] = value return self @@ -338,14 +312,14 @@ def set_stop_price_type( self, value: AddOrderTestReq.StopPriceTypeEnum ) -> AddOrderTestReqBuilder: """ - Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. + Either 'TP' or 'MP' need to be defined if stop is specified. """ self.obj['stopPriceType'] = value return self def set_stop_price(self, value: str) -> AddOrderTestReqBuilder: """ - Need to be defined if stop is specified. + Needs to be defined if stop is specified. """ self.obj['stopPrice'] = value return self @@ -364,18 +338,11 @@ def set_close_order(self, value: bool) -> AddOrderTestReqBuilder: self.obj['closeOrder'] = value return self - def set_force_hold(self, value: bool) -> AddOrderTestReqBuilder: - """ - 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. - """ - self.obj['forceHold'] = value - return self - def set_margin_mode( self, value: AddOrderTestReq.MarginModeEnum) -> AddOrderTestReqBuilder: """ - Margin mode: ISOLATED, CROSS, default: ISOLATED + Margin mode: ISOLATED, default: ISOLATED """ self.obj['marginMode'] = value return self @@ -389,7 +356,7 @@ def set_price(self, value: str) -> AddOrderTestReqBuilder: def set_size(self, value: int) -> AddOrderTestReqBuilder: """ - Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. + Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. """ self.obj['size'] = value return self @@ -405,28 +372,28 @@ def set_time_in_force( def set_post_only(self, value: bool) -> AddOrderTestReqBuilder: """ - 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. + Optional for type is 'limit' order, post only flag, invalid when timeInForce is IOC. When postOnly is true, not allowed to 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 fees, the order will be fully rejected. """ self.obj['postOnly'] = value return self def set_hidden(self, value: bool) -> AddOrderTestReqBuilder: """ - Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. + Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. """ self.obj['hidden'] = value return self def set_iceberg(self, value: bool) -> AddOrderTestReqBuilder: """ - 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. + Optional for type is 'limit' order, Only visible portion of the order is displayed in the order book. When iceberg is chose, choosing postOnly is not allowed. """ self.obj['iceberg'] = value return self def set_visible_size(self, value: str) -> AddOrderTestReqBuilder: """ - 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. + 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. """ self.obj['visibleSize'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_order_test_resp.py b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_order_test_resp.py index b58acedd..1d22c17b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_order_test_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_order_test_resp.py @@ -17,7 +17,7 @@ class AddOrderTestResp(BaseModel, Response): AddOrderTestResp Attributes: - order_id (str): The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + order_id (str): The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. client_oid (str): The user self-defined order id. """ @@ -26,7 +26,7 @@ class AddOrderTestResp(BaseModel, Response): order_id: Optional[str] = Field( default=None, description= - "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order.", + "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order.", alias="orderId") client_oid: Optional[str] = Field( default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_tpsl_order_req.py b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_tpsl_order_req.py index 44d4fd97..c2acc35b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_tpsl_order_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_tpsl_order_req.py @@ -16,24 +16,22 @@ class AddTpslOrderReq(BaseModel): AddTpslOrderReq Attributes: - client_oid (str): 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(-) - side (SideEnum): specify if the order is to 'buy' or 'sell' - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + client_oid (str): 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 (-). + side (SideEnum): Specify if the order is to 'buy' or 'sell'. + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) leverage (int): Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. - type (TypeEnum): specify if the order is an 'limit' order or 'market' order - remark (str): remark for the order, length cannot exceed 100 utf8 characters - stop_price_type (StopPriceTypeEnum): Either 'TP', 'IP' or 'MP' + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order + stop_price_type (StopPriceTypeEnum): Either 'TP' or 'MP' reduce_only (bool): 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. close_order (bool): 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. - force_hold (bool): 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. - margin_mode (MarginModeEnum): Margin mode: ISOLATED, CROSS, default: ISOLATED + margin_mode (MarginModeEnum): Margin mode: ISOLATED, default: ISOLATED price (str): Required for type is 'limit' order, indicating the operating price - size (int): Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. + size (int): Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. time_in_force (TimeInForceEnum): 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 - post_only (bool): 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. - hidden (bool): Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. - iceberg (bool): 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. - visible_size (str): 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. + post_only (bool): 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. + hidden (bool): Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. + iceberg (bool): 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. + visible_size (str): 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. trigger_stop_up_price (str): Take profit price trigger_stop_down_price (str): Stop loss price """ @@ -60,27 +58,23 @@ class StopPriceTypeEnum(Enum): """ Attributes: TRADE_PRICE: 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. - MARK_PRICE: MP for mark price, The mark price can be obtained through relevant OPEN API for index services - INDEX_PRICE: IP for index price, The index price can be obtained through relevant OPEN API for index services + MARK_PRICE: MP for mark price. The mark price can be obtained through relevant OPEN API for index services. """ TRADE_PRICE = 'TP' MARK_PRICE = 'MP' - INDEX_PRICE = 'IP' class MarginModeEnum(Enum): """ Attributes: ISOLATED: - CROSS: """ ISOLATED = 'ISOLATED' - CROSS = 'CROSS' class TimeInForceEnum(Enum): """ Attributes: - GOOD_TILL_CANCELED: order remains open on the order book until canceled. This is the default type if the field is left empty. - IMMEDIATE_OR_CANCEL: being matched or not, the remaining size of the order will be instantly canceled instead of entering the order book. + GOOD_TILL_CANCELED: Order remains open on the order book until canceled. This is the default type if the field is left empty. + IMMEDIATE_OR_CANCEL: Being matched or not, the remaining size of the order will be instantly canceled instead of entering the order book. """ GOOD_TILL_CANCELED = 'GTC' IMMEDIATE_OR_CANCEL = 'IOC' @@ -88,14 +82,15 @@ class TimeInForceEnum(Enum): client_oid: Optional[str] = Field( default=None, 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(-)", + "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 (-).", alias="clientOid") side: Optional[SideEnum] = Field( - default=None, description="specify if the order is to 'buy' or 'sell'") + default=None, + description="Specify if the order is to 'buy' or 'sell'.") symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) leverage: Optional[int] = Field( default=None, @@ -104,16 +99,10 @@ class TimeInForceEnum(Enum): ) type: Optional[TypeEnum] = Field( default=TypeEnum.LIMIT, - description="specify if the order is an 'limit' order or 'market' order" + description="Specify if the order is a 'limit' order or 'market' order" ) - remark: Optional[str] = Field( - default=None, - description= - "remark for the order, length cannot exceed 100 utf8 characters") stop_price_type: Optional[StopPriceTypeEnum] = Field( - default=None, - description="Either 'TP', 'IP' or 'MP'", - alias="stopPriceType") + default=None, description="Either 'TP' or 'MP'", alias="stopPriceType") reduce_only: Optional[bool] = Field( default=False, description= @@ -124,14 +113,9 @@ class TimeInForceEnum(Enum): 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.", alias="closeOrder") - force_hold: Optional[bool] = Field( - default=False, - 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.", - alias="forceHold") margin_mode: Optional[MarginModeEnum] = Field( default=MarginModeEnum.ISOLATED, - description="Margin mode: ISOLATED, CROSS, default: ISOLATED", + description="Margin mode: ISOLATED, default: ISOLATED", alias="marginMode") price: Optional[str] = Field( default=None, @@ -140,7 +124,7 @@ class TimeInForceEnum(Enum): size: Optional[int] = Field( default=None, description= - "Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported." + "Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported." ) time_in_force: Optional[TimeInForceEnum] = Field( default=TimeInForceEnum.GOOD_TILL_CANCELED, @@ -150,22 +134,22 @@ class TimeInForceEnum(Enum): post_only: Optional[bool] = Field( default=False, 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.", + "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.", alias="postOnly") hidden: Optional[bool] = Field( default=False, description= - "Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly." + "Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed." ) iceberg: Optional[bool] = Field( default=False, 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." + "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." ) visible_size: Optional[str] = Field( default=None, 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.", + "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.", alias="visibleSize") trigger_stop_up_price: Optional[str] = Field( default=None, @@ -177,10 +161,10 @@ class TimeInForceEnum(Enum): alias="triggerStopDownPrice") __properties: ClassVar[List[str]] = [ - "clientOid", "side", "symbol", "leverage", "type", "remark", - "stopPriceType", "reduceOnly", "closeOrder", "forceHold", "marginMode", - "price", "size", "timeInForce", "postOnly", "hidden", "iceberg", - "visibleSize", "triggerStopUpPrice", "triggerStopDownPrice" + "clientOid", "side", "symbol", "leverage", "type", "stopPriceType", + "reduceOnly", "closeOrder", "marginMode", "price", "size", + "timeInForce", "postOnly", "hidden", "iceberg", "visibleSize", + "triggerStopUpPrice", "triggerStopDownPrice" ] model_config = ConfigDict( @@ -227,8 +211,6 @@ def from_dict(cls, obj: Optional[Dict[str, "type": obj.get("type") if obj.get("type") is not None else AddTpslOrderReq.TypeEnum.LIMIT, - "remark": - obj.get("remark"), "stopPriceType": obj.get("stopPriceType"), "reduceOnly": @@ -237,9 +219,6 @@ def from_dict(cls, obj: Optional[Dict[str, "closeOrder": obj.get("closeOrder") if obj.get("closeOrder") is not None else False, - "forceHold": - obj.get("forceHold") - if obj.get("forceHold") is not None else False, "marginMode": obj.get("marginMode") if obj.get("marginMode") is not None else AddTpslOrderReq.MarginModeEnum.ISOLATED, @@ -273,7 +252,7 @@ def __init__(self): def set_client_oid(self, value: str) -> AddTpslOrderReqBuilder: """ - 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(-) + 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 (-). """ self.obj['clientOid'] = value return self @@ -281,14 +260,14 @@ def set_client_oid(self, value: str) -> AddTpslOrderReqBuilder: def set_side(self, value: AddTpslOrderReq.SideEnum) -> AddTpslOrderReqBuilder: """ - specify if the order is to 'buy' or 'sell' + Specify if the order is to 'buy' or 'sell'. """ self.obj['side'] = value return self def set_symbol(self, value: str) -> AddTpslOrderReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self @@ -303,23 +282,16 @@ def set_leverage(self, value: int) -> AddTpslOrderReqBuilder: def set_type(self, value: AddTpslOrderReq.TypeEnum) -> AddTpslOrderReqBuilder: """ - specify if the order is an 'limit' order or 'market' order + Specify if the order is a 'limit' order or 'market' order """ self.obj['type'] = value return self - def set_remark(self, value: str) -> AddTpslOrderReqBuilder: - """ - remark for the order, length cannot exceed 100 utf8 characters - """ - self.obj['remark'] = value - return self - def set_stop_price_type( self, value: AddTpslOrderReq.StopPriceTypeEnum ) -> AddTpslOrderReqBuilder: """ - Either 'TP', 'IP' or 'MP' + Either 'TP' or 'MP' """ self.obj['stopPriceType'] = value return self @@ -338,18 +310,11 @@ def set_close_order(self, value: bool) -> AddTpslOrderReqBuilder: self.obj['closeOrder'] = value return self - def set_force_hold(self, value: bool) -> AddTpslOrderReqBuilder: - """ - 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. - """ - self.obj['forceHold'] = value - return self - def set_margin_mode( self, value: AddTpslOrderReq.MarginModeEnum) -> AddTpslOrderReqBuilder: """ - Margin mode: ISOLATED, CROSS, default: ISOLATED + Margin mode: ISOLATED, default: ISOLATED """ self.obj['marginMode'] = value return self @@ -363,7 +328,7 @@ def set_price(self, value: str) -> AddTpslOrderReqBuilder: def set_size(self, value: int) -> AddTpslOrderReqBuilder: """ - Order size (Lot), must be a positive integer. The quantity unit of coin-swap contracts is size(lot), and other units are not supported. + Order size (lot), must be a positive integer. The quantity unit of coin-swap contracts is size (lot), and other units are not supported. """ self.obj['size'] = value return self @@ -379,28 +344,28 @@ def set_time_in_force( def set_post_only(self, value: bool) -> AddTpslOrderReqBuilder: """ - 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. + 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. """ self.obj['postOnly'] = value return self def set_hidden(self, value: bool) -> AddTpslOrderReqBuilder: """ - Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. + Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. """ self.obj['hidden'] = value return self def set_iceberg(self, value: bool) -> AddTpslOrderReqBuilder: """ - 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. + 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. """ self.obj['iceberg'] = value return self def set_visible_size(self, value: str) -> AddTpslOrderReqBuilder: """ - 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. + 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. """ self.obj['visibleSize'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_tpsl_order_resp.py b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_tpsl_order_resp.py index 9f07a021..8ea30b30 100644 --- a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_tpsl_order_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_add_tpsl_order_resp.py @@ -17,8 +17,8 @@ class AddTpslOrderResp(BaseModel, Response): AddTpslOrderResp Attributes: - order_id (str): The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. - client_oid (str): The user self-defined order id. + order_id (str): The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. + client_oid (str): The user self-defined order ID. """ common_response: Optional[RestResponse] = Field( @@ -26,11 +26,11 @@ class AddTpslOrderResp(BaseModel, Response): order_id: Optional[str] = Field( default=None, description= - "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order.", + "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order.", alias="orderId") client_oid: Optional[str] = Field( default=None, - description="The user self-defined order id.", + description="The user self-defined order ID.", alias="clientOid") __properties: ClassVar[List[str]] = ["orderId", "clientOid"] diff --git a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_cancel_order_by_client_oid_req.py b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_cancel_order_by_client_oid_req.py index 311189e4..1e1c834d 100644 --- a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_cancel_order_by_client_oid_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_cancel_order_by_client_oid_req.py @@ -15,18 +15,18 @@ class CancelOrderByClientOidReq(BaseModel): CancelOrderByClientOidReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - client_oid (str): The user self-defined order id. + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + client_oid (str): The user self-defined order ID. """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) client_oid: Optional[str] = Field( default=None, - description="The user self-defined order id.", + description="The user self-defined order ID.", alias="clientOid") __properties: ClassVar[List[str]] = ["symbol", "clientOid"] @@ -79,14 +79,14 @@ def __init__(self): def set_symbol(self, value: str) -> CancelOrderByClientOidReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self def set_client_oid(self, value: str) -> CancelOrderByClientOidReqBuilder: """ - The user self-defined order id. + The user self-defined order ID. """ self.obj['clientOid'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_cancel_order_by_id_req.py b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_cancel_order_by_id_req.py index 911202de..f9454335 100644 --- a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_cancel_order_by_id_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_cancel_order_by_id_req.py @@ -15,11 +15,11 @@ class CancelOrderByIdReq(BaseModel): CancelOrderByIdReq Attributes: - order_id (str): Order id + order_id (str): Order ID """ order_id: Optional[str] = Field(default=None, - description="Order id", + description="Order ID", alias="orderId") __properties: ClassVar[List[str]] = ["orderId"] @@ -68,7 +68,7 @@ def __init__(self): def set_order_id(self, value: str) -> CancelOrderByIdReqBuilder: """ - Order id + Order ID """ self.obj['orderId'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_get_max_open_size_req.py b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_get_max_open_size_req.py index 54838ed4..7d4455f4 100644 --- a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_get_max_open_size_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_get_max_open_size_req.py @@ -15,17 +15,17 @@ class GetMaxOpenSizeReq(BaseModel): GetMaxOpenSizeReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - price (str): Order price + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + price (float): Order Price leverage (int): Leverage """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) - price: Optional[str] = Field(default=None, description="Order price ") + price: Optional[float] = Field(default=None, description="Order Price ") leverage: Optional[int] = Field(default=None, description="Leverage ") __properties: ClassVar[List[str]] = ["symbol", "price", "leverage"] @@ -77,14 +77,14 @@ def __init__(self): def set_symbol(self, value: str) -> GetMaxOpenSizeReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self - def set_price(self, value: str) -> GetMaxOpenSizeReqBuilder: + def set_price(self, value: float) -> GetMaxOpenSizeReqBuilder: """ - Order price + Order Price """ self.obj['price'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_get_max_open_size_resp.py b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_get_max_open_size_resp.py index e446b6e6..7398a35b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_get_max_open_size_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_get_max_open_size_resp.py @@ -17,7 +17,7 @@ class GetMaxOpenSizeResp(BaseModel, Response): GetMaxOpenSizeResp Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) max_buy_open_size (str): Maximum buy size max_sell_open_size (str): Maximum buy size """ @@ -27,7 +27,7 @@ class GetMaxOpenSizeResp(BaseModel, Response): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) max_buy_open_size: Optional[str] = Field(default=None, description="Maximum buy size ", diff --git a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_req.py b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_req.py index 81608975..f532234b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_req.py @@ -15,16 +15,16 @@ class ModifyIsolatedMarginRiskLimtReq(BaseModel): ModifyIsolatedMarginRiskLimtReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - level (int): level + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + level (int): Level """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) - level: Optional[int] = Field(default=None, description="level") + level: Optional[int] = Field(default=None, description="Level") __properties: ClassVar[List[str]] = ["symbol", "level"] @@ -76,14 +76,14 @@ def __init__(self): def set_symbol(self, value: str) -> ModifyIsolatedMarginRiskLimtReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self def set_level(self, value: int) -> ModifyIsolatedMarginRiskLimtReqBuilder: """ - level + Level """ self.obj['level'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_resp.py b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_resp.py index d5c23666..d92af52a 100644 --- a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_modify_isolated_margin_risk_limt_resp.py @@ -17,7 +17,7 @@ class ModifyIsolatedMarginRiskLimtResp(BaseModel, Response): ModifyIsolatedMarginRiskLimtResp Attributes: - data (bool): To adjust the level will cancel the open order, the response can only indicate whether the submit of the adjustment request is successful or not. + data (bool): Adjusting the level will result in the cancellation of any open orders. The response will indicate only whether the adjustment request was successfully submitted. """ common_response: Optional[RestResponse] = Field( @@ -25,7 +25,7 @@ class ModifyIsolatedMarginRiskLimtResp(BaseModel, Response): data: Optional[bool] = Field( default=None, description= - "To adjust the level will cancel the open order, the response can only indicate whether the submit of the adjustment request is successful or not. " + "Adjusting the level will result in the cancellation of any open orders. The response will indicate only whether the adjustment request was successfully submitted. " ) __properties: ClassVar[List[str]] = ["data"] diff --git a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_remove_isolated_margin_req.py b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_remove_isolated_margin_req.py index f6d5edd1..ed003af3 100644 --- a/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_remove_isolated_margin_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/copytrading/futures/model_remove_isolated_margin_req.py @@ -16,7 +16,7 @@ class RemoveIsolatedMarginReq(BaseModel): Attributes: symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - withdraw_amount (str): 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 + withdraw_amount (float): 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 """ symbol: Optional[str] = Field( @@ -24,7 +24,7 @@ class RemoveIsolatedMarginReq(BaseModel): description= "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) - withdraw_amount: Optional[str] = Field( + withdraw_amount: Optional[float] = Field( default=None, 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 ", @@ -86,7 +86,7 @@ def set_symbol(self, value: str) -> RemoveIsolatedMarginReqBuilder: return self def set_withdraw_amount(self, - value: str) -> RemoveIsolatedMarginReqBuilder: + value: float) -> RemoveIsolatedMarginReqBuilder: """ 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 """ diff --git a/sdk/python/kucoin_universal_sdk/generate/earn/earn/api_earn.py b/sdk/python/kucoin_universal_sdk/generate/earn/earn/api_earn.py index 62875daf..5d013b1b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/earn/earn/api_earn.py +++ b/sdk/python/kucoin_universal_sdk/generate/earn/earn/api_earn.py @@ -28,18 +28,18 @@ class EarnAPI(ABC): @abstractmethod def purchase(self, req: PurchaseReq, **kwargs: Any) -> PurchaseResp: """ - summary: purchase - description: This endpoint allows subscribing earn product + summary: Purchase + description: This endpoint allows you to subscribe Earn products. documentation: https://www.kucoin.com/docs-new/api-3470268 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | EARN | - | API-RATE-LIMIT-POOL | EARN | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | EARN | + | API-RATE-LIMIT-POOL | EARN | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -48,17 +48,17 @@ def get_redeem_preview(self, req: GetRedeemPreviewReq, **kwargs: Any) -> GetRedeemPreviewResp: """ summary: Get Redeem Preview - description: This endpoint allows subscribing earn products + description: This endpoint allows you to subscribe Earn products. documentation: https://www.kucoin.com/docs-new/api-3470269 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | EARN | - | API-RATE-LIMIT-POOL | EARN | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | EARN | + | API-RATE-LIMIT-POOL | EARN | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -66,17 +66,17 @@ def get_redeem_preview(self, req: GetRedeemPreviewReq, def redeem(self, req: RedeemReq, **kwargs: Any) -> RedeemResp: """ summary: Redeem - description: This endpoint allows initiating redemption by holding ID. If the current holding is fully redeemed or in the process of being redeemed, it indicates that the holding does not exist. + description: This endpoint allows you to redeem Earn products by using holding ID. If the current holding is fully redeemed or in the process of being redeemed, it means that the holding does not exist. documentation: https://www.kucoin.com/docs-new/api-3470270 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | EARN | - | API-RATE-LIMIT-POOL | EARN | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | EARN | + | API-RATE-LIMIT-POOL | EARN | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -85,17 +85,17 @@ def get_savings_products(self, req: GetSavingsProductsReq, **kwargs: Any) -> GetSavingsProductsResp: """ summary: Get Savings Products - description: This endpoint can get available savings products. If no products are available, an empty list is returned. + description: Available savings products can be obtained at this endpoint. If no products are available, an empty list is returned. documentation: https://www.kucoin.com/docs-new/api-3470271 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | EARN | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | EARN | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -104,36 +104,17 @@ def get_promotion_products(self, req: GetPromotionProductsReq, **kwargs: Any) -> GetPromotionProductsResp: """ summary: Get Promotion Products - description: This endpoint can get available limited-time promotion products. If no products are available, an empty list is returned. + description: Available limited-duration products can be obtained at this endpoint. If no products are available, an empty list is returned. documentation: https://www.kucoin.com/docs-new/api-3470272 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | EARN | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ - """ - pass - - @abstractmethod - def get_account_holding(self, req: GetAccountHoldingReq, - **kwargs: Any) -> GetAccountHoldingResp: - """ - summary: Get Account Holding - description: This endpoint can get current holding assets information. If no current holding assets are available, an empty list is returned. - documentation: https://www.kucoin.com/docs-new/api-3470273 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | EARN | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | EARN | + | API-RATE-LIMIT-WEIGHT | NULL | + +-----------------------+---------+ """ pass @@ -142,17 +123,17 @@ def get_staking_products(self, req: GetStakingProductsReq, **kwargs: Any) -> GetStakingProductsResp: """ summary: Get Staking Products - description: This endpoint can get available staking products. If no products are available, an empty list is returned. + description: Available staking products can be obtained at this endpoint. If no products are available, an empty list is returned. documentation: https://www.kucoin.com/docs-new/api-3470274 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | EARN | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | EARN | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -161,17 +142,17 @@ def get_kcs_staking_products(self, req: GetKcsStakingProductsReq, **kwargs: Any) -> GetKcsStakingProductsResp: """ summary: Get KCS Staking Products - description: This endpoint can get available KCS staking products. If no products are available, an empty list is returned. + description: Available KCS staking products can be obtained at this endpoint. If no products are available, an empty list is returned. documentation: https://www.kucoin.com/docs-new/api-3470275 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | EARN | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | EARN | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -180,17 +161,36 @@ def get_eth_staking_products(self, req: GetEthStakingProductsReq, **kwargs: Any) -> GetEthStakingProductsResp: """ summary: Get ETH Staking Products - description: This endpoint can get available ETH staking products. If no products are available, an empty list is returned. + description: Available ETH staking products can be obtained at this endpoint. If no products are available, an empty list is returned. documentation: https://www.kucoin.com/docs-new/api-3470276 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | EARN | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | EARN | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ + """ + pass + + @abstractmethod + def get_account_holding(self, req: GetAccountHoldingReq, + **kwargs: Any) -> GetAccountHoldingResp: + """ + summary: Get Account Holding + description: Information on currently held assets can be obtained at this endpoint. If no assets are currently held, an empty list is returned. + documentation: https://www.kucoin.com/docs-new/api-3470273 + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | EARN | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -228,12 +228,6 @@ def get_promotion_products(self, req: GetPromotionProductsReq, "/api/v1/earn/promotion/products", req, GetPromotionProductsResp(), False, **kwargs) - def get_account_holding(self, req: GetAccountHoldingReq, - **kwargs: Any) -> GetAccountHoldingResp: - return self.transport.call("spot", False, "GET", - "/api/v1/earn/hold-assets", req, - GetAccountHoldingResp(), False, **kwargs) - def get_staking_products(self, req: GetStakingProductsReq, **kwargs: Any) -> GetStakingProductsResp: return self.transport.call("spot", False, "GET", @@ -253,3 +247,9 @@ def get_eth_staking_products(self, req: GetEthStakingProductsReq, "/api/v1/earn/eth-staking/products", req, GetEthStakingProductsResp(), False, **kwargs) + + def get_account_holding(self, req: GetAccountHoldingReq, + **kwargs: Any) -> GetAccountHoldingResp: + return self.transport.call("spot", False, "GET", + "/api/v1/earn/hold-assets", req, + GetAccountHoldingResp(), False, **kwargs) diff --git a/sdk/python/kucoin_universal_sdk/generate/earn/earn/api_earn.template b/sdk/python/kucoin_universal_sdk/generate/earn/earn/api_earn.template index b157e30a..8afd6c39 100644 --- a/sdk/python/kucoin_universal_sdk/generate/earn/earn/api_earn.template +++ b/sdk/python/kucoin_universal_sdk/generate/earn/earn/api_earn.template @@ -4,7 +4,7 @@ def test_purchase_req(self): """ purchase - purchase + Purchase /api/v1/earn/orders """ @@ -96,25 +96,6 @@ def test_get_promotion_products_req(self): print("error: ", e) raise e -def test_get_account_holding_req(self): - """ - get_account_holding - Get Account Holding - /api/v1/earn/hold-assets - """ - - builder = GetAccountHoldingReqBuilder() - builder.set_currency(?).set_product_id(?).set_product_category(?).set_current_page(?).set_page_size(?) - req = builder.build() - try: - resp = self.api.get_account_holding(req) - print("code: ", resp.common_response.code) - print("msg: ", resp.common_response.message) - print("data: ", resp.to_json()) - except Exception as e: - print("error: ", e) - raise e - def test_get_staking_products_req(self): """ get_staking_products @@ -171,3 +152,22 @@ def test_get_eth_staking_products_req(self): except Exception as e: print("error: ", e) raise e + +def test_get_account_holding_req(self): + """ + get_account_holding + Get Account Holding + /api/v1/earn/hold-assets + """ + + builder = GetAccountHoldingReqBuilder() + builder.set_currency(?).set_product_id(?).set_product_category(?).set_current_page(?).set_page_size(?) + req = builder.build() + try: + resp = self.api.get_account_holding(req) + print("code: ", resp.common_response.code) + print("msg: ", resp.common_response.message) + print("data: ", resp.to_json()) + except Exception as e: + print("error: ", e) + raise e diff --git a/sdk/python/kucoin_universal_sdk/generate/earn/earn/api_earn_test.py b/sdk/python/kucoin_universal_sdk/generate/earn/earn/api_earn_test.py index cee5db0c..e66fa908 100644 --- a/sdk/python/kucoin_universal_sdk/generate/earn/earn/api_earn_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/earn/earn/api_earn_test.py @@ -25,7 +25,7 @@ class EarnAPITest(unittest.TestCase): def test_purchase_req_model(self): """ purchase - purchase + Purchase /api/v1/earn/orders """ data = "{\"productId\": \"2611\", \"amount\": \"1\", \"accountType\": \"TRADE\"}" @@ -34,7 +34,7 @@ def test_purchase_req_model(self): def test_purchase_resp_model(self): """ purchase - purchase + Purchase /api/v1/earn/orders """ data = "{\n \"code\": \"200000\",\n \"data\": {\n \"orderId\": \"2767291\",\n \"orderTxId\": \"6603694\"\n }\n}" @@ -117,25 +117,6 @@ def test_get_promotion_products_resp_model(self): common_response = RestResponse.from_json(data) resp = GetPromotionProductsResp.from_dict(common_response.data) - def test_get_account_holding_req_model(self): - """ - get_account_holding - Get Account Holding - /api/v1/earn/hold-assets - """ - data = "{\"currency\": \"KCS\", \"productId\": \"example_string_default_value\", \"productCategory\": \"DEMAND\", \"currentPage\": 1, \"pageSize\": 10}" - req = GetAccountHoldingReq.from_json(data) - - def test_get_account_holding_resp_model(self): - """ - get_account_holding - Get Account Holding - /api/v1/earn/hold-assets - """ - data = "{\n \"code\": \"200000\",\n \"data\": {\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"currentPage\": 1,\n \"pageSize\": 15,\n \"items\": [\n {\n \"orderId\": \"2767291\",\n \"productId\": \"2611\",\n \"productCategory\": \"KCS_STAKING\",\n \"productType\": \"DEMAND\",\n \"currency\": \"KCS\",\n \"incomeCurrency\": \"KCS\",\n \"returnRate\": \"0.03471727\",\n \"holdAmount\": \"1\",\n \"redeemedAmount\": \"0\",\n \"redeemingAmount\": \"1\",\n \"lockStartTime\": 1701252000000,\n \"lockEndTime\": null,\n \"purchaseTime\": 1729257513000,\n \"redeemPeriod\": 3,\n \"status\": \"REDEEMING\",\n \"earlyRedeemSupported\": 0\n }\n ]\n }\n}" - common_response = RestResponse.from_json(data) - resp = GetAccountHoldingResp.from_dict(common_response.data) - def test_get_staking_products_req_model(self): """ get_staking_products @@ -192,3 +173,22 @@ def test_get_eth_staking_products_resp_model(self): data = "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"id\": \"ETH2\",\n \"category\": \"ETH2\",\n \"type\": \"DEMAND\",\n \"precision\": 8,\n \"currency\": \"ETH\",\n \"incomeCurrency\": \"ETH2\",\n \"returnRate\": \"0.028\",\n \"userLowerLimit\": \"0.01\",\n \"userUpperLimit\": \"8557.3597075\",\n \"productUpperLimit\": \"8557.3597075\",\n \"productRemainAmount\": \"8557.3597075\",\n \"redeemPeriod\": 5,\n \"redeemType\": \"MANUAL\",\n \"incomeReleaseType\": \"DAILY\",\n \"applyStartTime\": 1729255485000,\n \"applyEndTime\": null,\n \"lockStartTime\": 1729255485000,\n \"lockEndTime\": null,\n \"interestDate\": 1729267200000,\n \"newUserOnly\": 0,\n \"earlyRedeemSupported\": 0,\n \"duration\": 0,\n \"status\": \"ONGOING\"\n }\n ]\n}" common_response = RestResponse.from_json(data) resp = GetEthStakingProductsResp.from_dict(common_response.data) + + def test_get_account_holding_req_model(self): + """ + get_account_holding + Get Account Holding + /api/v1/earn/hold-assets + """ + data = "{\"currency\": \"KCS\", \"productId\": \"example_string_default_value\", \"productCategory\": \"DEMAND\", \"currentPage\": 1, \"pageSize\": 10}" + req = GetAccountHoldingReq.from_json(data) + + def test_get_account_holding_resp_model(self): + """ + get_account_holding + Get Account Holding + /api/v1/earn/hold-assets + """ + data = "{\n \"code\": \"200000\",\n \"data\": {\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"currentPage\": 1,\n \"pageSize\": 15,\n \"items\": [\n {\n \"orderId\": \"2767291\",\n \"productId\": \"2611\",\n \"productCategory\": \"KCS_STAKING\",\n \"productType\": \"DEMAND\",\n \"currency\": \"KCS\",\n \"incomeCurrency\": \"KCS\",\n \"returnRate\": \"0.03471727\",\n \"holdAmount\": \"1\",\n \"redeemedAmount\": \"0\",\n \"redeemingAmount\": \"1\",\n \"lockStartTime\": 1701252000000,\n \"lockEndTime\": null,\n \"purchaseTime\": 1729257513000,\n \"redeemPeriod\": 3,\n \"status\": \"REDEEMING\",\n \"earlyRedeemSupported\": 0\n }\n ]\n }\n}" + common_response = RestResponse.from_json(data) + resp = GetAccountHoldingResp.from_dict(common_response.data) diff --git a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_account_holding_req.py b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_account_holding_req.py index c7ebc428..c6889735 100644 --- a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_account_holding_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_account_holding_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetAccountHoldingReq(BaseModel): @@ -48,12 +47,11 @@ class ProductCategoryEnum(Enum): current_page: Optional[int] = Field(default=1, description="Current request page.", alias="currentPage") - page_size: Optional[Annotated[ - int, Field(le=500, strict=True, ge=10)]] = Field( - default=15, - description= - "Number of results per request. Minimum is 10, maximum is 500.", - alias="pageSize") + page_size: Optional[int] = Field( + default=15, + description= + "Number of results per request. Minimum is 10, maximum is 500.", + alias="pageSize") __properties: ClassVar[List[str]] = [ "currency", "productId", "productCategory", "currentPage", "pageSize" diff --git a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_account_holding_resp.py b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_account_holding_resp.py index f210680d..787e3a19 100644 --- a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_account_holding_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_account_holding_resp.py @@ -22,7 +22,7 @@ class GetAccountHoldingResp(BaseModel, Response): items (list[GetAccountHoldingItems]): current_page (int): current page page_size (int): page size - total_page (int): total page + total_page (int): total pages """ common_response: Optional[RestResponse] = Field( @@ -38,7 +38,7 @@ class GetAccountHoldingResp(BaseModel, Response): description="page size", alias="pageSize") total_page: Optional[int] = Field(default=None, - description="total page", + description="total pages", alias="totalPage") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_eth_staking_products_data.py b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_eth_staking_products_data.py index cc1e114e..e49b94b0 100644 --- a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_eth_staking_products_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_eth_staking_products_data.py @@ -23,10 +23,10 @@ class GetEthStakingProductsData(BaseModel): currency (str): currency income_currency (str): Income currency return_rate (str): Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return - user_lower_limit (str): Min user subscribe amount - user_upper_limit (str): Max user subscribe amount - product_upper_limit (str): Products total subscribe amount - product_remain_amount (str): Products remain subscribe amount + user_lower_limit (str): Min. user subscribe amount + user_upper_limit (str): Max. user subscription amount + product_upper_limit (str): Products total subscription amount + product_remain_amount (str): Remaining product subscription amount redeem_period (int): Redemption waiting period (days) redeem_type (RedeemTypeEnum): Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) income_release_type (IncomeReleaseTypeEnum): Income release type: DAILY (daily release), AFTER (release after product ends) @@ -34,11 +34,11 @@ class GetEthStakingProductsData(BaseModel): apply_end_time (int): Subscription end time, in milliseconds lock_start_time (int): Product earliest interest start time, in milliseconds lock_end_time (int): Product maturity time, in milliseconds - interest_date (int): Most recent interest date(millisecond) - new_user_only (NewUserOnlyEnum): Whether the product is exclusive for new users: 0 (no), 1 (yes) + interest_date (int): Most recent interest date (milliseconds) + new_user_only (NewUserOnlyEnum): Whether the product is exclusive to new users: 0 (no), 1 (yes) early_redeem_supported (EarlyRedeemSupportedEnum): Whether the fixed product supports early redemption: 0 (no), 1 (yes) duration (int): Product duration (days) - status (StatusEnum): Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) + status (StatusEnum): Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) """ class CategoryEnum(Enum): @@ -124,19 +124,19 @@ class StatusEnum(Enum): alias="returnRate") user_lower_limit: Optional[str] = Field( default=None, - description="Min user subscribe amount", + description="Min. user subscribe amount", alias="userLowerLimit") user_upper_limit: Optional[str] = Field( default=None, - description="Max user subscribe amount", + description="Max. user subscription amount", alias="userUpperLimit") product_upper_limit: Optional[str] = Field( default=None, - description="Products total subscribe amount", + description="Products total subscription amount", alias="productUpperLimit") product_remain_amount: Optional[str] = Field( default=None, - description="Products remain subscribe amount", + description="Remaining product subscription amount", alias="productRemainAmount") redeem_period: Optional[int] = Field( default=None, @@ -170,12 +170,12 @@ class StatusEnum(Enum): alias="lockEndTime") interest_date: Optional[int] = Field( default=None, - description="Most recent interest date(millisecond)", + description="Most recent interest date (milliseconds)", alias="interestDate") new_user_only: Optional[NewUserOnlyEnum] = Field( default=None, description= - "Whether the product is exclusive for new users: 0 (no), 1 (yes)", + "Whether the product is exclusive to new users: 0 (no), 1 (yes)", alias="newUserOnly") early_redeem_supported: Optional[EarlyRedeemSupportedEnum] = Field( default=None, @@ -187,7 +187,7 @@ class StatusEnum(Enum): status: Optional[StatusEnum] = Field( default=None, description= - "Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress)" + "Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress)" ) __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_kcs_staking_products_data.py b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_kcs_staking_products_data.py index 1f6c62b5..359b9587 100644 --- a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_kcs_staking_products_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_kcs_staking_products_data.py @@ -21,9 +21,9 @@ class GetKcsStakingProductsData(BaseModel): category (CategoryEnum): Product category: KCS_STAKING type (TypeEnum): Product subtype: TIME (fixed), DEMAND (demand) precision (int): Maximum precision supported - product_upper_limit (str): Products total subscribe amount - user_upper_limit (str): Max user subscribe amount - user_lower_limit (str): Min user subscribe amount + product_upper_limit (str): Products total subscription amount + user_upper_limit (str): Max. user subscription amount + user_lower_limit (str): Min. user subscribe amount redeem_period (int): Redemption waiting period (days) lock_start_time (int): Product earliest interest start time, in milliseconds lock_end_time (int): Product maturity time, in milliseconds @@ -32,13 +32,13 @@ class GetKcsStakingProductsData(BaseModel): return_rate (str): Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return income_currency (str): Income currency early_redeem_supported (EarlyRedeemSupportedEnum): Whether the fixed product supports early redemption: 0 (no), 1 (yes) - product_remain_amount (str): Products remain subscribe amount - status (StatusEnum): Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) + product_remain_amount (str): Remaining product subscription amount + status (StatusEnum): Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) redeem_type (RedeemTypeEnum): Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) income_release_type (IncomeReleaseTypeEnum): Income release type: DAILY (daily release), AFTER (release after product ends) - interest_date (int): Most recent interest date(millisecond) + interest_date (int): Most recent interest date (milliseconds) duration (int): Product duration (days) - new_user_only (NewUserOnlyEnum): Whether the product is exclusive for new users: 0 (no), 1 (yes) + new_user_only (NewUserOnlyEnum): Whether the product is exclusive to new users: 0 (no), 1 (yes) """ class CategoryEnum(Enum): @@ -119,15 +119,15 @@ class NewUserOnlyEnum(Enum): description="Maximum precision supported") product_upper_limit: Optional[str] = Field( default=None, - description="Products total subscribe amount", + description="Products total subscription amount", alias="productUpperLimit") user_upper_limit: Optional[str] = Field( default=None, - description="Max user subscribe amount", + description="Max. user subscription amount", alias="userUpperLimit") user_lower_limit: Optional[str] = Field( default=None, - description="Min user subscribe amount", + description="Min. user subscribe amount", alias="userLowerLimit") redeem_period: Optional[int] = Field( default=None, @@ -164,12 +164,12 @@ class NewUserOnlyEnum(Enum): alias="earlyRedeemSupported") product_remain_amount: Optional[str] = Field( default=None, - description="Products remain subscribe amount", + description="Remaining product subscription amount", alias="productRemainAmount") status: Optional[StatusEnum] = Field( default=None, description= - "Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress)" + "Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress)" ) redeem_type: Optional[RedeemTypeEnum] = Field( default=None, @@ -183,14 +183,14 @@ class NewUserOnlyEnum(Enum): alias="incomeReleaseType") interest_date: Optional[int] = Field( default=None, - description="Most recent interest date(millisecond)", + description="Most recent interest date (milliseconds)", alias="interestDate") duration: Optional[int] = Field(default=None, description="Product duration (days)") new_user_only: Optional[NewUserOnlyEnum] = Field( default=None, description= - "Whether the product is exclusive for new users: 0 (no), 1 (yes)", + "Whether the product is exclusive to new users: 0 (no), 1 (yes)", alias="newUserOnly") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_promotion_products_data.py b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_promotion_products_data.py index 471daad0..2eb7a516 100644 --- a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_promotion_products_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_promotion_products_data.py @@ -21,24 +21,24 @@ class GetPromotionProductsData(BaseModel): category (CategoryEnum): Product category: ACTIVITY type (TypeEnum): Product subtype: TIME (fixed), DEMAND (demand) precision (int): Maximum precision supported - product_upper_limit (str): Products total subscribe amount - user_upper_limit (str): Max user subscribe amount - user_lower_limit (str): Min user subscribe amount + product_upper_limit (str): Products total subscription amount + user_upper_limit (str): Max. user subscription amount + user_lower_limit (str): Min. user subscribe amount redeem_period (int): Redemption waiting period (days) lock_start_time (int): Product earliest interest start time, in milliseconds - lock_end_time (int): Product earliest interest end time, in milliseconds + lock_end_time (int): Earliest interest end time of product, in milliseconds apply_start_time (int): Subscription start time, in milliseconds apply_end_time (int): Subscription end time, in milliseconds return_rate (str): Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return income_currency (str): Income currency early_redeem_supported (EarlyRedeemSupportedEnum): Whether the fixed product supports early redemption: 0 (no), 1 (yes) - product_remain_amount (str): Products remain subscribe amount - status (StatusEnum): Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) + product_remain_amount (str): Remaining product subscription amount + status (StatusEnum): Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) redeem_type (RedeemTypeEnum): Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) income_release_type (IncomeReleaseTypeEnum): Income release type: DAILY (daily release), AFTER (release after product ends) - interest_date (int): Most recent interest date(millisecond) + interest_date (int): Most recent interest date (milliseconds) duration (int): Product duration (days) - new_user_only (NewUserOnlyEnum): Whether the product is exclusive for new users: 0 (no), 1 (yes) + new_user_only (NewUserOnlyEnum): Whether the product is exclusive to new users: 0 (no), 1 (yes) """ class CategoryEnum(Enum): @@ -119,15 +119,15 @@ class NewUserOnlyEnum(Enum): description="Maximum precision supported") product_upper_limit: Optional[str] = Field( default=None, - description="Products total subscribe amount", + description="Products total subscription amount", alias="productUpperLimit") user_upper_limit: Optional[str] = Field( default=None, - description="Max user subscribe amount", + description="Max. user subscription amount", alias="userUpperLimit") user_lower_limit: Optional[str] = Field( default=None, - description="Min user subscribe amount", + description="Min. user subscribe amount", alias="userLowerLimit") redeem_period: Optional[int] = Field( default=None, @@ -139,7 +139,7 @@ class NewUserOnlyEnum(Enum): alias="lockStartTime") lock_end_time: Optional[int] = Field( default=None, - description="Product earliest interest end time, in milliseconds", + description="Earliest interest end time of product, in milliseconds", alias="lockEndTime") apply_start_time: Optional[int] = Field( default=None, @@ -164,12 +164,12 @@ class NewUserOnlyEnum(Enum): alias="earlyRedeemSupported") product_remain_amount: Optional[str] = Field( default=None, - description="Products remain subscribe amount", + description="Remaining product subscription amount", alias="productRemainAmount") status: Optional[StatusEnum] = Field( default=None, description= - "Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress)" + "Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress)" ) redeem_type: Optional[RedeemTypeEnum] = Field( default=None, @@ -183,14 +183,14 @@ class NewUserOnlyEnum(Enum): alias="incomeReleaseType") interest_date: Optional[int] = Field( default=None, - description="Most recent interest date(millisecond)", + description="Most recent interest date (milliseconds)", alias="interestDate") duration: Optional[int] = Field(default=None, description="Product duration (days)") new_user_only: Optional[NewUserOnlyEnum] = Field( default=None, description= - "Whether the product is exclusive for new users: 0 (no), 1 (yes)", + "Whether the product is exclusive to new users: 0 (no), 1 (yes)", alias="newUserOnly") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_savings_products_data.py b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_savings_products_data.py index 49c3e5b9..314d059d 100644 --- a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_savings_products_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_savings_products_data.py @@ -21,9 +21,9 @@ class GetSavingsProductsData(BaseModel): category (CategoryEnum): Product category: DEMAND (savings) type (TypeEnum): Product subtype: TIME (fixed), DEMAND (demand) precision (int): Maximum precision supported - product_upper_limit (str): Products total subscribe amount - user_upper_limit (str): Max user subscribe amount - user_lower_limit (str): Min user subscribe amount + product_upper_limit (str): Products total subscription amount + user_upper_limit (str): Max. user subscription amount + user_lower_limit (str): Min. user subscribe amount redeem_period (int): Redemption waiting period (days) lock_start_time (int): Product earliest interest start time, in milliseconds lock_end_time (int): Product maturity time, in milliseconds @@ -32,13 +32,13 @@ class GetSavingsProductsData(BaseModel): return_rate (str): Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return income_currency (str): Income currency early_redeem_supported (EarlyRedeemSupportedEnum): Whether the fixed product supports early redemption: 0 (no), 1 (yes) - product_remain_amount (str): Products remain subscribe amount - status (StatusEnum): Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) + product_remain_amount (str): Remaining product subscription amount + status (StatusEnum): Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress) redeem_type (RedeemTypeEnum): Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) income_release_type (IncomeReleaseTypeEnum): Income release type: DAILY (daily release), AFTER (release after product ends) - interest_date (int): Most recent interest date(millisecond) + interest_date (int): Most recent interest date (milliseconds) duration (int): Product duration (days) - new_user_only (NewUserOnlyEnum): Whether the product is exclusive for new users: 0 (no), 1 (yes) + new_user_only (NewUserOnlyEnum): Whether the product is exclusive to new users: 0 (no), 1 (yes) """ class CategoryEnum(Enum): @@ -119,15 +119,15 @@ class NewUserOnlyEnum(Enum): description="Maximum precision supported") product_upper_limit: Optional[str] = Field( default=None, - description="Products total subscribe amount", + description="Products total subscription amount", alias="productUpperLimit") user_upper_limit: Optional[str] = Field( default=None, - description="Max user subscribe amount", + description="Max. user subscription amount", alias="userUpperLimit") user_lower_limit: Optional[str] = Field( default=None, - description="Min user subscribe amount", + description="Min. user subscribe amount", alias="userLowerLimit") redeem_period: Optional[int] = Field( default=None, @@ -164,12 +164,12 @@ class NewUserOnlyEnum(Enum): alias="earlyRedeemSupported") product_remain_amount: Optional[str] = Field( default=None, - description="Products remain subscribe amount", + description="Remaining product subscription amount", alias="productRemainAmount") status: Optional[StatusEnum] = Field( default=None, description= - "Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress)" + "Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress)" ) redeem_type: Optional[RedeemTypeEnum] = Field( default=None, @@ -183,14 +183,14 @@ class NewUserOnlyEnum(Enum): alias="incomeReleaseType") interest_date: Optional[int] = Field( default=None, - description="Most recent interest date(millisecond)", + description="Most recent interest date (milliseconds)", alias="interestDate") duration: Optional[int] = Field(default=None, description="Product duration (days)") new_user_only: Optional[NewUserOnlyEnum] = Field( default=None, description= - "Whether the product is exclusive for new users: 0 (no), 1 (yes)", + "Whether the product is exclusive to new users: 0 (no), 1 (yes)", alias="newUserOnly") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_staking_products_data.py b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_staking_products_data.py index 01fabe0d..deaddc80 100644 --- a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_staking_products_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_get_staking_products_data.py @@ -21,9 +21,9 @@ class GetStakingProductsData(BaseModel): category (CategoryEnum): Product category: STAKING type (TypeEnum): Product subtype: TIME (fixed), DEMAND (demand) precision (int): Maximum precision supported - product_upper_limit (str): Products total subscribe amount - user_upper_limit (str): Max user subscribe amount - user_lower_limit (str): Min user subscribe amount + product_upper_limit (str): Products total subscription amount + user_upper_limit (str): Max. user subscription amount + user_lower_limit (str): Min. user subscription amount redeem_period (int): Redemption waiting period (days) lock_start_time (int): Product earliest interest start time, in milliseconds lock_end_time (int): Product maturity time, in milliseconds @@ -32,13 +32,13 @@ class GetStakingProductsData(BaseModel): return_rate (str): Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return income_currency (str): Income currency early_redeem_supported (EarlyRedeemSupportedEnum): Whether the fixed product supports early redemption: 0 (no), 1 (yes) - product_remain_amount (str): Products remain subscribe amount - status (StatusEnum): Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress) + product_remain_amount (str): Remaining product subscription amount + status (StatusEnum): Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest accrual in progress) redeem_type (RedeemTypeEnum): Redemption channel: MANUAL (manual redemption), TRANS_DEMAND (transfer to corresponding demand product upon maturity), AUTO (redeem to funding account upon maturity) income_release_type (IncomeReleaseTypeEnum): Income release type: DAILY (daily release), AFTER (release after product ends) - interest_date (int): Most recent interest date(millisecond) + interest_date (int): Most recent interest date (milliseconds) duration (int): Product duration (days) - new_user_only (NewUserOnlyEnum): Whether the product is exclusive for new users: 0 (no), 1 (yes) + new_user_only (NewUserOnlyEnum): Whether the product is exclusive to new users: 0 (no), 1 (yes) """ class CategoryEnum(Enum): @@ -119,15 +119,15 @@ class NewUserOnlyEnum(Enum): description="Maximum precision supported") product_upper_limit: Optional[str] = Field( default=None, - description="Products total subscribe amount", + description="Products total subscription amount", alias="productUpperLimit") user_upper_limit: Optional[str] = Field( default=None, - description="Max user subscribe amount", + description="Max. user subscription amount", alias="userUpperLimit") user_lower_limit: Optional[str] = Field( default=None, - description="Min user subscribe amount", + description="Min. user subscription amount", alias="userLowerLimit") redeem_period: Optional[int] = Field( default=None, @@ -164,12 +164,12 @@ class NewUserOnlyEnum(Enum): alias="earlyRedeemSupported") product_remain_amount: Optional[str] = Field( default=None, - description="Products remain subscribe amount", + description="Remaining product subscription amount", alias="productRemainAmount") status: Optional[StatusEnum] = Field( default=None, description= - "Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress)" + "Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest accrual in progress)" ) redeem_type: Optional[RedeemTypeEnum] = Field( default=None, @@ -183,14 +183,14 @@ class NewUserOnlyEnum(Enum): alias="incomeReleaseType") interest_date: Optional[int] = Field( default=None, - description="Most recent interest date(millisecond)", + description="Most recent interest date (milliseconds)", alias="interestDate") duration: Optional[int] = Field(default=None, description="Product duration (days)") new_user_only: Optional[NewUserOnlyEnum] = Field( default=None, description= - "Whether the product is exclusive for new users: 0 (no), 1 (yes)", + "Whether the product is exclusive to new users: 0 (no), 1 (yes)", alias="newUserOnly") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_purchase_req.py b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_purchase_req.py index d513fdff..7eddfe5b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_purchase_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/earn/earn/model_purchase_req.py @@ -16,7 +16,7 @@ class PurchaseReq(BaseModel): PurchaseReq Attributes: - product_id (str): Product Id + product_id (str): Product ID amount (str): Subscription amount account_type (AccountTypeEnum): MAIN (funding account), TRADE (spot trading account) """ @@ -31,7 +31,7 @@ class AccountTypeEnum(Enum): TRADE = 'TRADE' product_id: Optional[str] = Field(default=None, - description="Product Id", + description="Product ID", alias="productId") amount: Optional[str] = Field(default=None, description="Subscription amount") @@ -88,7 +88,7 @@ def __init__(self): def set_product_id(self, value: str) -> PurchaseReqBuilder: """ - Product Id + Product ID """ self.obj['productId'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/api_funding_fees.py b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/api_funding_fees.py index 687da818..f54f5934 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/api_funding_fees.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/api_funding_fees.py @@ -17,18 +17,18 @@ class FundingFeesAPI(ABC): def get_current_funding_rate(self, req: GetCurrentFundingRateReq, **kwargs: Any) -> GetCurrentFundingRateResp: """ - summary: Get Current Funding Rate - description: get Current Funding Rate + summary: Get Current Funding Rate. + description: Get Current Funding Rate. documentation: https://www.kucoin.com/docs-new/api-3470265 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -38,17 +38,17 @@ def get_public_funding_history( **kwargs: Any) -> GetPublicFundingHistoryResp: """ summary: Get Public Funding History - description: Query the funding rate at each settlement time point within a certain time range of the corresponding contract + description: Query the funding rate at each settlement time point within a certain time range of the corresponding contract. documentation: https://www.kucoin.com/docs-new/api-3470266 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -60,15 +60,15 @@ def get_private_funding_history( summary: Get Private Funding History description: Submit request to get the funding history. documentation: https://www.kucoin.com/docs-new/api-3470267 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/api_funding_fees.template b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/api_funding_fees.template index 5baf1c68..29075e19 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/api_funding_fees.template +++ b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/api_funding_fees.template @@ -4,7 +4,7 @@ def test_get_current_funding_rate_req(self): """ get_current_funding_rate - Get Current Funding Rate + Get Current Funding Rate. /api/v1/funding-rate/{symbol}/current """ @@ -47,7 +47,7 @@ def test_get_private_funding_history_req(self): """ builder = GetPrivateFundingHistoryReqBuilder() - builder.set_symbol(?).set_from_(?).set_to(?).set_reverse(?).set_offset(?).set_forward(?).set_max_count(?) + builder.set_symbol(?).set_start_at(?).set_end_at(?).set_reverse(?).set_offset(?).set_forward(?).set_max_count(?) req = builder.build() try: resp = self.api.get_private_funding_history(req) diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/api_funding_fees_test.py b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/api_funding_fees_test.py index c7d20048..3948b3cf 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/api_funding_fees_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/api_funding_fees_test.py @@ -13,7 +13,7 @@ class FundingFeesAPITest(unittest.TestCase): def test_get_current_funding_rate_req_model(self): """ get_current_funding_rate - Get Current Funding Rate + Get Current Funding Rate. /api/v1/funding-rate/{symbol}/current """ data = "{\"symbol\": \"XBTUSDTM\"}" @@ -22,7 +22,7 @@ def test_get_current_funding_rate_req_model(self): def test_get_current_funding_rate_resp_model(self): """ get_current_funding_rate - Get Current Funding Rate + Get Current Funding Rate. /api/v1/funding-rate/{symbol}/current """ data = "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \".XBTUSDTMFPI8H\",\n \"granularity\": 28800000,\n \"timePoint\": 1731441600000,\n \"value\": 6.41E-4,\n \"predictedValue\": 5.2E-5,\n \"fundingRateCap\": 0.003,\n \"fundingRateFloor\": -0.003\n }\n}" @@ -54,7 +54,7 @@ def test_get_private_funding_history_req_model(self): Get Private Funding History /api/v1/funding-history """ - data = "{\"symbol\": \"XBTUSDTM\", \"from\": 1700310700000, \"to\": 1702310700000, \"reverse\": true, \"offset\": 123456, \"forward\": true, \"maxCount\": 123456}" + data = "{\"symbol\": \"XBTUSDTM\", \"startAt\": 1700310700000, \"endAt\": 1702310700000, \"reverse\": true, \"offset\": 123456, \"forward\": true, \"maxCount\": 123456}" req = GetPrivateFundingHistoryReq.from_json(data) def test_get_private_funding_history_resp_model(self): diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_current_funding_rate_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_current_funding_rate_req.py index 7521ecf0..8341d8f4 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_current_funding_rate_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_current_funding_rate_req.py @@ -15,14 +15,14 @@ class GetCurrentFundingRateReq(BaseModel): GetCurrentFundingRateReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ symbol: Optional[str] = Field( default=None, path_variable="True", description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) __properties: ClassVar[List[str]] = ["symbol"] @@ -72,7 +72,7 @@ def __init__(self): def set_symbol(self, value: str) -> GetCurrentFundingRateReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_current_funding_rate_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_current_funding_rate_resp.py index f7fd803a..e8bbb55d 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_current_funding_rate_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_current_funding_rate_resp.py @@ -18,8 +18,8 @@ class GetCurrentFundingRateResp(BaseModel, Response): Attributes: symbol (str): Funding Rate Symbol - granularity (int): Granularity (milisecond) - time_point (int): The funding rate settlement time point of the previous cycle (milisecond) + granularity (int): Granularity (milliseconds) + time_point (int): The funding rate settlement time point of the previous cycle (milliseconds) value (float): Current cycle funding rate predicted_value (float): Predicted funding rate funding_rate_cap (float): Maximum Funding Rate @@ -30,12 +30,12 @@ class GetCurrentFundingRateResp(BaseModel, Response): default=None, description="Common response") symbol: Optional[str] = Field(default=None, description="Funding Rate Symbol ") - granularity: Optional[int] = Field(default=None, - description="Granularity (milisecond) ") + granularity: Optional[int] = Field( + default=None, description="Granularity (milliseconds) ") time_point: Optional[int] = Field( default=None, description= - "The funding rate settlement time point of the previous cycle (milisecond) ", + "The funding rate settlement time point of the previous cycle (milliseconds) ", alias="timePoint") value: Optional[float] = Field(default=None, description="Current cycle funding rate ") diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_private_funding_history_data_list.py b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_private_funding_history_data_list.py index 1a6d5827..31338c49 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_private_funding_history_data_list.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_private_funding_history_data_list.py @@ -16,16 +16,16 @@ class GetPrivateFundingHistoryDataList(BaseModel): GetPrivateFundingHistoryDataList Attributes: - id (int): id - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - time_point (int): Time point (milisecond) + id (int): ID + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + time_point (int): Time point (milliseconds) funding_rate (float): Funding rate mark_price (float): Mark price position_qty (int): Position size position_cost (float): Position value at settlement period - funding (float): Settled funding fees. A positive number means that the user received the funding fee, and vice versa. - settle_currency (str): settlement currency - context (str): context + funding (float): Settled funding fees A positive number means that the user received the funding fee, and vice versa. + settle_currency (str): Settlement currency + context (str): Context margin_mode (MarginModeEnum): Margin mode: ISOLATED (isolated), CROSS (cross margin). """ @@ -38,14 +38,14 @@ class MarginModeEnum(Enum): ISOLATED = 'ISOLATED' CROSS = 'CROSS' - id: Optional[int] = Field(default=None, description="id") + id: Optional[int] = Field(default=None, description="ID") symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) time_point: Optional[int] = Field(default=None, - description="Time point (milisecond) ", + description="Time point (milliseconds) ", alias="timePoint") funding_rate: Optional[float] = Field(default=None, description="Funding rate ", @@ -63,12 +63,12 @@ class MarginModeEnum(Enum): funding: Optional[float] = Field( default=None, description= - "Settled funding fees. A positive number means that the user received the funding fee, and vice versa. " + "Settled funding fees A positive number means that the user received the funding fee, and vice versa. " ) settle_currency: Optional[str] = Field(default=None, - description="settlement currency ", + description="Settlement currency ", alias="settleCurrency") - context: Optional[str] = Field(default=None, description="context") + context: Optional[str] = Field(default=None, description="Context") margin_mode: Optional[MarginModeEnum] = Field( default=None, description="Margin mode: ISOLATED (isolated), CROSS (cross margin).", diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_private_funding_history_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_private_funding_history_req.py index 3f9be0a0..c66011db 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_private_funding_history_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_private_funding_history_req.py @@ -15,29 +15,30 @@ class GetPrivateFundingHistoryReq(BaseModel): GetPrivateFundingHistoryReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - from_ (int): Begin time (milisecond) - to (int): End time (milisecond) - reverse (bool): 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 + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + start_at (int): Begin time (milliseconds) + end_at (int): End time (milliseconds) + reverse (bool): 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. offset (int): 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. - forward (bool): 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 - max_count (int): Max record count. The default record count is 10 + forward (bool): 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. + max_count (int): Max. record count. The default record count is 10 """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) - from_: Optional[int] = Field(default=None, - description="Begin time (milisecond) ", - alias="from") - to: Optional[int] = Field(default=None, - description="End time (milisecond) ") + start_at: Optional[int] = Field(default=None, + description="Begin time (milliseconds) ", + alias="startAt") + end_at: Optional[int] = Field(default=None, + description="End time (milliseconds) ", + alias="endAt") reverse: Optional[bool] = Field( default=None, 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 " + "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. " ) offset: Optional[int] = Field( default=None, @@ -47,15 +48,16 @@ class GetPrivateFundingHistoryReq(BaseModel): forward: Optional[bool] = Field( default=None, 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 " + "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. " ) max_count: Optional[int] = Field( default=None, - description="Max record count. The default record count is 10", + description="Max. record count. The default record count is 10", alias="maxCount") __properties: ClassVar[List[str]] = [ - "symbol", "from", "to", "reverse", "offset", "forward", "maxCount" + "symbol", "startAt", "endAt", "reverse", "offset", "forward", + "maxCount" ] model_config = ConfigDict( @@ -94,8 +96,8 @@ def from_dict( _obj = cls.model_validate({ "symbol": obj.get("symbol"), - "from": obj.get("from"), - "to": obj.get("to"), + "startAt": obj.get("startAt"), + "endAt": obj.get("endAt"), "reverse": obj.get("reverse"), "offset": obj.get("offset"), "forward": obj.get("forward"), @@ -111,28 +113,28 @@ def __init__(self): def set_symbol(self, value: str) -> GetPrivateFundingHistoryReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self - def set_from_(self, value: int) -> GetPrivateFundingHistoryReqBuilder: + def set_start_at(self, value: int) -> GetPrivateFundingHistoryReqBuilder: """ - Begin time (milisecond) + Begin time (milliseconds) """ - self.obj['from'] = value + self.obj['startAt'] = value return self - def set_to(self, value: int) -> GetPrivateFundingHistoryReqBuilder: + def set_end_at(self, value: int) -> GetPrivateFundingHistoryReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ - self.obj['to'] = value + self.obj['endAt'] = value return self def set_reverse(self, value: bool) -> GetPrivateFundingHistoryReqBuilder: """ - 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 + 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. """ self.obj['reverse'] = value return self @@ -146,14 +148,14 @@ def set_offset(self, value: int) -> GetPrivateFundingHistoryReqBuilder: def set_forward(self, value: bool) -> GetPrivateFundingHistoryReqBuilder: """ - 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 + 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. """ self.obj['forward'] = value return self def set_max_count(self, value: int) -> GetPrivateFundingHistoryReqBuilder: """ - Max record count. The default record count is 10 + Max. record count. The default record count is 10 """ self.obj['maxCount'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_public_funding_history_data.py b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_public_funding_history_data.py index 95251762..390ead02 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_public_funding_history_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_public_funding_history_data.py @@ -15,21 +15,21 @@ class GetPublicFundingHistoryData(BaseModel): GetPublicFundingHistoryData Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) funding_rate (float): Funding rate - timepoint (int): Time point (milisecond) + timepoint (int): Time point (milliseconds) """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) funding_rate: Optional[float] = Field(default=None, description="Funding rate", alias="fundingRate") timepoint: Optional[int] = Field(default=None, - description="Time point (milisecond) ") + description="Time point (milliseconds) ") __properties: ClassVar[List[str]] = ["symbol", "fundingRate", "timepoint"] diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_public_funding_history_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_public_funding_history_req.py index 5485a60f..9b383356 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_public_funding_history_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/fundingfees/model_get_public_funding_history_req.py @@ -15,21 +15,21 @@ class GetPublicFundingHistoryReq(BaseModel): GetPublicFundingHistoryReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - from_ (int): Begin time (milisecond) - to (int): End time (milisecond) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + from_ (int): Begin time (milliseconds) + to (int): End time (milliseconds) """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) from_: Optional[int] = Field(default=None, - description="Begin time (milisecond) ", + description="Begin time (milliseconds) ", alias="from") to: Optional[int] = Field(default=None, - description="End time (milisecond) ") + description="End time (milliseconds) ") __properties: ClassVar[List[str]] = ["symbol", "from", "to"] @@ -82,21 +82,21 @@ def __init__(self): def set_symbol(self, value: str) -> GetPublicFundingHistoryReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self def set_from_(self, value: int) -> GetPublicFundingHistoryReqBuilder: """ - Begin time (milisecond) + Begin time (milliseconds) """ self.obj['from'] = value return self def set_to(self, value: int) -> GetPublicFundingHistoryReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['to'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_all_order_event.py b/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_all_order_event.py index 7217b326..75f73379 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_all_order_event.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_all_order_event.py @@ -18,27 +18,27 @@ class AllOrderEvent(BaseModel): AllOrderEvent Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) order_type (OrderTypeEnum): User-specified order type side (SideEnum): buy or sell canceled_size (str): Cumulative number of cancellations order_id (str): The unique order id generated by the trading system margin_mode (MarginModeEnum): Margin Mode type (TypeEnum): Order Type - order_time (int): Order time(Nanosecond) + order_time (int): Order time (nanoseconds) size (str): User-specified order size - filled_size (str): Cumulative number of filled + filled_size (str): Cumulative number filled price (str): Price remain_size (str): Remain size status (StatusEnum): Order Status - ts (int): Push time(Nanosecond) + ts (int): Push time (nanoseconds) liquidity (LiquidityEnum): Actual transaction order type, If the counterparty order is an [Hidden/Iceberg Order](https://www.kucoin.com/docs-new/doc-338146), even if it is a maker order, this param will be displayed as taker. For actual trading fee, please refer to the **feeType** fee_type (FeeTypeEnum): Actual Fee Type - match_price (str): Match Price(when the type is \"match\") + match_price (str): Match Price (when the type is \"match\") match_size (str): Match Size (when the type is \"match\") - trade_id (str): Trade id, it is generated by Matching engine. + trade_id (str): Trade ID: Generated by Matching engine. old_size (str): The size before order update - client_oid (str): Client Order Id,The ClientOid field is a unique ID created by the user + client_oid (str): Client Order ID: The ClientOid field is a unique ID created by the user trade_type (TradeTypeEnum): normal order or liquid order """ @@ -72,9 +72,9 @@ class MarginModeEnum(Enum): class TypeEnum(Enum): """ Attributes: - OPEN: the order is in the order book(maker order) - MATCH: the message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. - UPDATE: The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three situations: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. + OPEN: the order is in the order book (maker order) + MATCH: The message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. + UPDATE: The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three scenarios: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. FILLED: The message sent when the status of the order changes to DONE after the transaction CANCELED: The message sent when the status of the order changes to DONE due to being canceled """ @@ -87,7 +87,7 @@ class TypeEnum(Enum): class StatusEnum(Enum): """ Attributes: - OPEN: the order is in the order book(maker order) + OPEN: the order is in the order book (maker order) MATCH: when taker order executes with orders in the order book, the taker order status is “match” DONE: the order is fully executed successfully """ @@ -117,7 +117,7 @@ class TradeTypeEnum(Enum): """ Attributes: TRADE: Normal trade order - LIQUID: Liquid order, except type=update, all other types will be pushed + LIQUID: Liquid order; all other types with the exception of type=update will be pushed """ TRADE = 'trade' LIQUID = 'liquid' @@ -127,7 +127,7 @@ class TradeTypeEnum(Enum): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) " ) order_type: Optional[OrderTypeEnum] = Field( default=None, @@ -147,14 +147,13 @@ class TradeTypeEnum(Enum): alias="marginMode") type: Optional[TypeEnum] = Field(default=None, description="Order Type") order_time: Optional[int] = Field(default=None, - description="Order time(Nanosecond)", + description="Order time (nanoseconds)", alias="orderTime") size: Optional[str] = Field(default=None, description="User-specified order size") - filled_size: Optional[str] = Field( - default=None, - description="Cumulative number of filled", - alias="filledSize") + filled_size: Optional[str] = Field(default=None, + description="Cumulative number filled", + alias="filledSize") price: Optional[str] = Field(default=None, description="Price") remain_size: Optional[str] = Field(default=None, description="Remain size", @@ -162,7 +161,7 @@ class TradeTypeEnum(Enum): status: Optional[StatusEnum] = Field(default=None, description="Order Status") ts: Optional[int] = Field(default=None, - description="Push time(Nanosecond)") + description="Push time (nanoseconds)") liquidity: Optional[LiquidityEnum] = Field( default=None, description= @@ -173,7 +172,7 @@ class TradeTypeEnum(Enum): alias="feeType") match_price: Optional[str] = Field( default=None, - description="Match Price(when the type is \"match\")", + description="Match Price (when the type is \"match\")", alias="matchPrice") match_size: Optional[str] = Field( default=None, @@ -181,7 +180,7 @@ class TradeTypeEnum(Enum): alias="matchSize") trade_id: Optional[str] = Field( default=None, - description="Trade id, it is generated by Matching engine.", + description="Trade ID: Generated by Matching engine.", alias="tradeId") old_size: Optional[str] = Field(default=None, description="The size before order update", @@ -189,7 +188,7 @@ class TradeTypeEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Client Order Id,The ClientOid field is a unique ID created by the user", + "Client Order ID: The ClientOid field is a unique ID created by the user", alias="clientOid") trade_type: Optional[TradeTypeEnum] = Field( default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_all_position_event.py b/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_all_position_event.py index c8512f20..0a2a06ad 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_all_position_event.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_all_position_event.py @@ -18,40 +18,40 @@ class AllPositionEvent(BaseModel): AllPositionEvent Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) cross_mode (bool): Whether it is cross margin. delev_percentage (float): ADL ranking percentile opening_timestamp (int): Open time current_timestamp (int): Current timestamp - current_qty (int): Current postion quantity - current_cost (float): Current postion value + current_qty (int): Current position quantity + current_cost (float): Current position value current_comm (float): Current commission - unrealised_cost (float): Unrealised value - realised_gross_cost (float): Accumulated realised gross profit value - realised_cost (float): Current realised position value + unrealised_cost (float): Unrealized value + realised_gross_cost (float): Accumulated realized gross profit value + realised_cost (float): Current realized position value is_open (bool): Opened position or not mark_price (float): Mark price mark_value (float): Mark Value pos_cost (float): Position value pos_init (float): Inital margin Cross = opening value/cross leverage; isolated = accumulation of initial margin for each transaction pos_margin (float): Bankruptcy cost Cross = mark value * imr; Isolated = position margin (accumulation of initial margin, additional margin, generated funding fees, etc.) - realised_gross_pnl (float): Accumulated realised gross profit value - realised_pnl (float): Realised profit and loss - unrealised_pnl (float): Unrealised profit and loss + realised_gross_pnl (float): Accumulated realized gross profit value + realised_pnl (float): Realized profit and loss + unrealised_pnl (float): Unrealized profit and loss unrealised_pnl_pcnt (float): Profit-loss ratio of the position unrealised_roe_pcnt (float): Rate of return on investment avg_entry_price (float): Average entry price - liquidation_price (float): Liquidation price For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. - bankrupt_price (float): Bankruptcy price For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. + liquidation_price (float): Liquidation price: For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. + bankrupt_price (float): Bankruptcy price: For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. settle_currency (str): Currency used to clear and settle the trades - margin_mode (MarginModeEnum): Margin Mode: CROSS,ISOLATED + margin_mode (MarginModeEnum): Margin Mode: CROSS, ISOLATED position_side (PositionSideEnum): Position Side leverage (float): Leverage auto_deposit (bool): Auto deposit margin or not **Only applicable to Isolated Margin** maint_margin_req (float): Maintenance margin requirement **Only applicable to Isolated Margin** risk_limit (int): Risk limit **Only applicable to Isolated Margin** real_leverage (float): Leverage of the order **Only applicable to Isolated Margin** - pos_cross (float): added margin **Only applicable to Isolated Margin** + pos_cross (float): Added margin **Only applicable to Isolated Margin** pos_comm (float): Bankruptcy cost **Only applicable to Isolated Margin** pos_loss (float): Funding fees paid out **Only applicable to Isolated Margin** pos_funding (float): The current remaining unsettled funding fee for the position **Only applicable to Isolated Margin** @@ -61,7 +61,7 @@ class AllPositionEvent(BaseModel): qty (int): Position size funding_rate (float): Funding rate funding_fee (float): Funding fees - ts (int): Funding Fee Settlement Time (nanosecond) + ts (int): Funding Fee Settlement Time (nanoseconds) success (bool): Adjustment isolated margin risk limit level successful or not msg (str): Adjustment isolated margin risk limit level failure reason """ @@ -87,7 +87,7 @@ class PositionSideEnum(Enum): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) " ) cross_mode: Optional[bool] = Field( default=None, @@ -103,25 +103,27 @@ class PositionSideEnum(Enum): current_timestamp: Optional[int] = Field(default=None, description="Current timestamp ", alias="currentTimestamp") - current_qty: Optional[int] = Field(default=None, - description="Current postion quantity ", - alias="currentQty") - current_cost: Optional[float] = Field(default=None, - description="Current postion value ", - alias="currentCost") + current_qty: Optional[int] = Field( + default=None, + description="Current position quantity ", + alias="currentQty") + current_cost: Optional[float] = Field( + default=None, + description="Current position value ", + alias="currentCost") current_comm: Optional[float] = Field(default=None, description="Current commission ", alias="currentComm") unrealised_cost: Optional[float] = Field(default=None, - description="Unrealised value ", + description="Unrealized value ", alias="unrealisedCost") realised_gross_cost: Optional[float] = Field( default=None, - description="Accumulated realised gross profit value ", + description="Accumulated realized gross profit value ", alias="realisedGrossCost") realised_cost: Optional[float] = Field( default=None, - description="Current realised position value ", + description="Current realized position value ", alias="realisedCost") is_open: Optional[bool] = Field(default=None, description="Opened position or not ", @@ -147,15 +149,15 @@ class PositionSideEnum(Enum): alias="posMargin") realised_gross_pnl: Optional[float] = Field( default=None, - description="Accumulated realised gross profit value ", + description="Accumulated realized gross profit value ", alias="realisedGrossPnl") realised_pnl: Optional[float] = Field( default=None, - description="Realised profit and loss ", + description="Realized profit and loss ", alias="realisedPnl") unrealised_pnl: Optional[float] = Field( default=None, - description="Unrealised profit and loss ", + description="Unrealized profit and loss ", alias="unrealisedPnl") unrealised_pnl_pcnt: Optional[float] = Field( default=None, @@ -172,12 +174,12 @@ class PositionSideEnum(Enum): liquidation_price: Optional[float] = Field( default=None, description= - "Liquidation price For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. ", + "Liquidation price: For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. ", alias="liquidationPrice") bankrupt_price: Optional[float] = Field( default=None, description= - "Bankruptcy price For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. ", + "Bankruptcy price: For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. ", alias="bankruptPrice") settle_currency: Optional[str] = Field( default=None, @@ -185,7 +187,7 @@ class PositionSideEnum(Enum): alias="settleCurrency") margin_mode: Optional[MarginModeEnum] = Field( default=None, - description="Margin Mode: CROSS,ISOLATED ", + description="Margin Mode: CROSS, ISOLATED ", alias="marginMode") position_side: Optional[PositionSideEnum] = Field( default=None, description="Position Side ", alias="positionSide") @@ -211,7 +213,7 @@ class PositionSideEnum(Enum): alias="realLeverage") pos_cross: Optional[float] = Field( default=None, - description="added margin **Only applicable to Isolated Margin** ", + description="Added margin **Only applicable to Isolated Margin** ", alias="posCross") pos_comm: Optional[float] = Field( default=None, @@ -247,7 +249,7 @@ class PositionSideEnum(Enum): description="Funding fees", alias="fundingFee") ts: Optional[int] = Field( - default=None, description="Funding Fee Settlement Time (nanosecond)") + default=None, description="Funding Fee Settlement Time (nanoseconds)") success: Optional[bool] = Field( default=None, description= diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_order_event.py b/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_order_event.py index 1cf32177..31dc4887 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_order_event.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_order_event.py @@ -18,27 +18,27 @@ class OrderEvent(BaseModel): OrderEvent Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) order_type (OrderTypeEnum): User-specified order type side (SideEnum): buy or sell canceled_size (str): Cumulative number of cancellations order_id (str): The unique order id generated by the trading system margin_mode (MarginModeEnum): Margin Mode type (TypeEnum): Order Type - order_time (int): Order time(Nanosecond) + order_time (int): Order time (nanoseconds) size (str): User-specified order size - filled_size (str): Cumulative number of filled + filled_size (str): Cumulative number filled price (str): Price remain_size (str): Remain size status (StatusEnum): Order Status - ts (int): Push time(Nanosecond) + ts (int): Push time (nanoseconds) liquidity (LiquidityEnum): Actual transaction order type, If the counterparty order is an [Hidden/Iceberg Order](https://www.kucoin.com/docs-new/doc-338146), even if it is a maker order, this param will be displayed as taker. For actual trading fee, please refer to the **feeType** fee_type (FeeTypeEnum): Actual Fee Type - match_price (str): Match Price(when the type is \"match\") + match_price (str): Match Price (when the type is \"match\") match_size (str): Match Size (when the type is \"match\") - trade_id (str): Trade id, it is generated by Matching engine. + trade_id (str): Trade ID: Generated by Matching engine. old_size (str): The size before order update - client_oid (str): Client Order Id,The ClientOid field is a unique ID created by the user + client_oid (str): Client Order ID: The ClientOid field is a unique ID created by the user trade_type (TradeTypeEnum): normal order or liquid order """ @@ -72,9 +72,9 @@ class MarginModeEnum(Enum): class TypeEnum(Enum): """ Attributes: - OPEN: the order is in the order book(maker order) - MATCH: the message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. - UPDATE: The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three situations: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. + OPEN: the order is in the order book (maker order) + MATCH: The message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. + UPDATE: The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three scenarios: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. FILLED: The message sent when the status of the order changes to DONE after the transaction CANCELED: The message sent when the status of the order changes to DONE due to being canceled """ @@ -87,7 +87,7 @@ class TypeEnum(Enum): class StatusEnum(Enum): """ Attributes: - OPEN: the order is in the order book(maker order) + OPEN: the order is in the order book (maker order) MATCH: when taker order executes with orders in the order book, the taker order status is “match” DONE: the order is fully executed successfully """ @@ -117,7 +117,7 @@ class TradeTypeEnum(Enum): """ Attributes: TRADE: Normal trade order - LIQUID: Liquid order, except type=update, all other types will be pushed + LIQUID: Liquid order; all other types with the exception of type=update will be pushed """ TRADE = 'trade' LIQUID = 'liquid' @@ -127,7 +127,7 @@ class TradeTypeEnum(Enum): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) " ) order_type: Optional[OrderTypeEnum] = Field( default=None, @@ -147,14 +147,13 @@ class TradeTypeEnum(Enum): alias="marginMode") type: Optional[TypeEnum] = Field(default=None, description="Order Type") order_time: Optional[int] = Field(default=None, - description="Order time(Nanosecond)", + description="Order time (nanoseconds)", alias="orderTime") size: Optional[str] = Field(default=None, description="User-specified order size") - filled_size: Optional[str] = Field( - default=None, - description="Cumulative number of filled", - alias="filledSize") + filled_size: Optional[str] = Field(default=None, + description="Cumulative number filled", + alias="filledSize") price: Optional[str] = Field(default=None, description="Price") remain_size: Optional[str] = Field(default=None, description="Remain size", @@ -162,7 +161,7 @@ class TradeTypeEnum(Enum): status: Optional[StatusEnum] = Field(default=None, description="Order Status") ts: Optional[int] = Field(default=None, - description="Push time(Nanosecond)") + description="Push time (nanoseconds)") liquidity: Optional[LiquidityEnum] = Field( default=None, description= @@ -173,7 +172,7 @@ class TradeTypeEnum(Enum): alias="feeType") match_price: Optional[str] = Field( default=None, - description="Match Price(when the type is \"match\")", + description="Match Price (when the type is \"match\")", alias="matchPrice") match_size: Optional[str] = Field( default=None, @@ -181,7 +180,7 @@ class TradeTypeEnum(Enum): alias="matchSize") trade_id: Optional[str] = Field( default=None, - description="Trade id, it is generated by Matching engine.", + description="Trade ID: Generated by Matching engine.", alias="tradeId") old_size: Optional[str] = Field(default=None, description="The size before order update", @@ -189,7 +188,7 @@ class TradeTypeEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Client Order Id,The ClientOid field is a unique ID created by the user", + "Client Order ID: The ClientOid field is a unique ID created by the user", alias="clientOid") trade_type: Optional[TradeTypeEnum] = Field( default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_position_event.py b/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_position_event.py index ee2cd6cd..13bf755a 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_position_event.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_position_event.py @@ -18,40 +18,40 @@ class PositionEvent(BaseModel): PositionEvent Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) cross_mode (bool): Whether it is cross margin. delev_percentage (float): ADL ranking percentile opening_timestamp (int): Open time current_timestamp (int): Current timestamp - current_qty (int): Current postion quantity - current_cost (float): Current postion value + current_qty (int): Current position quantity + current_cost (float): Current position value current_comm (float): Current commission - unrealised_cost (float): Unrealised value - realised_gross_cost (float): Accumulated realised gross profit value - realised_cost (float): Current realised position value + unrealised_cost (float): Unrealized value + realised_gross_cost (float): Accumulated realized gross profit value + realised_cost (float): Current realized position value is_open (bool): Opened position or not mark_price (float): Mark price mark_value (float): Mark Value pos_cost (float): Position value pos_init (float): Inital margin Cross = opening value/cross leverage; isolated = accumulation of initial margin for each transaction pos_margin (float): Bankruptcy cost Cross = mark value * imr; Isolated = position margin (accumulation of initial margin, additional margin, generated funding fees, etc.) - realised_gross_pnl (float): Accumulated realised gross profit value - realised_pnl (float): Realised profit and loss - unrealised_pnl (float): Unrealised profit and loss + realised_gross_pnl (float): Accumulated realized gross profit value + realised_pnl (float): Realized profit and loss + unrealised_pnl (float): Unrealized profit and loss unrealised_pnl_pcnt (float): Profit-loss ratio of the position unrealised_roe_pcnt (float): Rate of return on investment avg_entry_price (float): Average entry price - liquidation_price (float): Liquidation price For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. - bankrupt_price (float): Bankruptcy price For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. + liquidation_price (float): Liquidation price: For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. + bankrupt_price (float): Bankruptcy price: For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. settle_currency (str): Currency used to clear and settle the trades - margin_mode (MarginModeEnum): Margin Mode: CROSS,ISOLATED + margin_mode (MarginModeEnum): Margin Mode: CROSS, ISOLATED position_side (PositionSideEnum): Position Side leverage (float): Leverage auto_deposit (bool): Auto deposit margin or not **Only applicable to Isolated Margin** maint_margin_req (float): Maintenance margin requirement **Only applicable to Isolated Margin** risk_limit (int): Risk limit **Only applicable to Isolated Margin** real_leverage (float): Leverage of the order **Only applicable to Isolated Margin** - pos_cross (float): added margin **Only applicable to Isolated Margin** + pos_cross (float): Added margin **Only applicable to Isolated Margin** pos_comm (float): Bankruptcy cost **Only applicable to Isolated Margin** pos_loss (float): Funding fees paid out **Only applicable to Isolated Margin** pos_funding (float): The current remaining unsettled funding fee for the position **Only applicable to Isolated Margin** @@ -61,7 +61,7 @@ class PositionEvent(BaseModel): qty (int): Position size funding_rate (float): Funding rate funding_fee (float): Funding fees - ts (int): Funding Fee Settlement Time (nanosecond) + ts (int): Funding Fee Settlement Time (nanoseconds) success (bool): Adjustment isolated margin risk limit level successful or not msg (str): Adjustment isolated margin risk limit level failure reason """ @@ -87,7 +87,7 @@ class PositionSideEnum(Enum): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) " ) cross_mode: Optional[bool] = Field( default=None, @@ -103,25 +103,27 @@ class PositionSideEnum(Enum): current_timestamp: Optional[int] = Field(default=None, description="Current timestamp ", alias="currentTimestamp") - current_qty: Optional[int] = Field(default=None, - description="Current postion quantity ", - alias="currentQty") - current_cost: Optional[float] = Field(default=None, - description="Current postion value ", - alias="currentCost") + current_qty: Optional[int] = Field( + default=None, + description="Current position quantity ", + alias="currentQty") + current_cost: Optional[float] = Field( + default=None, + description="Current position value ", + alias="currentCost") current_comm: Optional[float] = Field(default=None, description="Current commission ", alias="currentComm") unrealised_cost: Optional[float] = Field(default=None, - description="Unrealised value ", + description="Unrealized value ", alias="unrealisedCost") realised_gross_cost: Optional[float] = Field( default=None, - description="Accumulated realised gross profit value ", + description="Accumulated realized gross profit value ", alias="realisedGrossCost") realised_cost: Optional[float] = Field( default=None, - description="Current realised position value ", + description="Current realized position value ", alias="realisedCost") is_open: Optional[bool] = Field(default=None, description="Opened position or not ", @@ -147,15 +149,15 @@ class PositionSideEnum(Enum): alias="posMargin") realised_gross_pnl: Optional[float] = Field( default=None, - description="Accumulated realised gross profit value ", + description="Accumulated realized gross profit value ", alias="realisedGrossPnl") realised_pnl: Optional[float] = Field( default=None, - description="Realised profit and loss ", + description="Realized profit and loss ", alias="realisedPnl") unrealised_pnl: Optional[float] = Field( default=None, - description="Unrealised profit and loss ", + description="Unrealized profit and loss ", alias="unrealisedPnl") unrealised_pnl_pcnt: Optional[float] = Field( default=None, @@ -172,12 +174,12 @@ class PositionSideEnum(Enum): liquidation_price: Optional[float] = Field( default=None, description= - "Liquidation price For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. ", + "Liquidation price: For Cross Margin, you can refer to the liquidationPrice, and the liquidation is based on the risk rate. ", alias="liquidationPrice") bankrupt_price: Optional[float] = Field( default=None, description= - "Bankruptcy price For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. ", + "Bankruptcy price: For Cross Margin, you can refer to the bankruptPrice, and the liquidation is based on the risk rate. ", alias="bankruptPrice") settle_currency: Optional[str] = Field( default=None, @@ -185,7 +187,7 @@ class PositionSideEnum(Enum): alias="settleCurrency") margin_mode: Optional[MarginModeEnum] = Field( default=None, - description="Margin Mode: CROSS,ISOLATED ", + description="Margin Mode: CROSS, ISOLATED ", alias="marginMode") position_side: Optional[PositionSideEnum] = Field( default=None, description="Position Side ", alias="positionSide") @@ -211,7 +213,7 @@ class PositionSideEnum(Enum): alias="realLeverage") pos_cross: Optional[float] = Field( default=None, - description="added margin **Only applicable to Isolated Margin** ", + description="Added margin **Only applicable to Isolated Margin** ", alias="posCross") pos_comm: Optional[float] = Field( default=None, @@ -247,7 +249,7 @@ class PositionSideEnum(Enum): description="Funding fees", alias="fundingFee") ts: Optional[int] = Field( - default=None, description="Funding Fee Settlement Time (nanosecond)") + default=None, description="Funding Fee Settlement Time (nanoseconds)") success: Optional[bool] = Field( default=None, description= diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_stop_orders_event.py b/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_stop_orders_event.py index f0b4cc4b..ceba4413 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_stop_orders_event.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/model_stop_orders_event.py @@ -21,14 +21,14 @@ class StopOrdersEvent(BaseModel): created_at (int): margin_mode (MarginModeEnum): Margin Mode order_id (str): The unique order id generated by the trading system - order_price (str): Order price + order_price (str): Order Price order_type (OrderTypeEnum): User-specified order type side (SideEnum): buy or sell size (int): User-specified order size stop (StopEnum): Either 'down' or 'up' stop_price (str): Stop Price stop_price_type (str): - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) ts (int): type (TypeEnum): Order Type """ @@ -62,7 +62,7 @@ class StopEnum(Enum): """ Attributes: DOWN: Triggers when the price reaches or goes below the stopPrice - UP: Triggers when the price reaches or goes above the stopPrice + UP: Triggers when the price reaches or goes above the stopPrice. """ DOWN = 'down' UP = 'up' @@ -70,7 +70,7 @@ class StopEnum(Enum): class TypeEnum(Enum): """ Attributes: - OPEN: the order is in the order book(maker order) + OPEN: the order is in the order book (maker order) TRIGGERED: when the stop order has been triggered CANCEL: when the order has been canceled """ @@ -89,7 +89,7 @@ class TypeEnum(Enum): description="The unique order id generated by the trading system", alias="orderId") order_price: Optional[str] = Field(default=None, - description="Order price", + description="Order Price", alias="orderPrice") order_type: Optional[OrderTypeEnum] = Field( default=None, @@ -107,7 +107,7 @@ class TypeEnum(Enum): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-221752070) " ) ts: Optional[int] = None type: Optional[TypeEnum] = Field(default=None, description="Order Type") diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/ws_futures_private.py b/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/ws_futures_private.py index 3bfa6341..299b191c 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/ws_futures_private.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/futures_private/ws_futures_private.py @@ -19,7 +19,7 @@ def all_order(self, callback: AllOrderEventCallback) -> str: """ summary: All Order change pushes. description: Push order changes for all symbol - push frequency: realtime + push frequency: real-time """ pass @@ -27,8 +27,8 @@ def all_order(self, callback: AllOrderEventCallback) -> str: def all_position(self, callback: AllPositionEventCallback) -> str: """ summary: All symbol position change events push - description: Subscribe this topic to get the realtime push of position change event of all symbol - push frequency: realtime + description: Subscribe to this topic to get real-time pushes on all symbols’ position change events + push frequency: real-time """ pass @@ -36,8 +36,8 @@ def all_position(self, callback: AllPositionEventCallback) -> str: def balance(self, callback: BalanceEventCallback) -> str: """ summary: the balance change push - description: Subscribe this topic to get the realtime push of balance change - push frequency: realtime + description: Subscribe to this topic to get real-time balance change pushes + push frequency: real-time """ pass @@ -45,8 +45,8 @@ def balance(self, callback: BalanceEventCallback) -> str: def cross_leverage(self, callback: CrossLeverageEventCallback) -> str: """ summary: the leverage change push - description: Subscribe this topic to get the realtime push of leverage change of contracts that are in cross margin mode - push frequency: realtime + description: Subscribe to this topic to get real-time pushes on leverage changes of contracts that are in cross margin mode + push frequency: real-time """ pass @@ -54,8 +54,8 @@ def cross_leverage(self, callback: CrossLeverageEventCallback) -> str: def margin_mode(self, callback: MarginModeEventCallback) -> str: """ summary: the margin mode change - description: Subscribe this topic to get the realtime push of margin mode change event of a symbol - push frequency: realtime + description: Subscribe to this topic to get real-time pushes on symbols’ margin mode change events + push frequency: real-time """ pass @@ -64,7 +64,7 @@ def order(self, symbol: str, callback: OrderEventCallback) -> str: """ summary: Order change pushes. description: Push order changes for the specified symbol - push frequency: realtime + push frequency: real-time """ pass @@ -72,8 +72,8 @@ def order(self, symbol: str, callback: OrderEventCallback) -> str: def position(self, symbol: str, callback: PositionEventCallback) -> str: """ summary: the position change events push - description: Subscribe this topic to get the realtime push of position change event of a symbol - push frequency: realtime + description: Subscribe this topic to get real-time pushes on symbols’ position change events + push frequency: real-time """ pass @@ -81,8 +81,8 @@ def position(self, symbol: str, callback: PositionEventCallback) -> str: def stop_orders(self, callback: StopOrdersEventCallback) -> str: """ summary: stop order change pushes. - description: Subscribe this topic to get the realtime push of stop order changes. - push frequency: realtime + description: Subscribe to this topic to get real-time pushes on stop order changes. + push frequency: real-time """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/futures_public/model_instrument_event.py b/sdk/python/kucoin_universal_sdk/generate/futures/futures_public/model_instrument_event.py index 906c9d28..434dd399 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/futures_public/model_instrument_event.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/futures_public/model_instrument_event.py @@ -17,7 +17,7 @@ class InstrumentEvent(BaseModel): InstrumentEvent Attributes: - granularity (int): Granularity (predicted funding rate: 1-min granularity: 60000; Funding rate: 8-hours granularity: 28800000. ) + granularity (int): Granularity (predicted funding rate: 1-min granularity: 60000; Funding rate: 8-hours granularity: 28800000.) funding_rate (float): timestamp (int): mark_price (float): @@ -29,7 +29,7 @@ class InstrumentEvent(BaseModel): granularity: Optional[int] = Field( default=None, description= - "Granularity (predicted funding rate: 1-min granularity: 60000; Funding rate: 8-hours granularity: 28800000. )" + "Granularity (predicted funding rate: 1-min granularity: 60000; Funding rate: 8-hours granularity: 28800000.)" ) funding_rate: Optional[float] = Field(default=None, alias="fundingRate") timestamp: Optional[int] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/futures_public/ws_futures_public.py b/sdk/python/kucoin_universal_sdk/generate/futures/futures_public/ws_futures_public.py index 4125e52d..eb1a3694 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/futures_public/ws_futures_public.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/futures_public/ws_futures_public.py @@ -31,7 +31,7 @@ def execution(self, symbol: str, callback: ExecutionEventCallback) -> str: """ summary: Match execution data. description: For each order executed, the system will send you the match messages in the format as following. - push frequency: realtime + push frequency: real-time """ pass @@ -60,8 +60,8 @@ def orderbook_increment(self, symbol: str, callback: OrderbookIncrementEventCallback) -> str: """ summary: Orderbook - Increment - description: The system will return the increment change orderbook data(All depth), If there is no change in the market, data will not be pushed - push frequency: realtime + description: The system will return the increment change orderbook data (all depth). If there is no change in the market, data will not be pushed. + push frequency: real-time """ pass @@ -80,7 +80,7 @@ def orderbook_level5(self, symbol: str, callback: OrderbookLevel5EventCallback) -> str: """ summary: Orderbook - Level5 - description: The system will return the 5 best ask/bid orders data, If there is no change in the market, data will not be pushed + description: The system will return the 5 best ask/bid orders data. If there is no change in the market, data will not be pushed push frequency: 100ms """ pass @@ -90,7 +90,7 @@ def symbol_snapshot(self, symbol: str, callback: SymbolSnapshotEventCallback) -> str: """ summary: Symbol Snapshot - description: Get symbol's snapshot. + description: Get symbol snapshot. push frequency: 5000ms """ pass @@ -99,8 +99,8 @@ def symbol_snapshot(self, symbol: str, def ticker_v1(self, symbol: str, callback: TickerV1EventCallback) -> str: """ summary: Get Ticker(not recommended) - description: Subscribe this topic to get the realtime push of BBO changes.It is not recommended to use this topic any more. For real-time ticker information, please subscribe /contractMarket/tickerV2:{symbol}. - push frequency: realtime + description: Subscribe to this topic to get real-time pushes on BBO changes. It is not recommended to use this topic any more. For real-time ticker information, please subscribe /contractMarket/tickerV2:{symbol}. + push frequency: real-time """ pass @@ -108,8 +108,8 @@ def ticker_v1(self, symbol: str, callback: TickerV1EventCallback) -> str: def ticker_v2(self, symbol: str, callback: TickerV2EventCallback) -> str: """ summary: Get Ticker V2 - description: Subscribe this topic to get the realtime push of BBO changes. After subscription, when there are changes in the order book(Not necessarily ask1/bid1 changes), the system will push the real-time ticker symbol information to you. - push frequency: realtime + description: Subscribe to this topic to get real-time pushes of BBO changes. After subscription, when there are changes in the order book (not necessarily ask1/bid1 changes), the system will push the real-time ticker symbol information to you. + push frequency: real-time """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/api_market.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/api_market.py index 3b405aea..92ee7bef 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/api_market.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/api_market.py @@ -38,17 +38,17 @@ class MarketAPI(ABC): def get_symbol(self, req: GetSymbolReq, **kwargs: Any) -> GetSymbolResp: """ summary: Get Symbol - 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. + 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. documentation: https://www.kucoin.com/docs-new/api-3470221 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -56,17 +56,17 @@ def get_symbol(self, req: GetSymbolReq, **kwargs: Any) -> GetSymbolResp: def get_all_symbols(self, **kwargs: Any) -> GetAllSymbolsResp: """ summary: Get All Symbols - 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. + 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. documentation: https://www.kucoin.com/docs-new/api-3470220 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -74,17 +74,17 @@ def get_all_symbols(self, **kwargs: Any) -> GetAllSymbolsResp: def get_ticker(self, req: GetTickerReq, **kwargs: Any) -> GetTickerResp: """ summary: Get Ticker - 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. + 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. documentation: https://www.kucoin.com/docs-new/api-3470222 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -92,17 +92,17 @@ def get_ticker(self, req: GetTickerReq, **kwargs: Any) -> GetTickerResp: def get_all_tickers(self, **kwargs: Any) -> GetAllTickersResp: """ summary: Get All Tickers - 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. + 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. documentation: https://www.kucoin.com/docs-new/api-3470223 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -111,17 +111,17 @@ def get_full_order_book(self, req: GetFullOrderBookReq, **kwargs: Any) -> GetFullOrderBookResp: """ summary: Get Full OrderBook - 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 up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook. + 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. documentation: https://www.kucoin.com/docs-new/api-3470224 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -130,17 +130,17 @@ def get_part_order_book(self, req: GetPartOrderBookReq, **kwargs: Any) -> GetPartOrderBookResp: """ summary: Get Part OrderBook - description: Query for part orderbook depth data. (aggregated by price) You are recommended to request via this endpoint as the system reponse would be faster and cosume less traffic. + 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. documentation: https://www.kucoin.com/docs-new/api-3470225 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -149,17 +149,17 @@ def get_trade_history(self, req: GetTradeHistoryReq, **kwargs: Any) -> GetTradeHistoryResp: """ summary: Get Trade History - description: Request via this endpoint to get the trade history of the specified symbol, the returned quantity is the last 100 transaction records. + description: Request the trade history of the specified symbol via this endpoint. The returned quantity is the last 100 transaction records. documentation: https://www.kucoin.com/docs-new/api-3470232 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -167,17 +167,17 @@ def get_trade_history(self, req: GetTradeHistoryReq, def get_klines(self, req: GetKlinesReq, **kwargs: Any) -> GetKlinesResp: """ summary: Get Klines - description: Get the Kline of the symbol. Data are returned in grouped buckets based on requested type. For each query, the system would return at most 500 pieces of data. To obtain more data, please page the data by time. + 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. documentation: https://www.kucoin.com/docs-new/api-3470234 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -186,17 +186,17 @@ def get_mark_price(self, req: GetMarkPriceReq, **kwargs: Any) -> GetMarkPriceResp: """ summary: Get Mark Price - description: Get current mark price + description: Get the current mark price (Update snapshots once per second, real-time query). documentation: https://www.kucoin.com/docs-new/api-3470233 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -205,17 +205,17 @@ def get_spot_index_price(self, req: GetSpotIndexPriceReq, **kwargs: Any) -> GetSpotIndexPriceResp: """ summary: Get Spot Index Price - description: Get Spot Index Price + description: Get Spot Index Price (Update snapshots once per second, and there is a 5s cache when querying). documentation: https://www.kucoin.com/docs-new/api-3470231 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -224,17 +224,17 @@ def get_interest_rate_index(self, req: GetInterestRateIndexReq, **kwargs: Any) -> GetInterestRateIndexResp: """ summary: Get Interest Rate Index - description: Get interest rate Index. + description: Get interest rate Index (real-time query). documentation: https://www.kucoin.com/docs-new/api-3470226 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -243,35 +243,35 @@ def get_premium_index(self, req: GetPremiumIndexReq, **kwargs: Any) -> GetPremiumIndexResp: """ summary: Get Premium Index - description: Submit request to get premium index. + description: Submit request to get premium index (Update snapshots once per second, real-time query). documentation: https://www.kucoin.com/docs-new/api-3470227 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @abstractmethod def get24hr_stats(self, **kwargs: Any) -> Get24hrStatsResp: """ - summary: Get 24hr Stats + summary: Get 24hr stats description: Get the statistics of the platform futures trading volume in the last 24 hours. documentation: https://www.kucoin.com/docs-new/api-3470228 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -281,15 +281,15 @@ def get_server_time(self, **kwargs: Any) -> GetServerTimeResp: summary: Get Server Time description: Get the API server time. This is the Unix timestamp. documentation: https://www.kucoin.com/docs-new/api-3470229 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -299,15 +299,15 @@ def get_service_status(self, **kwargs: Any) -> GetServiceStatusResp: summary: Get Service Status description: Get the service status. documentation: https://www.kucoin.com/docs-new/api-3470230 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 4 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 4 | + +-----------------------+---------+ """ pass @@ -315,17 +315,17 @@ def get_service_status(self, **kwargs: Any) -> GetServiceStatusResp: def get_public_token(self, **kwargs: Any) -> GetPublicTokenResp: """ summary: Get Public Token - Futures - 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 + 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 documentation: https://www.kucoin.com/docs-new/api-3470297 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass @@ -333,17 +333,17 @@ def get_public_token(self, **kwargs: Any) -> GetPublicTokenResp: def get_private_token(self, **kwargs: Any) -> GetPrivateTokenResp: """ summary: Get Private Token - Futures - 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 + 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 documentation: https://www.kucoin.com/docs-new/api-3470296 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/api_market.template b/sdk/python/kucoin_universal_sdk/generate/futures/market/api_market.template index e50a2eab..37d65092 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/api_market.template +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/api_market.template @@ -98,7 +98,7 @@ def test_get_part_order_book_req(self): """ builder = GetPartOrderBookReqBuilder() - builder.set_symbol(?).set_size(?) + builder.set_size(?).set_symbol(?) req = builder.build() try: resp = self.api.get_part_order_book(req) @@ -226,7 +226,7 @@ def test_get_premium_index_req(self): def test_get24hr_stats_req(self): """ get24hr_stats - Get 24hr Stats + Get 24hr stats /api/v1/trade-statistics """ diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/api_market_test.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/api_market_test.py index 1143c69d..19d28531 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/api_market_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/api_market_test.py @@ -46,7 +46,7 @@ def test_get_symbol_resp_model(self): Get Symbol /api/v1/contracts/{symbol} """ - data = "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"XBTUSDM\",\n \"rootSymbol\": \"XBT\",\n \"type\": \"FFWCSX\",\n \"firstOpenDate\": 1552638575000,\n \"expireDate\": null,\n \"settleDate\": null,\n \"baseCurrency\": \"XBT\",\n \"quoteCurrency\": \"USD\",\n \"settleCurrency\": \"XBT\",\n \"maxOrderQty\": 10000000,\n \"maxPrice\": 1000000.0,\n \"lotSize\": 1,\n \"tickSize\": 0.1,\n \"indexPriceTickSize\": 0.1,\n \"multiplier\": -1.0,\n \"initialMargin\": 0.014,\n \"maintainMargin\": 0.007,\n \"maxRiskLimit\": 1,\n \"minRiskLimit\": 1,\n \"riskStep\": 0,\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\": false,\n \"isInverse\": true,\n \"markMethod\": \"FairPrice\",\n \"fairMethod\": \"FundingRate\",\n \"fundingBaseSymbol\": \".XBTINT8H\",\n \"fundingQuoteSymbol\": \".USDINT8H\",\n \"fundingRateSymbol\": \".XBTUSDMFPI8H\",\n \"indexSymbol\": \".BXBT\",\n \"settlementSymbol\": null,\n \"status\": \"Open\",\n \"fundingFeeRate\": 1.75E-4,\n \"predictedFundingFeeRate\": 1.76E-4,\n \"fundingRateGranularity\": 28800000,\n \"openInterest\": \"61725904\",\n \"turnoverOf24h\": 209.56303473,\n \"volumeOf24h\": 1.4354731E7,\n \"markPrice\": 68336.7,\n \"indexPrice\": 68335.29,\n \"lastTradePrice\": 68349.3,\n \"nextFundingRateTime\": 17402942,\n \"maxLeverage\": 75,\n \"sourceExchanges\": [\n \"kraken\",\n \"bitstamp\",\n \"crypto\"\n ],\n \"premiumsSymbol1M\": \".XBTUSDMPI\",\n \"premiumsSymbol8H\": \".XBTUSDMPI8H\",\n \"fundingBaseSymbol1M\": \".XBTINT\",\n \"fundingQuoteSymbol1M\": \".USDINT\",\n \"lowPrice\": 67436.7,\n \"highPrice\": 69471.8,\n \"priceChgPct\": 0.0097,\n \"priceChg\": 658.7,\n \"k\": 2645000.0,\n \"m\": 1640000.0,\n \"f\": 1.3,\n \"mmrLimit\": 0.3,\n \"mmrLevConstant\": 75.0,\n \"supportCross\": true\n }\n}" + data = "{\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}" common_response = RestResponse.from_json(data) resp = GetSymbolResp.from_dict(common_response.data) @@ -63,7 +63,7 @@ def test_get_all_symbols_resp_model(self): Get All Symbols /api/v1/contracts/active """ - data = "{\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.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\": 1.53E-4,\n \"predictedFundingFeeRate\": 8.0E-5,\n \"fundingRateGranularity\": 28800000,\n \"openInterest\": \"6384957\",\n \"turnoverOf24h\": 5.788402220999069E8,\n \"volumeOf24h\": 8274.432,\n \"markPrice\": 69732.33,\n \"indexPrice\": 69732.32,\n \"lastTradePrice\": 69732,\n \"nextFundingRateTime\": 21265941,\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\": 68817.5,\n \"highPrice\": 71615.8,\n \"priceChgPct\": 6.0E-4,\n \"priceChg\": 48.0,\n \"k\": 490.0,\n \"m\": 300.0,\n \"f\": 1.3,\n \"mmrLimit\": 0.3,\n \"mmrLevConstant\": 125.0,\n \"supportCross\": true\n }\n ]\n}" + data = "{\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}" common_response = RestResponse.from_json(data) resp = GetAllSymbolsResp.from_dict(common_response.data) @@ -128,7 +128,7 @@ def test_get_part_order_book_req_model(self): Get Part OrderBook /api/v1/level2/depth{size} """ - data = "{\"symbol\": \"XBTUSDM\", \"size\": \"20\"}" + data = "{\"size\": \"20\", \"symbol\": \"XBTUSDM\"}" req = GetPartOrderBookReq.from_json(data) def test_get_part_order_book_resp_model(self): @@ -258,14 +258,14 @@ def test_get_premium_index_resp_model(self): def test_get24hr_stats_req_model(self): """ get24hr_stats - Get 24hr Stats + Get 24hr stats /api/v1/trade-statistics """ def test_get24hr_stats_resp_model(self): """ get24hr_stats - Get 24hr Stats + Get 24hr stats /api/v1/trade-statistics """ data = "{\"code\":\"200000\",\"data\":{\"turnoverOf24h\":1.1155733413273683E9}}" diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_all_symbols_data.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_all_symbols_data.py index 53ae6ab8..bf077049 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_all_symbols_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_all_symbols_data.py @@ -18,10 +18,10 @@ class GetAllSymbolsData(BaseModel): Attributes: symbol (str): Symbol root_symbol (str): Contract group - type (TypeEnum): Type of the contract - first_open_date (int): First Open Date(millisecond) - expire_date (int): Expiration date(millisecond). Null means it will never expire - settle_date (int): Settlement date(millisecond). Null indicates that automatic settlement is not supported + type (TypeEnum): Type of contract + first_open_date (int): First Open Date (milliseconds) + expire_date (int): Expiration date (milliseconds) Null means it will never expire + settle_date (int): Settlement date (milliseconds) Null indicates that automatic settlement is not supported base_currency (str): Base currency quote_currency (str): Quote currency settle_currency (str): Currency used to clear and settle the trades @@ -45,32 +45,32 @@ class GetAllSymbolsData(BaseModel): is_quanto (bool): Deprecated param is_inverse (bool): Whether it is a reverse contract mark_method (MarkMethodEnum): Marking method - fair_method (FairMethodEnum): Fair price marking method, The Futures contract is null - funding_base_symbol (str): Ticker symbol of the based currency + fair_method (FairMethodEnum): Fair price marking method; the Futures contract is null + funding_base_symbol (str): Ticker symbol of the base currency funding_quote_symbol (str): Ticker symbol of the quote currency funding_rate_symbol (str): Funding rate symbol index_symbol (str): Index symbol - settlement_symbol (str): Settlement Symbol + settlement_symbol (str): Settlement symbol status (StatusEnum): Contract status funding_fee_rate (float): Funding fee rate predicted_funding_fee_rate (float): Predicted funding fee rate - funding_rate_granularity (int): Funding interval(millisecond) - open_interest (str): Open interest + funding_rate_granularity (int): Funding interval (milliseconds) + open_interest (str): Open interest (unit: lots) turnover_of24h (float): 24-hour turnover volume_of24h (float): 24-hour volume mark_price (float): Mark price index_price (float): Index price last_trade_price (float): Last trade price - next_funding_rate_time (int): Next funding rate time(millisecond) + next_funding_rate_time (int): Next funding rate time (milliseconds) max_leverage (int): Maximum leverage source_exchanges (list[str]): The contract index price source exchange - premiums_symbol1_m (str): Premium index symbol(1 minute) - premiums_symbol8_h (str): Premium index symbol(8 hours) - funding_base_symbol1_m (str): Base currency interest rate symbol(1 minute) - funding_quote_symbol1_m (str): Quote currency interest rate symbol(1 minute) + premiums_symbol1_m (str): Premium index symbol (1 minute) + premiums_symbol8_h (str): Premium index symbol (8 hours) + funding_base_symbol1_m (str): Base currency interest rate symbol (1 minute) + funding_quote_symbol1_m (str): Quote currency interest rate symbol (1 minute) low_price (float): 24-hour lowest price high_price (float): 24-hour highest price - price_chg_pct (float): 24-hour price change% + price_chg_pct (float): 24-hour % price change price_chg (float): 24-hour price change k (float): m (float): @@ -78,12 +78,14 @@ class GetAllSymbolsData(BaseModel): mmr_limit (float): mmr_lev_constant (float): support_cross (bool): Whether support Cross Margin + buy_limit (float): The current maximum buying price allowed + sell_limit (float): The current minimum selling price allowed """ class TypeEnum(Enum): """ Attributes: - FFWCSX: Standardized swap contracts standard financial futures on swap, expiration swap funding rate + FFWCSX: Standardized swap contracts, standard financial futures on swaps, expiration swap funding rates FFICSX: Futures Contract """ FFWCSX = 'FFWCSX' @@ -92,7 +94,7 @@ class TypeEnum(Enum): class MarkMethodEnum(Enum): """ Attributes: - FAIR_PRICE: Fair Price + FAIR_PRICE: FairPrice """ FAIR_PRICE = 'FairPrice' @@ -108,7 +110,7 @@ class StatusEnum(Enum): Attributes: INIT: Initial OPEN: Online - BEING_SETTLED: Setting + BEING_SETTLED: Settling SETTLED: Settled PAUSED: Suspended CLOSED: Offline @@ -127,20 +129,20 @@ class StatusEnum(Enum): description="Contract group", alias="rootSymbol") type: Optional[TypeEnum] = Field(default=None, - description="Type of the contract") + description="Type of contract") first_open_date: Optional[int] = Field( default=None, - description="First Open Date(millisecond)", + description="First Open Date (milliseconds)", alias="firstOpenDate") expire_date: Optional[int] = Field( default=None, description= - "Expiration date(millisecond). Null means it will never expire", + "Expiration date (milliseconds) Null means it will never expire", alias="expireDate") settle_date: Optional[int] = Field( default=None, description= - "Settlement date(millisecond). Null indicates that automatic settlement is not supported", + "Settlement date (milliseconds) Null indicates that automatic settlement is not supported", alias="settleDate") base_currency: Optional[str] = Field(default=None, description="Base currency", @@ -223,11 +225,11 @@ class StatusEnum(Enum): alias="markMethod") fair_method: Optional[FairMethodEnum] = Field( default=None, - description="Fair price marking method, The Futures contract is null", + description="Fair price marking method; the Futures contract is null", alias="fairMethod") funding_base_symbol: Optional[str] = Field( default=None, - description="Ticker symbol of the based currency", + description="Ticker symbol of the base currency", alias="fundingBaseSymbol") funding_quote_symbol: Optional[str] = Field( default=None, @@ -241,7 +243,7 @@ class StatusEnum(Enum): description="Index symbol", alias="indexSymbol") settlement_symbol: Optional[str] = Field(default=None, - description="Settlement Symbol", + description="Settlement symbol", alias="settlementSymbol") status: Optional[StatusEnum] = Field(default=None, description="Contract status") @@ -254,11 +256,12 @@ class StatusEnum(Enum): alias="predictedFundingFeeRate") funding_rate_granularity: Optional[int] = Field( default=None, - description="Funding interval(millisecond)", + description="Funding interval (milliseconds)", alias="fundingRateGranularity") - open_interest: Optional[str] = Field(default=None, - description="Open interest", - alias="openInterest") + open_interest: Optional[str] = Field( + default=None, + description="Open interest (unit: lots)", + alias="openInterest") turnover_of24h: Optional[float] = Field(default=None, description="24-hour turnover", alias="turnoverOf24h") @@ -276,7 +279,7 @@ class StatusEnum(Enum): alias="lastTradePrice") next_funding_rate_time: Optional[int] = Field( default=None, - description="Next funding rate time(millisecond)", + description="Next funding rate time (milliseconds)", alias="nextFundingRateTime") max_leverage: Optional[int] = Field(default=None, description="Maximum leverage", @@ -287,19 +290,19 @@ class StatusEnum(Enum): alias="sourceExchanges") premiums_symbol1_m: Optional[str] = Field( default=None, - description="Premium index symbol(1 minute)", + description="Premium index symbol (1 minute)", alias="premiumsSymbol1M") premiums_symbol8_h: Optional[str] = Field( default=None, - description="Premium index symbol(8 hours)", + description="Premium index symbol (8 hours)", alias="premiumsSymbol8H") funding_base_symbol1_m: Optional[str] = Field( default=None, - description="Base currency interest rate symbol(1 minute)", + description="Base currency interest rate symbol (1 minute)", alias="fundingBaseSymbol1M") funding_quote_symbol1_m: Optional[str] = Field( default=None, - description="Quote currency interest rate symbol(1 minute)", + description="Quote currency interest rate symbol (1 minute)", alias="fundingQuoteSymbol1M") low_price: Optional[float] = Field(default=None, description="24-hour lowest price", @@ -309,7 +312,7 @@ class StatusEnum(Enum): alias="highPrice") price_chg_pct: Optional[float] = Field( default=None, - description="24-hour price change% ", + description="24-hour % price change ", alias="priceChgPct") price_chg: Optional[float] = Field(default=None, description="24-hour price change", @@ -324,6 +327,14 @@ class StatusEnum(Enum): default=None, description="Whether support Cross Margin", alias="supportCross") + buy_limit: Optional[float] = Field( + default=None, + description="The current maximum buying price allowed", + alias="buyLimit") + sell_limit: Optional[float] = Field( + default=None, + description="The current minimum selling price allowed", + alias="sellLimit") __properties: ClassVar[List[str]] = [ "symbol", "rootSymbol", "type", "firstOpenDate", "expireDate", @@ -341,7 +352,7 @@ class StatusEnum(Enum): "sourceExchanges", "premiumsSymbol1M", "premiumsSymbol8H", "fundingBaseSymbol1M", "fundingQuoteSymbol1M", "lowPrice", "highPrice", "priceChgPct", "priceChg", "k", "m", "f", "mmrLimit", "mmrLevConstant", - "supportCross" + "supportCross", "buyLimit", "sellLimit" ] model_config = ConfigDict( @@ -500,6 +511,10 @@ def from_dict( "mmrLevConstant": obj.get("mmrLevConstant"), "supportCross": - obj.get("supportCross") + obj.get("supportCross"), + "buyLimit": + obj.get("buyLimit"), + "sellLimit": + obj.get("sellLimit") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_all_symbols_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_all_symbols_resp.py index 77e50347..1c004d12 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_all_symbols_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_all_symbols_resp.py @@ -18,13 +18,13 @@ class GetAllSymbolsResp(BaseModel, Response): GetAllSymbolsResp Attributes: - data (list[GetAllSymbolsData]): the list of all contracts + data (list[GetAllSymbolsData]): List of all contracts """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") data: Optional[List[GetAllSymbolsData]] = Field( - default=None, description="the list of all contracts") + default=None, description="List of all contracts") __properties: ClassVar[List[str]] = ["data"] diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_all_tickers_data.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_all_tickers_data.py index 53ac86f2..bb9e3921 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_all_tickers_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_all_tickers_data.py @@ -16,17 +16,17 @@ class GetAllTickersData(BaseModel): GetAllTickersData Attributes: - sequence (int): Sequence number, used to judge whether the messages pushed by Websocket is continuous. + sequence (int): Sequence number, used to judge whether the messages pushed by Websocket are continuous. symbol (str): Symbol side (SideEnum): Trade direction - size (int): 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. + size (int): 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. trade_id (str): Transaction ID price (str): Filled price best_bid_price (str): Best bid price best_bid_size (int): Best bid size best_ask_price (str): Best ask price best_ask_size (int): Best ask size - ts (int): Filled time(nanosecond) + ts (int): Filled time (nanoseconds) """ class SideEnum(Enum): @@ -41,7 +41,7 @@ class SideEnum(Enum): sequence: Optional[int] = Field( default=None, description= - "Sequence number, used to judge whether the messages pushed by Websocket is continuous." + "Sequence number, used to judge whether the messages pushed by Websocket are continuous." ) symbol: Optional[str] = Field(default=None, description="Symbol") side: Optional[SideEnum] = Field(default=None, @@ -49,7 +49,7 @@ class SideEnum(Enum): size: Optional[int] = Field( default=None, 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." + "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." ) trade_id: Optional[str] = Field(default=None, description="Transaction ID", @@ -68,7 +68,7 @@ class SideEnum(Enum): description="Best ask size", alias="bestAskSize") ts: Optional[int] = Field(default=None, - description="Filled time(nanosecond)") + description="Filled time (nanoseconds)") __properties: ClassVar[List[str]] = [ "sequence", "symbol", "side", "size", "tradeId", "price", diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_full_order_book_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_full_order_book_req.py index 2a367851..9a54b216 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_full_order_book_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_full_order_book_req.py @@ -15,13 +15,13 @@ class GetFullOrderBookReq(BaseModel): GetFullOrderBookReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) __properties: ClassVar[List[str]] = ["symbol"] @@ -70,7 +70,7 @@ def __init__(self): def set_symbol(self, value: str) -> GetFullOrderBookReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_full_order_book_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_full_order_book_resp.py index 5aeadc83..7d01ee5e 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_full_order_book_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_full_order_book_resp.py @@ -18,10 +18,10 @@ class GetFullOrderBookResp(BaseModel, Response): Attributes: sequence (int): Sequence number - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) bids (list[list[float]]): bids, from high to low asks (list[list[float]]): asks, from low to high - ts (int): Timestamp(nanosecond) + ts (int): Timestamp (nanoseconds) """ common_response: Optional[RestResponse] = Field( @@ -31,14 +31,14 @@ class GetFullOrderBookResp(BaseModel, Response): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) bids: Optional[List[List[float]]] = Field( default=None, description="bids, from high to low") asks: Optional[List[List[float]]] = Field( default=None, description="asks, from low to high") ts: Optional[int] = Field(default=None, - description="Timestamp(nanosecond)") + description="Timestamp (nanoseconds)") __properties: ClassVar[List[str]] = [ "sequence", "symbol", "bids", "asks", "ts" diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_interest_rate_index_data_list.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_interest_rate_index_data_list.py index d401ef6c..0dbac052 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_interest_rate_index_data_list.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_interest_rate_index_data_list.py @@ -15,21 +15,21 @@ class GetInterestRateIndexDataList(BaseModel): GetInterestRateIndexDataList Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) - granularity (int): Granularity (milisecond) - time_point (int): Timestamp(milisecond) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) + granularity (int): Granularity (milliseconds) + time_point (int): Timestamp (milliseconds) value (float): Interest rate value """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) " ) - granularity: Optional[int] = Field(default=None, - description="Granularity (milisecond)") + granularity: Optional[int] = Field( + default=None, description="Granularity (milliseconds)") time_point: Optional[int] = Field(default=None, - description="Timestamp(milisecond)", + description="Timestamp (milliseconds)", alias="timePoint") value: Optional[float] = Field(default=None, description="Interest rate value") diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_interest_rate_index_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_interest_rate_index_req.py index 3cd1b9f3..044fcb28 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_interest_rate_index_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_interest_rate_index_req.py @@ -8,7 +8,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetInterestRateIndexReq(BaseModel): @@ -16,30 +15,30 @@ class GetInterestRateIndexReq(BaseModel): GetInterestRateIndexReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) - reverse (bool): This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) + reverse (bool): This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. offset (int): 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. - forward (bool): 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 - max_count (int): Max record count. The default record count is 10, The maximum length cannot exceed 100 + forward (bool): 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. + max_count (int): Max. record count. The default record count is 10; the maximum length cannot exceed 100 """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) " ) start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") reverse: Optional[bool] = Field( default=True, description= - "This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default." + "This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default." ) offset: Optional[int] = Field( default=None, @@ -49,12 +48,12 @@ class GetInterestRateIndexReq(BaseModel): forward: Optional[bool] = Field( default=True, 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" + "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." ) - max_count: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( + max_count: Optional[int] = Field( default=10, description= - "Max record count. The default record count is 10, The maximum length cannot exceed 100", + "Max. record count. The default record count is 10; the maximum length cannot exceed 100", alias="maxCount") __properties: ClassVar[List[str]] = [ @@ -122,28 +121,28 @@ def __init__(self): def set_symbol(self, value: str) -> GetInterestRateIndexReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self def set_start_at(self, value: int) -> GetInterestRateIndexReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetInterestRateIndexReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self def set_reverse(self, value: bool) -> GetInterestRateIndexReqBuilder: """ - This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. """ self.obj['reverse'] = value return self @@ -157,14 +156,14 @@ def set_offset(self, value: int) -> GetInterestRateIndexReqBuilder: def set_forward(self, value: bool) -> GetInterestRateIndexReqBuilder: """ - 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 + 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. """ self.obj['forward'] = value return self def set_max_count(self, value: int) -> GetInterestRateIndexReqBuilder: """ - Max record count. The default record count is 10, The maximum length cannot exceed 100 + Max. record count. The default record count is 10; the maximum length cannot exceed 100 """ self.obj['maxCount'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_klines_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_klines_req.py index eb87ab4a..74ff3d49 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_klines_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_klines_req.py @@ -16,10 +16,10 @@ class GetKlinesReq(BaseModel): GetKlinesReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) - granularity (GranularityEnum): Type of candlestick patterns(minute) - from_ (int): Start time (milisecond) - to (int): End time (milisecond) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + granularity (GranularityEnum): Type of candlestick patterns (minutes) + from_ (int): Start time (milliseconds) + to (int): End time (milliseconds) """ class GranularityEnum(Enum): @@ -52,15 +52,15 @@ class GranularityEnum(Enum): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) " ) granularity: Optional[GranularityEnum] = Field( - default=None, description="Type of candlestick patterns(minute)") + default=None, description="Type of candlestick patterns (minutes)") from_: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="from") to: Optional[int] = Field(default=None, - description="End time (milisecond)") + description="End time (milliseconds)") __properties: ClassVar[List[str]] = ["symbol", "granularity", "from", "to"] @@ -112,7 +112,7 @@ def __init__(self): def set_symbol(self, value: str) -> GetKlinesReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self @@ -120,21 +120,21 @@ def set_symbol(self, value: str) -> GetKlinesReqBuilder: def set_granularity( self, value: GetKlinesReq.GranularityEnum) -> GetKlinesReqBuilder: """ - Type of candlestick patterns(minute) + Type of candlestick patterns (minutes) """ self.obj['granularity'] = value return self def set_from_(self, value: int) -> GetKlinesReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['from'] = value return self def set_to(self, value: int) -> GetKlinesReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['to'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_mark_price_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_mark_price_req.py index daabfd53..7b0588b0 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_mark_price_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_mark_price_req.py @@ -15,14 +15,14 @@ class GetMarkPriceReq(BaseModel): GetMarkPriceReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ symbol: Optional[str] = Field( default=None, path_variable="True", description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) __properties: ClassVar[List[str]] = ["symbol"] @@ -70,7 +70,7 @@ def __init__(self): def set_symbol(self, value: str) -> GetMarkPriceReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_mark_price_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_mark_price_resp.py index ba053e21..df5f702e 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_mark_price_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_mark_price_resp.py @@ -17,9 +17,9 @@ class GetMarkPriceResp(BaseModel, Response): GetMarkPriceResp Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - granularity (int): Granularity (milisecond) - time_point (int): Time point (milisecond) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + granularity (int): Granularity (milliseconds) + time_point (int): Time point (milliseconds) value (float): Mark price index_price (float): Index price """ @@ -29,12 +29,12 @@ class GetMarkPriceResp(BaseModel, Response): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) - granularity: Optional[int] = Field(default=None, - description="Granularity (milisecond)") + granularity: Optional[int] = Field( + default=None, description="Granularity (milliseconds)") time_point: Optional[int] = Field(default=None, - description="Time point (milisecond)", + description="Time point (milliseconds)", alias="timePoint") value: Optional[float] = Field(default=None, description="Mark price") index_price: Optional[float] = Field(default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_part_order_book_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_part_order_book_req.py index 0b3aaf2b..a9e77f29 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_part_order_book_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_part_order_book_req.py @@ -15,21 +15,21 @@ class GetPartOrderBookReq(BaseModel): GetPartOrderBookReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) size (str): Get the depth layer, optional value: 20, 100 + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ - symbol: Optional[str] = Field( - default=None, - description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " - ) size: Optional[str] = Field( default=None, path_variable="True", description="Get the depth layer, optional value: 20, 100") + symbol: Optional[str] = Field( + default=None, + description= + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + ) - __properties: ClassVar[List[str]] = ["symbol", "size"] + __properties: ClassVar[List[str]] = ["size", "symbol"] model_config = ConfigDict( populate_by_name=True, @@ -65,8 +65,8 @@ def from_dict( return cls.model_validate(obj) _obj = cls.model_validate({ - "symbol": obj.get("symbol"), - "size": obj.get("size") + "size": obj.get("size"), + "symbol": obj.get("symbol") }) return _obj @@ -76,18 +76,18 @@ class GetPartOrderBookReqBuilder: def __init__(self): self.obj = {} - def set_symbol(self, value: str) -> GetPartOrderBookReqBuilder: + def set_size(self, value: str) -> GetPartOrderBookReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Get the depth layer, optional value: 20, 100 """ - self.obj['symbol'] = value + self.obj['size'] = value return self - def set_size(self, value: str) -> GetPartOrderBookReqBuilder: + def set_symbol(self, value: str) -> GetPartOrderBookReqBuilder: """ - Get the depth layer, optional value: 20, 100 + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ - self.obj['size'] = value + self.obj['symbol'] = value return self def build(self) -> GetPartOrderBookReq: diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_part_order_book_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_part_order_book_resp.py index 722a07fe..5fb68636 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_part_order_book_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_part_order_book_resp.py @@ -18,10 +18,10 @@ class GetPartOrderBookResp(BaseModel, Response): Attributes: sequence (int): Sequence number - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) bids (list[list[float]]): bids, from high to low asks (list[list[float]]): asks, from low to high - ts (int): Timestamp(nanosecond) + ts (int): Timestamp (nanoseconds) """ common_response: Optional[RestResponse] = Field( @@ -31,14 +31,14 @@ class GetPartOrderBookResp(BaseModel, Response): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) bids: Optional[List[List[float]]] = Field( default=None, description="bids, from high to low") asks: Optional[List[List[float]]] = Field( default=None, description="asks, from low to high") ts: Optional[int] = Field(default=None, - description="Timestamp(nanosecond)") + description="Timestamp (nanoseconds)") __properties: ClassVar[List[str]] = [ "sequence", "symbol", "bids", "asks", "ts" diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_premium_index_data_list.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_premium_index_data_list.py index ca2236dc..b281b0bc 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_premium_index_data_list.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_premium_index_data_list.py @@ -15,21 +15,21 @@ class GetPremiumIndexDataList(BaseModel): GetPremiumIndexDataList Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) - granularity (int): Granularity(milisecond) - time_point (int): Timestamp(milisecond) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + granularity (int): Granularity (milliseconds) + time_point (int): Timestamp (milliseconds) value (float): Premium index """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) " ) - granularity: Optional[int] = Field(default=None, - description="Granularity(milisecond)") + granularity: Optional[int] = Field( + default=None, description="Granularity (milliseconds)") time_point: Optional[int] = Field(default=None, - description="Timestamp(milisecond)", + description="Timestamp (milliseconds)", alias="timePoint") value: Optional[float] = Field(default=None, description="Premium index") diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_premium_index_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_premium_index_req.py index 7d552521..991ff5a0 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_premium_index_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_premium_index_req.py @@ -8,7 +8,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetPremiumIndexReq(BaseModel): @@ -16,30 +15,30 @@ class GetPremiumIndexReq(BaseModel): GetPremiumIndexReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) - reverse (bool): This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) + reverse (bool): This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. offset (int): 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. - forward (bool): 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 - max_count (int): Max record count. The default record count is 10, The maximum length cannot exceed 100 + forward (bool): 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. + max_count (int): Max. record count. The default record count is 10; the maximum length cannot exceed 100 """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) " ) start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") reverse: Optional[bool] = Field( default=True, description= - "This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default." + "This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default." ) offset: Optional[int] = Field( default=None, @@ -49,12 +48,12 @@ class GetPremiumIndexReq(BaseModel): forward: Optional[bool] = Field( default=True, 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" + "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." ) - max_count: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( + max_count: Optional[int] = Field( default=10, description= - "Max record count. The default record count is 10, The maximum length cannot exceed 100", + "Max. record count. The default record count is 10; the maximum length cannot exceed 100", alias="maxCount") __properties: ClassVar[List[str]] = [ @@ -121,28 +120,28 @@ def __init__(self): def set_symbol(self, value: str) -> GetPremiumIndexReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self def set_start_at(self, value: int) -> GetPremiumIndexReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetPremiumIndexReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self def set_reverse(self, value: bool) -> GetPremiumIndexReqBuilder: """ - This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. """ self.obj['reverse'] = value return self @@ -156,14 +155,14 @@ def set_offset(self, value: int) -> GetPremiumIndexReqBuilder: def set_forward(self, value: bool) -> GetPremiumIndexReqBuilder: """ - 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 + 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. """ self.obj['forward'] = value return self def set_max_count(self, value: int) -> GetPremiumIndexReqBuilder: """ - Max record count. The default record count is 10, The maximum length cannot exceed 100 + Max. record count. The default record count is 10; the maximum length cannot exceed 100 """ self.obj['maxCount'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_private_token_instance_servers.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_private_token_instance_servers.py index cf3c34f6..8de8d040 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_private_token_instance_servers.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_private_token_instance_servers.py @@ -16,24 +16,24 @@ class GetPrivateTokenInstanceServers(BaseModel): GetPrivateTokenInstanceServers Attributes: - endpoint (str): Websocket domain URL, It is recommended to use a dynamic URL as the URL may change + endpoint (str): Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. encrypt (bool): Whether to encrypt. Currently only supports wss, not ws protocol (ProtocolEnum): Network Protocol - ping_interval (int): Recommended ping interval(millisecond) - ping_timeout (int): Heartbeat timeout(millisecond) + ping_interval (int): Recommended ping interval (milliseconds) + ping_timeout (int): Heartbeat timeout (milliseconds) """ class ProtocolEnum(Enum): """ Attributes: - WEBSOCKET: websocket + WEBSOCKET: Websocket """ WEBSOCKET = 'websocket' endpoint: Optional[str] = Field( default=None, description= - "Websocket domain URL, It is recommended to use a dynamic URL as the URL may change" + "Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change." ) encrypt: Optional[bool] = Field( default=None, @@ -42,11 +42,11 @@ class ProtocolEnum(Enum): description="Network Protocol") ping_interval: Optional[int] = Field( default=None, - description="Recommended ping interval(millisecond)", + description="Recommended ping interval (milliseconds)", alias="pingInterval") ping_timeout: Optional[int] = Field( default=None, - description="Heartbeat timeout(millisecond)", + description="Heartbeat timeout (milliseconds)", alias="pingTimeout") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_private_token_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_private_token_resp.py index 6527108f..ee128392 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_private_token_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_private_token_resp.py @@ -18,7 +18,7 @@ class GetPrivateTokenResp(BaseModel, Response): GetPrivateTokenResp Attributes: - token (str): The token required to establish a websocket connection + token (str): The token required to establish a Websocket connection instance_servers (list[GetPrivateTokenInstanceServers]): """ @@ -26,7 +26,7 @@ class GetPrivateTokenResp(BaseModel, Response): default=None, description="Common response") token: Optional[str] = Field( default=None, - description="The token required to establish a websocket connection") + description="The token required to establish a Websocket connection") instance_servers: Optional[List[GetPrivateTokenInstanceServers]] = Field( default=None, alias="instanceServers") diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_public_token_instance_servers.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_public_token_instance_servers.py index d3bb94a1..55dfacab 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_public_token_instance_servers.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_public_token_instance_servers.py @@ -16,24 +16,24 @@ class GetPublicTokenInstanceServers(BaseModel): GetPublicTokenInstanceServers Attributes: - endpoint (str): Websocket domain URL, It is recommended to use a dynamic URL as the URL may change + endpoint (str): Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. encrypt (bool): Whether to encrypt. Currently only supports wss, not ws protocol (ProtocolEnum): Network Protocol - ping_interval (int): Recommended ping interval(millisecond) - ping_timeout (int): Heartbeat timeout(millisecond) + ping_interval (int): Recommended ping interval (milliseconds) + ping_timeout (int): Heartbeat timeout (milliseconds) """ class ProtocolEnum(Enum): """ Attributes: - WEBSOCKET: websocket + WEBSOCKET: Websocket """ WEBSOCKET = 'websocket' endpoint: Optional[str] = Field( default=None, description= - "Websocket domain URL, It is recommended to use a dynamic URL as the URL may change" + "Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change." ) encrypt: Optional[bool] = Field( default=None, @@ -42,11 +42,11 @@ class ProtocolEnum(Enum): description="Network Protocol") ping_interval: Optional[int] = Field( default=None, - description="Recommended ping interval(millisecond)", + description="Recommended ping interval (milliseconds)", alias="pingInterval") ping_timeout: Optional[int] = Field( default=None, - description="Heartbeat timeout(millisecond)", + description="Heartbeat timeout (milliseconds)", alias="pingTimeout") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_public_token_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_public_token_resp.py index 251efcde..c4600921 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_public_token_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_public_token_resp.py @@ -18,7 +18,7 @@ class GetPublicTokenResp(BaseModel, Response): GetPublicTokenResp Attributes: - token (str): The token required to establish a websocket connection + token (str): The token required to establish a Websocket connection instance_servers (list[GetPublicTokenInstanceServers]): """ @@ -26,7 +26,7 @@ class GetPublicTokenResp(BaseModel, Response): default=None, description="Common response") token: Optional[str] = Field( default=None, - description="The token required to establish a websocket connection") + description="The token required to establish a Websocket connection") instance_servers: Optional[List[GetPublicTokenInstanceServers]] = Field( default=None, alias="instanceServers") diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_server_time_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_server_time_resp.py index a5118cce..a02b65bc 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_server_time_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_server_time_resp.py @@ -17,13 +17,13 @@ class GetServerTimeResp(BaseModel, Response): GetServerTimeResp Attributes: - data (int): ServerTime(millisecond) + data (int): ServerTime (milliseconds) """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") data: Optional[int] = Field(default=None, - description="ServerTime(millisecond)") + description="ServerTime (milliseconds)") __properties: ClassVar[List[str]] = ["data"] diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_service_status_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_service_status_resp.py index 5679679f..4888ab3a 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_service_status_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_service_status_resp.py @@ -19,7 +19,7 @@ class GetServiceStatusResp(BaseModel, Response): Attributes: msg (str): - status (StatusEnum): Status of service: open:normal transaction, close:Stop Trading/Maintenance, cancelonly:can only cancel the order but not place order + status (StatusEnum): Status of service: open: normal transaction; close: Stop Trading/Maintenance; cancelonly: can only cancel the order but not place order """ class StatusEnum(Enum): @@ -39,7 +39,7 @@ class StatusEnum(Enum): status: Optional[StatusEnum] = Field( default=None, description= - "Status of service: open:normal transaction, close:Stop Trading/Maintenance, cancelonly:can only cancel the order but not place order" + "Status of service: open: normal transaction; close: Stop Trading/Maintenance; cancelonly: can only cancel the order but not place order" ) __properties: ClassVar[List[str]] = ["msg", "status"] diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_spot_index_price_data_list.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_spot_index_price_data_list.py index e3475f00..ced5fb42 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_spot_index_price_data_list.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_spot_index_price_data_list.py @@ -16,9 +16,9 @@ class GetSpotIndexPriceDataList(BaseModel): GetSpotIndexPriceDataList Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) - granularity (int): Granularity (milisecond) - time_point (int): Timestamp (milisecond) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) + granularity (int): Granularity (milliseconds) + time_point (int): Timestamp (milliseconds) value (float): Index Value decomposion_list (list[GetSpotIndexPriceDataListDecomposionList]): Component List """ @@ -26,12 +26,12 @@ class GetSpotIndexPriceDataList(BaseModel): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) " ) - granularity: Optional[int] = Field(default=None, - description="Granularity (milisecond)") + granularity: Optional[int] = Field( + default=None, description="Granularity (milliseconds)") time_point: Optional[int] = Field(default=None, - description="Timestamp (milisecond)", + description="Timestamp (milliseconds)", alias="timePoint") value: Optional[float] = Field(default=None, description="Index Value") decomposion_list: Optional[ diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_spot_index_price_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_spot_index_price_req.py index 3d75c83c..a5ba684a 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_spot_index_price_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_spot_index_price_req.py @@ -8,7 +8,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetSpotIndexPriceReq(BaseModel): @@ -16,30 +15,30 @@ class GetSpotIndexPriceReq(BaseModel): GetSpotIndexPriceReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) - reverse (bool): This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) + reverse (bool): This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. offset (int): 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. - forward (bool): 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 - max_count (int): Max record count. The default record count is 10, The maximum length cannot exceed 100 + forward (bool): 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. + max_count (int): Max. record count. The default record count is 10; the maximum length cannot exceed 100 """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) " ) start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") reverse: Optional[bool] = Field( default=True, description= - "This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default." + "This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default." ) offset: Optional[int] = Field( default=None, @@ -49,12 +48,12 @@ class GetSpotIndexPriceReq(BaseModel): forward: Optional[bool] = Field( default=True, 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" + "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." ) - max_count: Optional[Annotated[int, Field(le=100, strict=True)]] = Field( + max_count: Optional[int] = Field( default=10, description= - "Max record count. The default record count is 10, The maximum length cannot exceed 100", + "Max. record count. The default record count is 10; the maximum length cannot exceed 100", alias="maxCount") __properties: ClassVar[List[str]] = [ @@ -121,28 +120,28 @@ def __init__(self): def set_symbol(self, value: str) -> GetSpotIndexPriceReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self def set_start_at(self, value: int) -> GetSpotIndexPriceReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetSpotIndexPriceReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self def set_reverse(self, value: bool) -> GetSpotIndexPriceReqBuilder: """ - This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default. + This parameter functions to judge whether the lookup is reversed. True means “yes”. False means “no”. This parameter is set as True by default. """ self.obj['reverse'] = value return self @@ -156,14 +155,14 @@ def set_offset(self, value: int) -> GetSpotIndexPriceReqBuilder: def set_forward(self, value: bool) -> GetSpotIndexPriceReqBuilder: """ - 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 + 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. """ self.obj['forward'] = value return self def set_max_count(self, value: int) -> GetSpotIndexPriceReqBuilder: """ - Max record count. The default record count is 10, The maximum length cannot exceed 100 + Max. record count. The default record count is 10; the maximum length cannot exceed 100 """ self.obj['maxCount'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_symbol_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_symbol_resp.py index b172881f..c58b9d66 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_symbol_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_symbol_resp.py @@ -20,10 +20,10 @@ class GetSymbolResp(BaseModel, Response): Attributes: symbol (str): Symbol root_symbol (str): Contract group - type (TypeEnum): Type of the contract - first_open_date (int): First Open Date(millisecond) - expire_date (int): Expiration date(millisecond). Null means it will never expire - settle_date (int): Settlement date(millisecond). Null indicates that automatic settlement is not supported + type (TypeEnum): Type of contract + first_open_date (int): First Open Date (milliseconds) + expire_date (int): Expiration date (milliseconds) Null means it will never expire + settle_date (int): Settlement date (milliseconds) Null indicates that automatic settlement is not supported base_currency (str): Base currency quote_currency (str): Quote currency settle_currency (str): Currency used to clear and settle the trades @@ -47,32 +47,32 @@ class GetSymbolResp(BaseModel, Response): is_quanto (bool): Deprecated param is_inverse (bool): Whether it is a reverse contract mark_method (MarkMethodEnum): Marking method - fair_method (FairMethodEnum): Fair price marking method, The Futures contract is null - funding_base_symbol (str): Ticker symbol of the based currency + fair_method (FairMethodEnum): Fair price marking method; the Futures contract is null + funding_base_symbol (str): Ticker symbol of the base currency funding_quote_symbol (str): Ticker symbol of the quote currency funding_rate_symbol (str): Funding rate symbol index_symbol (str): Index symbol - settlement_symbol (str): Settlement Symbol + settlement_symbol (str): Settlement symbol status (StatusEnum): Contract status funding_fee_rate (float): Funding fee rate predicted_funding_fee_rate (float): Predicted funding fee rate - funding_rate_granularity (int): Funding interval(millisecond) - open_interest (str): Open interest + funding_rate_granularity (int): Funding interval (milliseconds) + open_interest (str): Open interest (unit: lots) turnover_of24h (float): 24-hour turnover volume_of24h (float): 24-hour volume mark_price (float): Mark price index_price (float): Index price last_trade_price (float): Last trade price - next_funding_rate_time (int): Next funding rate time(millisecond) + next_funding_rate_time (int): Next funding rate time (milliseconds) max_leverage (int): Maximum leverage source_exchanges (list[str]): The contract index price source exchange - premiums_symbol1_m (str): Premium index symbol(1 minute) - premiums_symbol8_h (str): Premium index symbol(8 hours) - funding_base_symbol1_m (str): Base currency interest rate symbol(1 minute) - funding_quote_symbol1_m (str): Quote currency interest rate symbol(1 minute) + premiums_symbol1_m (str): Premium index symbol (1 minute) + premiums_symbol8_h (str): Premium index symbol (8 hours) + funding_base_symbol1_m (str): Base currency interest rate symbol (1 minute) + funding_quote_symbol1_m (str): Quote currency interest rate symbol (1 minute) low_price (float): 24-hour lowest price high_price (float): 24-hour highest price - price_chg_pct (float): 24-hour price change% + price_chg_pct (float): 24-hour % price change price_chg (float): 24-hour price change k (float): m (float): @@ -80,12 +80,14 @@ class GetSymbolResp(BaseModel, Response): mmr_limit (float): mmr_lev_constant (float): support_cross (bool): Whether support Cross Margin + buy_limit (float): The current maximum buying price allowed + sell_limit (float): The current minimum selling price allowed """ class TypeEnum(Enum): """ Attributes: - FFWCSX: Standardized swap contracts standard financial futures on swap, expiration swap funding rate + FFWCSX: Standardized swap contracts, standard financial futures on swaps, expiration swap funding rates FFICSX: Futures Contract """ FFWCSX = 'FFWCSX' @@ -94,7 +96,7 @@ class TypeEnum(Enum): class MarkMethodEnum(Enum): """ Attributes: - FAIR_PRICE: Fair Price + FAIR_PRICE: FairPrice """ FAIR_PRICE = 'FairPrice' @@ -110,7 +112,7 @@ class StatusEnum(Enum): Attributes: INIT: Initial OPEN: Online - BEING_SETTLED: Setting + BEING_SETTLED: Settling SETTLED: Settled PAUSED: Suspended CLOSED: Offline @@ -131,20 +133,20 @@ class StatusEnum(Enum): description="Contract group", alias="rootSymbol") type: Optional[TypeEnum] = Field(default=None, - description="Type of the contract") + description="Type of contract") first_open_date: Optional[int] = Field( default=None, - description="First Open Date(millisecond)", + description="First Open Date (milliseconds)", alias="firstOpenDate") expire_date: Optional[int] = Field( default=None, description= - "Expiration date(millisecond). Null means it will never expire", + "Expiration date (milliseconds) Null means it will never expire", alias="expireDate") settle_date: Optional[int] = Field( default=None, description= - "Settlement date(millisecond). Null indicates that automatic settlement is not supported", + "Settlement date (milliseconds) Null indicates that automatic settlement is not supported", alias="settleDate") base_currency: Optional[str] = Field(default=None, description="Base currency", @@ -227,11 +229,11 @@ class StatusEnum(Enum): alias="markMethod") fair_method: Optional[FairMethodEnum] = Field( default=None, - description="Fair price marking method, The Futures contract is null", + description="Fair price marking method; the Futures contract is null", alias="fairMethod") funding_base_symbol: Optional[str] = Field( default=None, - description="Ticker symbol of the based currency", + description="Ticker symbol of the base currency", alias="fundingBaseSymbol") funding_quote_symbol: Optional[str] = Field( default=None, @@ -245,7 +247,7 @@ class StatusEnum(Enum): description="Index symbol", alias="indexSymbol") settlement_symbol: Optional[str] = Field(default=None, - description="Settlement Symbol", + description="Settlement symbol", alias="settlementSymbol") status: Optional[StatusEnum] = Field(default=None, description="Contract status") @@ -258,11 +260,12 @@ class StatusEnum(Enum): alias="predictedFundingFeeRate") funding_rate_granularity: Optional[int] = Field( default=None, - description="Funding interval(millisecond)", + description="Funding interval (milliseconds)", alias="fundingRateGranularity") - open_interest: Optional[str] = Field(default=None, - description="Open interest", - alias="openInterest") + open_interest: Optional[str] = Field( + default=None, + description="Open interest (unit: lots)", + alias="openInterest") turnover_of24h: Optional[float] = Field(default=None, description="24-hour turnover", alias="turnoverOf24h") @@ -280,7 +283,7 @@ class StatusEnum(Enum): alias="lastTradePrice") next_funding_rate_time: Optional[int] = Field( default=None, - description="Next funding rate time(millisecond)", + description="Next funding rate time (milliseconds)", alias="nextFundingRateTime") max_leverage: Optional[int] = Field(default=None, description="Maximum leverage", @@ -291,19 +294,19 @@ class StatusEnum(Enum): alias="sourceExchanges") premiums_symbol1_m: Optional[str] = Field( default=None, - description="Premium index symbol(1 minute)", + description="Premium index symbol (1 minute)", alias="premiumsSymbol1M") premiums_symbol8_h: Optional[str] = Field( default=None, - description="Premium index symbol(8 hours)", + description="Premium index symbol (8 hours)", alias="premiumsSymbol8H") funding_base_symbol1_m: Optional[str] = Field( default=None, - description="Base currency interest rate symbol(1 minute)", + description="Base currency interest rate symbol (1 minute)", alias="fundingBaseSymbol1M") funding_quote_symbol1_m: Optional[str] = Field( default=None, - description="Quote currency interest rate symbol(1 minute)", + description="Quote currency interest rate symbol (1 minute)", alias="fundingQuoteSymbol1M") low_price: Optional[float] = Field(default=None, description="24-hour lowest price", @@ -313,7 +316,7 @@ class StatusEnum(Enum): alias="highPrice") price_chg_pct: Optional[float] = Field( default=None, - description="24-hour price change% ", + description="24-hour % price change ", alias="priceChgPct") price_chg: Optional[float] = Field(default=None, description="24-hour price change", @@ -328,6 +331,14 @@ class StatusEnum(Enum): default=None, description="Whether support Cross Margin", alias="supportCross") + buy_limit: Optional[float] = Field( + default=None, + description="The current maximum buying price allowed", + alias="buyLimit") + sell_limit: Optional[float] = Field( + default=None, + description="The current minimum selling price allowed", + alias="sellLimit") __properties: ClassVar[List[str]] = [ "symbol", "rootSymbol", "type", "firstOpenDate", "expireDate", @@ -345,7 +356,7 @@ class StatusEnum(Enum): "sourceExchanges", "premiumsSymbol1M", "premiumsSymbol8H", "fundingBaseSymbol1M", "fundingQuoteSymbol1M", "lowPrice", "highPrice", "priceChgPct", "priceChg", "k", "m", "f", "mmrLimit", "mmrLevConstant", - "supportCross" + "supportCross", "buyLimit", "sellLimit" ] model_config = ConfigDict( @@ -504,7 +515,11 @@ def from_dict(cls, obj: Optional[Dict[str, "mmrLevConstant": obj.get("mmrLevConstant"), "supportCross": - obj.get("supportCross") + obj.get("supportCross"), + "buyLimit": + obj.get("buyLimit"), + "sellLimit": + obj.get("sellLimit") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_ticker_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_ticker_req.py index 79a14269..c7b27915 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_ticker_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_ticker_req.py @@ -15,13 +15,13 @@ class GetTickerReq(BaseModel): GetTickerReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) __properties: ClassVar[List[str]] = ["symbol"] @@ -69,7 +69,7 @@ def __init__(self): def set_symbol(self, value: str) -> GetTickerReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_ticker_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_ticker_resp.py index 0647bffb..361998bc 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_ticker_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_ticker_resp.py @@ -18,9 +18,9 @@ class GetTickerResp(BaseModel, Response): GetTickerResp Attributes: - sequence (int): Sequence number, used to judge whether the messages pushed by Websocket is continuous. - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - side (SideEnum): 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. + sequence (int): Sequence number, used to judge whether the messages pushed by Websocket are continuous. + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + side (SideEnum): 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. size (int): Filled quantity trade_id (str): Transaction ID price (str): Filled price @@ -28,7 +28,7 @@ class GetTickerResp(BaseModel, Response): best_bid_size (int): Best bid size best_ask_price (str): Best ask price best_ask_size (int): Best ask size - ts (int): Filled time(nanosecond) + ts (int): Filled time (nanoseconds) """ class SideEnum(Enum): @@ -45,17 +45,17 @@ class SideEnum(Enum): sequence: Optional[int] = Field( default=None, description= - "Sequence number, used to judge whether the messages pushed by Websocket is continuous." + "Sequence number, used to judge whether the messages pushed by Websocket are continuous." ) symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) side: Optional[SideEnum] = Field( default=None, 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." + "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." ) size: Optional[int] = Field(default=None, description="Filled quantity") trade_id: Optional[str] = Field(default=None, @@ -75,7 +75,7 @@ class SideEnum(Enum): description="Best ask size", alias="bestAskSize") ts: Optional[int] = Field(default=None, - description="Filled time(nanosecond)") + description="Filled time (nanoseconds)") __properties: ClassVar[List[str]] = [ "sequence", "symbol", "side", "size", "tradeId", "price", diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_trade_history_data.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_trade_history_data.py index abf9a5a4..dee68766 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_trade_history_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_trade_history_data.py @@ -21,10 +21,10 @@ class GetTradeHistoryData(BaseModel): trade_id (str): Transaction ID maker_order_id (str): Maker order ID taker_order_id (str): Taker order ID - ts (int): Filled timestamp(nanosecond) + ts (int): Filled timestamp (nanosecond) size (int): Filled amount price (str): Filled price - side (SideEnum): 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. + side (SideEnum): 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. """ class SideEnum(Enum): @@ -51,13 +51,13 @@ class SideEnum(Enum): description="Taker order ID", alias="takerOrderId") ts: Optional[int] = Field(default=None, - description="Filled timestamp(nanosecond)") + description="Filled timestamp (nanosecond)") size: Optional[int] = Field(default=None, description="Filled amount") price: Optional[str] = Field(default=None, description="Filled price") side: Optional[SideEnum] = Field( default=None, 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." + "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." ) __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_trade_history_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_trade_history_req.py index 5ee5853f..6232e4fe 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_trade_history_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/market/model_get_trade_history_req.py @@ -15,13 +15,13 @@ class GetTradeHistoryReq(BaseModel): GetTradeHistoryReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) __properties: ClassVar[List[str]] = ["symbol"] @@ -70,7 +70,7 @@ def __init__(self): def set_symbol(self, value: str) -> GetTradeHistoryReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/api_order.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/api_order.py index f524436b..6ea86171 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/api_order.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/api_order.py @@ -48,17 +48,17 @@ class OrderAPI(ABC): def add_order(self, req: AddOrderReq, **kwargs: Any) -> AddOrderResp: """ summary: Add Order - description: Place 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. + 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. documentation: https://www.kucoin.com/docs-new/api-3470235 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -69,15 +69,15 @@ def add_order_test(self, req: AddOrderTestReq, summary: Add Order Test description: Place order to the futures trading system just for validation documentation: https://www.kucoin.com/docs-new/api-3470238 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -88,15 +88,15 @@ def batch_add_orders(self, req: BatchAddOrdersReq, summary: Batch Add Orders 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. documentation: https://www.kucoin.com/docs-new/api-3470236 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 20 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+---------+ """ pass @@ -107,15 +107,15 @@ def add_tpsl_order(self, req: AddTpslOrderReq, summary: Add Take Profit And Stop Loss Order 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. documentation: https://www.kucoin.com/docs-new/api-3470237 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -126,15 +126,15 @@ def cancel_order_by_id(self, req: CancelOrderByIdReq, summary: Cancel Order By OrderId description: Cancel order by system generated orderId. documentation: https://www.kucoin.com/docs-new/api-3470239 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -146,15 +146,15 @@ def cancel_order_by_client_oid( summary: Cancel Order By ClientOid description: Cancel order by client defined orderId. documentation: https://www.kucoin.com/docs-new/api-3470240 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -165,15 +165,15 @@ def batch_cancel_orders(self, req: BatchCancelOrdersReq, summary: Batch Cancel Orders description: Cancel a bach of orders by client defined orderId or system generated orderId documentation: https://www.kucoin.com/docs-new/api-3470241 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 20 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+---------+ """ pass @@ -184,15 +184,15 @@ def cancel_all_orders_v3(self, req: CancelAllOrdersV3Req, summary: Cancel All Orders description: Cancel all open orders (excluding stop orders). The response is a list of orderIDs of the canceled orders. documentation: https://www.kucoin.com/docs-new/api-3470242 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass @@ -203,15 +203,15 @@ def cancel_all_stop_orders(self, req: CancelAllStopOrdersReq, summary: Cancel All Stop orders 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'. documentation: https://www.kucoin.com/docs-new/api-3470243 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 15 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 15 | + +-----------------------+---------+ """ pass @@ -222,15 +222,15 @@ def get_order_by_order_id(self, req: GetOrderByOrderIdReq, summary: Get Order By OrderId description: Get a single order by order id (including a stop order). documentation: https://www.kucoin.com/docs-new/api-3470245 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -239,17 +239,17 @@ def get_order_by_client_oid(self, req: GetOrderByClientOidReq, **kwargs: Any) -> GetOrderByClientOidResp: """ summary: Get Order By ClientOid - description: Get a single order by client order id (including a stop order). + description: Get a single order by client order ID (including a stop order). documentation: https://www.kucoin.com/docs-new/api-3470352 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -260,15 +260,15 @@ def get_order_list(self, req: GetOrderListReq, summary: Get Order List description: List your current orders. documentation: https://www.kucoin.com/docs-new/api-3470244 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -279,15 +279,15 @@ def get_recent_closed_orders(self, req: GetRecentClosedOrdersReq, summary: Get Recent Closed Orders 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. documentation: https://www.kucoin.com/docs-new/api-3470246 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -298,15 +298,15 @@ def get_stop_order_list(self, req: GetStopOrderListReq, summary: Get Stop Order List description: Get the un-triggered stop orders list. Stop orders that have been triggered can be queried through the general order interface documentation: https://www.kucoin.com/docs-new/api-3470247 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 6 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 6 | + +-----------------------+---------+ """ pass @@ -315,17 +315,17 @@ def get_open_order_value(self, req: GetOpenOrderValueReq, **kwargs: Any) -> GetOpenOrderValueResp: """ summary: Get Open Order Value - description: You can query this endpoint to get the the total number and value of the all your active orders. + description: You can query this endpoint to get the total number and value of all your active orders. documentation: https://www.kucoin.com/docs-new/api-3470250 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass @@ -334,17 +334,17 @@ def get_recent_trade_history(self, req: GetRecentTradeHistoryReq, **kwargs: Any) -> GetRecentTradeHistoryResp: """ summary: Get Recent Trade History - description: Get a list of recent 1000 fills in the last 24 hours. If you need to get your recent traded order history with low latency, you may query this endpoint. + 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. documentation: https://www.kucoin.com/docs-new/api-3470249 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | NULL | + +-----------------------+---------+ """ pass @@ -355,15 +355,15 @@ def get_trade_history(self, req: GetTradeHistoryReq, summary: Get Trade History 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. documentation: https://www.kucoin.com/docs-new/api-3470248 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -375,15 +375,15 @@ def cancel_all_orders_v1(self, req: CancelAllOrdersV1Req, summary: Cancel All Orders - V1 description: Cancel all open orders (excluding stop orders). The response is a list of orderIDs of the canceled orders. documentation: https://www.kucoin.com/docs-new/api-3470362 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 200 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 200 | + +-----------------------+---------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/api_order_test.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/api_order_test.py index 086ec28d..0808c151 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/api_order_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/api_order_test.py @@ -256,7 +256,7 @@ def test_get_order_list_req_model(self): Get Order List /api/v1/orders """ - data = "{\"status\": \"done\", \"symbol\": \"example_string_default_value\", \"side\": \"buy\", \"type\": \"limit\", \"startAt\": 123456, \"endAt\": 123456, \"currentPage\": 123456, \"pageSize\": 123456}" + data = "{\"status\": \"done\", \"symbol\": \"example_string_default_value\", \"side\": \"buy\", \"type\": \"limit\", \"startAt\": 123456, \"endAt\": 123456, \"currentPage\": 1, \"pageSize\": 50}" req = GetOrderListReq.from_json(data) def test_get_order_list_resp_model(self): @@ -360,7 +360,7 @@ def test_get_trade_history_resp_model(self): Get Trade History /api/v1/fills """ - data = "{\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\": \"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 \"settleCurrency\": \"USDT\",\n \"fee\": \"0.04045854\",\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 \"settleCurrency\": \"USDT\",\n \"fee\": \"0.040467\",\n \"orderType\": \"market\",\n \"displayType\": \"market\",\n \"tradeType\": \"trade\",\n \"subTradeType\": null,\n \"tradeTime\": 1729155587944000000,\n \"createdAt\": 1729155588104\n }\n ]\n }\n}" + data = "{\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}" common_response = RestResponse.from_json(data) resp = GetTradeHistoryResp.from_dict(common_response.data) diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_order_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_order_req.py index 30eec5d0..d9ad5571 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_order_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_order_req.py @@ -16,29 +16,29 @@ class AddOrderReq(BaseModel): AddOrderReq Attributes: - client_oid (str): 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(-) - side (SideEnum): specify if the order is to 'buy' or 'sell' - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + client_oid (str): 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 (-). + side (SideEnum): Specify if the order is to 'buy' or 'sell'. + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) leverage (int): Used to calculate the margin to be frozen for the order. If you are to close the position, this parameter is not required. - type (TypeEnum): specify if the order is an 'limit' order or 'market' order - remark (str): remark for the order, length cannot exceed 100 utf8 characters - stop (StopEnum): Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order + remark (str): Remark for the order: Length cannot exceed 100 utf8 characters + stop (StopEnum): Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. stop_price_type (StopPriceTypeEnum): Either 'TP', 'IP' or 'MP', Need to be defined if stop is specified. - stop_price (str): Need to be defined if stop is specified. + stop_price (str): Needs to be defined if stop is specified. reduce_only (bool): 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. close_order (bool): 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. - force_hold (bool): 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. - stp (StpEnum): [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. + force_hold (bool): 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. + stp (StpEnum): [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported. margin_mode (MarginModeEnum): Margin mode: ISOLATED, CROSS, default: ISOLATED price (str): Required for type is 'limit' order, indicating the operating price - size (int): **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. + size (int): **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. time_in_force (TimeInForceEnum): 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 - post_only (bool): 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. - hidden (bool): Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. - iceberg (bool): 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. - visible_size (str): 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 (str): **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 - value_qty (str): **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 + post_only (bool): 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. + hidden (bool): Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. + iceberg (bool): 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. + visible_size (str): 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 (str): **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. + value_qty (str): **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. """ class SideEnum(Enum): @@ -63,7 +63,7 @@ class StopEnum(Enum): """ Attributes: DOWN: Triggers when the price reaches or goes below the stopPrice. - UP: Triggers when the price reaches or goes above the stopPrice + UP: Triggers when the price reaches or goes above the stopPrice. """ DOWN = 'down' UP = 'up' @@ -72,8 +72,8 @@ class StopPriceTypeEnum(Enum): """ Attributes: TRADE_PRICE: 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. - MARK_PRICE: MP for mark price, The mark price can be obtained through relevant OPEN API for index services - INDEX_PRICE: IP for index price, The index price can be obtained through relevant OPEN API for index services + MARK_PRICE: MP for mark price. The mark price can be obtained through relevant OPEN API for index services. + INDEX_PRICE: IP for index price. The index price can be obtained through relevant OPEN API for index services. """ TRADE_PRICE = 'TP' MARK_PRICE = 'MP' @@ -102,8 +102,8 @@ class MarginModeEnum(Enum): class TimeInForceEnum(Enum): """ Attributes: - GOOD_TILL_CANCELED: order remains open on the order book until canceled. This is the default type if the field is left empty. - IMMEDIATE_OR_CANCEL: being matched or not, the remaining size of the order will be instantly canceled instead of entering the order book. + GOOD_TILL_CANCELED: Order remains open on the order book until canceled. This is the default type if the field is left empty. + IMMEDIATE_OR_CANCEL: Being matched or not, the remaining size of the order will be instantly canceled instead of entering the order book. """ GOOD_TILL_CANCELED = 'GTC' IMMEDIATE_OR_CANCEL = 'IOC' @@ -111,14 +111,15 @@ class TimeInForceEnum(Enum): client_oid: Optional[str] = Field( default=None, 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(-)", + "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 (-).", alias="clientOid") side: Optional[SideEnum] = Field( - default=None, description="specify if the order is to 'buy' or 'sell'") + default=None, + description="Specify if the order is to 'buy' or 'sell'.") symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) leverage: Optional[int] = Field( default=None, @@ -127,16 +128,16 @@ class TimeInForceEnum(Enum): ) type: Optional[TypeEnum] = Field( default=TypeEnum.LIMIT, - description="specify if the order is an 'limit' order or 'market' order" + description="Specify if the order is a 'limit' order or 'market' order" ) remark: Optional[str] = Field( default=None, description= - "remark for the order, length cannot exceed 100 utf8 characters") + "Remark for the order: Length cannot exceed 100 utf8 characters") stop: Optional[StopEnum] = Field( default=None, description= - "Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded." + "Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be provided." ) stop_price_type: Optional[StopPriceTypeEnum] = Field( default=None, @@ -145,7 +146,7 @@ class TimeInForceEnum(Enum): alias="stopPriceType") stop_price: Optional[str] = Field( default=None, - description="Need to be defined if stop is specified. ", + description="Needs to be defined if stop is specified. ", alias="stopPrice") reduce_only: Optional[bool] = Field( default=False, @@ -160,12 +161,12 @@ class TimeInForceEnum(Enum): force_hold: Optional[bool] = Field( default=False, 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.", + "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.", alias="forceHold") stp: Optional[StpEnum] = Field( default=None, 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." + "[Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported." ) margin_mode: Optional[MarginModeEnum] = Field( default=MarginModeEnum.ISOLATED, @@ -178,7 +179,7 @@ class TimeInForceEnum(Enum): size: Optional[int] = Field( default=None, 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." + "**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." ) time_in_force: Optional[TimeInForceEnum] = Field( default=TimeInForceEnum.GOOD_TILL_CANCELED, @@ -188,32 +189,32 @@ class TimeInForceEnum(Enum): post_only: Optional[bool] = Field( default=False, 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.", + "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.", alias="postOnly") hidden: Optional[bool] = Field( default=False, description= - "Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly." + "Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed." ) iceberg: Optional[bool] = Field( default=False, 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." + "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." ) visible_size: Optional[str] = Field( default=None, 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.", + "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.", alias="visibleSize") qty: Optional[str] = Field( default=None, 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" + "**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." ) value_qty: Optional[str] = Field( default=None, 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", + "**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.", alias="valueQty") __properties: ClassVar[List[str]] = [ @@ -318,21 +319,21 @@ def __init__(self): def set_client_oid(self, value: str) -> AddOrderReqBuilder: """ - 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(-) + 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 (-). """ self.obj['clientOid'] = value return self def set_side(self, value: AddOrderReq.SideEnum) -> AddOrderReqBuilder: """ - specify if the order is to 'buy' or 'sell' + Specify if the order is to 'buy' or 'sell'. """ self.obj['side'] = value return self def set_symbol(self, value: str) -> AddOrderReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self @@ -346,21 +347,21 @@ def set_leverage(self, value: int) -> AddOrderReqBuilder: def set_type(self, value: AddOrderReq.TypeEnum) -> AddOrderReqBuilder: """ - specify if the order is an 'limit' order or 'market' order + Specify if the order is a 'limit' order or 'market' order """ self.obj['type'] = value return self def set_remark(self, value: str) -> AddOrderReqBuilder: """ - remark for the order, length cannot exceed 100 utf8 characters + Remark for the order: Length cannot exceed 100 utf8 characters """ self.obj['remark'] = value return self def set_stop(self, value: AddOrderReq.StopEnum) -> AddOrderReqBuilder: """ - Either 'down' or 'up'. If stop is used,parameter stopPrice and stopPriceType also need to be provieded. + Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be provided. """ self.obj['stop'] = value return self @@ -375,7 +376,7 @@ def set_stop_price_type( def set_stop_price(self, value: str) -> AddOrderReqBuilder: """ - Need to be defined if stop is specified. + Needs to be defined if stop is specified. """ self.obj['stopPrice'] = value return self @@ -396,14 +397,14 @@ def set_close_order(self, value: bool) -> AddOrderReqBuilder: def set_force_hold(self, value: bool) -> AddOrderReqBuilder: """ - 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. + 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. """ self.obj['forceHold'] = value return self def set_stp(self, value: AddOrderReq.StpEnum) -> AddOrderReqBuilder: """ - [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. + [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported. """ self.obj['stp'] = value return self @@ -425,7 +426,7 @@ def set_price(self, value: str) -> AddOrderReqBuilder: def set_size(self, value: int) -> AddOrderReqBuilder: """ - **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. + **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. """ self.obj['size'] = value return self @@ -440,42 +441,42 @@ def set_time_in_force( def set_post_only(self, value: bool) -> AddOrderReqBuilder: """ - 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. + 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. """ self.obj['postOnly'] = value return self def set_hidden(self, value: bool) -> AddOrderReqBuilder: """ - Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. + Optional for type is 'limit' order, orders not displaying in order book. When hidden is chosen, choosing postOnly is not allowed. """ self.obj['hidden'] = value return self def set_iceberg(self, value: bool) -> AddOrderReqBuilder: """ - 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. + 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. """ self.obj['iceberg'] = value return self def set_visible_size(self, value: str) -> AddOrderReqBuilder: """ - 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. + 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. """ self.obj['visibleSize'] = value return self def set_qty(self, value: str) -> AddOrderReqBuilder: """ - **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 + **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. """ self.obj['qty'] = value return self def set_value_qty(self, value: str) -> AddOrderReqBuilder: """ - **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 + **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. """ self.obj['valueQty'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_order_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_order_resp.py index abc916dd..900c12ab 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_order_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_order_resp.py @@ -17,8 +17,8 @@ class AddOrderResp(BaseModel, Response): AddOrderResp Attributes: - order_id (str): The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. - client_oid (str): The user self-defined order id. + order_id (str): The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. + client_oid (str): The user self-defined order ID. """ common_response: Optional[RestResponse] = Field( @@ -26,11 +26,11 @@ class AddOrderResp(BaseModel, Response): order_id: Optional[str] = Field( default=None, description= - "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order.", + "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order.", alias="orderId") client_oid: Optional[str] = Field( default=None, - description="The user self-defined order id.", + description="The user self-defined order ID.", alias="clientOid") __properties: ClassVar[List[str]] = ["orderId", "clientOid"] diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_order_test_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_order_test_req.py index 01b921fb..285e74a7 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_order_test_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_order_test_req.py @@ -36,7 +36,7 @@ class AddOrderTestReq(BaseModel): post_only (bool): 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. hidden (bool): Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. iceberg (bool): 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. - visible_size (str): 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. + visible_size (str): 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 (str): **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 value_qty (str): **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 """ @@ -203,7 +203,7 @@ class TimeInForceEnum(Enum): visible_size: Optional[str] = Field( default=None, 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.", + "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.", alias="visibleSize") qty: Optional[str] = Field( default=None, @@ -469,7 +469,7 @@ def set_iceberg(self, value: bool) -> AddOrderTestReqBuilder: def set_visible_size(self, value: str) -> AddOrderTestReqBuilder: """ - 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. + 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. """ self.obj['visibleSize'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_tpsl_order_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_tpsl_order_req.py index db07ae8c..60939c70 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_tpsl_order_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_add_tpsl_order_req.py @@ -34,7 +34,7 @@ class AddTpslOrderReq(BaseModel): post_only (bool): 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. hidden (bool): Optional for type is 'limit' order, orders not displaying in order book. When hidden chose, not allowed choose postOnly. iceberg (bool): 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. - visible_size (str): 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. + visible_size (str): 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. trigger_stop_up_price (str): Take profit price trigger_stop_down_price (str): Stop loss price qty (str): **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 @@ -184,7 +184,7 @@ class TimeInForceEnum(Enum): visible_size: Optional[str] = Field( default=None, 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.", + "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.", alias="visibleSize") trigger_stop_up_price: Optional[str] = Field( default=None, @@ -444,7 +444,7 @@ def set_iceberg(self, value: bool) -> AddTpslOrderReqBuilder: def set_visible_size(self, value: str) -> AddTpslOrderReqBuilder: """ - 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. + 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. """ self.obj['visibleSize'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_cancel_all_orders_v1_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_cancel_all_orders_v1_req.py index 121ab052..768ddd90 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_cancel_all_orders_v1_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_cancel_all_orders_v1_req.py @@ -15,13 +15,13 @@ class CancelAllOrdersV1Req(BaseModel): CancelAllOrdersV1Req Attributes: - symbol (str): 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) + symbol (str): 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) """ symbol: Optional[str] = Field( default=None, 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) " + "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) " ) __properties: ClassVar[List[str]] = ["symbol"] @@ -70,7 +70,7 @@ def __init__(self): def set_symbol(self, value: str) -> CancelAllOrdersV1ReqBuilder: """ - 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) + 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) """ self.obj['symbol'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_cancel_all_orders_v1_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_cancel_all_orders_v1_resp.py index 083acf3e..4c376b22 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_cancel_all_orders_v1_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_cancel_all_orders_v1_resp.py @@ -17,14 +17,14 @@ class CancelAllOrdersV1Resp(BaseModel, Response): CancelAllOrdersV1Resp Attributes: - cancelled_order_ids (list[str]): Unique ID of the cancelled order + cancelled_order_ids (list[str]): Unique ID of the canceled order """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") cancelled_order_ids: Optional[List[str]] = Field( default=None, - description="Unique ID of the cancelled order", + description="Unique ID of the canceled order", alias="cancelledOrderIds") __properties: ClassVar[List[str]] = ["cancelledOrderIds"] diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_open_order_value_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_open_order_value_req.py index ec721ef7..3d557bbb 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_open_order_value_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_open_order_value_req.py @@ -15,13 +15,13 @@ class GetOpenOrderValueReq(BaseModel): GetOpenOrderValueReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) __properties: ClassVar[List[str]] = ["symbol"] @@ -70,7 +70,7 @@ def __init__(self): def set_symbol(self, value: str) -> GetOpenOrderValueReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_open_order_value_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_open_order_value_resp.py index 61377280..c9591382 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_open_order_value_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_open_order_value_resp.py @@ -17,33 +17,33 @@ class GetOpenOrderValueResp(BaseModel, Response): GetOpenOrderValueResp Attributes: - open_order_buy_size (int): Total number of the unexecuted buy orders - open_order_sell_size (int): Total number of the unexecuted sell orders - open_order_buy_cost (str): Value of all the unexecuted buy orders - open_order_sell_cost (str): Value of all the unexecuted sell orders - settle_currency (str): settlement currency + open_order_buy_size (int): Total number of unexecuted buy orders + open_order_sell_size (int): Total number of unexecuted sell orders + open_order_buy_cost (str): Value of all unexecuted buy orders + open_order_sell_cost (str): Value of all unexecuted sell orders + settle_currency (str): Settlement currency """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") open_order_buy_size: Optional[int] = Field( default=None, - description="Total number of the unexecuted buy orders ", + description="Total number of unexecuted buy orders ", alias="openOrderBuySize") open_order_sell_size: Optional[int] = Field( default=None, - description="Total number of the unexecuted sell orders ", + description="Total number of unexecuted sell orders ", alias="openOrderSellSize") open_order_buy_cost: Optional[str] = Field( default=None, - description="Value of all the unexecuted buy orders ", + description="Value of all unexecuted buy orders ", alias="openOrderBuyCost") open_order_sell_cost: Optional[str] = Field( default=None, - description="Value of all the unexecuted sell orders ", + description="Value of all unexecuted sell orders ", alias="openOrderSellCost") settle_currency: Optional[str] = Field(default=None, - description="settlement currency ", + description="Settlement currency ", alias="settleCurrency") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_order_by_client_oid_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_order_by_client_oid_req.py index 692df734..e14be6cc 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_order_by_client_oid_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_order_by_client_oid_req.py @@ -15,12 +15,12 @@ class GetOrderByClientOidReq(BaseModel): GetOrderByClientOidReq Attributes: - client_oid (str): The user self-defined order id. + client_oid (str): The user self-defined order ID. """ client_oid: Optional[str] = Field( default=None, - description="The user self-defined order id.", + description="The user self-defined order ID.", alias="clientOid") __properties: ClassVar[List[str]] = ["clientOid"] @@ -69,7 +69,7 @@ def __init__(self): def set_client_oid(self, value: str) -> GetOrderByClientOidReqBuilder: """ - The user self-defined order id. + The user self-defined order ID. """ self.obj['clientOid'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_order_by_client_oid_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_order_by_client_oid_resp.py index 04fd844e..e703588e 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_order_by_client_oid_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_order_by_client_oid_resp.py @@ -19,15 +19,15 @@ class GetOrderByClientOidResp(BaseModel, Response): Attributes: id (str): Order ID - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) type (TypeEnum): Order type, market order or limit order side (SideEnum): Transaction side - price (str): Order price + price (str): Order Price size (int): Order quantity value (str): Order value deal_value (str): Executed size of funds deal_size (int): Executed quantity - stp (StpEnum): [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. + stp (StpEnum): [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported. stop (str): Stop order type (stop limit or stop market) stop_price_type (StopPriceTypeEnum): Trigger price type of stop orders stop_triggered (bool): Mark to show whether the stop order is triggered @@ -37,21 +37,21 @@ class GetOrderByClientOidResp(BaseModel, Response): hidden (bool): Mark of the hidden order iceberg (bool): Mark of the iceberg order leverage (str): Leverage of the order - force_hold (bool): A mark to forcely hold the funds for an order + force_hold (bool): A mark to force-hold the funds for an order close_order (bool): A mark to close the position visible_size (int): Visible size of the iceberg order - client_oid (str): Unique order id created by users to identify their orders + client_oid (str): Unique order ID created by users to identify their orders remark (str): Remark - tags (str): tag order source + tags (str): Tag order source is_active (bool): Mark of the active orders cancel_exist (bool): Mark of the canceled orders - created_at (int): Time the order created - updated_at (int): last update time + created_at (int): Order creation time + updated_at (int): Last update time end_at (int): Order Endtime - order_time (int): Order create time in nanosecond - settle_currency (str): settlement currency + order_time (int): Order creation time in nanoseconds + settle_currency (str): Settlement currency margin_mode (MarginModeEnum): Margin mode: ISOLATED (isolated), CROSS (cross margin). - avg_deal_price (str): 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 + avg_deal_price (str): 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 filled_size (int): Value of the executed orders filled_value (str): Executed order quantity status (StatusEnum): order status: “open” or “done” @@ -94,8 +94,8 @@ class StopPriceTypeEnum(Enum): Attributes: NULL: None TRADE_PRICE: 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. - MARK_PRICE: MP for mark price, The mark price can be obtained through relevant OPEN API for index services - INDEX_PRICE: IP for index price, The index price can be obtained through relevant OPEN API for index services + MARK_PRICE: MP for mark price. The mark price can be obtained through relevant OPEN API for index services. + INDEX_PRICE: IP for index price. The index price can be obtained through relevant OPEN API for index services. """ NULL = '' TRADE_PRICE = 'TP' @@ -126,13 +126,13 @@ class StatusEnum(Enum): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) type: Optional[TypeEnum] = Field( default=None, description="Order type, market order or limit order") side: Optional[SideEnum] = Field(default=None, description="Transaction side") - price: Optional[str] = Field(default=None, description="Order price") + price: Optional[str] = Field(default=None, description="Order Price") size: Optional[int] = Field(default=None, description="Order quantity") value: Optional[str] = Field(default=None, description="Order value ") deal_value: Optional[str] = Field(default=None, @@ -144,7 +144,7 @@ class StatusEnum(Enum): stp: Optional[StpEnum] = Field( default=None, 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." + "[Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB. DC not currently supported." ) stop: Optional[str] = Field( default=None, @@ -176,7 +176,7 @@ class StatusEnum(Enum): description="Leverage of the order ") force_hold: Optional[bool] = Field( default=None, - description="A mark to forcely hold the funds for an order ", + description="A mark to force-hold the funds for an order ", alias="forceHold") close_order: Optional[bool] = Field( default=None, @@ -189,10 +189,10 @@ class StatusEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Unique order id created by users to identify their orders ", + "Unique order ID created by users to identify their orders ", alias="clientOid") remark: Optional[str] = Field(default=None, description="Remark") - tags: Optional[str] = Field(default=None, description="tag order source ") + tags: Optional[str] = Field(default=None, description="Tag order source ") is_active: Optional[bool] = Field(default=None, description="Mark of the active orders ", alias="isActive") @@ -201,20 +201,20 @@ class StatusEnum(Enum): description="Mark of the canceled orders ", alias="cancelExist") created_at: Optional[int] = Field(default=None, - description="Time the order created ", + description="Order creation time ", alias="createdAt") updated_at: Optional[int] = Field(default=None, - description="last update time ", + description="Last update time ", alias="updatedAt") end_at: Optional[int] = Field(default=None, description="Order Endtime", alias="endAt") order_time: Optional[int] = Field( default=None, - description="Order create time in nanosecond ", + description="Order creation time in nanoseconds ", alias="orderTime") settle_currency: Optional[str] = Field(default=None, - description="settlement currency ", + description="Settlement currency ", alias="settleCurrency") margin_mode: Optional[MarginModeEnum] = Field( default=None, @@ -223,7 +223,7 @@ class StatusEnum(Enum): avg_deal_price: Optional[str] = Field( default=None, 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 ", + "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 ", alias="avgDealPrice") filled_size: Optional[int] = Field( default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_order_list_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_order_list_req.py index 9844b3d5..28932c22 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_order_list_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_order_list_req.py @@ -19,7 +19,7 @@ class GetOrderListReq(BaseModel): status (StatusEnum): active or done, done as default. Only list orders for a specific status symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) side (SideEnum): buy or sell - type (TypeEnum): limit, market, limit_stop or market_stop + type (TypeEnum): Order Type start_at (int): Start time (milisecond) end_at (int): End time (milisecond) current_page (int): Current request page, The default currentPage is 1 @@ -47,11 +47,19 @@ class SideEnum(Enum): class TypeEnum(Enum): """ Attributes: - LIMIT: - MARKET: + LIMIT: Limit order + MARKET: Market order + LIMIT_STOP: Stop limit order + MARKET_STOP: Stop market order + OCO_LIMIT: Oco limit order + OCO_STOP: Oco stop order """ LIMIT = 'limit' MARKET = 'market' + LIMIT_STOP = 'limit_stop' + MARKET_STOP = 'market_stop' + OCO_LIMIT = 'oco_limit' + OCO_STOP = 'oco_stop' status: Optional[StatusEnum] = Field( default=None, @@ -64,8 +72,7 @@ class TypeEnum(Enum): "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) side: Optional[SideEnum] = Field(default=None, description="buy or sell") - type: Optional[TypeEnum] = Field( - default=None, description="limit, market, limit_stop or market_stop") + type: Optional[TypeEnum] = Field(default=None, description="Order Type") start_at: Optional[int] = Field(default=None, description="Start time (milisecond)", alias="startAt") @@ -73,11 +80,11 @@ class TypeEnum(Enum): description="End time (milisecond)", alias="endAt") current_page: Optional[int] = Field( - default=None, + default=1, description="Current request page, The default currentPage is 1", alias="currentPage") page_size: Optional[int] = Field( - default=None, + default=50, description= "pageSize, The default pageSize is 50, The maximum cannot exceed 1000", alias="pageSize") @@ -120,14 +127,23 @@ def from_dict(cls, obj: Optional[Dict[str, return cls.model_validate(obj) _obj = cls.model_validate({ - "status": obj.get("status"), - "symbol": obj.get("symbol"), - "side": obj.get("side"), - "type": obj.get("type"), - "startAt": obj.get("startAt"), - "endAt": obj.get("endAt"), - "currentPage": obj.get("currentPage"), - "pageSize": obj.get("pageSize") + "status": + obj.get("status"), + "symbol": + obj.get("symbol"), + "side": + obj.get("side"), + "type": + obj.get("type"), + "startAt": + obj.get("startAt"), + "endAt": + obj.get("endAt"), + "currentPage": + obj.get("currentPage") + if obj.get("currentPage") is not None else 1, + "pageSize": + obj.get("pageSize") if obj.get("pageSize") is not None else 50 }) return _obj @@ -163,7 +179,7 @@ def set_side(self, def set_type(self, value: GetOrderListReq.TypeEnum) -> GetOrderListReqBuilder: """ - limit, market, limit_stop or market_stop + Order Type """ self.obj['type'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_recent_trade_history_data.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_recent_trade_history_data.py index 568b1369..d710e18e 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_recent_trade_history_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_recent_trade_history_data.py @@ -16,11 +16,11 @@ class GetRecentTradeHistoryData(BaseModel): GetRecentTradeHistoryData Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) trade_id (str): Trade ID order_id (str): Order ID side (SideEnum): Transaction side - liquidity (LiquidityEnum): Liquidity- taker or maker + liquidity (LiquidityEnum): Liquidity-taker or -maker force_taker (bool): Whether to force processing as a taker price (str): Filled price size (int): Filled amount @@ -29,9 +29,9 @@ class GetRecentTradeHistoryData(BaseModel): close_fee_pay (str): Closing transaction fee stop (str): A mark to the stop order type fee_rate (str): Fee Rate - fix_fee (str): Fixed fees(Deprecated field, no actual use of the value field) + fix_fee (str): Fixed fees (Deprecated field, no actual use of the value field) fee_currency (str): Charging currency - trade_time (int): trade time in nanosecond + trade_time (int): Trade time in nanoseconds sub_trade_type (str): Deprecated field, no actual use of the value field margin_mode (MarginModeEnum): Margin mode: ISOLATED (isolated), CROSS (cross margin). display_type (DisplayTypeEnum): Order Type @@ -39,7 +39,7 @@ class GetRecentTradeHistoryData(BaseModel): settle_currency (str): Settle Currency order_type (OrderTypeEnum): Order type trade_type (TradeTypeEnum): Trade type (trade, liquid, cancel, adl or settlement) - created_at (int): Time the order created + created_at (int): Order creation time """ class SideEnum(Enum): @@ -95,7 +95,7 @@ class TradeTypeEnum(Enum): """ Attributes: TRADE: trade - CANCEL: Partially filled and cancelled orders + CANCEL: Partially filled and canceled orders LIQUID: liquid ADL: adl SETTLEMENT: settlement @@ -109,7 +109,7 @@ class TradeTypeEnum(Enum): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) trade_id: Optional[str] = Field(default=None, description="Trade ID ", @@ -120,7 +120,7 @@ class TradeTypeEnum(Enum): side: Optional[SideEnum] = Field(default=None, description="Transaction side ") liquidity: Optional[LiquidityEnum] = Field( - default=None, description="Liquidity- taker or maker ") + default=None, description="Liquidity-taker or -maker ") force_taker: Optional[bool] = Field( default=None, description="Whether to force processing as a taker ", @@ -143,13 +143,13 @@ class TradeTypeEnum(Enum): fix_fee: Optional[str] = Field( default=None, description= - "Fixed fees(Deprecated field, no actual use of the value field) ", + "Fixed fees (Deprecated field, no actual use of the value field) ", alias="fixFee") fee_currency: Optional[str] = Field(default=None, description="Charging currency ", alias="feeCurrency") trade_time: Optional[int] = Field(default=None, - description="trade time in nanosecond ", + description="Trade time in nanoseconds ", alias="tradeTime") sub_trade_type: Optional[str] = Field( default=None, @@ -174,7 +174,7 @@ class TradeTypeEnum(Enum): description="Trade type (trade, liquid, cancel, adl or settlement) ", alias="tradeType") created_at: Optional[int] = Field(default=None, - description="Time the order created ", + description="Order creation time ", alias="createdAt") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_recent_trade_history_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_recent_trade_history_req.py index 0d2ef711..af8dda10 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_recent_trade_history_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_recent_trade_history_req.py @@ -15,13 +15,13 @@ class GetRecentTradeHistoryReq(BaseModel): GetRecentTradeHistoryReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) __properties: ClassVar[List[str]] = ["symbol"] @@ -71,7 +71,7 @@ def __init__(self): def set_symbol(self, value: str) -> GetRecentTradeHistoryReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_stop_order_list_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_stop_order_list_req.py index 46391750..9a2dbabf 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_stop_order_list_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_stop_order_list_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetStopOrderListReq(BaseModel): @@ -61,7 +60,7 @@ class TypeEnum(Enum): default=None, description="Current request page, The default currentPage is 1", alias="currentPage") - page_size: Optional[Annotated[int, Field(le=1000, strict=True)]] = Field( + page_size: Optional[int] = Field( default=50, description= "pageSize, The default pageSize is 50, The maximum cannot exceed 1000", diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_trade_history_items.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_trade_history_items.py index 01bc072f..93aeba1f 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_trade_history_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_trade_history_items.py @@ -16,11 +16,11 @@ class GetTradeHistoryItems(BaseModel): GetTradeHistoryItems Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) trade_id (str): Trade ID order_id (str): Order ID side (SideEnum): Transaction side - liquidity (LiquidityEnum): Liquidity- taker or maker + liquidity (LiquidityEnum): Liquidity-taker or -maker force_taker (bool): Whether to force processing as a taker price (str): Filled price size (int): Filled amount @@ -29,17 +29,19 @@ class GetTradeHistoryItems(BaseModel): close_fee_pay (str): Closing transaction fee stop (str): A mark to the stop order type fee_rate (str): Fee Rate - fix_fee (str): Fixed fees(Deprecated field, no actual use of the value field) + fix_fee (str): Fixed fees (Deprecated field, no actual use of the value field) fee_currency (str): Charging currency - trade_time (int): trade time in nanosecond + trade_time (int): Trade time in nanoseconds sub_trade_type (str): Deprecated field, no actual use of the value field margin_mode (MarginModeEnum): Margin mode: ISOLATED (isolated), CROSS (cross margin). - settle_currency (str): Settle Currency - display_type (DisplayTypeEnum): Order Type - fee (str): + settle_currency (str): Settle currency + display_type (DisplayTypeEnum): Order type + fee (str): Trading fee order_type (OrderTypeEnum): Order type trade_type (TradeTypeEnum): Trade type (trade, liquid, adl or settlement) - created_at (int): Time the order created + created_at (int): Order creation time + open_fee_tax_pay (str): Opening tax fee (Only KYC users in some regions have this parameter) + close_fee_tax_pay (str): Close tax fee (Only KYC users in some regions have this parameter) """ class SideEnum(Enum): @@ -63,8 +65,8 @@ class LiquidityEnum(Enum): class MarginModeEnum(Enum): """ Attributes: - ISOLATED: Isolated Margin - CROSS: Cross Margin + ISOLATED: Isolated margin + CROSS: Cross margin """ ISOLATED = 'ISOLATED' CROSS = 'CROSS' @@ -72,10 +74,10 @@ class MarginModeEnum(Enum): class DisplayTypeEnum(Enum): """ Attributes: - LIMIT: Limit order - MARKET: Market order - LIMIT_STOP: Stop limit order - MARKET_STOP: Stop Market order + LIMIT: limit order + MARKET: market order + LIMIT_STOP: stop limit order + MARKET_STOP: stop market order """ LIMIT = 'limit' MARKET = 'market' @@ -107,7 +109,7 @@ class TradeTypeEnum(Enum): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) trade_id: Optional[str] = Field(default=None, description="Trade ID ", @@ -118,7 +120,7 @@ class TradeTypeEnum(Enum): side: Optional[SideEnum] = Field(default=None, description="Transaction side") liquidity: Optional[LiquidityEnum] = Field( - default=None, description="Liquidity- taker or maker") + default=None, description="Liquidity-taker or -maker") force_taker: Optional[bool] = Field( default=None, description="Whether to force processing as a taker ", @@ -140,13 +142,13 @@ class TradeTypeEnum(Enum): fix_fee: Optional[str] = Field( default=None, description= - "Fixed fees(Deprecated field, no actual use of the value field)", + "Fixed fees (Deprecated field, no actual use of the value field)", alias="fixFee") fee_currency: Optional[str] = Field(default=None, description="Charging currency", alias="feeCurrency") trade_time: Optional[int] = Field(default=None, - description="trade time in nanosecond", + description="Trade time in nanoseconds", alias="tradeTime") sub_trade_type: Optional[str] = Field( default=None, @@ -157,12 +159,12 @@ class TradeTypeEnum(Enum): description="Margin mode: ISOLATED (isolated), CROSS (cross margin).", alias="marginMode") settle_currency: Optional[str] = Field(default=None, - description="Settle Currency", + description="Settle currency", alias="settleCurrency") display_type: Optional[DisplayTypeEnum] = Field(default=None, - description="Order Type", + description="Order type", alias="displayType") - fee: Optional[str] = None + fee: Optional[str] = Field(default=None, description="Trading fee") order_type: Optional[OrderTypeEnum] = Field(default=None, description="Order type", alias="orderType") @@ -171,15 +173,25 @@ class TradeTypeEnum(Enum): description="Trade type (trade, liquid, adl or settlement) ", alias="tradeType") created_at: Optional[int] = Field(default=None, - description="Time the order created ", + description="Order creation time ", alias="createdAt") + open_fee_tax_pay: Optional[str] = Field( + default=None, + description= + "Opening tax fee (Only KYC users in some regions have this parameter)", + alias="openFeeTaxPay") + close_fee_tax_pay: Optional[str] = Field( + default=None, + description= + "Close tax fee (Only KYC users in some regions have this parameter)", + alias="closeFeeTaxPay") __properties: ClassVar[List[str]] = [ "symbol", "tradeId", "orderId", "side", "liquidity", "forceTaker", "price", "size", "value", "openFeePay", "closeFeePay", "stop", "feeRate", "fixFee", "feeCurrency", "tradeTime", "subTradeType", "marginMode", "settleCurrency", "displayType", "fee", "orderType", - "tradeType", "createdAt" + "tradeType", "createdAt", "openFeeTaxPay", "closeFeeTaxPay" ] model_config = ConfigDict( @@ -239,6 +251,8 @@ def from_dict( "fee": obj.get("fee"), "orderType": obj.get("orderType"), "tradeType": obj.get("tradeType"), - "createdAt": obj.get("createdAt") + "createdAt": obj.get("createdAt"), + "openFeeTaxPay": obj.get("openFeeTaxPay"), + "closeFeeTaxPay": obj.get("closeFeeTaxPay") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_trade_history_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_trade_history_req.py index aef3038e..6ceae834 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_trade_history_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/order/model_get_trade_history_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetTradeHistoryReq(BaseModel): @@ -17,15 +16,15 @@ class GetTradeHistoryReq(BaseModel): GetTradeHistoryReq Attributes: - order_id (str): List fills for a specific order only (If you specify orderId, other parameters can be ignored) - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + order_id (str): List fills for a specific order only (if you specify orderId, other parameters can be ignored) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) side (SideEnum): Order side type (TypeEnum): Order Type - trade_types (str): Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all type when empty - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) - current_page (int): Current request page, The default currentPage is 1 - page_size (int): pageSize, The default pageSize is 50, The maximum cannot exceed 1000 + trade_types (str): Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all types when empty + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) + current_page (int): Current request page. The default currentPage is 1 + page_size (int): pageSize, The default pageSize is 50; the maximum cannot exceed 1000 """ class SideEnum(Enum): @@ -53,34 +52,34 @@ class TypeEnum(Enum): order_id: Optional[str] = Field( default=None, description= - "List fills for a specific order only (If you specify orderId, other parameters can be ignored)", + "List fills for a specific order only (if you specify orderId, other parameters can be ignored)", alias="orderId") symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) side: Optional[SideEnum] = Field(default=None, description="Order side") type: Optional[TypeEnum] = Field(default=None, description="Order Type") trade_types: Optional[str] = Field( default=None, description= - "Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all type when empty", + "Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all types when empty", alias="tradeTypes") start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") current_page: Optional[int] = Field( default=1, - description="Current request page, The default currentPage is 1", + description="Current request page. The default currentPage is 1", alias="currentPage") - page_size: Optional[Annotated[int, Field(le=1000, strict=True)]] = Field( + page_size: Optional[int] = Field( default=50, description= - "pageSize, The default pageSize is 50, The maximum cannot exceed 1000", + "pageSize, The default pageSize is 50; the maximum cannot exceed 1000", alias="pageSize") __properties: ClassVar[List[str]] = [ @@ -152,14 +151,14 @@ def __init__(self): def set_order_id(self, value: str) -> GetTradeHistoryReqBuilder: """ - List fills for a specific order only (If you specify orderId, other parameters can be ignored) + List fills for a specific order only (if you specify orderId, other parameters can be ignored) """ self.obj['orderId'] = value return self def set_symbol(self, value: str) -> GetTradeHistoryReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self @@ -184,35 +183,35 @@ def set_type( def set_trade_types(self, value: str) -> GetTradeHistoryReqBuilder: """ - Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all type when empty + Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all types when empty """ self.obj['tradeTypes'] = value return self def set_start_at(self, value: int) -> GetTradeHistoryReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetTradeHistoryReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self def set_current_page(self, value: int) -> GetTradeHistoryReqBuilder: """ - Current request page, The default currentPage is 1 + Current request page. The default currentPage is 1 """ self.obj['currentPage'] = value return self def set_page_size(self, value: int) -> GetTradeHistoryReqBuilder: """ - pageSize, The default pageSize is 50, The maximum cannot exceed 1000 + pageSize, The default pageSize is 50; the maximum cannot exceed 1000 """ self.obj['pageSize'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/positions/api_positions.py b/sdk/python/kucoin_universal_sdk/generate/futures/positions/api_positions.py index 468977c0..d1be1b83 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/positions/api_positions.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/positions/api_positions.py @@ -43,15 +43,15 @@ def get_margin_mode(self, req: GetMarginModeReq, summary: Get Margin Mode description: This interface can query the margin mode of the current symbol. documentation: https://www.kucoin.com/docs-new/api-3470259 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -62,15 +62,15 @@ def switch_margin_mode(self, req: SwitchMarginModeReq, summary: Switch Margin Mode description: This interface can modify the margin mode of the current symbol. documentation: https://www.kucoin.com/docs-new/api-3470262 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -81,15 +81,15 @@ def get_max_open_size(self, req: GetMaxOpenSizeReq, summary: Get Max Open Size description: Get Maximum Open Position Size. documentation: https://www.kucoin.com/docs-new/api-3470251 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -100,15 +100,15 @@ def get_position_details(self, req: GetPositionDetailsReq, summary: Get Position Details description: Get the position details of a specified position. documentation: https://www.kucoin.com/docs-new/api-3470252 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -119,15 +119,15 @@ def get_position_list(self, req: GetPositionListReq, summary: Get Position List description: Get the position details of a specified position. documentation: https://www.kucoin.com/docs-new/api-3470253 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -138,15 +138,15 @@ def get_positions_history(self, req: GetPositionsHistoryReq, summary: Get Positions History description: This interface can query position history information records. documentation: https://www.kucoin.com/docs-new/api-3470254 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -157,15 +157,15 @@ def get_max_withdraw_margin(self, req: GetMaxWithdrawMarginReq, summary: Get Max Withdraw Margin description: This interface can query the maximum amount of margin that the current position supports withdrawal. documentation: https://www.kucoin.com/docs-new/api-3470258 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass @@ -176,15 +176,15 @@ def get_cross_margin_leverage(self, req: GetCrossMarginLeverageReq, summary: Get Cross Margin Leverage description: This interface can query the current symbol’s cross-margin leverage multiple. documentation: https://www.kucoin.com/docs-new/api-3470260 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -195,15 +195,15 @@ def modify_margin_leverage(self, req: ModifyMarginLeverageReq, summary: Modify Cross Margin Leverage description: This interface can modify the current symbol’s cross-margin leverage multiple. documentation: https://www.kucoin.com/docs-new/api-3470261 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -214,15 +214,15 @@ def add_isolated_margin(self, req: AddIsolatedMarginReq, summary: Add Isolated Margin description: Add Isolated Margin Manually. documentation: https://www.kucoin.com/docs-new/api-3470257 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 4 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 4 | + +-----------------------+---------+ """ pass @@ -233,15 +233,15 @@ def remove_isolated_margin(self, req: RemoveIsolatedMarginReq, summary: Remove Isolated Margin description: Remove Isolated Margin Manually. documentation: https://www.kucoin.com/docs-new/api-3470256 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass @@ -251,17 +251,17 @@ def get_isolated_margin_risk_limit( **kwargs: Any) -> GetIsolatedMarginRiskLimitResp: """ summary: Get Isolated Margin Risk Limit - description: This interface can be used to obtain information about risk limit level of a specific contract(Only valid for isolated Margin). + description: This interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin). documentation: https://www.kucoin.com/docs-new/api-3470263 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -271,17 +271,17 @@ def modify_isolated_margin_risk_limt( **kwargs: Any) -> ModifyIsolatedMarginRiskLimtResp: """ summary: Modify Isolated Margin Risk Limit - description: This interface can be used to obtain information about risk limit level of a specific contract(Only valid for isolated Margin). + description: This interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin). documentation: https://www.kucoin.com/docs-new/api-3470264 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -294,15 +294,15 @@ def modify_auto_deposit_status( summary: Modify Isolated Margin Auto-Deposit Status description: This endpoint is only applicable to isolated margin and is no longer recommended. It is recommended to use cross margin instead. documentation: https://www.kucoin.com/docs-new/api-3470255 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | FUTURES | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | FUTURES | - | API-RATE-LIMIT-POOL | FUTURES | - | API-RATE-LIMIT | 4 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | FUTURES | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | FUTURES | + | API-RATE-LIMIT-POOL | FUTURES | + | API-RATE-LIMIT-WEIGHT | 4 | + +-----------------------+---------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/positions/api_positions_test.py b/sdk/python/kucoin_universal_sdk/generate/futures/positions/api_positions_test.py index 3d6e67ee..22e6c9af 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/positions/api_positions_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/positions/api_positions_test.py @@ -143,7 +143,7 @@ def test_get_positions_history_resp_model(self): Get Positions History /api/v1/history-positions """ - data = "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 10,\n \"totalNum\": 3,\n \"totalPage\": 1,\n \"items\": [\n {\n \"closeId\": \"500000000027312193\",\n \"userId\": \"633559791e1cbc0001f319bc\",\n \"symbol\": \"XBTUSDTM\",\n \"settleCurrency\": \"USDT\",\n \"leverage\": \"0.0\",\n \"type\": \"CLOSE_SHORT\",\n \"pnl\": \"-3.79237944\",\n \"realisedGrossCost\": \"3.795\",\n \"withdrawPnl\": \"0.0\",\n \"tradeFee\": \"0.078657\",\n \"fundingFee\": \"0.08127756\",\n \"openTime\": 1727073653603,\n \"closeTime\": 1729155587945,\n \"openPrice\": \"63650.0\",\n \"closePrice\": \"67445.0\",\n \"marginMode\": \"ISOLATED\"\n },\n {\n \"closeId\": \"500000000026809668\",\n \"userId\": \"633559791e1cbc0001f319bc\",\n \"symbol\": \"SUIUSDTM\",\n \"settleCurrency\": \"USDT\",\n \"leverage\": \"0.0\",\n \"type\": \"LIQUID_SHORT\",\n \"pnl\": \"-1.10919296\",\n \"realisedGrossCost\": \"1.11297635\",\n \"withdrawPnl\": \"0.0\",\n \"tradeFee\": \"0.00200295\",\n \"fundingFee\": \"0.00578634\",\n \"openTime\": 1726473389296,\n \"closeTime\": 1728738683541,\n \"openPrice\": \"1.1072\",\n \"closePrice\": \"2.22017635\",\n \"marginMode\": \"ISOLATED\"\n },\n {\n \"closeId\": \"500000000026819355\",\n \"userId\": \"633559791e1cbc0001f319bc\",\n \"symbol\": \"XBTUSDTM\",\n \"settleCurrency\": \"USDT\",\n \"leverage\": \"0.0\",\n \"type\": \"LIQUID_SHORT\",\n \"pnl\": \"-5.941896296\",\n \"realisedGrossCost\": \"5.86937042\",\n \"withdrawPnl\": \"0.0\",\n \"tradeFee\": \"0.074020096\",\n \"fundingFee\": \"0.00149422\",\n \"openTime\": 1726490775358,\n \"closeTime\": 1727061049859,\n \"openPrice\": \"58679.6\",\n \"closePrice\": \"64548.97042\",\n \"marginMode\": \"ISOLATED\"\n }\n ]\n }\n}" + data = "{\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}" common_response = RestResponse.from_json(data) resp = GetPositionsHistoryResp.from_dict(common_response.data) @@ -200,7 +200,7 @@ def test_modify_margin_leverage_resp_model(self): Modify Cross Margin Leverage /api/v2/changeCrossUserLeverage """ - data = "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"XBTUSDTM\",\n \"leverage\": \"3\"\n }\n}" + data = "{\n \"code\": \"200000\",\n \"data\": true\n}" common_response = RestResponse.from_json(data) resp = ModifyMarginLeverageResp.from_dict(common_response.data) diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_isolated_margin_risk_limit_data.py b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_isolated_margin_risk_limit_data.py index 889a64dd..065b4bbb 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_isolated_margin_risk_limit_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_isolated_margin_risk_limit_data.py @@ -15,11 +15,11 @@ class GetIsolatedMarginRiskLimitData(BaseModel): GetIsolatedMarginRiskLimitData Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - level (int): level - max_risk_limit (int): Upper limit USDT(includes) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + level (int): Level + max_risk_limit (int): Upper limit USDT (included) min_risk_limit (int): Lower limit USDT - max_leverage (int): Max leverage + max_leverage (int): Max. leverage initial_margin (float): Initial margin rate maintain_margin (float): Maintenance margin rate """ @@ -27,18 +27,18 @@ class GetIsolatedMarginRiskLimitData(BaseModel): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) - level: Optional[int] = Field(default=None, description="level ") + level: Optional[int] = Field(default=None, description="Level ") max_risk_limit: Optional[int] = Field( default=None, - description="Upper limit USDT(includes) ", + description="Upper limit USDT (included) ", alias="maxRiskLimit") min_risk_limit: Optional[int] = Field(default=None, description="Lower limit USDT ", alias="minRiskLimit") max_leverage: Optional[int] = Field(default=None, - description="Max leverage ", + description="Max. leverage ", alias="maxLeverage") initial_margin: Optional[float] = Field(default=None, description="Initial margin rate ", diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_isolated_margin_risk_limit_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_isolated_margin_risk_limit_req.py index 227b10ed..f30b6d00 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_isolated_margin_risk_limit_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_isolated_margin_risk_limit_req.py @@ -15,14 +15,14 @@ class GetIsolatedMarginRiskLimitReq(BaseModel): GetIsolatedMarginRiskLimitReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ symbol: Optional[str] = Field( default=None, path_variable="True", description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) __properties: ClassVar[List[str]] = ["symbol"] @@ -73,7 +73,7 @@ def __init__(self): def set_symbol(self, value: str) -> GetIsolatedMarginRiskLimitReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_max_open_size_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_max_open_size_req.py index 54838ed4..b6367964 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_max_open_size_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_max_open_size_req.py @@ -15,17 +15,17 @@ class GetMaxOpenSizeReq(BaseModel): GetMaxOpenSizeReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - price (str): Order price + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + price (str): Order Price leverage (int): Leverage """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) - price: Optional[str] = Field(default=None, description="Order price ") + price: Optional[str] = Field(default=None, description="Order Price ") leverage: Optional[int] = Field(default=None, description="Leverage ") __properties: ClassVar[List[str]] = ["symbol", "price", "leverage"] @@ -77,14 +77,14 @@ def __init__(self): def set_symbol(self, value: str) -> GetMaxOpenSizeReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self def set_price(self, value: str) -> GetMaxOpenSizeReqBuilder: """ - Order price + Order Price """ self.obj['price'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_max_open_size_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_max_open_size_resp.py index 41e34a3a..fe1dc81e 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_max_open_size_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_max_open_size_resp.py @@ -17,9 +17,9 @@ class GetMaxOpenSizeResp(BaseModel, Response): GetMaxOpenSizeResp Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - max_buy_open_size (int): Maximum buy size - max_sell_open_size (int): Maximum buy size + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + max_buy_open_size (int): Maximum buy size (unit: lot) + max_sell_open_size (int): Maximum buy size (unit: lot) """ common_response: Optional[RestResponse] = Field( @@ -27,14 +27,16 @@ class GetMaxOpenSizeResp(BaseModel, Response): symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) - max_buy_open_size: Optional[int] = Field(default=None, - description="Maximum buy size ", - alias="maxBuyOpenSize") - max_sell_open_size: Optional[int] = Field(default=None, - description="Maximum buy size ", - alias="maxSellOpenSize") + max_buy_open_size: Optional[int] = Field( + default=None, + description="Maximum buy size (unit: lot) ", + alias="maxBuyOpenSize") + max_sell_open_size: Optional[int] = Field( + default=None, + description="Maximum buy size (unit: lot) ", + alias="maxSellOpenSize") __properties: ClassVar[List[str]] = [ "symbol", "maxBuyOpenSize", "maxSellOpenSize" diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_positions_history_items.py b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_positions_history_items.py index d594be15..a6655ffe 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_positions_history_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_positions_history_items.py @@ -32,6 +32,12 @@ class GetPositionsHistoryItems(BaseModel): open_price (str): Opening price of the position close_price (str): Closing price of the position margin_mode (MarginModeEnum): Margin Mode: CROSS,ISOLATED + realised_gross_cost_new (str): + tax (str): Tax + roe (str): + liquid_amount (str): + liquid_price (str): + side (str): Position side """ class MarginModeEnum(Enum): @@ -100,11 +106,20 @@ class MarginModeEnum(Enum): default=None, description="Margin Mode: CROSS,ISOLATED", alias="marginMode") + realised_gross_cost_new: Optional[str] = Field( + default=None, alias="realisedGrossCostNew") + tax: Optional[str] = Field(default=None, description="Tax") + roe: Optional[str] = None + liquid_amount: Optional[str] = Field(default=None, alias="liquidAmount") + liquid_price: Optional[str] = Field(default=None, alias="liquidPrice") + side: Optional[str] = Field(default=None, description="Position side") __properties: ClassVar[List[str]] = [ "closeId", "userId", "symbol", "settleCurrency", "leverage", "type", "pnl", "realisedGrossCost", "withdrawPnl", "tradeFee", "fundingFee", - "openTime", "closeTime", "openPrice", "closePrice", "marginMode" + "openTime", "closeTime", "openPrice", "closePrice", "marginMode", + "realisedGrossCostNew", "tax", "roe", "liquidAmount", "liquidPrice", + "side" ] model_config = ConfigDict( @@ -173,6 +188,18 @@ def from_dict( "closePrice": obj.get("closePrice"), "marginMode": - obj.get("marginMode") + obj.get("marginMode"), + "realisedGrossCostNew": + obj.get("realisedGrossCostNew"), + "tax": + obj.get("tax"), + "roe": + obj.get("roe"), + "liquidAmount": + obj.get("liquidAmount"), + "liquidPrice": + obj.get("liquidPrice"), + "side": + obj.get("side") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_positions_history_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_positions_history_req.py index 80fee9e5..a4e9c741 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_positions_history_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_get_positions_history_req.py @@ -8,7 +8,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetPositionsHistoryReq(BaseModel): @@ -33,7 +32,7 @@ class GetPositionsHistoryReq(BaseModel): alias="from") to: Optional[int] = Field(default=None, description="Closing end time(ms) ") - limit: Optional[Annotated[int, Field(le=200, strict=True)]] = Field( + limit: Optional[int] = Field( default=10, description="Number of requests per page, max 200, default 10 ") page_id: Optional[int] = Field( diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_modify_isolated_margin_risk_limt_req.py b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_modify_isolated_margin_risk_limt_req.py index 81608975..f532234b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_modify_isolated_margin_risk_limt_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_modify_isolated_margin_risk_limt_req.py @@ -15,16 +15,16 @@ class ModifyIsolatedMarginRiskLimtReq(BaseModel): ModifyIsolatedMarginRiskLimtReq Attributes: - symbol (str): Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) - level (int): level + symbol (str): Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + level (int): Level """ symbol: Optional[str] = Field( default=None, description= - "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " + "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) " ) - level: Optional[int] = Field(default=None, description="level") + level: Optional[int] = Field(default=None, description="Level") __properties: ClassVar[List[str]] = ["symbol", "level"] @@ -76,14 +76,14 @@ def __init__(self): def set_symbol(self, value: str) -> ModifyIsolatedMarginRiskLimtReqBuilder: """ - Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) + Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220) """ self.obj['symbol'] = value return self def set_level(self, value: int) -> ModifyIsolatedMarginRiskLimtReqBuilder: """ - level + Level """ self.obj['level'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_modify_isolated_margin_risk_limt_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_modify_isolated_margin_risk_limt_resp.py index d5c23666..d92af52a 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_modify_isolated_margin_risk_limt_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_modify_isolated_margin_risk_limt_resp.py @@ -17,7 +17,7 @@ class ModifyIsolatedMarginRiskLimtResp(BaseModel, Response): ModifyIsolatedMarginRiskLimtResp Attributes: - data (bool): To adjust the level will cancel the open order, the response can only indicate whether the submit of the adjustment request is successful or not. + data (bool): Adjusting the level will result in the cancellation of any open orders. The response will indicate only whether the adjustment request was successfully submitted. """ common_response: Optional[RestResponse] = Field( @@ -25,7 +25,7 @@ class ModifyIsolatedMarginRiskLimtResp(BaseModel, Response): data: Optional[bool] = Field( default=None, description= - "To adjust the level will cancel the open order, the response can only indicate whether the submit of the adjustment request is successful or not. " + "Adjusting the level will result in the cancellation of any open orders. The response will indicate only whether the adjustment request was successfully submitted. " ) __properties: ClassVar[List[str]] = ["data"] diff --git a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_modify_margin_leverage_resp.py b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_modify_margin_leverage_resp.py index 96303747..22757cbc 100644 --- a/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_modify_margin_leverage_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/futures/positions/model_modify_margin_leverage_resp.py @@ -17,16 +17,14 @@ class ModifyMarginLeverageResp(BaseModel, Response): ModifyMarginLeverageResp Attributes: - symbol (str): - leverage (str): + data (bool): """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") - symbol: Optional[str] = None - leverage: Optional[str] = None + data: Optional[bool] = None - __properties: ClassVar[List[str]] = ["symbol", "leverage"] + __properties: ClassVar[List[str]] = ["data"] model_config = ConfigDict( populate_by_name=True, @@ -59,13 +57,13 @@ def from_dict( if obj is None: return None + # original response + obj = {'data': obj} + if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "symbol": obj.get("symbol"), - "leverage": obj.get("leverage") - }) + _obj = cls.model_validate({"data": obj.get("data")}) return _obj def set_common_response(self, response: RestResponse): diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/credit/api_credit.py b/sdk/python/kucoin_universal_sdk/generate/margin/credit/api_credit.py index 0dccb386..4071d97d 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/credit/api_credit.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/credit/api_credit.py @@ -28,15 +28,15 @@ def get_loan_market(self, req: GetLoanMarketReq, summary: Get Loan Market description: This API endpoint is used to get the information about the currencies available for lending. documentation: https://www.kucoin.com/docs-new/api-3470212 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass @@ -48,15 +48,15 @@ def get_loan_market_interest_rate( summary: Get Loan Market Interest Rate description: This API endpoint is used to get the interest rates of the margin lending market over the past 7 days. documentation: https://www.kucoin.com/docs-new/api-3470215 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 5 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+--------+ """ pass @@ -66,15 +66,15 @@ def purchase(self, req: PurchaseReq, **kwargs: Any) -> PurchaseResp: summary: Purchase description: Invest credit in the market and earn interest documentation: https://www.kucoin.com/docs-new/api-3470216 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 15 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 15 | + +-----------------------+---------+ """ pass @@ -83,17 +83,17 @@ def modify_purchase(self, req: ModifyPurchaseReq, **kwargs: Any) -> ModifyPurchaseResp: """ summary: Modify Purchase - description: This API endpoint is used to update the interest rates of subscription orders, which will take effect at the beginning of the next hour.,Please ensure that the funds are in the main(funding) account + description: This API endpoint is used to update the interest rates of subscription orders, which will take effect at the beginning of the next hour. Please ensure that the funds are in the main (funding) account. documentation: https://www.kucoin.com/docs-new/api-3470217 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass @@ -102,17 +102,17 @@ def get_purchase_orders(self, req: GetPurchaseOrdersReq, **kwargs: Any) -> GetPurchaseOrdersResp: """ summary: Get Purchase Orders - description: This API endpoint provides pagination query for the purchase orders. + description: This API endpoint provides a pagination query for the purchase orders. documentation: https://www.kucoin.com/docs-new/api-3470213 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass @@ -120,17 +120,17 @@ def get_purchase_orders(self, req: GetPurchaseOrdersReq, def redeem(self, req: RedeemReq, **kwargs: Any) -> RedeemResp: """ summary: Redeem - description: Redeem your loan order + description: Redeem your loan order. documentation: https://www.kucoin.com/docs-new/api-3470218 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 15 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 15 | + +-----------------------+---------+ """ pass @@ -141,15 +141,15 @@ def get_redeem_orders(self, req: GetRedeemOrdersReq, summary: Get Redeem Orders description: This API endpoint provides pagination query for the redeem orders. documentation: https://www.kucoin.com/docs-new/api-3470214 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/credit/api_credit.template b/sdk/python/kucoin_universal_sdk/generate/margin/credit/api_credit.template index 291b685d..7f6645f0 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/credit/api_credit.template +++ b/sdk/python/kucoin_universal_sdk/generate/margin/credit/api_credit.template @@ -85,7 +85,7 @@ def test_get_purchase_orders_req(self): """ builder = GetPurchaseOrdersReqBuilder() - builder.set_currency(?).set_status(?).set_purchase_order_no(?).set_current_page(?).set_page_size(?) + builder.set_status(?).set_currency(?).set_purchase_order_no(?).set_current_page(?).set_page_size(?) req = builder.build() try: resp = self.api.get_purchase_orders(req) @@ -123,7 +123,7 @@ def test_get_redeem_orders_req(self): """ builder = GetRedeemOrdersReqBuilder() - builder.set_currency(?).set_status(?).set_redeem_order_no(?).set_current_page(?).set_page_size(?) + builder.set_status(?).set_currency(?).set_redeem_order_no(?).set_current_page(?).set_page_size(?) req = builder.build() try: resp = self.api.get_redeem_orders(req) diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/credit/api_credit_test.py b/sdk/python/kucoin_universal_sdk/generate/margin/credit/api_credit_test.py index 2cbc356e..c5312aae 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/credit/api_credit_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/credit/api_credit_test.py @@ -100,7 +100,7 @@ def test_get_purchase_orders_req_model(self): Get Purchase Orders /api/v3/purchase/orders """ - data = "{\"currency\": \"BTC\", \"status\": \"DONE\", \"purchaseOrderNo\": \"example_string_default_value\", \"currentPage\": 1, \"pageSize\": 50}" + data = "{\"status\": \"DONE\", \"currency\": \"BTC\", \"purchaseOrderNo\": \"example_string_default_value\", \"currentPage\": 1, \"pageSize\": 50}" req = GetPurchaseOrdersReq.from_json(data) def test_get_purchase_orders_resp_model(self): @@ -138,7 +138,7 @@ def test_get_redeem_orders_req_model(self): Get Redeem Orders /api/v3/redeem/orders """ - data = "{\"currency\": \"BTC\", \"status\": \"DONE\", \"redeemOrderNo\": \"example_string_default_value\", \"currentPage\": 1, \"pageSize\": 50}" + data = "{\"status\": \"DONE\", \"currency\": \"BTC\", \"redeemOrderNo\": \"example_string_default_value\", \"currentPage\": 1, \"pageSize\": 50}" req = GetRedeemOrdersReq.from_json(data) def test_get_redeem_orders_resp_model(self): diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_loan_market_data.py b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_loan_market_data.py index 19163673..b46ed68d 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_loan_market_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_loan_market_data.py @@ -25,7 +25,7 @@ class GetLoanMarketData(BaseModel): interest_increment (str): Increment precision for interest; default is 0.0001 max_purchase_size (str): Maximum purchase amount market_interest_rate (str): Latest market lending rate - auto_purchase_enable (bool): Whether to allow automatic purchase: true: on, false: off + auto_purchase_enable (bool): Whether to allow automatic purchase: True: on; false: off """ currency: Optional[str] = Field(default=None, description="Currency") @@ -66,7 +66,7 @@ class GetLoanMarketData(BaseModel): alias="marketInterestRate") auto_purchase_enable: Optional[bool] = Field( default=None, - description="Whether to allow automatic purchase: true: on, false: off", + description="Whether to allow automatic purchase: True: on; false: off", alias="autoPurchaseEnable") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_purchase_orders_items.py b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_purchase_orders_items.py index 900b3420..2657a461 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_purchase_orders_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_purchase_orders_items.py @@ -17,7 +17,7 @@ class GetPurchaseOrdersItems(BaseModel): Attributes: currency (str): Currency - purchase_order_no (str): Purchase order id + purchase_order_no (str): Purchase order ID purchase_size (str): Total purchase size match_size (str): Executed size interest_rate (str): Target annualized interest rate @@ -37,7 +37,7 @@ class StatusEnum(Enum): currency: Optional[str] = Field(default=None, description="Currency") purchase_order_no: Optional[str] = Field(default=None, - description="Purchase order id", + description="Purchase order ID", alias="purchaseOrderNo") purchase_size: Optional[str] = Field(default=None, description="Total purchase size", diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_purchase_orders_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_purchase_orders_req.py index 9e073508..b6766778 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_purchase_orders_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_purchase_orders_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetPurchaseOrdersReq(BaseModel): @@ -17,39 +16,39 @@ class GetPurchaseOrdersReq(BaseModel): GetPurchaseOrdersReq Attributes: - currency (str): currency status (StatusEnum): DONE-completed; PENDING-settling - purchase_order_no (str): + currency (str): Currency + purchase_order_no (str): Purchase order ID current_page (int): Current page; default is 1 - page_size (int): Page size; 1<=pageSize<=100; default is 50 + page_size (int): Page size; 1<=pageSize<=50; default is 50 """ class StatusEnum(Enum): """ Attributes: - DONE: - PENDING: + DONE: completed + PENDING: settling """ DONE = 'DONE' PENDING = 'PENDING' - currency: Optional[str] = Field(default=None, description="currency") status: Optional[StatusEnum] = Field( default=None, description="DONE-completed; PENDING-settling") + currency: Optional[str] = Field(default=None, description="Currency") purchase_order_no: Optional[str] = Field(default=None, + description="Purchase order ID", alias="purchaseOrderNo") current_page: Optional[int] = Field( default=1, description="Current page; default is 1", alias="currentPage") - page_size: Optional[Annotated[ - int, Field(le=100, strict=True, ge=1)]] = Field( - default=50, - description="Page size; 1<=pageSize<=100; default is 50", - alias="pageSize") + page_size: Optional[int] = Field( + default=50, + description="Page size; 1<=pageSize<=50; default is 50", + alias="pageSize") __properties: ClassVar[List[str]] = [ - "currency", "status", "purchaseOrderNo", "currentPage", "pageSize" + "status", "currency", "purchaseOrderNo", "currentPage", "pageSize" ] model_config = ConfigDict( @@ -86,10 +85,10 @@ def from_dict( return cls.model_validate(obj) _obj = cls.model_validate({ - "currency": - obj.get("currency"), "status": obj.get("status"), + "currency": + obj.get("currency"), "purchaseOrderNo": obj.get("purchaseOrderNo"), "currentPage": @@ -106,13 +105,6 @@ class GetPurchaseOrdersReqBuilder: def __init__(self): self.obj = {} - def set_currency(self, value: str) -> GetPurchaseOrdersReqBuilder: - """ - currency - """ - self.obj['currency'] = value - return self - def set_status( self, value: GetPurchaseOrdersReq.StatusEnum ) -> GetPurchaseOrdersReqBuilder: @@ -122,9 +114,16 @@ def set_status( self.obj['status'] = value return self + def set_currency(self, value: str) -> GetPurchaseOrdersReqBuilder: + """ + Currency + """ + self.obj['currency'] = value + return self + def set_purchase_order_no(self, value: str) -> GetPurchaseOrdersReqBuilder: """ - + Purchase order ID """ self.obj['purchaseOrderNo'] = value return self @@ -138,7 +137,7 @@ def set_current_page(self, value: int) -> GetPurchaseOrdersReqBuilder: def set_page_size(self, value: int) -> GetPurchaseOrdersReqBuilder: """ - Page size; 1<=pageSize<=100; default is 50 + Page size; 1<=pageSize<=50; default is 50 """ self.obj['pageSize'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_purchase_orders_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_purchase_orders_resp.py index 48c1ece3..43900d0a 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_purchase_orders_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_purchase_orders_resp.py @@ -21,7 +21,7 @@ class GetPurchaseOrdersResp(BaseModel, Response): current_page (int): Current Page page_size (int): Page Size total_num (int): Total Number - total_page (int): Total Page + total_page (int): Total Pages items (list[GetPurchaseOrdersItems]): """ @@ -37,7 +37,7 @@ class GetPurchaseOrdersResp(BaseModel, Response): description="Total Number", alias="totalNum") total_page: Optional[int] = Field(default=None, - description="Total Page", + description="Total Pages", alias="totalPage") items: Optional[List[GetPurchaseOrdersItems]] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_redeem_orders_items.py b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_redeem_orders_items.py index a1bfb854..d4334618 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_redeem_orders_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_redeem_orders_items.py @@ -16,8 +16,8 @@ class GetRedeemOrdersItems(BaseModel): Attributes: currency (str): Currency - purchase_order_no (str): Purchase order id - redeem_order_no (str): Redeem order id + purchase_order_no (str): Purchase order ID + redeem_order_no (str): Redeem order ID redeem_size (str): Redemption size receipt_size (str): Redeemed size apply_time (str): Time of redeem @@ -26,10 +26,10 @@ class GetRedeemOrdersItems(BaseModel): currency: Optional[str] = Field(default=None, description="Currency") purchase_order_no: Optional[str] = Field(default=None, - description="Purchase order id", + description="Purchase order ID", alias="purchaseOrderNo") redeem_order_no: Optional[str] = Field(default=None, - description="Redeem order id", + description="Redeem order ID", alias="redeemOrderNo") redeem_size: Optional[str] = Field(default=None, description="Redemption size", diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_redeem_orders_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_redeem_orders_req.py index 2ab97b78..1205e936 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_redeem_orders_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_redeem_orders_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetRedeemOrdersReq(BaseModel): @@ -17,40 +16,39 @@ class GetRedeemOrdersReq(BaseModel): GetRedeemOrdersReq Attributes: - currency (str): currency status (StatusEnum): DONE-completed; PENDING-settling - redeem_order_no (str): Redeem order id + currency (str): currency + redeem_order_no (str): Redeem order ID current_page (int): Current page; default is 1 - page_size (int): Page size; 1<=pageSize<=100; default is 50 + page_size (int): Page size; 1<=pageSize<=50; default is 50 """ class StatusEnum(Enum): """ Attributes: - DONE: - PENDING: + DONE: completed + PENDING: settling """ DONE = 'DONE' PENDING = 'PENDING' - currency: Optional[str] = Field(default=None, description="currency") status: Optional[StatusEnum] = Field( default=None, description="DONE-completed; PENDING-settling") + currency: Optional[str] = Field(default=None, description="currency") redeem_order_no: Optional[str] = Field(default=None, - description="Redeem order id", + description="Redeem order ID", alias="redeemOrderNo") current_page: Optional[int] = Field( default=1, description="Current page; default is 1", alias="currentPage") - page_size: Optional[Annotated[ - int, Field(le=100, strict=True, ge=1)]] = Field( - default=50, - description="Page size; 1<=pageSize<=100; default is 50", - alias="pageSize") + page_size: Optional[int] = Field( + default=50, + description="Page size; 1<=pageSize<=50; default is 50", + alias="pageSize") __properties: ClassVar[List[str]] = [ - "currency", "status", "redeemOrderNo", "currentPage", "pageSize" + "status", "currency", "redeemOrderNo", "currentPage", "pageSize" ] model_config = ConfigDict( @@ -87,10 +85,10 @@ def from_dict( return cls.model_validate(obj) _obj = cls.model_validate({ - "currency": - obj.get("currency"), "status": obj.get("status"), + "currency": + obj.get("currency"), "redeemOrderNo": obj.get("redeemOrderNo"), "currentPage": @@ -107,13 +105,6 @@ class GetRedeemOrdersReqBuilder: def __init__(self): self.obj = {} - def set_currency(self, value: str) -> GetRedeemOrdersReqBuilder: - """ - currency - """ - self.obj['currency'] = value - return self - def set_status( self, value: GetRedeemOrdersReq.StatusEnum) -> GetRedeemOrdersReqBuilder: @@ -123,9 +114,16 @@ def set_status( self.obj['status'] = value return self + def set_currency(self, value: str) -> GetRedeemOrdersReqBuilder: + """ + currency + """ + self.obj['currency'] = value + return self + def set_redeem_order_no(self, value: str) -> GetRedeemOrdersReqBuilder: """ - Redeem order id + Redeem order ID """ self.obj['redeemOrderNo'] = value return self @@ -139,7 +137,7 @@ def set_current_page(self, value: int) -> GetRedeemOrdersReqBuilder: def set_page_size(self, value: int) -> GetRedeemOrdersReqBuilder: """ - Page size; 1<=pageSize<=100; default is 50 + Page size; 1<=pageSize<=50; default is 50 """ self.obj['pageSize'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_redeem_orders_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_redeem_orders_resp.py index 2e150441..67ff4979 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_redeem_orders_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_get_redeem_orders_resp.py @@ -21,7 +21,7 @@ class GetRedeemOrdersResp(BaseModel, Response): current_page (int): Current Page page_size (int): Page Size total_num (int): Total Number - total_page (int): Total Page + total_page (int): Total Pages items (list[GetRedeemOrdersItems]): """ @@ -37,7 +37,7 @@ class GetRedeemOrdersResp(BaseModel, Response): description="Total Number", alias="totalNum") total_page: Optional[int] = Field(default=None, - description="Total Page", + description="Total Pages", alias="totalPage") items: Optional[List[GetRedeemOrdersItems]] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_modify_purchase_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_modify_purchase_req.py index eb176487..aa922b42 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_modify_purchase_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_modify_purchase_req.py @@ -17,7 +17,7 @@ class ModifyPurchaseReq(BaseModel): Attributes: currency (str): Currency interest_rate (str): Modified purchase interest rate - purchase_order_no (str): Purchase order id + purchase_order_no (str): Purchase order ID """ currency: Optional[str] = Field(default=None, description="Currency") @@ -26,7 +26,7 @@ class ModifyPurchaseReq(BaseModel): description="Modified purchase interest rate", alias="interestRate") purchase_order_no: Optional[str] = Field(default=None, - description="Purchase order id", + description="Purchase order ID", alias="purchaseOrderNo") __properties: ClassVar[List[str]] = [ @@ -94,7 +94,7 @@ def set_interest_rate(self, value: str) -> ModifyPurchaseReqBuilder: def set_purchase_order_no(self, value: str) -> ModifyPurchaseReqBuilder: """ - Purchase order id + Purchase order ID """ self.obj['purchaseOrderNo'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_purchase_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_purchase_req.py index bdf905d1..b4acbbc7 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_purchase_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_purchase_req.py @@ -16,14 +16,14 @@ class PurchaseReq(BaseModel): Attributes: currency (str): Currency - size (str): purchase amount - interest_rate (str): purchase interest rate + size (str): Purchase amount + interest_rate (str): Purchase interest rate """ currency: Optional[str] = Field(default=None, description="Currency") - size: Optional[str] = Field(default=None, description="purchase amount") + size: Optional[str] = Field(default=None, description="Purchase amount") interest_rate: Optional[str] = Field(default=None, - description="purchase interest rate", + description="Purchase interest rate", alias="interestRate") __properties: ClassVar[List[str]] = ["currency", "size", "interestRate"] @@ -81,14 +81,14 @@ def set_currency(self, value: str) -> PurchaseReqBuilder: def set_size(self, value: str) -> PurchaseReqBuilder: """ - purchase amount + Purchase amount """ self.obj['size'] = value return self def set_interest_rate(self, value: str) -> PurchaseReqBuilder: """ - purchase interest rate + Purchase interest rate """ self.obj['interestRate'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_purchase_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_purchase_resp.py index c0a218a9..870b65e9 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_purchase_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_purchase_resp.py @@ -17,13 +17,13 @@ class PurchaseResp(BaseModel, Response): PurchaseResp Attributes: - order_no (str): Purchase order id + order_no (str): Purchase order ID """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") order_no: Optional[str] = Field(default=None, - description="Purchase order id", + description="Purchase order ID", alias="orderNo") __properties: ClassVar[List[str]] = ["orderNo"] diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_redeem_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_redeem_req.py index e0a95492..c5ae5b40 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_redeem_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_redeem_req.py @@ -17,13 +17,13 @@ class RedeemReq(BaseModel): Attributes: currency (str): Currency size (str): Redemption amount - purchase_order_no (str): Purchase order id + purchase_order_no (str): Purchase order ID """ currency: Optional[str] = Field(default=None, description="Currency") size: Optional[str] = Field(default=None, description="Redemption amount") purchase_order_no: Optional[str] = Field(default=None, - description="Purchase order id", + description="Purchase order ID", alias="purchaseOrderNo") __properties: ClassVar[List[str]] = ["currency", "size", "purchaseOrderNo"] @@ -88,7 +88,7 @@ def set_size(self, value: str) -> RedeemReqBuilder: def set_purchase_order_no(self, value: str) -> RedeemReqBuilder: """ - Purchase order id + Purchase order ID """ self.obj['purchaseOrderNo'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_redeem_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_redeem_resp.py index da1a3a8f..700f7a46 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_redeem_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/credit/model_redeem_resp.py @@ -17,13 +17,13 @@ class RedeemResp(BaseModel, Response): RedeemResp Attributes: - order_no (str): Redeem order id + order_no (str): Redeem order ID """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") order_no: Optional[str] = Field(default=None, - description="Redeem order id", + description="Redeem order ID", alias="orderNo") __properties: ClassVar[List[str]] = ["orderNo"] diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/debit/api_debit.py b/sdk/python/kucoin_universal_sdk/generate/margin/debit/api_debit.py index 290bb5eb..8f2483b0 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/debit/api_debit.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/debit/api_debit.py @@ -25,15 +25,15 @@ def borrow(self, req: BorrowReq, **kwargs: Any) -> BorrowResp: summary: Borrow description: This API endpoint is used to initiate an application for cross or isolated margin borrowing. documentation: https://www.kucoin.com/docs-new/api-3470206 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 15 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 15 | + +-----------------------+---------+ """ pass @@ -42,17 +42,17 @@ def get_borrow_history(self, req: GetBorrowHistoryReq, **kwargs: Any) -> GetBorrowHistoryResp: """ summary: Get Borrow History - description: This API endpoint is used to get the borrowing orders for cross and isolated margin accounts + description: This API endpoint is used to get the borrowing orders for cross and isolated margin accounts. documentation: https://www.kucoin.com/docs-new/api-3470207 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 15 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 15 | + +-----------------------+---------+ """ pass @@ -62,15 +62,15 @@ def repay(self, req: RepayReq, **kwargs: Any) -> RepayResp: summary: Repay description: This API endpoint is used to initiate an application for cross or isolated margin repayment. documentation: https://www.kucoin.com/docs-new/api-3470210 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass @@ -79,17 +79,17 @@ def get_repay_history(self, req: GetRepayHistoryReq, **kwargs: Any) -> GetRepayHistoryResp: """ summary: Get Repay History - description: This API endpoint is used to get the borrowing orders for cross and isolated margin accounts + description: This API endpoint is used to get the borrowing orders for cross and isolated margin accounts. documentation: https://www.kucoin.com/docs-new/api-3470208 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 15 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 15 | + +-----------------------+---------+ """ pass @@ -97,18 +97,18 @@ def get_repay_history(self, req: GetRepayHistoryReq, def get_interest_history(self, req: GetInterestHistoryReq, **kwargs: Any) -> GetInterestHistoryResp: """ - summary: Get Interest History - description: Request via this endpoint to get the interest records of the cross/isolated margin lending. + summary: Get Interest History. + description: Request the interest records of the cross/isolated margin lending via this endpoint. documentation: https://www.kucoin.com/docs-new/api-3470209 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 20 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+---------+ """ pass @@ -119,15 +119,15 @@ def modify_leverage(self, req: ModifyLeverageReq, summary: Modify Leverage description: This endpoint allows modifying the leverage multiplier for cross margin or isolated margin. documentation: https://www.kucoin.com/docs-new/api-3470211 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 8 | + +-----------------------+---------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/debit/api_debit.template b/sdk/python/kucoin_universal_sdk/generate/margin/debit/api_debit.template index 5b376d73..2a39a483 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/debit/api_debit.template +++ b/sdk/python/kucoin_universal_sdk/generate/margin/debit/api_debit.template @@ -80,7 +80,7 @@ def test_get_repay_history_req(self): def test_get_interest_history_req(self): """ get_interest_history - Get Interest History + Get Interest History. /api/v3/margin/interest """ diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/debit/api_debit_test.py b/sdk/python/kucoin_universal_sdk/generate/margin/debit/api_debit_test.py index 4ce5b409..6c98b448 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/debit/api_debit_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/debit/api_debit_test.py @@ -95,7 +95,7 @@ def test_get_repay_history_resp_model(self): def test_get_interest_history_req_model(self): """ get_interest_history - Get Interest History + Get Interest History. /api/v3/margin/interest """ data = "{\"currency\": \"BTC\", \"isIsolated\": true, \"symbol\": \"BTC-USDT\", \"startTime\": 123456, \"endTime\": 123456, \"currentPage\": 1, \"pageSize\": 50}" @@ -104,7 +104,7 @@ def test_get_interest_history_req_model(self): def test_get_interest_history_resp_model(self): """ get_interest_history - Get Interest History + Get Interest History. /api/v3/margin/interest """ data = "{\"code\":\"200000\",\"data\":{\"timestamp\":1729665170701,\"currentPage\":1,\"pageSize\":50,\"totalNum\":3,\"totalPage\":1,\"items\":[{\"currency\":\"USDT\",\"dayRatio\":\"0.000296\",\"interestAmount\":\"0.00000001\",\"createdTime\":1729663213375},{\"currency\":\"USDT\",\"dayRatio\":\"0.000296\",\"interestAmount\":\"0.00000001\",\"createdTime\":1729659618802},{\"currency\":\"USDT\",\"dayRatio\":\"0.000296\",\"interestAmount\":\"0.00000001\",\"createdTime\":1729656028077}]}}" diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_borrow_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_borrow_resp.py index 8a2d81b3..272aac5e 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_borrow_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_borrow_resp.py @@ -17,14 +17,14 @@ class BorrowResp(BaseModel, Response): BorrowResp Attributes: - order_no (str): Borrow Order Id + order_no (str): Borrow Order ID actual_size (str): Actual borrowed amount """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") order_no: Optional[str] = Field(default=None, - description="Borrow Order Id", + description="Borrow Order ID", alias="orderNo") actual_size: Optional[str] = Field(default=None, description="Actual borrowed amount", diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_borrow_history_items.py b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_borrow_history_items.py index 26c5aff8..93b2a653 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_borrow_history_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_borrow_history_items.py @@ -16,13 +16,13 @@ class GetBorrowHistoryItems(BaseModel): GetBorrowHistoryItems Attributes: - order_no (str): Borrow Order Id + order_no (str): Borrow Order ID symbol (str): Isolated Margin symbol; empty for cross margin currency (str): currency size (str): Initiated borrow amount actual_size (str): Actual borrow amount status (StatusEnum): PENDING: Processing, SUCCESS: Successful, FAILED: Failed - created_time (int): borrow time + created_time (int): Borrow time """ class StatusEnum(Enum): @@ -37,7 +37,7 @@ class StatusEnum(Enum): FAILED = 'FAILED' order_no: Optional[str] = Field(default=None, - description="Borrow Order Id", + description="Borrow Order ID", alias="orderNo") symbol: Optional[str] = Field( default=None, @@ -52,7 +52,7 @@ class StatusEnum(Enum): default=None, description="PENDING: Processing, SUCCESS: Successful, FAILED: Failed") created_time: Optional[int] = Field(default=None, - description="borrow time", + description="Borrow time", alias="createdTime") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_borrow_history_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_borrow_history_req.py index c5577709..94db25b8 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_borrow_history_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_borrow_history_req.py @@ -8,7 +8,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetBorrowHistoryReq(BaseModel): @@ -19,7 +18,7 @@ class GetBorrowHistoryReq(BaseModel): currency (str): currency is_isolated (bool): true-isolated, false-cross; default is false symbol (str): symbol, mandatory for isolated margin account - order_no (str): Borrow Order Id + order_no (str): Borrow Order ID start_time (int): The start and end times are not restricted. If the start time is empty or less than 1680278400000, the default value is set to 1680278400000 (April 1, 2023, 00:00:00) end_time (int): End time current_page (int): Current query page, with a starting value of 1. Default:1 @@ -35,7 +34,7 @@ class GetBorrowHistoryReq(BaseModel): default=None, description="symbol, mandatory for isolated margin account") order_no: Optional[str] = Field(default=None, - description="Borrow Order Id", + description="Borrow Order ID", alias="orderNo") start_time: Optional[int] = Field( default=None, @@ -50,9 +49,7 @@ class GetBorrowHistoryReq(BaseModel): description= "Current query page, with a starting value of 1. Default:1 ", alias="currentPage") - page_size: Optional[Annotated[int, Field( - le=500, strict=True, ge=10 - )]] = Field( + page_size: Optional[int] = Field( default=50, description= "Number of results per page. Default is 50, minimum is 10, maximum is 500", @@ -147,7 +144,7 @@ def set_symbol(self, value: str) -> GetBorrowHistoryReqBuilder: def set_order_no(self, value: str) -> GetBorrowHistoryReqBuilder: """ - Borrow Order Id + Borrow Order ID """ self.obj['orderNo'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_borrow_history_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_borrow_history_resp.py index 568c6189..c48afe84 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_borrow_history_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_borrow_history_resp.py @@ -22,7 +22,7 @@ class GetBorrowHistoryResp(BaseModel, Response): current_page (int): current page page_size (int): page size total_num (int): total number - total_page (int): total page + total_page (int): total pages items (list[GetBorrowHistoryItems]): """ @@ -39,7 +39,7 @@ class GetBorrowHistoryResp(BaseModel, Response): description="total number", alias="totalNum") total_page: Optional[int] = Field(default=None, - description="total page", + description="total pages", alias="totalPage") items: Optional[List[GetBorrowHistoryItems]] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_interest_history_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_interest_history_req.py index 9a0a1493..0bef8382 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_interest_history_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_interest_history_req.py @@ -8,7 +8,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetInterestHistoryReq(BaseModel): @@ -46,9 +45,7 @@ class GetInterestHistoryReq(BaseModel): description= "Current query page, with a starting value of 1. Default:1 ", alias="currentPage") - page_size: Optional[Annotated[int, Field( - le=500, strict=True, ge=10 - )]] = Field( + page_size: Optional[int] = Field( default=50, description= "Number of results per page. Default is 50, minimum is 10, maximum is 500", diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_interest_history_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_interest_history_resp.py index 106d8ab4..655308be 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_interest_history_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_interest_history_resp.py @@ -22,7 +22,7 @@ class GetInterestHistoryResp(BaseModel, Response): current_page (int): current page page_size (int): page size total_num (int): total number - total_page (int): total page + total_page (int): total pages items (list[GetInterestHistoryItems]): """ @@ -39,7 +39,7 @@ class GetInterestHistoryResp(BaseModel, Response): description="total number", alias="totalNum") total_page: Optional[int] = Field(default=None, - description="total page", + description="total pages", alias="totalPage") items: Optional[List[GetInterestHistoryItems]] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_repay_history_items.py b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_repay_history_items.py index cbd00a4c..ff443efd 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_repay_history_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_repay_history_items.py @@ -16,7 +16,7 @@ class GetRepayHistoryItems(BaseModel): GetRepayHistoryItems Attributes: - order_no (str): Repay Order Id + order_no (str): Repay order ID symbol (str): Isolated Margin symbol; empty for cross margin currency (str): currency size (str): Amount of initiated repay @@ -38,7 +38,7 @@ class StatusEnum(Enum): FAILED = 'FAILED' order_no: Optional[str] = Field(default=None, - description="Repay Order Id", + description="Repay order ID", alias="orderNo") symbol: Optional[str] = Field( default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_repay_history_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_repay_history_req.py index 32f8d255..c575a020 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_repay_history_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_repay_history_req.py @@ -8,7 +8,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetRepayHistoryReq(BaseModel): @@ -19,7 +18,7 @@ class GetRepayHistoryReq(BaseModel): currency (str): currency is_isolated (bool): true-isolated, false-cross; default is false symbol (str): symbol, mandatory for isolated margin account - order_no (str): Repay Order Id + order_no (str): Repay order ID start_time (int): The start and end times are not restricted. If the start time is empty or less than 1680278400000, the default value is set to 1680278400000 (April 1, 2023, 00:00:00) end_time (int): End time current_page (int): Current query page, with a starting value of 1. Default:1 @@ -35,7 +34,7 @@ class GetRepayHistoryReq(BaseModel): default=None, description="symbol, mandatory for isolated margin account") order_no: Optional[str] = Field(default=None, - description="Repay Order Id", + description="Repay order ID", alias="orderNo") start_time: Optional[int] = Field( default=None, @@ -50,9 +49,7 @@ class GetRepayHistoryReq(BaseModel): description= "Current query page, with a starting value of 1. Default:1 ", alias="currentPage") - page_size: Optional[Annotated[int, Field( - le=500, strict=True, ge=10 - )]] = Field( + page_size: Optional[int] = Field( default=50, description= "Number of results per page. Default is 50, minimum is 10, maximum is 500", @@ -147,7 +144,7 @@ def set_symbol(self, value: str) -> GetRepayHistoryReqBuilder: def set_order_no(self, value: str) -> GetRepayHistoryReqBuilder: """ - Repay Order Id + Repay order ID """ self.obj['orderNo'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_repay_history_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_repay_history_resp.py index b65d00e0..281bc172 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_repay_history_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_get_repay_history_resp.py @@ -22,7 +22,7 @@ class GetRepayHistoryResp(BaseModel, Response): current_page (int): current page page_size (int): page size total_num (int): total number - total_page (int): total page + total_page (int): total pages items (list[GetRepayHistoryItems]): """ @@ -39,7 +39,7 @@ class GetRepayHistoryResp(BaseModel, Response): description="total number", alias="totalNum") total_page: Optional[int] = Field(default=None, - description="total page", + description="total pages", alias="totalPage") items: Optional[List[GetRepayHistoryItems]] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_repay_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_repay_resp.py index 3d60ce65..25d34390 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_repay_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/debit/model_repay_resp.py @@ -18,7 +18,7 @@ class RepayResp(BaseModel, Response): Attributes: timestamp (int): - order_no (str): Repay Order Id + order_no (str): Repay order ID actual_size (str): Actual repay amount """ @@ -26,7 +26,7 @@ class RepayResp(BaseModel, Response): default=None, description="Common response") timestamp: Optional[int] = None order_no: Optional[str] = Field(default=None, - description="Repay Order Id", + description="Repay order ID", alias="orderNo") actual_size: Optional[str] = Field(default=None, description="Actual repay amount", diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/margin_private/model_cross_margin_position_event.py b/sdk/python/kucoin_universal_sdk/generate/margin/margin_private/model_cross_margin_position_event.py index d2da2864..d18612fe 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/margin_private/model_cross_margin_position_event.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/margin_private/model_cross_margin_position_event.py @@ -20,7 +20,7 @@ class CrossMarginPositionEvent(BaseModel): Attributes: debt_ratio (float): Debt ratio - total_asset (float): Total asset in BTC (interest included) + total_asset (float): Total assets in BTC (interest included) margin_coefficient_total_asset (str): total_debt (str): Total debt in BTC (interest included) asset_list (dict[str, CrossMarginPositionAssetListValue]): Asset list (interest included) @@ -37,7 +37,7 @@ class TypeEnum(Enum): FROZEN_RENEW: When the auto-borrow renewing is complete and the position returns to “EFFECTIVE” status, the system will push this event. UNFROZEN_RENEW: When the account reaches a negative balance, the system will push this event. LIABILITY: When the account reaches a negative balance, the system will push this event. - UNLIABILITY: When all the liabilities is repaid and the position returns to “EFFECTIVE” status, the system will push this event. + UNLIABILITY: When all the liabilities are repaid and the position returns to “EFFECTIVE” status, the system will push this event. """ FROZEN_FL = 'FROZEN_FL' UNFROZEN_FL = 'UNFROZEN_FL' @@ -53,7 +53,7 @@ class TypeEnum(Enum): alias="debtRatio") total_asset: Optional[float] = Field( default=None, - description="Total asset in BTC (interest included)", + description="Total assets in BTC (interest included)", alias="totalAsset") margin_coefficient_total_asset: Optional[str] = Field( default=None, alias="marginCoefficientTotalAsset") diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/margin_private/ws_margin_private.py b/sdk/python/kucoin_universal_sdk/generate/margin/margin_private/ws_margin_private.py index 4bcbb3f8..35f7cda9 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/margin_private/ws_margin_private.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/margin_private/ws_margin_private.py @@ -13,7 +13,7 @@ def cross_margin_position( self, callback: CrossMarginPositionEventCallback) -> str: """ summary: Get Cross Margin Position change - description: The system will push the change event when the position status changes, Or push the current debt message periodically when there is a liability. + description: The system will push the change event when the position status changes, or push the current debt message periodically when there is a liability. push frequency: once every 4s """ pass @@ -24,7 +24,7 @@ def isolated_margin_position( callback: IsolatedMarginPositionEventCallback) -> str: """ summary: Get Isolated Margin Position change - description: The system will push the change event when the position status changes, Or push the current debt message periodically when there is a liability. + description: The system will push the change event when the position status changes, or push the current debt message periodically when there is a liability. push frequency: real time """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/margin_public/ws_margin_public.py b/sdk/python/kucoin_universal_sdk/generate/margin/margin_public/ws_margin_public.py index 45de5630..19241233 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/margin_public/ws_margin_public.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/margin_public/ws_margin_public.py @@ -14,7 +14,7 @@ def index_price(self, symbol: List[str], callback: IndexPriceEventCallback) -> str: """ summary: Index Price - description: Subscribe to this topic to get the index price for the margin trading. The following ticker symbols are supported: List of currently supported symbol. + description: Subscribe to this topic to get the index price for margin trading. The following ticker symbols are supported: List of currently supported symbols. push frequency: once every 1s """ pass @@ -24,7 +24,7 @@ def mark_price(self, symbol: List[str], callback: MarkPriceEventCallback) -> str: """ summary: Mark Price - description: Subscribe to this topic to get the mark price for margin trading.The following ticker symbols are supported: List of currently supported symbol + description: Subscribe to this topic to get the mark price for margin trading. The following ticker symbols are supported: List of currently supported symbols push frequency: once every 1s """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/market/api_market.py b/sdk/python/kucoin_universal_sdk/generate/margin/market/api_market.py index b90e2896..8b52a165 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/market/api_market.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/market/api_market.py @@ -23,89 +23,89 @@ def get_cross_margin_symbols(self, req: GetCrossMarginSymbolsReq, summary: Get Symbols - Cross Margin description: This endpoint allows querying the configuration of cross margin symbol. documentation: https://www.kucoin.com/docs-new/api-3470189 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+--------+ """ pass @abstractmethod - def get_margin_config(self, **kwargs: Any) -> GetMarginConfigResp: + def get_etf_info(self, req: GetEtfInfoReq, + **kwargs: Any) -> GetEtfInfoResp: """ - summary: Get Margin Config - description: Request via this endpoint to get the configure info of the cross margin. - documentation: https://www.kucoin.com/docs-new/api-3470190 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 25 | - +---------------------+--------+ + summary: Get ETF Info + description: This interface returns leveraged token information. + documentation: https://www.kucoin.com/docs-new/api-3470191 + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+--------+ """ pass @abstractmethod - def get_etf_info(self, req: GetEtfInfoReq, - **kwargs: Any) -> GetEtfInfoResp: + def get_mark_price_detail(self, req: GetMarkPriceDetailReq, + **kwargs: Any) -> GetMarkPriceDetailResp: """ - summary: Get ETF Info - description: This interface returns leveraged token information - documentation: https://www.kucoin.com/docs-new/api-3470191 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+--------+ + summary: Get Mark Price Detail + description: This endpoint returns the current Mark price for specified margin trading pairs. + documentation: https://www.kucoin.com/docs-new/api-3470193 + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+--------+ """ pass @abstractmethod - def get_mark_price_list(self, **kwargs: Any) -> GetMarkPriceListResp: + def get_margin_config(self, **kwargs: Any) -> GetMarginConfigResp: """ - summary: Get Mark Price List - description: This endpoint returns the current Mark price for all margin trading pairs. - documentation: https://www.kucoin.com/docs-new/api-3470192 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 10 | - +---------------------+--------+ + summary: Get Margin Config + description: Request the configure info of the cross margin via this endpoint. + documentation: https://www.kucoin.com/docs-new/api-3470190 + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 25 | + +-----------------------+--------+ """ pass @abstractmethod - def get_mark_price_detail(self, req: GetMarkPriceDetailReq, - **kwargs: Any) -> GetMarkPriceDetailResp: + def get_mark_price_list(self, **kwargs: Any) -> GetMarkPriceListResp: """ - summary: Get Mark Price Detail - description: This endpoint returns the current Mark price for specified margin trading pairs. - documentation: https://www.kucoin.com/docs-new/api-3470193 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 2 | - +---------------------+--------+ + summary: Get Mark Price List + description: This endpoint returns the current Mark price for all margin trading pairs. + documentation: https://www.kucoin.com/docs-new/api-3470192 + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+--------+ """ pass @@ -116,15 +116,15 @@ def get_isolated_margin_symbols( summary: Get Symbols - Isolated Margin description: This endpoint allows querying the configuration of isolated margin symbol. documentation: https://www.kucoin.com/docs-new/api-3470194 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+--------+ """ pass @@ -141,27 +141,27 @@ def get_cross_margin_symbols(self, req: GetCrossMarginSymbolsReq, GetCrossMarginSymbolsResp(), False, **kwargs) - def get_margin_config(self, **kwargs: Any) -> GetMarginConfigResp: - return self.transport.call("spot", False, "GET", - "/api/v1/margin/config", None, - GetMarginConfigResp(), False, **kwargs) - def get_etf_info(self, req: GetEtfInfoReq, **kwargs: Any) -> GetEtfInfoResp: return self.transport.call("spot", False, "GET", "/api/v3/etf/info", req, GetEtfInfoResp(), False, **kwargs) - def get_mark_price_list(self, **kwargs: Any) -> GetMarkPriceListResp: - return self.transport.call("spot", False, "GET", - "/api/v3/mark-price/all-symbols", None, - GetMarkPriceListResp(), False, **kwargs) - def get_mark_price_detail(self, req: GetMarkPriceDetailReq, **kwargs: Any) -> GetMarkPriceDetailResp: return self.transport.call("spot", False, "GET", "/api/v1/mark-price/{symbol}/current", req, GetMarkPriceDetailResp(), False, **kwargs) + def get_margin_config(self, **kwargs: Any) -> GetMarginConfigResp: + return self.transport.call("spot", False, "GET", + "/api/v1/margin/config", None, + GetMarginConfigResp(), False, **kwargs) + + def get_mark_price_list(self, **kwargs: Any) -> GetMarkPriceListResp: + return self.transport.call("spot", False, "GET", + "/api/v3/mark-price/all-symbols", None, + GetMarkPriceListResp(), False, **kwargs) + def get_isolated_margin_symbols( self, **kwargs: Any) -> GetIsolatedMarginSymbolsResp: return self.transport.call("spot", False, "GET", diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/market/api_market.template b/sdk/python/kucoin_universal_sdk/generate/margin/market/api_market.template index 9c21fcf6..a5a0efc5 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/market/api_market.template +++ b/sdk/python/kucoin_universal_sdk/generate/margin/market/api_market.template @@ -20,15 +20,18 @@ def test_get_cross_margin_symbols_req(self): print("error: ", e) raise e -def test_get_margin_config_req(self): +def test_get_etf_info_req(self): """ - get_margin_config - Get Margin Config - /api/v1/margin/config + get_etf_info + Get ETF Info + /api/v3/etf/info """ + builder = GetEtfInfoReqBuilder() + builder.set_currency(?) + req = builder.build() try: - resp = self.api.get_margin_config() + resp = self.api.get_etf_info(req) print("code: ", resp.common_response.code) print("msg: ", resp.common_response.message) print("data: ", resp.to_json()) @@ -36,18 +39,18 @@ def test_get_margin_config_req(self): print("error: ", e) raise e -def test_get_etf_info_req(self): +def test_get_mark_price_detail_req(self): """ - get_etf_info - Get ETF Info - /api/v3/etf/info + get_mark_price_detail + Get Mark Price Detail + /api/v1/mark-price/{symbol}/current """ - builder = GetEtfInfoReqBuilder() - builder.set_currency(?) + builder = GetMarkPriceDetailReqBuilder() + builder.set_symbol(?) req = builder.build() try: - resp = self.api.get_etf_info(req) + resp = self.api.get_mark_price_detail(req) print("code: ", resp.common_response.code) print("msg: ", resp.common_response.message) print("data: ", resp.to_json()) @@ -55,15 +58,15 @@ def test_get_etf_info_req(self): print("error: ", e) raise e -def test_get_mark_price_list_req(self): +def test_get_margin_config_req(self): """ - get_mark_price_list - Get Mark Price List - /api/v3/mark-price/all-symbols + get_margin_config + Get Margin Config + /api/v1/margin/config """ try: - resp = self.api.get_mark_price_list() + resp = self.api.get_margin_config() print("code: ", resp.common_response.code) print("msg: ", resp.common_response.message) print("data: ", resp.to_json()) @@ -71,18 +74,15 @@ def test_get_mark_price_list_req(self): print("error: ", e) raise e -def test_get_mark_price_detail_req(self): +def test_get_mark_price_list_req(self): """ - get_mark_price_detail - Get Mark Price Detail - /api/v1/mark-price/{symbol}/current + get_mark_price_list + Get Mark Price List + /api/v3/mark-price/all-symbols """ - builder = GetMarkPriceDetailReqBuilder() - builder.set_symbol(?) - req = builder.build() try: - resp = self.api.get_mark_price_detail(req) + resp = self.api.get_mark_price_list() print("code: ", resp.common_response.code) print("msg: ", resp.common_response.message) print("data: ", resp.to_json()) diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/market/api_market_test.py b/sdk/python/kucoin_universal_sdk/generate/margin/market/api_market_test.py index 3810d9ec..2e3242aa 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/market/api_market_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/market/api_market_test.py @@ -32,23 +32,6 @@ def test_get_cross_margin_symbols_resp_model(self): common_response = RestResponse.from_json(data) resp = GetCrossMarginSymbolsResp.from_dict(common_response.data) - def test_get_margin_config_req_model(self): - """ - get_margin_config - Get Margin Config - /api/v1/margin/config - """ - - def test_get_margin_config_resp_model(self): - """ - get_margin_config - Get Margin Config - /api/v1/margin/config - """ - data = "{\n \"code\": \"200000\",\n \"data\": {\n \"maxLeverage\": 5,\n \"warningDebtRatio\": \"0.95\",\n \"liqDebtRatio\": \"0.97\",\n \"currencyList\": [\n \"VRA\",\n \"APT\",\n \"IOTX\",\n \"SHIB\",\n \"KDA\",\n \"BCHSV\",\n \"NEAR\",\n \"CLV\",\n \"AUDIO\",\n \"AIOZ\",\n \"FLOW\",\n \"WLD\",\n \"COMP\",\n \"MEME\",\n \"SLP\",\n \"STX\",\n \"ZRO\",\n \"QI\",\n \"PYTH\",\n \"RUNE\",\n \"DGB\",\n \"IOST\",\n \"SUI\",\n \"BCH\",\n \"CAKE\",\n \"DOT\",\n \"OMG\",\n \"POL\",\n \"GMT\",\n \"1INCH\",\n \"RSR\",\n \"NKN\",\n \"BTC\",\n \"AR\",\n \"ARB\",\n \"TON\",\n \"LISTA\",\n \"AVAX\",\n \"SEI\",\n \"FTM\",\n \"ERN\",\n \"BB\",\n \"BTT\",\n \"JTO\",\n \"ONE\",\n \"RLC\",\n \"ANKR\",\n \"SUSHI\",\n \"CATI\",\n \"ALGO\",\n \"PEPE2\",\n \"ATOM\",\n \"LPT\",\n \"BIGTIME\",\n \"CFX\",\n \"DYM\",\n \"VELO\",\n \"XPR\",\n \"SNX\",\n \"JUP\",\n \"MANA\",\n \"API3\",\n \"PYR\",\n \"ROSE\",\n \"GLMR\",\n \"SATS\",\n \"TIA\",\n \"GALAX\",\n \"SOL\",\n \"DAO\",\n \"FET\",\n \"ETC\",\n \"MKR\",\n \"WOO\",\n \"DODO\",\n \"OGN\",\n \"BNB\",\n \"ICP\",\n \"BLUR\",\n \"ETH\",\n \"ZEC\",\n \"NEO\",\n \"CELO\",\n \"REN\",\n \"MANTA\",\n \"LRC\",\n \"STRK\",\n \"ADA\",\n \"STORJ\",\n \"REQ\",\n \"TAO\",\n \"VET\",\n \"FITFI\",\n \"USDT\",\n \"DOGE\",\n \"HBAR\",\n \"SXP\",\n \"NEIROCTO\",\n \"CHR\",\n \"ORDI\",\n \"DASH\",\n \"PEPE\",\n \"ONDO\",\n \"ILV\",\n \"WAVES\",\n \"CHZ\",\n \"DOGS\",\n \"XRP\",\n \"CTSI\",\n \"JASMY\",\n \"FLOKI\",\n \"TRX\",\n \"KAVA\",\n \"SAND\",\n \"C98\",\n \"UMA\",\n \"NOT\",\n \"IMX\",\n \"WIF\",\n \"ENA\",\n \"EGLD\",\n \"BOME\",\n \"LTC\",\n \"USDC\",\n \"METIS\",\n \"WIN\",\n \"THETA\",\n \"FXS\",\n \"ENJ\",\n \"CRO\",\n \"AEVO\",\n \"INJ\",\n \"LTO\",\n \"CRV\",\n \"GRT\",\n \"DYDX\",\n \"FLUX\",\n \"ENS\",\n \"WAX\",\n \"MASK\",\n \"POND\",\n \"UNI\",\n \"AAVE\",\n \"LINA\",\n \"TLM\",\n \"BONK\",\n \"QNT\",\n \"LDO\",\n \"ALICE\",\n \"XLM\",\n \"LINK\",\n \"CKB\",\n \"LUNC\",\n \"YFI\",\n \"ETHW\",\n \"XTZ\",\n \"LUNA\",\n \"OP\",\n \"SUPER\",\n \"EIGEN\",\n \"KSM\",\n \"ELON\",\n \"EOS\",\n \"FIL\",\n \"ZETA\",\n \"SKL\",\n \"BAT\",\n \"APE\",\n \"HMSTR\",\n \"YGG\",\n \"MOVR\",\n \"PEOPLE\",\n \"KCS\",\n \"AXS\",\n \"ARPA\",\n \"ZIL\"\n ]\n }\n}" - common_response = RestResponse.from_json(data) - resp = GetMarginConfigResp.from_dict(common_response.data) - def test_get_etf_info_req_model(self): """ get_etf_info @@ -68,23 +51,6 @@ def test_get_etf_info_resp_model(self): common_response = RestResponse.from_json(data) resp = GetEtfInfoResp.from_dict(common_response.data) - def test_get_mark_price_list_req_model(self): - """ - get_mark_price_list - Get Mark Price List - /api/v3/mark-price/all-symbols - """ - - def test_get_mark_price_list_resp_model(self): - """ - get_mark_price_list - Get Mark Price List - /api/v3/mark-price/all-symbols - """ - data = "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"USDT-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.504E-5\n },\n {\n \"symbol\": \"USDC-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.5049024E-5\n }\n ]\n}" - common_response = RestResponse.from_json(data) - resp = GetMarkPriceListResp.from_dict(common_response.data) - def test_get_mark_price_detail_req_model(self): """ get_mark_price_detail @@ -104,6 +70,40 @@ def test_get_mark_price_detail_resp_model(self): common_response = RestResponse.from_json(data) resp = GetMarkPriceDetailResp.from_dict(common_response.data) + def test_get_margin_config_req_model(self): + """ + get_margin_config + Get Margin Config + /api/v1/margin/config + """ + + def test_get_margin_config_resp_model(self): + """ + get_margin_config + Get Margin Config + /api/v1/margin/config + """ + data = "{\n \"code\": \"200000\",\n \"data\": {\n \"maxLeverage\": 5,\n \"warningDebtRatio\": \"0.95\",\n \"liqDebtRatio\": \"0.97\",\n \"currencyList\": [\n \"VRA\",\n \"APT\",\n \"IOTX\",\n \"SHIB\",\n \"KDA\",\n \"BCHSV\",\n \"NEAR\",\n \"CLV\",\n \"AUDIO\",\n \"AIOZ\",\n \"FLOW\",\n \"WLD\",\n \"COMP\",\n \"MEME\",\n \"SLP\",\n \"STX\",\n \"ZRO\",\n \"QI\",\n \"PYTH\",\n \"RUNE\",\n \"DGB\",\n \"IOST\",\n \"SUI\",\n \"BCH\",\n \"CAKE\",\n \"DOT\",\n \"OMG\",\n \"POL\",\n \"GMT\",\n \"1INCH\",\n \"RSR\",\n \"NKN\",\n \"BTC\",\n \"AR\",\n \"ARB\",\n \"TON\",\n \"LISTA\",\n \"AVAX\",\n \"SEI\",\n \"FTM\",\n \"ERN\",\n \"BB\",\n \"BTT\",\n \"JTO\",\n \"ONE\",\n \"RLC\",\n \"ANKR\",\n \"SUSHI\",\n \"CATI\",\n \"ALGO\",\n \"PEPE2\",\n \"ATOM\",\n \"LPT\",\n \"BIGTIME\",\n \"CFX\",\n \"DYM\",\n \"VELO\",\n \"XPR\",\n \"SNX\",\n \"JUP\",\n \"MANA\",\n \"API3\",\n \"PYR\",\n \"ROSE\",\n \"GLMR\",\n \"SATS\",\n \"TIA\",\n \"GALAX\",\n \"SOL\",\n \"DAO\",\n \"FET\",\n \"ETC\",\n \"MKR\",\n \"WOO\",\n \"DODO\",\n \"OGN\",\n \"BNB\",\n \"ICP\",\n \"BLUR\",\n \"ETH\",\n \"ZEC\",\n \"NEO\",\n \"CELO\",\n \"REN\",\n \"MANTA\",\n \"LRC\",\n \"STRK\",\n \"ADA\",\n \"STORJ\",\n \"REQ\",\n \"TAO\",\n \"VET\",\n \"FITFI\",\n \"USDT\",\n \"DOGE\",\n \"HBAR\",\n \"SXP\",\n \"NEIROCTO\",\n \"CHR\",\n \"ORDI\",\n \"DASH\",\n \"PEPE\",\n \"ONDO\",\n \"ILV\",\n \"WAVES\",\n \"CHZ\",\n \"DOGS\",\n \"XRP\",\n \"CTSI\",\n \"JASMY\",\n \"FLOKI\",\n \"TRX\",\n \"KAVA\",\n \"SAND\",\n \"C98\",\n \"UMA\",\n \"NOT\",\n \"IMX\",\n \"WIF\",\n \"ENA\",\n \"EGLD\",\n \"BOME\",\n \"LTC\",\n \"USDC\",\n \"METIS\",\n \"WIN\",\n \"THETA\",\n \"FXS\",\n \"ENJ\",\n \"CRO\",\n \"AEVO\",\n \"INJ\",\n \"LTO\",\n \"CRV\",\n \"GRT\",\n \"DYDX\",\n \"FLUX\",\n \"ENS\",\n \"WAX\",\n \"MASK\",\n \"POND\",\n \"UNI\",\n \"AAVE\",\n \"LINA\",\n \"TLM\",\n \"BONK\",\n \"QNT\",\n \"LDO\",\n \"ALICE\",\n \"XLM\",\n \"LINK\",\n \"CKB\",\n \"LUNC\",\n \"YFI\",\n \"ETHW\",\n \"XTZ\",\n \"LUNA\",\n \"OP\",\n \"SUPER\",\n \"EIGEN\",\n \"KSM\",\n \"ELON\",\n \"EOS\",\n \"FIL\",\n \"ZETA\",\n \"SKL\",\n \"BAT\",\n \"APE\",\n \"HMSTR\",\n \"YGG\",\n \"MOVR\",\n \"PEOPLE\",\n \"KCS\",\n \"AXS\",\n \"ARPA\",\n \"ZIL\"\n ]\n }\n}" + common_response = RestResponse.from_json(data) + resp = GetMarginConfigResp.from_dict(common_response.data) + + def test_get_mark_price_list_req_model(self): + """ + get_mark_price_list + Get Mark Price List + /api/v3/mark-price/all-symbols + """ + + def test_get_mark_price_list_resp_model(self): + """ + get_mark_price_list + Get Mark Price List + /api/v3/mark-price/all-symbols + """ + data = "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"USDT-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.504E-5\n },\n {\n \"symbol\": \"USDC-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.5049024E-5\n }\n ]\n}" + common_response = RestResponse.from_json(data) + resp = GetMarkPriceListResp.from_dict(common_response.data) + def test_get_isolated_margin_symbols_req_model(self): """ get_isolated_margin_symbols diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_cross_margin_symbols_items.py b/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_cross_margin_symbols_items.py index 476a8f6c..830c3b64 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_cross_margin_symbols_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_cross_margin_symbols_items.py @@ -16,37 +16,38 @@ class GetCrossMarginSymbolsItems(BaseModel): Attributes: symbol (str): symbol - name (str): symbol name - enable_trading (bool): Whether trading is enabled: true for enabled, false for disabled + name (str): Symbol name + enable_trading (bool): Whether trading is enabled: True for enabled; false for disabled market (str): Trading market - base_currency (str): Base currency,e.g. BTC. - quote_currency (str): Quote currency,e.g. USDT. + base_currency (str): Base currency, e.g. BTC. + quote_currency (str): Quote currency, e.g. USDT. base_increment (str): Quantity increment: The quantity for an order must be a positive integer multiple of this increment. Here, the size refers to the quantity of the base currency for the order. For example, for the ETH-USDT trading pair, if the baseIncrement is 0.0000001, the order quantity can be 1.0000001 but not 1.00000001. - base_min_size (str): The minimum order quantity requried to place an order. + base_min_size (str): The minimum order quantity required to place an order. quote_increment (str): Quote increment: The funds for a market order must be a positive integer multiple of this increment. The funds refer to the quote currency amount. For example, for the ETH-USDT trading pair, if the quoteIncrement is 0.000001, the amount of USDT for the order can be 3000.000001 but not 3000.0000001. quote_min_size (str): The minimum order funds required to place a market order. base_max_size (str): The maximum order size required to place an order. quote_max_size (str): The maximum order funds required to place a market order. - price_increment (str): Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. specifies the min order price as well as the price increment.This also applies to quote currency. + price_increment (str): Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. Specifies the min. order price as well as the price increment.This also applies to quote currency. fee_currency (str): The currency of charged fees. - price_limit_rate (str): Threshold for price portection - min_funds (str): the minimum trading amounts + price_limit_rate (str): Threshold for price protection + min_funds (str): The minimum trading amounts """ symbol: Optional[str] = Field(default=None, description="symbol") - name: Optional[str] = Field(default=None, description="symbol name") + name: Optional[str] = Field(default=None, description="Symbol name") enable_trading: Optional[bool] = Field( default=None, description= - "Whether trading is enabled: true for enabled, false for disabled", + "Whether trading is enabled: True for enabled; false for disabled", alias="enableTrading") market: Optional[str] = Field(default=None, description="Trading market") - base_currency: Optional[str] = Field(default=None, - description="Base currency,e.g. BTC.", - alias="baseCurrency") + base_currency: Optional[str] = Field( + default=None, + description="Base currency, e.g. BTC.", + alias="baseCurrency") quote_currency: Optional[str] = Field( default=None, - description="Quote currency,e.g. USDT.", + description="Quote currency, e.g. USDT.", alias="quoteCurrency") base_increment: Optional[str] = Field( default=None, @@ -55,7 +56,7 @@ class GetCrossMarginSymbolsItems(BaseModel): alias="baseIncrement") base_min_size: Optional[str] = Field( default=None, - description="The minimum order quantity requried to place an order.", + description="The minimum order quantity required to place an order.", alias="baseMinSize") quote_increment: Optional[str] = Field( default=None, @@ -77,7 +78,7 @@ class GetCrossMarginSymbolsItems(BaseModel): price_increment: Optional[str] = Field( default=None, description= - "Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. specifies the min order price as well as the price increment.This also applies to quote currency.", + "Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. Specifies the min. order price as well as the price increment.This also applies to quote currency.", alias="priceIncrement") fee_currency: Optional[str] = Field( default=None, @@ -85,10 +86,10 @@ class GetCrossMarginSymbolsItems(BaseModel): alias="feeCurrency") price_limit_rate: Optional[str] = Field( default=None, - description="Threshold for price portection", + description="Threshold for price protection", alias="priceLimitRate") min_funds: Optional[str] = Field(default=None, - description="the minimum trading amounts", + description="The minimum trading amounts", alias="minFunds") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_etf_info_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_etf_info_req.py index daa85d5a..7ea913ee 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_etf_info_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_etf_info_req.py @@ -15,12 +15,12 @@ class GetEtfInfoReq(BaseModel): GetEtfInfoReq Attributes: - currency (str): ETF Currency, if empty query all currencies + currency (str): ETF Currency: If empty, query all currencies """ currency: Optional[str] = Field( default=None, - description="ETF Currency, if empty query all currencies ") + description="ETF Currency: If empty, query all currencies ") __properties: ClassVar[List[str]] = ["currency"] @@ -67,7 +67,7 @@ def __init__(self): def set_currency(self, value: str) -> GetEtfInfoReqBuilder: """ - ETF Currency, if empty query all currencies + ETF Currency: If empty, query all currencies """ self.obj['currency'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_isolated_margin_symbols_data.py b/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_isolated_margin_symbols_data.py index 8141a22a..7e8b322f 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_isolated_margin_symbols_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_isolated_margin_symbols_data.py @@ -16,10 +16,10 @@ class GetIsolatedMarginSymbolsData(BaseModel): Attributes: symbol (str): symbol - symbol_name (str): symbol name - base_currency (str): Base currency,e.g. BTC. - quote_currency (str): Quote currency,e.g. USDT. - max_leverage (int): Max leverage of this symbol + symbol_name (str): Symbol name + base_currency (str): Base currency, e.g. BTC. + quote_currency (str): Quote currency, e.g. USDT. + max_leverage (int): Max. leverage of this symbol fl_debt_ratio (str): trade_enable (bool): auto_renew_max_debt_ratio (str): @@ -33,18 +33,19 @@ class GetIsolatedMarginSymbolsData(BaseModel): symbol: Optional[str] = Field(default=None, description="symbol") symbol_name: Optional[str] = Field(default=None, - description="symbol name", + description="Symbol name", alias="symbolName") - base_currency: Optional[str] = Field(default=None, - description="Base currency,e.g. BTC.", - alias="baseCurrency") + base_currency: Optional[str] = Field( + default=None, + description="Base currency, e.g. BTC.", + alias="baseCurrency") quote_currency: Optional[str] = Field( default=None, - description="Quote currency,e.g. USDT.", + description="Quote currency, e.g. USDT.", alias="quoteCurrency") max_leverage: Optional[int] = Field( default=None, - description="Max leverage of this symbol", + description="Max. leverage of this symbol", alias="maxLeverage") fl_debt_ratio: Optional[str] = Field(default=None, alias="flDebtRatio") trade_enable: Optional[bool] = Field(default=None, alias="tradeEnable") diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_margin_config_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_margin_config_resp.py index 66d575e4..de2b7afa 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_margin_config_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/market/model_get_margin_config_resp.py @@ -18,7 +18,7 @@ class GetMarginConfigResp(BaseModel, Response): Attributes: currency_list (list[str]): Available currencies for margin trade - max_leverage (int): Max leverage available + max_leverage (int): Max. leverage available warning_debt_ratio (str): The warning debt ratio of the forced liquidation liq_debt_ratio (str): The debt ratio of the forced liquidation """ @@ -30,7 +30,7 @@ class GetMarginConfigResp(BaseModel, Response): description="Available currencies for margin trade", alias="currencyList") max_leverage: Optional[int] = Field(default=None, - description="Max leverage available", + description="Max. leverage available", alias="maxLeverage") warning_debt_ratio: Optional[str] = Field( default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/api_order.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/api_order.py index ca172385..2a98d08f 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/api_order.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/api_order.py @@ -38,17 +38,17 @@ class OrderAPI(ABC): def add_order(self, req: AddOrderReq, **kwargs: Any) -> AddOrderResp: """ summary: Add Order - description: Place order to the Cross-margin or Isolated-margin 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. + description: Place order in the Cross-margin or Isolated-margin 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. documentation: https://www.kucoin.com/docs-new/api-3470204 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -57,17 +57,17 @@ def add_order_test(self, req: AddOrderTestReq, **kwargs: Any) -> AddOrderTestResp: """ summary: Add Order Test - description: Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. + description: Order test endpoint: This endpoint’s request and return parameters are identical to the order endpoint, and can be used to verify whether the signature is correct, among other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. documentation: https://www.kucoin.com/docs-new/api-3470205 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -76,17 +76,17 @@ def cancel_order_by_order_id(self, req: CancelOrderByOrderIdReq, **kwargs: Any) -> CancelOrderByOrderIdResp: """ summary: Cancel Order By OrderId - description: This endpoint can be used to cancel a margin order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + description: This endpoint can be used to cancel a margin order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. documentation: https://www.kucoin.com/docs-new/api-3470195 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -96,17 +96,17 @@ def cancel_order_by_client_oid( **kwargs: Any) -> CancelOrderByClientOidResp: """ summary: Cancel Order By ClientOid - description: This endpoint can be used to cancel a margin order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + description: This endpoint can be used to cancel a margin order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. documentation: https://www.kucoin.com/docs-new/api-3470201 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -116,17 +116,17 @@ def cancel_all_orders_by_symbol( **kwargs: Any) -> CancelAllOrdersBySymbolResp: """ summary: Cancel All Orders By Symbol - description: This interface can cancel all open Margin orders by symbol This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + description: This interface can cancel all open Margin orders by symbol. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. documentation: https://www.kucoin.com/docs-new/api-3470197 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass @@ -136,17 +136,17 @@ def get_symbols_with_open_order( **kwargs: Any) -> GetSymbolsWithOpenOrderResp: """ summary: Get Symbols With Open Order - description: This interface can query all Margin symbol that has active orders + description: This interface can query all Margin symbols that have active orders. documentation: https://www.kucoin.com/docs-new/api-3470196 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | NULL | + +-----------------------+---------+ """ pass @@ -155,17 +155,17 @@ def get_open_orders(self, req: GetOpenOrdersReq, **kwargs: Any) -> GetOpenOrdersResp: """ summary: Get Open Orders - description: This interface is to obtain all Margin active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. + description: This interface is to obtain all Margin active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. documentation: https://www.kucoin.com/docs-new/api-3470198 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 4 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 4 | + +-----------------------+---------+ """ pass @@ -174,17 +174,17 @@ def get_closed_orders(self, req: GetClosedOrdersReq, **kwargs: Any) -> GetClosedOrdersResp: """ summary: Get Closed Orders - description: This interface is to obtain all Margin closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. + description: This interface is to obtain all Margin closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. documentation: https://www.kucoin.com/docs-new/api-3470199 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass @@ -195,15 +195,15 @@ def get_trade_history(self, req: GetTradeHistoryReq, summary: Get Trade History description: This endpoint can be used to obtain a list of the latest Margin transaction details. The returned data is sorted in descending order according to the latest update time of the order. documentation: https://www.kucoin.com/docs-new/api-3470200 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -212,17 +212,17 @@ def get_order_by_order_id(self, req: GetOrderByOrderIdReq, **kwargs: Any) -> GetOrderByOrderIdResp: """ summary: Get Order By OrderId - description: This endpoint can be used to obtain information for a single Margin order using the order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. + description: This endpoint can be used to obtain information for a single Margin order using the order ID. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. documentation: https://www.kucoin.com/docs-new/api-3470202 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -231,17 +231,17 @@ def get_order_by_client_oid(self, req: GetOrderByClientOidReq, **kwargs: Any) -> GetOrderByClientOidResp: """ summary: Get Order By ClientOid - description: This endpoint can be used to obtain information for a single Margin order using the client order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. + description: This endpoint can be used to obtain information for a single Margin order using the client order ID. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. documentation: https://www.kucoin.com/docs-new/api-3470203 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -251,17 +251,17 @@ def add_order_v1(self, req: AddOrderV1Req, **kwargs: Any) -> AddOrderV1Resp: """ summary: Add Order - V1 - description: Place order to the Cross-margin or Isolated-margin 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. + description: Place order in the Cross-margin or Isolated-margin 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. documentation: https://www.kucoin.com/docs-new/api-3470312 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -271,17 +271,17 @@ def add_order_test_v1(self, req: AddOrderTestV1Req, **kwargs: Any) -> AddOrderTestV1Resp: """ summary: Add Order Test - V1 - description: Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. + description: Order test endpoint: This endpoint’s request and return parameters are identical to the order endpoint, and can be used to verify whether the signature is correct, among other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. documentation: https://www.kucoin.com/docs-new/api-3470313 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | MARGIN | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | MARGIN | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/api_order.template b/sdk/python/kucoin_universal_sdk/generate/margin/order/api_order.template index a5f56078..980e658b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/api_order.template +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/api_order.template @@ -180,7 +180,7 @@ def test_get_order_by_order_id_req(self): """ builder = GetOrderByOrderIdReqBuilder() - builder.set_symbol(?).set_order_id(?) + builder.set_order_id(?).set_symbol(?) req = builder.build() try: resp = self.api.get_order_by_order_id(req) @@ -199,7 +199,7 @@ def test_get_order_by_client_oid_req(self): """ builder = GetOrderByClientOidReqBuilder() - builder.set_symbol(?).set_client_oid(?) + builder.set_client_oid(?).set_symbol(?) req = builder.build() try: resp = self.api.get_order_by_client_oid(req) diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/api_order_test.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/api_order_test.py index 62a5e47f..4f09cb9c 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/api_order_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/api_order_test.py @@ -208,7 +208,7 @@ def test_get_order_by_order_id_req_model(self): Get Order By OrderId /api/v3/hf/margin/orders/{orderId} """ - data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"671667306afcdb000723107f\"}" + data = "{\"orderId\": \"671667306afcdb000723107f\", \"symbol\": \"BTC-USDT\"}" req = GetOrderByOrderIdReq.from_json(data) def test_get_order_by_order_id_resp_model(self): @@ -227,7 +227,7 @@ def test_get_order_by_client_oid_req_model(self): Get Order By ClientOid /api/v3/hf/margin/orders/client-order/{clientOid} """ - data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e493fb\"}" + data = "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"symbol\": \"BTC-USDT\"}" req = GetOrderByClientOidReq.from_json(data) def test_get_order_by_client_oid_resp_model(self): diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_req.py index 152b8adb..d6201468 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_req.py @@ -16,23 +16,23 @@ class AddOrderReq(BaseModel): AddOrderReq Attributes: - client_oid (str): Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. - side (SideEnum): specify if the order is to 'buy' or 'sell' + client_oid (str): Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + side (SideEnum): Specify if the order is to 'buy' or 'sell'. symbol (str): symbol - type (TypeEnum): specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. stp (StpEnum): [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC price (str): Specify price for order When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. - size (str): Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + size (str): Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds time_in_force (TimeInForceEnum): [Time in force](https://www.kucoin.com/docs-new/api-5176570) is a special strategy used during trading post_only (bool): passive order labels, this is disabled when the order timing strategy is IOC or FOK hidden (bool): [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) iceberg (bool): Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) visible_size (str): Maximum visible quantity in iceberg orders - cancel_after (int): Cancel after n seconds,the order timing strategy is GTT + cancel_after (int): Cancel after n seconds, the order timing strategy is GTT funds (str): When **type** is market, select one out of two: size or funds - is_isolated (bool): true - isolated margin ,false - cross margin. defult as false + is_isolated (bool): True - isolated margin; false - cross margin. Default is false auto_borrow (bool): When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. - auto_repay (bool): AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + auto_repay (bool): AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. """ class SideEnum(Enum): @@ -82,15 +82,16 @@ class TimeInForceEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status.", + "Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status.", alias="clientOid") side: Optional[SideEnum] = Field( - default=None, description="specify if the order is to 'buy' or 'sell'") + default=None, + description="Specify if the order is to 'buy' or 'sell'.") symbol: Optional[str] = Field(default=None, description="symbol") type: Optional[TypeEnum] = Field( default=TypeEnum.LIMIT, description= - "specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged." + "Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged." ) stp: Optional[StpEnum] = Field( default=None, @@ -105,7 +106,7 @@ class TimeInForceEnum(Enum): size: Optional[str] = Field( default=None, description= - "Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds" + "Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds" ) time_in_force: Optional[TimeInForceEnum] = Field( default=TimeInForceEnum.GTC, @@ -133,7 +134,7 @@ class TimeInForceEnum(Enum): alias="visibleSize") cancel_after: Optional[int] = Field( default=None, - description="Cancel after n seconds,the order timing strategy is GTT", + description="Cancel after n seconds, the order timing strategy is GTT", alias="cancelAfter") funds: Optional[str] = Field( default=None, @@ -142,7 +143,7 @@ class TimeInForceEnum(Enum): is_isolated: Optional[bool] = Field( default=False, description= - "true - isolated margin ,false - cross margin. defult as false", + "True - isolated margin; false - cross margin. Default is false", alias="isIsolated") auto_borrow: Optional[bool] = Field( default=False, @@ -152,7 +153,7 @@ class TimeInForceEnum(Enum): auto_repay: Optional[bool] = Field( default=False, description= - "AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount.", + "AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount.", alias="autoRepay") __properties: ClassVar[List[str]] = [ @@ -242,14 +243,14 @@ def __init__(self): def set_client_oid(self, value: str) -> AddOrderReqBuilder: """ - Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. """ self.obj['clientOid'] = value return self def set_side(self, value: AddOrderReq.SideEnum) -> AddOrderReqBuilder: """ - specify if the order is to 'buy' or 'sell' + Specify if the order is to 'buy' or 'sell'. """ self.obj['side'] = value return self @@ -263,7 +264,7 @@ def set_symbol(self, value: str) -> AddOrderReqBuilder: def set_type(self, value: AddOrderReq.TypeEnum) -> AddOrderReqBuilder: """ - specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. """ self.obj['type'] = value return self @@ -284,7 +285,7 @@ def set_price(self, value: str) -> AddOrderReqBuilder: def set_size(self, value: str) -> AddOrderReqBuilder: """ - Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds """ self.obj['size'] = value return self @@ -327,7 +328,7 @@ def set_visible_size(self, value: str) -> AddOrderReqBuilder: def set_cancel_after(self, value: int) -> AddOrderReqBuilder: """ - Cancel after n seconds,the order timing strategy is GTT + Cancel after n seconds, the order timing strategy is GTT """ self.obj['cancelAfter'] = value return self @@ -341,7 +342,7 @@ def set_funds(self, value: str) -> AddOrderReqBuilder: def set_is_isolated(self, value: bool) -> AddOrderReqBuilder: """ - true - isolated margin ,false - cross margin. defult as false + True - isolated margin; false - cross margin. Default is false """ self.obj['isIsolated'] = value return self @@ -355,7 +356,7 @@ def set_auto_borrow(self, value: bool) -> AddOrderReqBuilder: def set_auto_repay(self, value: bool) -> AddOrderReqBuilder: """ - AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. """ self.obj['autoRepay'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_resp.py index 3f319696..7dd0c916 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_resp.py @@ -17,10 +17,10 @@ class AddOrderResp(BaseModel, Response): AddOrderResp Attributes: - order_id (str): The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. - loan_apply_id (str): Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow. + order_id (str): The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. + loan_apply_id (str): Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow. borrow_size (str): Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. - client_oid (str): The user self-defined order id. + client_oid (str): The user self-defined order ID. """ common_response: Optional[RestResponse] = Field( @@ -28,12 +28,12 @@ class AddOrderResp(BaseModel, Response): order_id: Optional[str] = Field( default=None, description= - "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order.", + "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order.", alias="orderId") loan_apply_id: Optional[str] = Field( default=None, description= - "Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow.", + "Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow.", alias="loanApplyId") borrow_size: Optional[str] = Field( default=None, @@ -42,7 +42,7 @@ class AddOrderResp(BaseModel, Response): alias="borrowSize") client_oid: Optional[str] = Field( default=None, - description="The user self-defined order id.", + description="The user self-defined order ID.", alias="clientOid") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_req.py index 039e5bc7..b2e32081 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_req.py @@ -16,23 +16,23 @@ class AddOrderTestReq(BaseModel): AddOrderTestReq Attributes: - client_oid (str): Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. - side (SideEnum): specify if the order is to 'buy' or 'sell' + client_oid (str): Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + side (SideEnum): Specify if the order is to 'buy' or 'sell'. symbol (str): symbol - type (TypeEnum): specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. stp (StpEnum): [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC price (str): Specify price for order When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. - size (str): Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + size (str): Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds time_in_force (TimeInForceEnum): [Time in force](https://www.kucoin.com/docs-new/api-5176570) is a special strategy used during trading post_only (bool): passive order labels, this is disabled when the order timing strategy is IOC or FOK hidden (bool): [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) iceberg (bool): Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) visible_size (str): Maximum visible quantity in iceberg orders - cancel_after (int): Cancel after n seconds,the order timing strategy is GTT + cancel_after (int): Cancel after n seconds, the order timing strategy is GTT funds (str): When **type** is market, select one out of two: size or funds - is_isolated (bool): true - isolated margin ,false - cross margin. defult as false + is_isolated (bool): True - isolated margin; false - cross margin. Default is false auto_borrow (bool): When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. - auto_repay (bool): AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + auto_repay (bool): AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. """ class SideEnum(Enum): @@ -82,15 +82,16 @@ class TimeInForceEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status.", + "Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status.", alias="clientOid") side: Optional[SideEnum] = Field( - default=None, description="specify if the order is to 'buy' or 'sell'") + default=None, + description="Specify if the order is to 'buy' or 'sell'.") symbol: Optional[str] = Field(default=None, description="symbol") type: Optional[TypeEnum] = Field( default=TypeEnum.LIMIT, description= - "specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged." + "Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged." ) stp: Optional[StpEnum] = Field( default=None, @@ -105,7 +106,7 @@ class TimeInForceEnum(Enum): size: Optional[str] = Field( default=None, description= - "Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds" + "Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds" ) time_in_force: Optional[TimeInForceEnum] = Field( default=TimeInForceEnum.GTC, @@ -133,7 +134,7 @@ class TimeInForceEnum(Enum): alias="visibleSize") cancel_after: Optional[int] = Field( default=None, - description="Cancel after n seconds,the order timing strategy is GTT", + description="Cancel after n seconds, the order timing strategy is GTT", alias="cancelAfter") funds: Optional[str] = Field( default=None, @@ -142,7 +143,7 @@ class TimeInForceEnum(Enum): is_isolated: Optional[bool] = Field( default=False, description= - "true - isolated margin ,false - cross margin. defult as false", + "True - isolated margin; false - cross margin. Default is false", alias="isIsolated") auto_borrow: Optional[bool] = Field( default=False, @@ -152,7 +153,7 @@ class TimeInForceEnum(Enum): auto_repay: Optional[bool] = Field( default=False, description= - "AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount.", + "AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount.", alias="autoRepay") __properties: ClassVar[List[str]] = [ @@ -243,7 +244,7 @@ def __init__(self): def set_client_oid(self, value: str) -> AddOrderTestReqBuilder: """ - Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. """ self.obj['clientOid'] = value return self @@ -251,7 +252,7 @@ def set_client_oid(self, value: str) -> AddOrderTestReqBuilder: def set_side(self, value: AddOrderTestReq.SideEnum) -> AddOrderTestReqBuilder: """ - specify if the order is to 'buy' or 'sell' + Specify if the order is to 'buy' or 'sell'. """ self.obj['side'] = value return self @@ -266,7 +267,7 @@ def set_symbol(self, value: str) -> AddOrderTestReqBuilder: def set_type(self, value: AddOrderTestReq.TypeEnum) -> AddOrderTestReqBuilder: """ - specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. """ self.obj['type'] = value return self @@ -288,7 +289,7 @@ def set_price(self, value: str) -> AddOrderTestReqBuilder: def set_size(self, value: str) -> AddOrderTestReqBuilder: """ - Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds """ self.obj['size'] = value return self @@ -332,7 +333,7 @@ def set_visible_size(self, value: str) -> AddOrderTestReqBuilder: def set_cancel_after(self, value: int) -> AddOrderTestReqBuilder: """ - Cancel after n seconds,the order timing strategy is GTT + Cancel after n seconds, the order timing strategy is GTT """ self.obj['cancelAfter'] = value return self @@ -346,7 +347,7 @@ def set_funds(self, value: str) -> AddOrderTestReqBuilder: def set_is_isolated(self, value: bool) -> AddOrderTestReqBuilder: """ - true - isolated margin ,false - cross margin. defult as false + True - isolated margin; false - cross margin. Default is false """ self.obj['isIsolated'] = value return self @@ -360,7 +361,7 @@ def set_auto_borrow(self, value: bool) -> AddOrderTestReqBuilder: def set_auto_repay(self, value: bool) -> AddOrderTestReqBuilder: """ - AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. """ self.obj['autoRepay'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_resp.py index c86d1220..c6573b9e 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_resp.py @@ -17,10 +17,10 @@ class AddOrderTestResp(BaseModel, Response): AddOrderTestResp Attributes: - order_id (str): The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + order_id (str): The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. loan_apply_id (str): Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. borrow_size (float): ID of the borrowing response. The field is returned only after placing the order under the mode of Auto-Borrow. - client_oid (str): The user self-defined order id. + client_oid (str): The user self-defined order ID. """ common_response: Optional[RestResponse] = Field( @@ -28,7 +28,7 @@ class AddOrderTestResp(BaseModel, Response): order_id: Optional[str] = Field( default=None, description= - "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order.", + "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order.", alias="orderId") loan_apply_id: Optional[str] = Field( default=None, @@ -42,7 +42,7 @@ class AddOrderTestResp(BaseModel, Response): alias="borrowSize") client_oid: Optional[str] = Field( default=None, - description="The user self-defined order id.", + description="The user self-defined order ID.", alias="clientOid") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_v1_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_v1_req.py index 803451f8..402ab1e3 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_v1_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_v1_req.py @@ -16,22 +16,22 @@ class AddOrderTestV1Req(BaseModel): AddOrderTestV1Req Attributes: - client_oid (str): Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. - side (SideEnum): specify if the order is to 'buy' or 'sell' + client_oid (str): Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + side (SideEnum): Specify if the order is to 'buy' or 'sell'. symbol (str): symbol - type (TypeEnum): specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. stp (StpEnum): [Self Trade Prevention](https://www.kucoin.com/docs-new/api-5176570) is divided into four strategies: CN, CO, CB , and DC price (str): Specify price for order When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. - size (str): Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + size (str): Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds time_in_force (TimeInForceEnum): [Time in force](https://www.kucoin.com/docs-new/api-5176570) is a special strategy used during trading post_only (bool): passive order labels, this is disabled when the order timing strategy is IOC or FOK hidden (bool): Hidden or not (not shown in order book) iceberg (bool): Whether or not only visible portions of orders are shown in iceberg orders visible_size (str): Maximum visible quantity in iceberg orders - cancel_after (int): Cancel after n seconds,the order timing strategy is GTT + cancel_after (int): Cancel after n seconds, the order timing strategy is GTT funds (str): When **type** is market, select one out of two: size or funds auto_borrow (bool): When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. - auto_repay (bool): AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + auto_repay (bool): AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. margin_model (MarginModelEnum): The type of trading, including cross (cross mode) and isolated (isolated mode). It is set at cross by default. """ @@ -91,15 +91,16 @@ class MarginModelEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status.", + "Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status.", alias="clientOid") side: Optional[SideEnum] = Field( - default=None, description="specify if the order is to 'buy' or 'sell'") + default=None, + description="Specify if the order is to 'buy' or 'sell'.") symbol: Optional[str] = Field(default=None, description="symbol") type: Optional[TypeEnum] = Field( default=TypeEnum.LIMIT, description= - "specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged." + "Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged." ) stp: Optional[StpEnum] = Field( default=None, @@ -114,7 +115,7 @@ class MarginModelEnum(Enum): size: Optional[str] = Field( default=None, description= - "Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds" + "Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds" ) time_in_force: Optional[TimeInForceEnum] = Field( default=TimeInForceEnum.GTC, @@ -139,7 +140,7 @@ class MarginModelEnum(Enum): alias="visibleSize") cancel_after: Optional[int] = Field( default=None, - description="Cancel after n seconds,the order timing strategy is GTT", + description="Cancel after n seconds, the order timing strategy is GTT", alias="cancelAfter") funds: Optional[str] = Field( default=None, @@ -153,7 +154,7 @@ class MarginModelEnum(Enum): auto_repay: Optional[bool] = Field( default=False, description= - "AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount.", + "AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount.", alias="autoRepay") margin_model: Optional[MarginModelEnum] = Field( default=MarginModelEnum.CROSS, @@ -250,7 +251,7 @@ def __init__(self): def set_client_oid(self, value: str) -> AddOrderTestV1ReqBuilder: """ - Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. """ self.obj['clientOid'] = value return self @@ -259,7 +260,7 @@ def set_side( self, value: AddOrderTestV1Req.SideEnum) -> AddOrderTestV1ReqBuilder: """ - specify if the order is to 'buy' or 'sell' + Specify if the order is to 'buy' or 'sell'. """ self.obj['side'] = value return self @@ -275,7 +276,7 @@ def set_type( self, value: AddOrderTestV1Req.TypeEnum) -> AddOrderTestV1ReqBuilder: """ - specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. """ self.obj['type'] = value return self @@ -297,7 +298,7 @@ def set_price(self, value: str) -> AddOrderTestV1ReqBuilder: def set_size(self, value: str) -> AddOrderTestV1ReqBuilder: """ - Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds """ self.obj['size'] = value return self @@ -341,7 +342,7 @@ def set_visible_size(self, value: str) -> AddOrderTestV1ReqBuilder: def set_cancel_after(self, value: int) -> AddOrderTestV1ReqBuilder: """ - Cancel after n seconds,the order timing strategy is GTT + Cancel after n seconds, the order timing strategy is GTT """ self.obj['cancelAfter'] = value return self @@ -362,7 +363,7 @@ def set_auto_borrow(self, value: bool) -> AddOrderTestV1ReqBuilder: def set_auto_repay(self, value: bool) -> AddOrderTestV1ReqBuilder: """ - AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. """ self.obj['autoRepay'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_v1_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_v1_resp.py index b35e41db..22be09cb 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_v1_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_test_v1_resp.py @@ -17,8 +17,8 @@ class AddOrderTestV1Resp(BaseModel, Response): AddOrderTestV1Resp Attributes: - order_id (str): The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. - loan_apply_id (str): Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow. + order_id (str): The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. + loan_apply_id (str): Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow. borrow_size (str): Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. client_oid (str): This return value is invalid """ @@ -28,12 +28,12 @@ class AddOrderTestV1Resp(BaseModel, Response): order_id: Optional[str] = Field( default=None, description= - "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order.", + "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order.", alias="orderId") loan_apply_id: Optional[str] = Field( default=None, description= - "Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow.", + "Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow.", alias="loanApplyId") borrow_size: Optional[str] = Field( default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_v1_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_v1_req.py index fbff0a01..b0083699 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_v1_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_v1_req.py @@ -16,22 +16,22 @@ class AddOrderV1Req(BaseModel): AddOrderV1Req Attributes: - client_oid (str): Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. - side (SideEnum): specify if the order is to 'buy' or 'sell' + client_oid (str): Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + side (SideEnum): Specify if the order is to 'buy' or 'sell'. symbol (str): symbol - type (TypeEnum): specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. stp (StpEnum): [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC price (str): Specify price for order When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. - size (str): Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + size (str): Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds time_in_force (TimeInForceEnum): [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading post_only (bool): passive order labels, this is disabled when the order timing strategy is IOC or FOK hidden (bool): Hidden or not (not shown in order book) iceberg (bool): Whether or not only visible portions of orders are shown in iceberg orders visible_size (str): Maximum visible quantity in iceberg orders - cancel_after (int): Cancel after n seconds,the order timing strategy is GTT + cancel_after (int): Cancel after n seconds, the order timing strategy is GTT funds (str): When **type** is market, select one out of two: size or funds auto_borrow (bool): When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. - auto_repay (bool): AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + auto_repay (bool): AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. margin_model (MarginModelEnum): The type of trading, including cross (cross mode) and isolated (isolated mode). It is set at cross by default. """ @@ -91,15 +91,16 @@ class MarginModelEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status.", + "Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status.", alias="clientOid") side: Optional[SideEnum] = Field( - default=None, description="specify if the order is to 'buy' or 'sell'") + default=None, + description="Specify if the order is to 'buy' or 'sell'.") symbol: Optional[str] = Field(default=None, description="symbol") type: Optional[TypeEnum] = Field( default=TypeEnum.LIMIT, description= - "specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged." + "Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged." ) stp: Optional[StpEnum] = Field( default=None, @@ -114,7 +115,7 @@ class MarginModelEnum(Enum): size: Optional[str] = Field( default=None, description= - "Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds" + "Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds" ) time_in_force: Optional[TimeInForceEnum] = Field( default=TimeInForceEnum.GTC, @@ -139,7 +140,7 @@ class MarginModelEnum(Enum): alias="visibleSize") cancel_after: Optional[int] = Field( default=None, - description="Cancel after n seconds,the order timing strategy is GTT", + description="Cancel after n seconds, the order timing strategy is GTT", alias="cancelAfter") funds: Optional[str] = Field( default=None, @@ -153,7 +154,7 @@ class MarginModelEnum(Enum): auto_repay: Optional[bool] = Field( default=False, description= - "AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount.", + "AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount.", alias="autoRepay") margin_model: Optional[MarginModelEnum] = Field( default=MarginModelEnum.CROSS, @@ -250,14 +251,14 @@ def __init__(self): def set_client_oid(self, value: str) -> AddOrderV1ReqBuilder: """ - Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. """ self.obj['clientOid'] = value return self def set_side(self, value: AddOrderV1Req.SideEnum) -> AddOrderV1ReqBuilder: """ - specify if the order is to 'buy' or 'sell' + Specify if the order is to 'buy' or 'sell'. """ self.obj['side'] = value return self @@ -271,7 +272,7 @@ def set_symbol(self, value: str) -> AddOrderV1ReqBuilder: def set_type(self, value: AddOrderV1Req.TypeEnum) -> AddOrderV1ReqBuilder: """ - specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. """ self.obj['type'] = value return self @@ -292,7 +293,7 @@ def set_price(self, value: str) -> AddOrderV1ReqBuilder: def set_size(self, value: str) -> AddOrderV1ReqBuilder: """ - Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds """ self.obj['size'] = value return self @@ -336,7 +337,7 @@ def set_visible_size(self, value: str) -> AddOrderV1ReqBuilder: def set_cancel_after(self, value: int) -> AddOrderV1ReqBuilder: """ - Cancel after n seconds,the order timing strategy is GTT + Cancel after n seconds, the order timing strategy is GTT """ self.obj['cancelAfter'] = value return self @@ -357,7 +358,7 @@ def set_auto_borrow(self, value: bool) -> AddOrderV1ReqBuilder: def set_auto_repay(self, value: bool) -> AddOrderV1ReqBuilder: """ - AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. + AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. """ self.obj['autoRepay'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_v1_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_v1_resp.py index ed332a82..3992e6b5 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_v1_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_add_order_v1_resp.py @@ -17,8 +17,8 @@ class AddOrderV1Resp(BaseModel, Response): AddOrderV1Resp Attributes: - order_id (str): The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. - loan_apply_id (str): Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow. + order_id (str): The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. + loan_apply_id (str): Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow. borrow_size (str): Borrowed amount. The field is returned only after placing the order under the mode of Auto-Borrow. client_oid (str): This return value is invalid """ @@ -28,12 +28,12 @@ class AddOrderV1Resp(BaseModel, Response): order_id: Optional[str] = Field( default=None, description= - "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order.", + "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order.", alias="orderId") loan_apply_id: Optional[str] = Field( default=None, description= - "Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow.", + "Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow.", alias="loanApplyId") borrow_size: Optional[str] = Field( default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_cancel_order_by_client_oid_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_cancel_order_by_client_oid_req.py index 98c50a3b..8fef76b4 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_cancel_order_by_client_oid_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_cancel_order_by_client_oid_req.py @@ -15,14 +15,14 @@ class CancelOrderByClientOidReq(BaseModel): CancelOrderByClientOidReq Attributes: - client_oid (str): Client Order Id,unique identifier created by the user + client_oid (str): Client Order Id, unique identifier created by the user symbol (str): symbol """ client_oid: Optional[str] = Field( default=None, path_variable="True", - description="Client Order Id,unique identifier created by the user", + description="Client Order Id, unique identifier created by the user", alias="clientOid") symbol: Optional[str] = Field(default=None, description="symbol") @@ -76,7 +76,7 @@ def __init__(self): def set_client_oid(self, value: str) -> CancelOrderByClientOidReqBuilder: """ - Client Order Id,unique identifier created by the user + Client Order Id, unique identifier created by the user """ self.obj['clientOid'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_cancel_order_by_client_oid_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_cancel_order_by_client_oid_resp.py index fb268334..5cea9b4d 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_cancel_order_by_client_oid_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_cancel_order_by_client_oid_resp.py @@ -17,14 +17,14 @@ class CancelOrderByClientOidResp(BaseModel, Response): CancelOrderByClientOidResp Attributes: - client_oid (str): Client Order Id,unique identifier created by the user + client_oid (str): Client Order Id, unique identifier created by the user """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") client_oid: Optional[str] = Field( default=None, - description="Client Order Id,unique identifier created by the user", + description="Client Order Id, unique identifier created by the user", alias="clientOid") __properties: ClassVar[List[str]] = ["clientOid"] diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_cancel_order_by_order_id_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_cancel_order_by_order_id_resp.py index ff2d7834..08149532 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_cancel_order_by_order_id_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_cancel_order_by_order_id_resp.py @@ -17,13 +17,13 @@ class CancelOrderByOrderIdResp(BaseModel, Response): CancelOrderByOrderIdResp Attributes: - order_id (str): order id + order_id (str): Order id """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") order_id: Optional[str] = Field(default=None, - description="order id", + description="Order id", alias="orderId") __properties: ClassVar[List[str]] = ["orderId"] diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_closed_orders_items.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_closed_orders_items.py index f5e2ab45..859f649d 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_closed_orders_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_closed_orders_items.py @@ -19,40 +19,40 @@ class GetClosedOrdersItems(BaseModel): id (str): The unique order id generated by the trading system symbol (str): symbol op_type (str): - type (TypeEnum): Specify if the order is an 'limit' order or 'market' order. + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order. side (str): Buy or sell - price (str): Order price - size (str): Order size + price (str): Order Price + size (str): Order Size funds (str): Order Funds deal_size (str): Number of filled transactions deal_funds (str): Funds of filled transactions fee (str): [Handling fees](https://www.kucoin.com/docs-new/api-5327739) - fee_currency (str): currency used to calculate trading fee + fee_currency (str): Currency used to calculate trading fee stp (StpEnum): [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC stop (str): stop_triggered (bool): stop_price (str): time_in_force (TimeInForceEnum): Time in force - post_only (bool): Whether its a postOnly order. - hidden (bool): Whether its a hidden order. - iceberg (bool): Whether its a iceberg order. + post_only (bool): Whether it’s a postOnly order. + hidden (bool): Whether it’s a hidden order. + iceberg (bool): Whether it’s a iceberg order. visible_size (str): Visible size of iceberg order in order book. cancel_after (int): A GTT timeInForce that expires in n seconds channel (str): - client_oid (str): Client Order Id,unique identifier created by the user + client_oid (str): Client Order Id, unique identifier created by the user remark (str): Order placement remarks tags (str): Order tag cancel_exist (bool): Whether there is a cancellation record for the order. created_at (int): last_updated_at (int): trade_type (str): Trade type, redundancy param - in_order_book (bool): Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook + in_order_book (bool): Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook cancelled_size (str): Number of canceled transactions cancelled_funds (str): Funds of canceled transactions remain_size (str): Number of remain transactions remain_funds (str): Funds of remain transactions - tax (str): Users in some regions need query this field - active (bool): Order status: true-The status of the order isactive; false-The status of the order is done + tax (str): Users in some regions have this field + active (bool): Order status: true-The status of the order is active; false-The status of the order is done """ class TypeEnum(Enum): @@ -98,10 +98,10 @@ class TimeInForceEnum(Enum): type: Optional[TypeEnum] = Field( default=None, description= - "Specify if the order is an 'limit' order or 'market' order. ") + "Specify if the order is a 'limit' order or 'market' order. ") side: Optional[str] = Field(default=None, description="Buy or sell") - price: Optional[str] = Field(default=None, description="Order price") - size: Optional[str] = Field(default=None, description="Order size") + price: Optional[str] = Field(default=None, description="Order Price") + size: Optional[str] = Field(default=None, description="Order Size") funds: Optional[str] = Field(default=None, description="Order Funds") deal_size: Optional[str] = Field( default=None, @@ -117,7 +117,7 @@ class TimeInForceEnum(Enum): "[Handling fees](https://www.kucoin.com/docs-new/api-5327739)") fee_currency: Optional[str] = Field( default=None, - description="currency used to calculate trading fee", + description="Currency used to calculate trading fee", alias="feeCurrency") stp: Optional[StpEnum] = Field( default=None, @@ -131,12 +131,12 @@ class TimeInForceEnum(Enum): default=None, description="Time in force", alias="timeInForce") post_only: Optional[bool] = Field( default=None, - description="Whether its a postOnly order.", + description="Whether it’s a postOnly order.", alias="postOnly") hidden: Optional[bool] = Field(default=None, - description="Whether its a hidden order.") - iceberg: Optional[bool] = Field(default=None, - description="Whether its a iceberg order.") + description="Whether it’s a hidden order.") + iceberg: Optional[bool] = Field( + default=None, description="Whether it’s a iceberg order.") visible_size: Optional[str] = Field( default=None, description="Visible size of iceberg order in order book.", @@ -148,7 +148,7 @@ class TimeInForceEnum(Enum): channel: Optional[str] = None client_oid: Optional[str] = Field( default=None, - description="Client Order Id,unique identifier created by the user", + description="Client Order Id, unique identifier created by the user", alias="clientOid") remark: Optional[str] = Field(default=None, description="Order placement remarks") @@ -166,7 +166,7 @@ class TimeInForceEnum(Enum): in_order_book: Optional[bool] = Field( default=None, description= - "Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook", + "Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook", alias="inOrderBook") cancelled_size: Optional[str] = Field( default=None, @@ -185,12 +185,11 @@ class TimeInForceEnum(Enum): description="Funds of remain transactions", alias="remainFunds") tax: Optional[str] = Field( - default=None, - description="Users in some regions need query this field") + default=None, description="Users in some regions have this field") active: Optional[bool] = Field( default=None, description= - "Order status: true-The status of the order isactive; false-The status of the order is done" + "Order status: true-The status of the order is active; false-The status of the order is done" ) __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_closed_orders_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_closed_orders_req.py index 922ff45e..636ca670 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_closed_orders_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_closed_orders_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetClosedOrdersReq(BaseModel): @@ -19,12 +18,12 @@ class GetClosedOrdersReq(BaseModel): Attributes: symbol (str): symbol trade_type (TradeTypeEnum): Transaction type: MARGIN_TRADE - cross margin trade, MARGIN_ISOLATED_TRADE - isolated margin trade - side (SideEnum): specify if the order is to 'buy' or 'sell' - type (TypeEnum): specify if the order is an 'limit' order or 'market' order. - last_id (int): The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. - limit (int): Default20,Max100 - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) + side (SideEnum): Specify if the order is to 'buy' or 'sell'. + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order. + last_id (int): The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. + limit (int): Default20, Max100 + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) """ class TradeTypeEnum(Enum): @@ -61,23 +60,23 @@ class TypeEnum(Enum): "Transaction type: MARGIN_TRADE - cross margin trade, MARGIN_ISOLATED_TRADE - isolated margin trade", alias="tradeType") side: Optional[SideEnum] = Field( - default=None, description="specify if the order is to 'buy' or 'sell'") + default=None, + description="Specify if the order is to 'buy' or 'sell'.") type: Optional[TypeEnum] = Field( default=None, description= - "specify if the order is an 'limit' order or 'market' order. ") + "Specify if the order is a 'limit' order or 'market' order. ") last_id: Optional[int] = Field( default=None, description= - "The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page.", + "The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page.", alias="lastId") - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = Field( - default=20, description="Default20,Max100") + limit: Optional[int] = Field(default=20, description="Default20, Max100") start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") __properties: ClassVar[List[str]] = [ @@ -164,7 +163,7 @@ def set_side( self, value: GetClosedOrdersReq.SideEnum) -> GetClosedOrdersReqBuilder: """ - specify if the order is to 'buy' or 'sell' + Specify if the order is to 'buy' or 'sell'. """ self.obj['side'] = value return self @@ -173,35 +172,35 @@ def set_type( self, value: GetClosedOrdersReq.TypeEnum) -> GetClosedOrdersReqBuilder: """ - specify if the order is an 'limit' order or 'market' order. + Specify if the order is a 'limit' order or 'market' order. """ self.obj['type'] = value return self def set_last_id(self, value: int) -> GetClosedOrdersReqBuilder: """ - The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. """ self.obj['lastId'] = value return self def set_limit(self, value: int) -> GetClosedOrdersReqBuilder: """ - Default20,Max100 + Default20, Max100 """ self.obj['limit'] = value return self def set_start_at(self, value: int) -> GetClosedOrdersReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetClosedOrdersReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_closed_orders_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_closed_orders_resp.py index 4c8b0ee8..1694f4e8 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_closed_orders_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_closed_orders_resp.py @@ -18,7 +18,7 @@ class GetClosedOrdersResp(BaseModel, Response): GetClosedOrdersResp Attributes: - last_id (int): The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + last_id (int): The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. items (list[GetClosedOrdersItems]): """ @@ -27,7 +27,7 @@ class GetClosedOrdersResp(BaseModel, Response): last_id: Optional[int] = Field( default=None, description= - "The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page.", + "The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page.", alias="lastId") items: Optional[List[GetClosedOrdersItems]] = None diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_open_orders_data.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_open_orders_data.py index 114198e7..ccc0574a 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_open_orders_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_open_orders_data.py @@ -19,40 +19,40 @@ class GetOpenOrdersData(BaseModel): id (str): The unique order id generated by the trading system symbol (str): symbol op_type (str): - type (TypeEnum): Specify if the order is an 'limit' order or 'market' order. + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order. side (SideEnum): Buy or sell - price (str): Order price - size (str): Order size + price (str): Order Price + size (str): Order Size funds (str): Order Funds deal_size (str): Number of filled transactions deal_funds (str): Funds of filled transactions - fee (str): trading fee - fee_currency (str): currency used to calculate trading fee + fee (str): Trading fee + fee_currency (str): Currency used to calculate trading fee stp (StpEnum): [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC stop (str): stop_triggered (bool): stop_price (str): time_in_force (TimeInForceEnum): Time in force - post_only (bool): Whether its a postOnly order. - hidden (bool): Whether its a hidden order. - iceberg (bool): Whether its a iceberg order. + post_only (bool): Whether it’s a postOnly order. + hidden (bool): Whether it’s a hidden order. + iceberg (bool): Whether it’s a iceberg order. visible_size (str): Visible size of iceberg order in order book. cancel_after (int): A GTT timeInForce that expires in n seconds channel (str): - client_oid (str): Client Order Id,unique identifier created by the user + client_oid (str): Client Order Id, unique identifier created by the user remark (str): Order placement remarks tags (str): Order tag cancel_exist (bool): Whether there is a cancellation record for the order. created_at (int): last_updated_at (int): trade_type (str): Trade type, redundancy param - in_order_book (bool): Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook + in_order_book (bool): Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook cancelled_size (str): Number of canceled transactions cancelled_funds (str): Funds of canceled transactions remain_size (str): Number of remain transactions remain_funds (str): Funds of remain transactions - tax (str): Users in some regions need query this field - active (bool): Order status: true-The status of the order isactive; false-The status of the order is done + tax (str): Users in some regions have this field + active (bool): Order status: true-The status of the order is active; false-The status of the order is done """ class TypeEnum(Enum): @@ -107,10 +107,10 @@ class TimeInForceEnum(Enum): type: Optional[TypeEnum] = Field( default=None, description= - "Specify if the order is an 'limit' order or 'market' order. ") + "Specify if the order is a 'limit' order or 'market' order. ") side: Optional[SideEnum] = Field(default=None, description="Buy or sell") - price: Optional[str] = Field(default=None, description="Order price") - size: Optional[str] = Field(default=None, description="Order size") + price: Optional[str] = Field(default=None, description="Order Price") + size: Optional[str] = Field(default=None, description="Order Size") funds: Optional[str] = Field(default=None, description="Order Funds") deal_size: Optional[str] = Field( default=None, @@ -120,10 +120,10 @@ class TimeInForceEnum(Enum): default=None, description="Funds of filled transactions", alias="dealFunds") - fee: Optional[str] = Field(default=None, description="trading fee") + fee: Optional[str] = Field(default=None, description="Trading fee") fee_currency: Optional[str] = Field( default=None, - description="currency used to calculate trading fee", + description="Currency used to calculate trading fee", alias="feeCurrency") stp: Optional[StpEnum] = Field( default=None, @@ -137,12 +137,12 @@ class TimeInForceEnum(Enum): default=None, description="Time in force", alias="timeInForce") post_only: Optional[bool] = Field( default=None, - description="Whether its a postOnly order.", + description="Whether it’s a postOnly order.", alias="postOnly") hidden: Optional[bool] = Field(default=None, - description="Whether its a hidden order.") - iceberg: Optional[bool] = Field(default=None, - description="Whether its a iceberg order.") + description="Whether it’s a hidden order.") + iceberg: Optional[bool] = Field( + default=None, description="Whether it’s a iceberg order.") visible_size: Optional[str] = Field( default=None, description="Visible size of iceberg order in order book.", @@ -154,7 +154,7 @@ class TimeInForceEnum(Enum): channel: Optional[str] = None client_oid: Optional[str] = Field( default=None, - description="Client Order Id,unique identifier created by the user", + description="Client Order Id, unique identifier created by the user", alias="clientOid") remark: Optional[str] = Field(default=None, description="Order placement remarks") @@ -172,7 +172,7 @@ class TimeInForceEnum(Enum): in_order_book: Optional[bool] = Field( default=None, description= - "Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook", + "Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook", alias="inOrderBook") cancelled_size: Optional[str] = Field( default=None, @@ -191,12 +191,11 @@ class TimeInForceEnum(Enum): description="Funds of remain transactions", alias="remainFunds") tax: Optional[str] = Field( - default=None, - description="Users in some regions need query this field") + default=None, description="Users in some regions have this field") active: Optional[bool] = Field( default=None, description= - "Order status: true-The status of the order isactive; false-The status of the order is done" + "Order status: true-The status of the order is active; false-The status of the order is done" ) __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_client_oid_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_client_oid_req.py index a99502e6..598bbf08 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_client_oid_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_client_oid_req.py @@ -15,18 +15,18 @@ class GetOrderByClientOidReq(BaseModel): GetOrderByClientOidReq Attributes: + client_oid (str): Client Order Id, unique identifier created by the user symbol (str): symbol - client_oid (str): Client Order Id,unique identifier created by the user """ - symbol: Optional[str] = Field(default=None, description="symbol") client_oid: Optional[str] = Field( default=None, path_variable="True", - description="Client Order Id,unique identifier created by the user", + description="Client Order Id, unique identifier created by the user", alias="clientOid") + symbol: Optional[str] = Field(default=None, description="symbol") - __properties: ClassVar[List[str]] = ["symbol", "clientOid"] + __properties: ClassVar[List[str]] = ["clientOid", "symbol"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +62,8 @@ def from_dict( return cls.model_validate(obj) _obj = cls.model_validate({ - "symbol": obj.get("symbol"), - "clientOid": obj.get("clientOid") + "clientOid": obj.get("clientOid"), + "symbol": obj.get("symbol") }) return _obj @@ -73,18 +73,18 @@ class GetOrderByClientOidReqBuilder: def __init__(self): self.obj = {} - def set_symbol(self, value: str) -> GetOrderByClientOidReqBuilder: + def set_client_oid(self, value: str) -> GetOrderByClientOidReqBuilder: """ - symbol + Client Order Id, unique identifier created by the user """ - self.obj['symbol'] = value + self.obj['clientOid'] = value return self - def set_client_oid(self, value: str) -> GetOrderByClientOidReqBuilder: + def set_symbol(self, value: str) -> GetOrderByClientOidReqBuilder: """ - Client Order Id,unique identifier created by the user + symbol """ - self.obj['clientOid'] = value + self.obj['symbol'] = value return self def build(self) -> GetOrderByClientOidReq: diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_client_oid_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_client_oid_resp.py index e5ed5221..12deda59 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_client_oid_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_client_oid_resp.py @@ -21,40 +21,40 @@ class GetOrderByClientOidResp(BaseModel, Response): id (str): The unique order id generated by the trading system symbol (str): symbol op_type (str): - type (TypeEnum): Specify if the order is an 'limit' order or 'market' order. + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order. side (SideEnum): Buy or sell - price (str): Order price - size (str): Order size + price (str): Order Price + size (str): Order Size funds (str): Order Funds deal_size (str): Number of filled transactions deal_funds (str): Funds of filled transactions fee (str): [Handling fees](https://www.kucoin.com/docs-new/api-5327739) - fee_currency (str): currency used to calculate trading fee + fee_currency (str): Currency used to calculate trading fee stp (StpEnum): [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC stop (str): stop_triggered (bool): stop_price (str): time_in_force (TimeInForceEnum): Time in force - post_only (bool): Whether its a postOnly order. - hidden (bool): Whether its a hidden order. - iceberg (bool): Whether its a iceberg order. + post_only (bool): Whether it’s a postOnly order. + hidden (bool): Whether it’s a hidden order. + iceberg (bool): Whether it’s a iceberg order. visible_size (str): Visible size of iceberg order in order book. cancel_after (int): A GTT timeInForce that expires in n seconds channel (str): - client_oid (str): Client Order Id,unique identifier created by the user + client_oid (str): Client Order Id, unique identifier created by the user remark (str): Order placement remarks tags (str): Order tag cancel_exist (bool): Whether there is a cancellation record for the order. created_at (int): last_updated_at (int): trade_type (str): Trade type, redundancy param - in_order_book (bool): Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook + in_order_book (bool): Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook cancelled_size (str): Number of canceled transactions cancelled_funds (str): Funds of canceled transactions remain_size (str): Number of remain transactions remain_funds (str): Funds of remain transactions - tax (str): Users in some regions need query this field - active (bool): Order status: true-The status of the order isactive; false-The status of the order is done + tax (str): Users in some regions have this field + active (bool): Order status: true-The status of the order is active; false-The status of the order is done """ class TypeEnum(Enum): @@ -111,10 +111,10 @@ class TimeInForceEnum(Enum): type: Optional[TypeEnum] = Field( default=None, description= - "Specify if the order is an 'limit' order or 'market' order. ") + "Specify if the order is a 'limit' order or 'market' order. ") side: Optional[SideEnum] = Field(default=None, description="Buy or sell") - price: Optional[str] = Field(default=None, description="Order price") - size: Optional[str] = Field(default=None, description="Order size") + price: Optional[str] = Field(default=None, description="Order Price") + size: Optional[str] = Field(default=None, description="Order Size") funds: Optional[str] = Field(default=None, description="Order Funds") deal_size: Optional[str] = Field( default=None, @@ -130,7 +130,7 @@ class TimeInForceEnum(Enum): "[Handling fees](https://www.kucoin.com/docs-new/api-5327739)") fee_currency: Optional[str] = Field( default=None, - description="currency used to calculate trading fee", + description="Currency used to calculate trading fee", alias="feeCurrency") stp: Optional[StpEnum] = Field( default=None, @@ -144,12 +144,12 @@ class TimeInForceEnum(Enum): default=None, description="Time in force", alias="timeInForce") post_only: Optional[bool] = Field( default=None, - description="Whether its a postOnly order.", + description="Whether it’s a postOnly order.", alias="postOnly") hidden: Optional[bool] = Field(default=None, - description="Whether its a hidden order.") - iceberg: Optional[bool] = Field(default=None, - description="Whether its a iceberg order.") + description="Whether it’s a hidden order.") + iceberg: Optional[bool] = Field( + default=None, description="Whether it’s a iceberg order.") visible_size: Optional[str] = Field( default=None, description="Visible size of iceberg order in order book.", @@ -161,7 +161,7 @@ class TimeInForceEnum(Enum): channel: Optional[str] = None client_oid: Optional[str] = Field( default=None, - description="Client Order Id,unique identifier created by the user", + description="Client Order Id, unique identifier created by the user", alias="clientOid") remark: Optional[str] = Field(default=None, description="Order placement remarks") @@ -179,7 +179,7 @@ class TimeInForceEnum(Enum): in_order_book: Optional[bool] = Field( default=None, description= - "Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook", + "Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook", alias="inOrderBook") cancelled_size: Optional[str] = Field( default=None, @@ -198,12 +198,11 @@ class TimeInForceEnum(Enum): description="Funds of remain transactions", alias="remainFunds") tax: Optional[str] = Field( - default=None, - description="Users in some regions need query this field") + default=None, description="Users in some regions have this field") active: Optional[bool] = Field( default=None, description= - "Order status: true-The status of the order isactive; false-The status of the order is done" + "Order status: true-The status of the order is active; false-The status of the order is done" ) __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_order_id_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_order_id_req.py index 086e63ea..46714c7b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_order_id_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_order_id_req.py @@ -15,18 +15,18 @@ class GetOrderByOrderIdReq(BaseModel): GetOrderByOrderIdReq Attributes: - symbol (str): symbol order_id (str): The unique order id generated by the trading system + symbol (str): symbol """ - symbol: Optional[str] = Field(default=None, description="symbol") order_id: Optional[str] = Field( default=None, path_variable="True", description="The unique order id generated by the trading system", alias="orderId") + symbol: Optional[str] = Field(default=None, description="symbol") - __properties: ClassVar[List[str]] = ["symbol", "orderId"] + __properties: ClassVar[List[str]] = ["orderId", "symbol"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +62,8 @@ def from_dict( return cls.model_validate(obj) _obj = cls.model_validate({ - "symbol": obj.get("symbol"), - "orderId": obj.get("orderId") + "orderId": obj.get("orderId"), + "symbol": obj.get("symbol") }) return _obj @@ -73,18 +73,18 @@ class GetOrderByOrderIdReqBuilder: def __init__(self): self.obj = {} - def set_symbol(self, value: str) -> GetOrderByOrderIdReqBuilder: + def set_order_id(self, value: str) -> GetOrderByOrderIdReqBuilder: """ - symbol + The unique order id generated by the trading system """ - self.obj['symbol'] = value + self.obj['orderId'] = value return self - def set_order_id(self, value: str) -> GetOrderByOrderIdReqBuilder: + def set_symbol(self, value: str) -> GetOrderByOrderIdReqBuilder: """ - The unique order id generated by the trading system + symbol """ - self.obj['orderId'] = value + self.obj['symbol'] = value return self def build(self) -> GetOrderByOrderIdReq: diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_order_id_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_order_id_resp.py index 48e4679a..6ef54c84 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_order_id_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_order_by_order_id_resp.py @@ -21,40 +21,40 @@ class GetOrderByOrderIdResp(BaseModel, Response): id (str): The unique order id generated by the trading system symbol (str): symbol op_type (str): - type (TypeEnum): Specify if the order is an 'limit' order or 'market' order. + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order. side (SideEnum): Buy or sell - price (str): Order price - size (str): Order size + price (str): Order Price + size (str): Order Size funds (str): Order Funds deal_size (str): Number of filled transactions deal_funds (str): Funds of filled transactions fee (str): [Handling fees](https://www.kucoin.com/docs-new/api-5327739) - fee_currency (str): currency used to calculate trading fee + fee_currency (str): Currency used to calculate trading fee stp (StpEnum): [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into these strategies: CN, CO, CB , and DC stop (str): stop_triggered (bool): stop_price (str): time_in_force (TimeInForceEnum): Time in force - post_only (bool): Whether its a postOnly order. - hidden (bool): Whether its a hidden order. - iceberg (bool): Whether its a iceberg order. + post_only (bool): Whether it’s a postOnly order. + hidden (bool): Whether it’s a hidden order. + iceberg (bool): Whether it’s a iceberg order. visible_size (str): Visible size of iceberg order in order book. cancel_after (int): A GTT timeInForce that expires in n seconds channel (str): - client_oid (str): Client Order Id,unique identifier created by the user + client_oid (str): Client Order Id, unique identifier created by the user remark (str): Order placement remarks tags (str): Order tag cancel_exist (bool): Whether there is a cancellation record for the order. created_at (int): last_updated_at (int): trade_type (str): Trade type, redundancy param - in_order_book (bool): Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook + in_order_book (bool): Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook cancelled_size (str): Number of canceled transactions cancelled_funds (str): Funds of canceled transactions remain_size (str): Number of remain transactions remain_funds (str): Funds of remain transactions - tax (str): Users in some regions need query this field - active (bool): Order status: true-The status of the order isactive; false-The status of the order is done + tax (str): Users in some regions have this field + active (bool): Order status: true-The status of the order is active; false-The status of the order is done """ class TypeEnum(Enum): @@ -111,10 +111,10 @@ class TimeInForceEnum(Enum): type: Optional[TypeEnum] = Field( default=None, description= - "Specify if the order is an 'limit' order or 'market' order. ") + "Specify if the order is a 'limit' order or 'market' order. ") side: Optional[SideEnum] = Field(default=None, description="Buy or sell") - price: Optional[str] = Field(default=None, description="Order price") - size: Optional[str] = Field(default=None, description="Order size") + price: Optional[str] = Field(default=None, description="Order Price") + size: Optional[str] = Field(default=None, description="Order Size") funds: Optional[str] = Field(default=None, description="Order Funds") deal_size: Optional[str] = Field( default=None, @@ -130,7 +130,7 @@ class TimeInForceEnum(Enum): "[Handling fees](https://www.kucoin.com/docs-new/api-5327739)") fee_currency: Optional[str] = Field( default=None, - description="currency used to calculate trading fee", + description="Currency used to calculate trading fee", alias="feeCurrency") stp: Optional[StpEnum] = Field( default=None, @@ -144,12 +144,12 @@ class TimeInForceEnum(Enum): default=None, description="Time in force", alias="timeInForce") post_only: Optional[bool] = Field( default=None, - description="Whether its a postOnly order.", + description="Whether it’s a postOnly order.", alias="postOnly") hidden: Optional[bool] = Field(default=None, - description="Whether its a hidden order.") - iceberg: Optional[bool] = Field(default=None, - description="Whether its a iceberg order.") + description="Whether it’s a hidden order.") + iceberg: Optional[bool] = Field( + default=None, description="Whether it’s a iceberg order.") visible_size: Optional[str] = Field( default=None, description="Visible size of iceberg order in order book.", @@ -161,7 +161,7 @@ class TimeInForceEnum(Enum): channel: Optional[str] = None client_oid: Optional[str] = Field( default=None, - description="Client Order Id,unique identifier created by the user", + description="Client Order Id, unique identifier created by the user", alias="clientOid") remark: Optional[str] = Field(default=None, description="Order placement remarks") @@ -179,7 +179,7 @@ class TimeInForceEnum(Enum): in_order_book: Optional[bool] = Field( default=None, description= - "Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook", + "Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook", alias="inOrderBook") cancelled_size: Optional[str] = Field( default=None, @@ -198,12 +198,11 @@ class TimeInForceEnum(Enum): description="Funds of remain transactions", alias="remainFunds") tax: Optional[str] = Field( - default=None, - description="Users in some regions need query this field") + default=None, description="Users in some regions have this field") active: Optional[bool] = Field( default=None, description= - "Order status: true-The status of the order isactive; false-The status of the order is done" + "Order status: true-The status of the order is active; false-The status of the order is done" ) __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_trade_history_items.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_trade_history_items.py index 7fee4539..691f780f 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_trade_history_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_trade_history_items.py @@ -16,25 +16,25 @@ class GetTradeHistoryItems(BaseModel): GetTradeHistoryItems Attributes: - id (int): Id of transaction detail + id (int): ID of transaction detail symbol (str): symbol - trade_id (int): Trade Id, symbol latitude increment + trade_id (int): Trade ID, symbol latitude increment order_id (str): The unique order id generated by the trading system - counter_order_id (str): Counterparty order Id + counter_order_id (str): Counterparty order ID side (SideEnum): Buy or sell liquidity (LiquidityEnum): Liquidity type: taker or maker force_taker (bool): - price (str): Order price - size (str): Order size + price (str): Order Price + size (str): Order Size funds (str): Order Funds fee (str): [Handling fees](https://www.kucoin.com/docs-new/api-5327739) fee_rate (str): Fee rate - fee_currency (str): currency used to calculate trading fee + fee_currency (str): Currency used to calculate trading fee stop (str): Take Profit and Stop Loss type, currently HFT does not support the Take Profit and Stop Loss type, so it is empty trade_type (str): Trade type, redundancy param - tax (str): Users in some regions need query this field - tax_rate (str): Tax Rate, Users in some regions need query this field - type (TypeEnum): Specify if the order is an 'limit' order or 'market' order. + tax (str): Users in some regions have this field + tax_rate (str): Tax Rate: Users in some regions must query this field + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order. created_at (int): """ @@ -66,11 +66,11 @@ class TypeEnum(Enum): MARKET = 'market' id: Optional[int] = Field(default=None, - description="Id of transaction detail") + description="ID of transaction detail") symbol: Optional[str] = Field(default=None, description="symbol") trade_id: Optional[int] = Field( default=None, - description="Trade Id, symbol latitude increment", + description="Trade ID, symbol latitude increment", alias="tradeId") order_id: Optional[str] = Field( default=None, @@ -78,14 +78,14 @@ class TypeEnum(Enum): alias="orderId") counter_order_id: Optional[str] = Field( default=None, - description="Counterparty order Id", + description="Counterparty order ID", alias="counterOrderId") side: Optional[SideEnum] = Field(default=None, description="Buy or sell") liquidity: Optional[LiquidityEnum] = Field( default=None, description="Liquidity type: taker or maker") force_taker: Optional[bool] = Field(default=None, alias="forceTaker") - price: Optional[str] = Field(default=None, description="Order price") - size: Optional[str] = Field(default=None, description="Order size") + price: Optional[str] = Field(default=None, description="Order Price") + size: Optional[str] = Field(default=None, description="Order Size") funds: Optional[str] = Field(default=None, description="Order Funds") fee: Optional[str] = Field( default=None, @@ -96,7 +96,7 @@ class TypeEnum(Enum): alias="feeRate") fee_currency: Optional[str] = Field( default=None, - description="currency used to calculate trading fee", + description="Currency used to calculate trading fee", alias="feeCurrency") stop: Optional[str] = Field( default=None, @@ -108,16 +108,15 @@ class TypeEnum(Enum): description="Trade type, redundancy param", alias="tradeType") tax: Optional[str] = Field( - default=None, - description="Users in some regions need query this field") + default=None, description="Users in some regions have this field") tax_rate: Optional[str] = Field( default=None, - description="Tax Rate, Users in some regions need query this field", + description="Tax Rate: Users in some regions must query this field", alias="taxRate") type: Optional[TypeEnum] = Field( default=None, description= - "Specify if the order is an 'limit' order or 'market' order. ") + "Specify if the order is a 'limit' order or 'market' order. ") created_at: Optional[int] = Field(default=None, alias="createdAt") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_trade_history_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_trade_history_req.py index f2b4a561..62df88b8 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_trade_history_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_trade_history_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetTradeHistoryReq(BaseModel): @@ -19,13 +18,13 @@ class GetTradeHistoryReq(BaseModel): Attributes: symbol (str): symbol trade_type (TradeTypeEnum): Trade type: MARGIN_TRADE - cross margin trade, MARGIN_ISOLATED_TRADE - isolated margin trade - order_id (str): The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters) - side (SideEnum): specify if the order is to 'buy' or 'sell' - type (TypeEnum): specify if the order is an 'limit' order or 'market' order. - last_id (int): The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. - limit (int): Default100,Max200 - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) + order_id (str): The unique order id generated by the trading system (If orderId is specified, please ignore the other query parameters) + side (SideEnum): Specify if the order is to 'buy' or 'sell'. + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order. + last_id (int): The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. + limit (int): Default20, Max100 + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) """ class TradeTypeEnum(Enum): @@ -64,26 +63,26 @@ class TypeEnum(Enum): order_id: Optional[str] = Field( default=None, description= - "The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters)", + "The unique order id generated by the trading system (If orderId is specified, please ignore the other query parameters)", alias="orderId") side: Optional[SideEnum] = Field( - default=None, description="specify if the order is to 'buy' or 'sell'") + default=None, + description="Specify if the order is to 'buy' or 'sell'.") type: Optional[TypeEnum] = Field( default=None, description= - "specify if the order is an 'limit' order or 'market' order. ") + "Specify if the order is a 'limit' order or 'market' order. ") last_id: Optional[int] = Field( default=None, description= - "The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page.", + "The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page.", alias="lastId") - limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = Field( - default=20, description="Default100,Max200") + limit: Optional[int] = Field(default=20, description="Default20, Max100") start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") __properties: ClassVar[List[str]] = [ @@ -170,7 +169,7 @@ def set_trade_type( def set_order_id(self, value: str) -> GetTradeHistoryReqBuilder: """ - The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters) + The unique order id generated by the trading system (If orderId is specified, please ignore the other query parameters) """ self.obj['orderId'] = value return self @@ -179,7 +178,7 @@ def set_side( self, value: GetTradeHistoryReq.SideEnum) -> GetTradeHistoryReqBuilder: """ - specify if the order is to 'buy' or 'sell' + Specify if the order is to 'buy' or 'sell'. """ self.obj['side'] = value return self @@ -188,35 +187,35 @@ def set_type( self, value: GetTradeHistoryReq.TypeEnum) -> GetTradeHistoryReqBuilder: """ - specify if the order is an 'limit' order or 'market' order. + Specify if the order is a 'limit' order or 'market' order. """ self.obj['type'] = value return self def set_last_id(self, value: int) -> GetTradeHistoryReqBuilder: """ - The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. """ self.obj['lastId'] = value return self def set_limit(self, value: int) -> GetTradeHistoryReqBuilder: """ - Default100,Max200 + Default20, Max100 """ self.obj['limit'] = value return self def set_start_at(self, value: int) -> GetTradeHistoryReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetTradeHistoryReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_trade_history_resp.py b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_trade_history_resp.py index 4b218981..ad62aa8c 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_trade_history_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/order/model_get_trade_history_resp.py @@ -19,7 +19,7 @@ class GetTradeHistoryResp(BaseModel, Response): Attributes: items (list[GetTradeHistoryItems]): - last_id (int): The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page. + last_id (int): The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. """ common_response: Optional[RestResponse] = Field( @@ -28,7 +28,7 @@ class GetTradeHistoryResp(BaseModel, Response): last_id: Optional[int] = Field( default=None, description= - "The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page.", + "The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page.", alias="lastId") __properties: ClassVar[List[str]] = ["items", "lastId"] diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/risklimit/api_risk_limit.py b/sdk/python/kucoin_universal_sdk/generate/margin/risklimit/api_risk_limit.py index a59466b1..2e8948f2 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/risklimit/api_risk_limit.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/risklimit/api_risk_limit.py @@ -14,17 +14,17 @@ def get_margin_risk_limit(self, req: GetMarginRiskLimitReq, **kwargs: Any) -> GetMarginRiskLimitResp: """ summary: Get Margin Risk Limit - description: Request via this endpoint to get the Configure and Risk limit info of the margin. + description: Request Configure and Risk limit info of the margin via this endpoint. documentation: https://www.kucoin.com/docs-new/api-3470219 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 20 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+---------+ """ pass diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/risklimit/model_get_margin_risk_limit_data.py b/sdk/python/kucoin_universal_sdk/generate/margin/risklimit/model_get_margin_risk_limit_data.py index f2b39f49..1e2669e7 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/risklimit/model_get_margin_risk_limit_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/risklimit/model_get_margin_risk_limit_data.py @@ -22,9 +22,9 @@ class GetMarginRiskLimitData(BaseModel): hold_max_amount (str): CROSS MARGIN RESPONSES, Maximum holding amount borrow_coefficient (str): CROSS MARGIN RESPONSES, [Borrow Coefficient](https://www.kucoin.com/land/price-protect) margin_coefficient (str): CROSS MARGIN RESPONSES, [Margin Coefficient](https://www.kucoin.com/land/price-protect) - precision (int): CROSS MARGIN RESPONSES, Currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 + precision (int): CROSS MARGIN RESPONSES, Currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 borrow_min_amount (str): CROSS MARGIN RESPONSES, Minimum personal borrow amount - borrow_min_unit (str): CROSS MARGIN RESPONSES, Minimum unit for borrowing, the borrowed amount must be an integer multiple of this value + borrow_min_unit (str): CROSS MARGIN RESPONSES, Minimum unit for borrowing; the borrowed amount must be an integer multiple of this value borrow_enabled (bool): CROSS MARGIN RESPONSES, Whether to support borrowing symbol (str): ISOLATED MARGIN RESPONSES, Symbol base_max_borrow_amount (str): ISOLATED MARGIN RESPONSES, Base maximum personal borrow amount. If the platform has no borrowing amount, this value will still be displayed. @@ -33,8 +33,8 @@ class GetMarginRiskLimitData(BaseModel): quote_max_buy_amount (str): ISOLATED MARGIN RESPONSES, Quote maximum buy amount base_max_hold_amount (str): ISOLATED MARGIN RESPONSES, Base maximum holding amount quote_max_hold_amount (str): ISOLATED MARGIN RESPONSES, Quote maximum holding amount - base_precision (int): ISOLATED MARGIN RESPONSES, Base currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 - quote_precision (int): ISOLATED MARGIN RESPONSES, Quote currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 + base_precision (int): ISOLATED MARGIN RESPONSES, Base currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 + quote_precision (int): ISOLATED MARGIN RESPONSES, Quote currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 base_borrow_min_amount (str): ISOLATED MARGIN RESPONSES, Base minimum personal borrow amount quote_borrow_min_amount (str): ISOLATED MARGIN RESPONSES, Quote minimum personal borrow amount base_borrow_min_unit (str): ISOLATED MARGIN RESPONSES, Base minimum unit for borrowing, the borrowed amount must be an integer multiple of this value @@ -76,7 +76,7 @@ class GetMarginRiskLimitData(BaseModel): precision: Optional[int] = Field( default=None, description= - "CROSS MARGIN RESPONSES, Currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001" + "CROSS MARGIN RESPONSES, Currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001" ) borrow_min_amount: Optional[str] = Field( default=None, @@ -85,7 +85,7 @@ class GetMarginRiskLimitData(BaseModel): borrow_min_unit: Optional[str] = Field( default=None, description= - "CROSS MARGIN RESPONSES, Minimum unit for borrowing, the borrowed amount must be an integer multiple of this value", + "CROSS MARGIN RESPONSES, Minimum unit for borrowing; the borrowed amount must be an integer multiple of this value", alias="borrowMinUnit") borrow_enabled: Optional[bool] = Field( default=None, @@ -122,12 +122,12 @@ class GetMarginRiskLimitData(BaseModel): base_precision: Optional[int] = Field( default=None, description= - "ISOLATED MARGIN RESPONSES, Base currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001", + "ISOLATED MARGIN RESPONSES, Base currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001", alias="basePrecision") quote_precision: Optional[int] = Field( default=None, description= - "ISOLATED MARGIN RESPONSES, Quote currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 ", + "ISOLATED MARGIN RESPONSES, Quote currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001 ", alias="quotePrecision") base_borrow_min_amount: Optional[str] = Field( default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/margin/risklimit/model_get_margin_risk_limit_req.py b/sdk/python/kucoin_universal_sdk/generate/margin/risklimit/model_get_margin_risk_limit_req.py index 73be85a5..66be134b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/margin/risklimit/model_get_margin_risk_limit_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/margin/risklimit/model_get_margin_risk_limit_req.py @@ -15,21 +15,21 @@ class GetMarginRiskLimitReq(BaseModel): GetMarginRiskLimitReq Attributes: - is_isolated (bool): true-isolated, false-cross - currency (str): currency, This field is only required for cross margin - symbol (str): symbol, This field is only required for isolated margin + is_isolated (bool): True-isolated, false-cross + currency (str): Currency: This field is only required for cross margin + symbol (str): Symbol: This field is only required for isolated margin """ is_isolated: Optional[bool] = Field( default=None, - description="true-isolated, false-cross", + description="True-isolated, false-cross", alias="isIsolated") currency: Optional[str] = Field( default=None, - description="currency, This field is only required for cross margin") + description="Currency: This field is only required for cross margin") symbol: Optional[str] = Field( default=None, - description="symbol, This field is only required for isolated margin") + description="Symbol: This field is only required for isolated margin") __properties: ClassVar[List[str]] = ["isIsolated", "currency", "symbol"] @@ -81,21 +81,21 @@ def __init__(self): def set_is_isolated(self, value: bool) -> GetMarginRiskLimitReqBuilder: """ - true-isolated, false-cross + True-isolated, false-cross """ self.obj['isIsolated'] = value return self def set_currency(self, value: str) -> GetMarginRiskLimitReqBuilder: """ - currency, This field is only required for cross margin + Currency: This field is only required for cross margin """ self.obj['currency'] = value return self def set_symbol(self, value: str) -> GetMarginRiskLimitReqBuilder: """ - symbol, This field is only required for isolated margin + Symbol: This field is only required for isolated margin """ self.obj['symbol'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/__init__.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/__init__.py index e542baa9..a791e633 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/__init__.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/__init__.py @@ -14,6 +14,13 @@ from .model_get_announcements_req import GetAnnouncementsReq from .model_get_announcements_req import GetAnnouncementsReqBuilder from .model_get_announcements_resp import GetAnnouncementsResp +from .model_get_call_auction_info_req import GetCallAuctionInfoReq +from .model_get_call_auction_info_req import GetCallAuctionInfoReqBuilder +from .model_get_call_auction_info_resp import GetCallAuctionInfoResp +from .model_get_call_auction_part_order_book_req import GetCallAuctionPartOrderBookReq +from .model_get_call_auction_part_order_book_req import GetCallAuctionPartOrderBookReqBuilder +from .model_get_call_auction_part_order_book_resp import GetCallAuctionPartOrderBookResp +from .model_get_client_ip_address_resp import GetClientIpAddressResp from .model_get_currency_chains import GetCurrencyChains from .model_get_currency_req import GetCurrencyReq from .model_get_currency_req import GetCurrencyReqBuilder diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/api_market.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/api_market.py index b2f71951..63167999 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/api_market.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/api_market.py @@ -11,6 +11,11 @@ from .model_get_all_tickers_resp import GetAllTickersResp from .model_get_announcements_req import GetAnnouncementsReq from .model_get_announcements_resp import GetAnnouncementsResp +from .model_get_call_auction_info_req import GetCallAuctionInfoReq +from .model_get_call_auction_info_resp import GetCallAuctionInfoResp +from .model_get_call_auction_part_order_book_req import GetCallAuctionPartOrderBookReq +from .model_get_call_auction_part_order_book_resp import GetCallAuctionPartOrderBookResp +from .model_get_client_ip_address_resp import GetClientIpAddressResp from .model_get_currency_req import GetCurrencyReq from .model_get_currency_resp import GetCurrencyResp from .model_get_fiat_price_req import GetFiatPriceReq @@ -43,15 +48,15 @@ def get_announcements(self, req: GetAnnouncementsReq, summary: Get Announcements description: This interface can obtain the latest news announcements, and the default page search is for announcements within a month. documentation: https://www.kucoin.com/docs-new/api-3470157 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 20 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+--------+ """ pass @@ -60,17 +65,17 @@ def get_currency(self, req: GetCurrencyReq, **kwargs: Any) -> GetCurrencyResp: """ summary: Get Currency - description: Request via this endpoint to get the currency details of a specified currency + description: Request the currency details of a specified currency via this endpoint. documentation: https://www.kucoin.com/docs-new/api-3470155 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+--------+ """ pass @@ -78,17 +83,17 @@ def get_currency(self, req: GetCurrencyReq, def get_all_currencies(self, **kwargs: Any) -> GetAllCurrenciesResp: """ summary: Get All Currencies - description: Request via this endpoint to get the currency list.Not all currencies currently can be used for trading. + description: Request a currency list via this endpoint. Not all currencies can currently be used for trading. documentation: https://www.kucoin.com/docs-new/api-3470152 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+--------+ """ pass @@ -98,15 +103,15 @@ def get_symbol(self, req: GetSymbolReq, **kwargs: Any) -> GetSymbolResp: summary: Get Symbol description: Request via this endpoint to get detail currency pairs for trading. If you want to get the market information of the trading symbol, please use Get All Tickers. documentation: https://www.kucoin.com/docs-new/api-3470159 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 4 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 4 | + +-----------------------+--------+ """ pass @@ -115,17 +120,17 @@ def get_all_symbols(self, req: GetAllSymbolsReq, **kwargs: Any) -> GetAllSymbolsResp: """ summary: Get All Symbols - description: Request via this endpoint to get a list of available currency pairs for trading. If you want to get the market information of the trading symbol, please use Get All Tickers. + description: Request a list of available currency pairs for trading via this endpoint. If you want to get the market information of the trading symbol, please use Get All Tickers. documentation: https://www.kucoin.com/docs-new/api-3470154 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 4 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 4 | + +-----------------------+--------+ """ pass @@ -135,15 +140,15 @@ def get_ticker(self, req: GetTickerReq, **kwargs: Any) -> GetTickerResp: summary: Get Ticker description: Request via this endpoint to get Level 1 Market Data. The returned value includes the best bid price and size, the best ask price and size as well as the last traded price and the last traded size. documentation: https://www.kucoin.com/docs-new/api-3470160 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 2 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+--------+ """ pass @@ -151,17 +156,17 @@ def get_ticker(self, req: GetTickerReq, **kwargs: Any) -> GetTickerResp: def get_all_tickers(self, **kwargs: Any) -> GetAllTickersResp: """ summary: Get All Tickers - description: Request market tickers for all the trading pairs in the market (including 24h volume), takes a snapshot every 2 seconds. On the rare occasion that we will change the currency name, if you still want the changed symbol name, you can use the symbolName field instead of the symbol field via “Get all tickers” endpoint. + description: Request market tickers for all the trading pairs in the market (including 24h volume); takes a snapshot every 2 seconds. On the rare occasion that we change the currency name, if you still want the changed symbol name, you can use the symbolName field instead of the symbol field via “Get all tickers” endpoint. documentation: https://www.kucoin.com/docs-new/api-3470167 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 15 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 15 | + +-----------------------+--------+ """ pass @@ -172,15 +177,15 @@ def get_trade_history(self, req: GetTradeHistoryReq, summary: Get Trade History description: Request via this endpoint to get the trade history of the specified symbol, the returned quantity is the last 100 transaction records. documentation: https://www.kucoin.com/docs-new/api-3470162 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+--------+ """ pass @@ -190,15 +195,15 @@ def get_klines(self, req: GetKlinesReq, **kwargs: Any) -> GetKlinesResp: summary: Get Klines description: Get the Kline of the symbol. Data are returned in grouped buckets based on requested type. For each query, the system would return at most 1500 pieces of data. To obtain more data, please page the data by time. documentation: https://www.kucoin.com/docs-new/api-3470163 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+--------+ """ pass @@ -209,15 +214,15 @@ def get_part_order_book(self, req: GetPartOrderBookReq, summary: Get Part OrderBook description: Query for part orderbook depth data. (aggregated by price) You are recommended to request via this endpoint as the system reponse would be faster and cosume less traffic. documentation: https://www.kucoin.com/docs-new/api-3470165 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 2 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+--------+ """ pass @@ -228,15 +233,54 @@ def get_full_order_book(self, req: GetFullOrderBookReq, summary: Get Full OrderBook 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 up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook. documentation: https://www.kucoin.com/docs-new/api-3470164 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ + """ + pass + + @abstractmethod + def get_call_auction_part_order_book( + self, req: GetCallAuctionPartOrderBookReq, + **kwargs: Any) -> GetCallAuctionPartOrderBookResp: + """ + summary: Get Call Auction Part OrderBook + description: Query for call auction 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. + documentation: https://www.kucoin.com/docs-new/api-3471564 + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+--------+ + """ + pass + + @abstractmethod + def get_call_auction_info(self, req: GetCallAuctionInfoReq, + **kwargs: Any) -> GetCallAuctionInfoResp: + """ + summary: Get Call Auction Info + description: Get call auction data. This interface will return the following information for the specified symbol during the call auction phase: estimated transaction price, estimated transaction quantity, bid price range, and ask price range. + documentation: https://www.kucoin.com/docs-new/api-3471565 + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+--------+ """ pass @@ -245,17 +289,17 @@ def get_fiat_price(self, req: GetFiatPriceReq, **kwargs: Any) -> GetFiatPriceResp: """ summary: Get Fiat Price - description: Request via this endpoint to get the fiat price of the currencies for the available trading pairs. + description: Request the fiat price of the currencies for the available trading pairs via this endpoint. documentation: https://www.kucoin.com/docs-new/api-3470153 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+--------+ """ pass @@ -266,15 +310,15 @@ def get24hr_stats(self, req: Get24hrStatsReq, summary: Get 24hr Stats description: Request via this endpoint to get the statistics of the specified ticker in the last 24 hours. documentation: https://www.kucoin.com/docs-new/api-3470161 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 15 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 15 | + +-----------------------+--------+ """ pass @@ -282,17 +326,35 @@ def get24hr_stats(self, req: Get24hrStatsReq, def get_market_list(self, **kwargs: Any) -> GetMarketListResp: """ summary: Get Market List - description: Request via this endpoint to get the transaction currency for the entire trading market. + description: Request via this endpoint the transaction currency for the entire trading market. documentation: https://www.kucoin.com/docs-new/api-3470166 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+--------+ + """ + pass + + @abstractmethod + def get_client_ip_address(self, **kwargs: Any) -> GetClientIpAddressResp: + """ + summary: Get Client IP Address + description: Get the server time. + documentation: https://www.kucoin.com/docs-new/api-3471123 + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 0 | + +-----------------------+--------+ """ pass @@ -302,15 +364,15 @@ def get_server_time(self, **kwargs: Any) -> GetServerTimeResp: summary: Get Server Time description: Get the server time. documentation: https://www.kucoin.com/docs-new/api-3470156 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+--------+ """ pass @@ -318,17 +380,17 @@ def get_server_time(self, **kwargs: Any) -> GetServerTimeResp: def get_service_status(self, **kwargs: Any) -> GetServiceStatusResp: """ summary: Get Service Status - description: Get the service status + description: Get the service status. documentation: https://www.kucoin.com/docs-new/api-3470158 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 3 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+--------+ """ pass @@ -336,17 +398,17 @@ def get_service_status(self, **kwargs: Any) -> GetServiceStatusResp: def get_public_token(self, **kwargs: Any) -> GetPublicTokenResp: """ summary: Get Public Token - Spot/Margin - description: This interface can obtain the token required for websocket to establish a Spot/Margin 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 + description: This interface can obtain the token required for Websocket to establish a Spot/Margin 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 documentation: https://www.kucoin.com/docs-new/api-3470294 - +---------------------+--------+ - | Extra API Info | Value | - +---------------------+--------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PUBLIC | - | API-PERMISSION | NULL | - | API-RATE-LIMIT-POOL | PUBLIC | - | API-RATE-LIMIT | 10 | - +---------------------+--------+ + +-----------------------+--------+ + | Extra API Info | Value | + +-----------------------+--------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PUBLIC | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+--------+ """ pass @@ -354,17 +416,17 @@ def get_public_token(self, **kwargs: Any) -> GetPublicTokenResp: def get_private_token(self, **kwargs: Any) -> GetPrivateTokenResp: """ summary: Get Private Token - Spot/Margin - description: This interface can obtain the token required for websocket to establish a Spot/Margin 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 + description: This interface can obtain the token required for Websocket to establish a Spot/Margin 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 documentation: https://www.kucoin.com/docs-new/api-3470295 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass @@ -435,6 +497,20 @@ def get_full_order_book(self, req: GetFullOrderBookReq, "/api/v3/market/orderbook/level2", req, GetFullOrderBookResp(), False, **kwargs) + def get_call_auction_part_order_book( + self, req: GetCallAuctionPartOrderBookReq, + **kwargs: Any) -> GetCallAuctionPartOrderBookResp: + return self.transport.call( + "spot", False, "GET", + "/api/v1/market/orderbook/callauction/level2_{size}", req, + GetCallAuctionPartOrderBookResp(), False, **kwargs) + + def get_call_auction_info(self, req: GetCallAuctionInfoReq, + **kwargs: Any) -> GetCallAuctionInfoResp: + return self.transport.call("spot", False, "GET", + "/api/v1/market/callauctionData", req, + GetCallAuctionInfoResp(), False, **kwargs) + def get_fiat_price(self, req: GetFiatPriceReq, **kwargs: Any) -> GetFiatPriceResp: return self.transport.call("spot", False, "GET", "/api/v1/prices", req, @@ -450,6 +526,10 @@ def get_market_list(self, **kwargs: Any) -> GetMarketListResp: return self.transport.call("spot", False, "GET", "/api/v1/markets", None, GetMarketListResp(), False, **kwargs) + def get_client_ip_address(self, **kwargs: Any) -> GetClientIpAddressResp: + return self.transport.call("spot", False, "GET", "/api/v1/my-ip", None, + GetClientIpAddressResp(), False, **kwargs) + def get_server_time(self, **kwargs: Any) -> GetServerTimeResp: return self.transport.call("spot", False, "GET", "/api/v1/timestamp", None, GetServerTimeResp(), False, **kwargs) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/api_market.template b/sdk/python/kucoin_universal_sdk/generate/spot/market/api_market.template index 237b6ed2..153caece 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/api_market.template +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/api_market.template @@ -204,6 +204,44 @@ def test_get_full_order_book_req(self): print("error: ", e) raise e +def test_get_call_auction_part_order_book_req(self): + """ + get_call_auction_part_order_book + Get Call Auction Part OrderBook + /api/v1/market/orderbook/callauction/level2_{size} + """ + + builder = GetCallAuctionPartOrderBookReqBuilder() + builder.set_symbol(?).set_size(?) + req = builder.build() + try: + resp = self.api.get_call_auction_part_order_book(req) + print("code: ", resp.common_response.code) + print("msg: ", resp.common_response.message) + print("data: ", resp.to_json()) + except Exception as e: + print("error: ", e) + raise e + +def test_get_call_auction_info_req(self): + """ + get_call_auction_info + Get Call Auction Info + /api/v1/market/callauctionData + """ + + builder = GetCallAuctionInfoReqBuilder() + builder.set_symbol(?) + req = builder.build() + try: + resp = self.api.get_call_auction_info(req) + print("code: ", resp.common_response.code) + print("msg: ", resp.common_response.message) + print("data: ", resp.to_json()) + except Exception as e: + print("error: ", e) + raise e + def test_get_fiat_price_req(self): """ get_fiat_price @@ -258,6 +296,22 @@ def test_get_market_list_req(self): print("error: ", e) raise e +def test_get_client_ip_address_req(self): + """ + get_client_ip_address + Get Client IP Address + /api/v1/my-ip + """ + + try: + resp = self.api.get_client_ip_address() + print("code: ", resp.common_response.code) + print("msg: ", resp.common_response.message) + print("data: ", resp.to_json()) + except Exception as e: + print("error: ", e) + raise e + def test_get_server_time_req(self): """ get_server_time diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/api_market_test.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/api_market_test.py index 53dd67ab..53d8cd49 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/api_market_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/api_market_test.py @@ -7,6 +7,11 @@ from .model_get_all_tickers_resp import GetAllTickersResp from .model_get_announcements_req import GetAnnouncementsReq from .model_get_announcements_resp import GetAnnouncementsResp +from .model_get_call_auction_info_req import GetCallAuctionInfoReq +from .model_get_call_auction_info_resp import GetCallAuctionInfoResp +from .model_get_call_auction_part_order_book_req import GetCallAuctionPartOrderBookReq +from .model_get_call_auction_part_order_book_resp import GetCallAuctionPartOrderBookResp +from .model_get_client_ip_address_resp import GetClientIpAddressResp from .model_get_currency_req import GetCurrencyReq from .model_get_currency_resp import GetCurrencyResp from .model_get_fiat_price_req import GetFiatPriceReq @@ -103,7 +108,7 @@ def test_get_symbol_resp_model(self): Get Symbol /api/v2/symbols/{symbol} """ - data = "{\"code\":\"200000\",\"data\":{\"symbol\":\"BTC-USDT\",\"name\":\"BTC-USDT\",\"baseCurrency\":\"BTC\",\"quoteCurrency\":\"USDT\",\"feeCurrency\":\"USDT\",\"market\":\"USDS\",\"baseMinSize\":\"0.00001\",\"quoteMinSize\":\"0.1\",\"baseMaxSize\":\"10000000000\",\"quoteMaxSize\":\"99999999\",\"baseIncrement\":\"0.00000001\",\"quoteIncrement\":\"0.000001\",\"priceIncrement\":\"0.1\",\"priceLimitRate\":\"0.1\",\"minFunds\":\"0.1\",\"isMarginEnabled\":true,\"enableTrading\":true,\"feeCategory\":1,\"makerFeeCoefficient\":\"1.00\",\"takerFeeCoefficient\":\"1.00\",\"st\":false}}" + data = "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"BTC-USDT\",\n \"name\": \"BTC-USDT\",\n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USDT\",\n \"feeCurrency\": \"USDT\",\n \"market\": \"USDS\",\n \"baseMinSize\": \"0.00001\",\n \"quoteMinSize\": \"0.1\",\n \"baseMaxSize\": \"10000000000\",\n \"quoteMaxSize\": \"99999999\",\n \"baseIncrement\": \"0.00000001\",\n \"quoteIncrement\": \"0.000001\",\n \"priceIncrement\": \"0.1\",\n \"priceLimitRate\": \"0.1\",\n \"minFunds\": \"0.1\",\n \"isMarginEnabled\": true,\n \"enableTrading\": true,\n \"feeCategory\": 1,\n \"makerFeeCoefficient\": \"1.00\",\n \"takerFeeCoefficient\": \"1.00\",\n \"st\": false,\n \"callauctionIsEnabled\": false,\n \"callauctionPriceFloor\": null,\n \"callauctionPriceCeiling\": null,\n \"callauctionFirstStageStartTime\": null,\n \"callauctionSecondStageStartTime\": null,\n \"callauctionThirdStageStartTime\": null,\n \"tradingStartTime\": null\n }\n}" common_response = RestResponse.from_json(data) resp = GetSymbolResp.from_dict(common_response.data) @@ -122,7 +127,7 @@ def test_get_all_symbols_resp_model(self): Get All Symbols /api/v2/symbols """ - data = "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"BTC-USDT\",\n \"name\": \"BTC-USDT\",\n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USDT\",\n \"feeCurrency\": \"USDT\",\n \"market\": \"USDS\",\n \"baseMinSize\": \"0.00001\",\n \"quoteMinSize\": \"0.1\",\n \"baseMaxSize\": \"10000000000\",\n \"quoteMaxSize\": \"99999999\",\n \"baseIncrement\": \"0.00000001\",\n \"quoteIncrement\": \"0.000001\",\n \"priceIncrement\": \"0.1\",\n \"priceLimitRate\": \"0.1\",\n \"minFunds\": \"0.1\",\n \"isMarginEnabled\": true,\n \"enableTrading\": true,\n \"feeCategory\": 1,\n \"makerFeeCoefficient\": \"1.00\",\n \"takerFeeCoefficient\": \"1.00\",\n \"st\": false\n }\n ]\n}" + data = "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"BTC-USDT\",\n \"name\": \"BTC-USDT\",\n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USDT\",\n \"feeCurrency\": \"USDT\",\n \"market\": \"USDS\",\n \"baseMinSize\": \"0.00001\",\n \"quoteMinSize\": \"0.1\",\n \"baseMaxSize\": \"10000000000\",\n \"quoteMaxSize\": \"99999999\",\n \"baseIncrement\": \"0.00000001\",\n \"quoteIncrement\": \"0.000001\",\n \"priceIncrement\": \"0.1\",\n \"priceLimitRate\": \"0.1\",\n \"minFunds\": \"0.1\",\n \"isMarginEnabled\": true,\n \"enableTrading\": true,\n \"feeCategory\": 1,\n \"makerFeeCoefficient\": \"1.00\",\n \"takerFeeCoefficient\": \"1.00\",\n \"st\": false,\n \"callauctionIsEnabled\": false,\n \"callauctionPriceFloor\": null,\n \"callauctionPriceCeiling\": null,\n \"callauctionFirstStageStartTime\": null,\n \"callauctionSecondStageStartTime\": null,\n \"callauctionThirdStageStartTime\": null,\n \"tradingStartTime\": null\n }\n ]\n}" common_response = RestResponse.from_json(data) resp = GetAllSymbolsResp.from_dict(common_response.data) @@ -238,6 +243,44 @@ def test_get_full_order_book_resp_model(self): common_response = RestResponse.from_json(data) resp = GetFullOrderBookResp.from_dict(common_response.data) + def test_get_call_auction_part_order_book_req_model(self): + """ + get_call_auction_part_order_book + Get Call Auction Part OrderBook + /api/v1/market/orderbook/callauction/level2_{size} + """ + data = "{\"symbol\": \"BTC-USDT\", \"size\": \"20\"}" + req = GetCallAuctionPartOrderBookReq.from_json(data) + + def test_get_call_auction_part_order_book_resp_model(self): + """ + get_call_auction_part_order_book + Get Call Auction Part OrderBook + /api/v1/market/orderbook/callauction/level2_{size} + """ + data = "{\n \"code\": \"200000\",\n \"data\": {\n \"time\": 1729176273859,\n \"sequence\": \"14610502970\",\n \"bids\": [\n [\n \"66976.4\",\n \"0.69109872\"\n ],\n [\n \"66976.3\",\n \"0.14377\"\n ]\n ],\n \"asks\": [\n [\n \"66976.5\",\n \"0.05408199\"\n ],\n [\n \"66976.8\",\n \"0.0005\"\n ]\n ]\n }\n}" + common_response = RestResponse.from_json(data) + resp = GetCallAuctionPartOrderBookResp.from_dict(common_response.data) + + def test_get_call_auction_info_req_model(self): + """ + get_call_auction_info + Get Call Auction Info + /api/v1/market/callauctionData + """ + data = "{\"symbol\": \"BTC-USDT\"}" + req = GetCallAuctionInfoReq.from_json(data) + + def test_get_call_auction_info_resp_model(self): + """ + get_call_auction_info + Get Call Auction Info + /api/v1/market/callauctionData + """ + data = "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"BTC-USDT\",\n \"estimatedPrice\": \"0.17\",\n \"estimatedSize\": \"0.03715004\",\n \"sellOrderRangeLowPrice\": \"1.788\",\n \"sellOrderRangeHighPrice\": \"2.788\",\n \"buyOrderRangeLowPrice\": \"1.788\",\n \"buyOrderRangeHighPrice\": \"2.788\",\n \"time\": 1550653727731\n }\n}" + common_response = RestResponse.from_json(data) + resp = GetCallAuctionInfoResp.from_dict(common_response.data) + def test_get_fiat_price_req_model(self): """ get_fiat_price @@ -293,6 +336,23 @@ def test_get_market_list_resp_model(self): common_response = RestResponse.from_json(data) resp = GetMarketListResp.from_dict(common_response.data) + def test_get_client_ip_address_req_model(self): + """ + get_client_ip_address + Get Client IP Address + /api/v1/my-ip + """ + + def test_get_client_ip_address_resp_model(self): + """ + get_client_ip_address + Get Client IP Address + /api/v1/my-ip + """ + data = "{\"code\":\"200000\",\"data\":\"20.***.***.128\"}" + common_response = RestResponse.from_json(data) + resp = GetClientIpAddressResp.from_dict(common_response.data) + def test_get_server_time_req_model(self): """ get_server_time diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_currencies_data.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_currencies_data.py index 4c7dfa4f..e06c9ced 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_currencies_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_currencies_data.py @@ -17,24 +17,24 @@ class GetAllCurrenciesData(BaseModel): Attributes: currency (str): A unique currency code that will never change - name (str): Currency name, will change after renaming - full_name (str): Full name of a currency, will change after renaming + name (str): Currency name; will change after renaming + full_name (str): Full currency name; will change after renaming precision (int): Currency precision confirms (int): Number of block confirmations contract_address (str): Contract address - is_margin_enabled (bool): Support margin or not - is_debit_enabled (bool): Support debit or not - chains (list[GetAllCurrenciesDataChains]): chain list + is_margin_enabled (bool): Margin support or not + is_debit_enabled (bool): Debit support or not + chains (list[GetAllCurrenciesDataChains]): Chain list """ currency: Optional[str] = Field( default=None, description="A unique currency code that will never change") name: Optional[str] = Field( - default=None, description="Currency name, will change after renaming") + default=None, description="Currency name; will change after renaming") full_name: Optional[str] = Field( default=None, - description="Full name of a currency, will change after renaming", + description="Full currency name; will change after renaming", alias="fullName") precision: Optional[int] = Field(default=None, description="Currency precision") @@ -45,14 +45,14 @@ class GetAllCurrenciesData(BaseModel): alias="contractAddress") is_margin_enabled: Optional[bool] = Field( default=None, - description="Support margin or not", + description="Margin support or not", alias="isMarginEnabled") is_debit_enabled: Optional[bool] = Field( default=None, - description="Support debit or not", + description="Debit support or not", alias="isDebitEnabled") chains: Optional[List[GetAllCurrenciesDataChains]] = Field( - default=None, description="chain list") + default=None, description="Chain list") __properties: ClassVar[List[str]] = [ "currency", "name", "fullName", "precision", "confirms", diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_currencies_data_chains.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_currencies_data_chains.py index 60d72d2a..a1bca4f6 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_currencies_data_chains.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_currencies_data_chains.py @@ -15,28 +15,28 @@ class GetAllCurrenciesDataChains(BaseModel): GetAllCurrenciesDataChains Attributes: - chain_name (str): chain name of currency + chain_name (str): Chain name of currency withdrawal_min_size (str): Minimum withdrawal amount deposit_min_size (str): Minimum deposit amount - withdraw_fee_rate (str): withdraw fee rate + withdraw_fee_rate (str): Withdraw fee rate withdrawal_min_fee (str): Minimum fees charged for withdrawal - is_withdraw_enabled (bool): Support withdrawal or not - is_deposit_enabled (bool): Support deposit or not + is_withdraw_enabled (bool): Withdrawal support or not + is_deposit_enabled (bool): Deposit support or not confirms (int): Number of block confirmations pre_confirms (int): The number of blocks (confirmations) for advance on-chain verification contract_address (str): Contract address withdraw_precision (int): Withdrawal precision bit, indicating the maximum supported length after the decimal point of the withdrawal amount max_withdraw (str): Maximum amount of single withdrawal max_deposit (str): Maximum amount of single deposit (only applicable to Lightning Network) - need_tag (bool): whether memo/tag is needed - chain_id (str): chain id of currency - deposit_fee_rate (str): deposit fee rate (some currencies have this param, the default is empty) - withdraw_max_fee (str): withdraw max fee(some currencies have this param, the default is empty) + need_tag (bool): Need for memo/tag or not + chain_id (str): Chain id of currency + deposit_fee_rate (str): Deposit fee rate (some currencies have this param; the default is empty) + withdraw_max_fee (str): Withdraw max. fee (some currencies have this param; the default is empty) deposit_tier_fee (str): """ chain_name: Optional[str] = Field(default=None, - description="chain name of currency", + description="Chain name of currency", alias="chainName") withdrawal_min_size: Optional[str] = Field( default=None, @@ -47,7 +47,7 @@ class GetAllCurrenciesDataChains(BaseModel): description="Minimum deposit amount", alias="depositMinSize") withdraw_fee_rate: Optional[str] = Field(default=None, - description="withdraw fee rate", + description="Withdraw fee rate", alias="withdrawFeeRate") withdrawal_min_fee: Optional[str] = Field( default=None, @@ -55,11 +55,11 @@ class GetAllCurrenciesDataChains(BaseModel): alias="withdrawalMinFee") is_withdraw_enabled: Optional[bool] = Field( default=None, - description="Support withdrawal or not", + description="Withdrawal support or not", alias="isWithdrawEnabled") is_deposit_enabled: Optional[bool] = Field( default=None, - description="Support deposit or not", + description="Deposit support or not", alias="isDepositEnabled") confirms: Optional[int] = Field( default=None, description="Number of block confirmations") @@ -86,20 +86,20 @@ class GetAllCurrenciesDataChains(BaseModel): "Maximum amount of single deposit (only applicable to Lightning Network)", alias="maxDeposit") need_tag: Optional[bool] = Field(default=None, - description="whether memo/tag is needed", + description="Need for memo/tag or not", alias="needTag") chain_id: Optional[str] = Field(default=None, - description="chain id of currency", + description="Chain id of currency", alias="chainId") deposit_fee_rate: Optional[str] = Field( default=None, description= - "deposit fee rate (some currencies have this param, the default is empty)", + "Deposit fee rate (some currencies have this param; the default is empty)", alias="depositFeeRate") withdraw_max_fee: Optional[str] = Field( default=None, description= - "withdraw max fee(some currencies have this param, the default is empty)", + "Withdraw max. fee (some currencies have this param; the default is empty)", alias="withdrawMaxFee") deposit_tier_fee: Optional[str] = Field(default=None, alias="depositTierFee") diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_symbols_data.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_symbols_data.py index d1f16bbf..113c8450 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_symbols_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_symbols_data.py @@ -16,27 +16,34 @@ class GetAllSymbolsData(BaseModel): GetAllSymbolsData Attributes: - symbol (str): unique code of a symbol, it would not change after renaming - name (str): Name of trading pairs, it would change after renaming - base_currency (str): Base currency,e.g. BTC. - quote_currency (str): Quote currency,e.g. USDT. + symbol (str): Unique code of a symbol; it will not change after renaming + name (str): Name of trading pairs, it will change after renaming + base_currency (str): Base currency, e.g. BTC. + quote_currency (str): Quote currency, e.g. USDT. fee_currency (str): The currency of charged fees. market (str): The trading market. - base_min_size (str): The minimum order quantity requried to place an order. + base_min_size (str): The minimum order quantity required to place an order. quote_min_size (str): The minimum order funds required to place a market order. base_max_size (str): The maximum order size required to place an order. quote_max_size (str): The maximum order funds required to place a market order. base_increment (str): Quantity increment: The quantity for an order must be a positive integer multiple of this increment. Here, the size refers to the quantity of the base currency for the order. For example, for the ETH-USDT trading pair, if the baseIncrement is 0.0000001, the order quantity can be 1.0000001 but not 1.00000001. quote_increment (str): Quote increment: The funds for a market order must be a positive integer multiple of this increment. The funds refer to the quote currency amount. For example, for the ETH-USDT trading pair, if the quoteIncrement is 0.000001, the amount of USDT for the order can be 3000.000001 but not 3000.0000001. - price_increment (str): Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. specifies the min order price as well as the price increment.This also applies to quote currency. - price_limit_rate (str): Threshold for price portection - min_funds (str): the minimum trading amounts + price_increment (str): Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. Specifies the min. order price as well as the price increment.This also applies to quote currency. + price_limit_rate (str): Threshold for price protection + min_funds (str): The minimum trading amounts is_margin_enabled (bool): Available for margin or not. enable_trading (bool): Available for transaction or not. fee_category (FeeCategoryEnum): [Fee Type](https://www.kucoin.com/vip/privilege) maker_fee_coefficient (str): The maker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee taker_fee_coefficient (str): The taker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee - st (bool): Whether it is an [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol + st (bool): Whether it is a [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol + callauction_is_enabled (bool): The [call auction](https://www.kucoin.com/support/40999744334105) status returns true/false + callauction_price_floor (str): The lowest price declared in the call auction + callauction_price_ceiling (str): The highest bid price in the call auction + callauction_first_stage_start_time (int): The first phase of the call auction starts at (Allow add orders, allow cancel orders) + callauction_second_stage_start_time (int): The second phase of the call auction starts at (Allow add orders, don't allow cancel orders) + callauction_third_stage_start_time (int): The third phase of the call auction starts at (Don't allow add orders, don't allow cancel orders) + trading_start_time (int): Official opening time (end time of the third phase of call auction) """ class FeeCategoryEnum(Enum): @@ -52,17 +59,18 @@ class FeeCategoryEnum(Enum): symbol: Optional[str] = Field( default=None, - description= - "unique code of a symbol, it would not change after renaming") + description="Unique code of a symbol; it will not change after renaming" + ) name: Optional[str] = Field( default=None, - description="Name of trading pairs, it would change after renaming") - base_currency: Optional[str] = Field(default=None, - description="Base currency,e.g. BTC.", - alias="baseCurrency") + description="Name of trading pairs, it will change after renaming") + base_currency: Optional[str] = Field( + default=None, + description="Base currency, e.g. BTC.", + alias="baseCurrency") quote_currency: Optional[str] = Field( default=None, - description="Quote currency,e.g. USDT.", + description="Quote currency, e.g. USDT.", alias="quoteCurrency") fee_currency: Optional[str] = Field( default=None, @@ -72,7 +80,7 @@ class FeeCategoryEnum(Enum): description="The trading market.") base_min_size: Optional[str] = Field( default=None, - description="The minimum order quantity requried to place an order.", + description="The minimum order quantity required to place an order.", alias="baseMinSize") quote_min_size: Optional[str] = Field( default=None, @@ -99,14 +107,14 @@ class FeeCategoryEnum(Enum): price_increment: Optional[str] = Field( default=None, description= - "Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. specifies the min order price as well as the price increment.This also applies to quote currency.", + "Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. Specifies the min. order price as well as the price increment.This also applies to quote currency.", alias="priceIncrement") price_limit_rate: Optional[str] = Field( default=None, - description="Threshold for price portection", + description="Threshold for price protection", alias="priceLimitRate") min_funds: Optional[str] = Field(default=None, - description="the minimum trading amounts", + description="The minimum trading amounts", alias="minFunds") is_margin_enabled: Optional[bool] = Field( default=None, @@ -133,15 +141,52 @@ class FeeCategoryEnum(Enum): st: Optional[bool] = Field( default=None, description= - "Whether it is an [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol" + "Whether it is a [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol" ) + callauction_is_enabled: Optional[bool] = Field( + default=None, + description= + "The [call auction](https://www.kucoin.com/support/40999744334105) status returns true/false", + alias="callauctionIsEnabled") + callauction_price_floor: Optional[str] = Field( + default=None, + description="The lowest price declared in the call auction", + alias="callauctionPriceFloor") + callauction_price_ceiling: Optional[str] = Field( + default=None, + description="The highest bid price in the call auction ", + alias="callauctionPriceCeiling") + callauction_first_stage_start_time: Optional[int] = Field( + default=None, + description= + "The first phase of the call auction starts at (Allow add orders, allow cancel orders)", + alias="callauctionFirstStageStartTime") + callauction_second_stage_start_time: Optional[int] = Field( + default=None, + description= + "The second phase of the call auction starts at (Allow add orders, don't allow cancel orders)", + alias="callauctionSecondStageStartTime") + callauction_third_stage_start_time: Optional[int] = Field( + default=None, + description= + "The third phase of the call auction starts at (Don't allow add orders, don't allow cancel orders)", + alias="callauctionThirdStageStartTime") + trading_start_time: Optional[int] = Field( + default=None, + description= + "Official opening time (end time of the third phase of call auction)", + alias="tradingStartTime") __properties: ClassVar[List[str]] = [ "symbol", "name", "baseCurrency", "quoteCurrency", "feeCurrency", "market", "baseMinSize", "quoteMinSize", "baseMaxSize", "quoteMaxSize", "baseIncrement", "quoteIncrement", "priceIncrement", "priceLimitRate", "minFunds", "isMarginEnabled", "enableTrading", "feeCategory", - "makerFeeCoefficient", "takerFeeCoefficient", "st" + "makerFeeCoefficient", "takerFeeCoefficient", "st", + "callauctionIsEnabled", "callauctionPriceFloor", + "callauctionPriceCeiling", "callauctionFirstStageStartTime", + "callauctionSecondStageStartTime", "callauctionThirdStageStartTime", + "tradingStartTime" ] model_config = ConfigDict( @@ -218,6 +263,20 @@ def from_dict( "takerFeeCoefficient": obj.get("takerFeeCoefficient"), "st": - obj.get("st") + obj.get("st"), + "callauctionIsEnabled": + obj.get("callauctionIsEnabled"), + "callauctionPriceFloor": + obj.get("callauctionPriceFloor"), + "callauctionPriceCeiling": + obj.get("callauctionPriceCeiling"), + "callauctionFirstStageStartTime": + obj.get("callauctionFirstStageStartTime"), + "callauctionSecondStageStartTime": + obj.get("callauctionSecondStageStartTime"), + "callauctionThirdStageStartTime": + obj.get("callauctionThirdStageStartTime"), + "tradingStartTime": + obj.get("tradingStartTime") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_tickers_ticker.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_tickers_ticker.py index 45ddbcd8..f0aff20b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_tickers_ticker.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_all_tickers_ticker.py @@ -17,7 +17,7 @@ class GetAllTickersTicker(BaseModel): Attributes: symbol (str): Symbol - symbol_name (str): Name of trading pairs, it would change after renaming + symbol_name (str): Name of trading pairs, it will change after renaming buy (str): Best bid price best_bid_size (str): Best bid size sell (str): Best ask price @@ -39,8 +39,8 @@ class GetAllTickersTicker(BaseModel): class TakerCoefficientEnum(Enum): """ Attributes: - T_1: the taker fee coefficient is 1 - T_0: no fee + T_1: The taker fee coefficient is 1 + T_0: No fee """ T_1 = '1' T_0 = '0' @@ -48,8 +48,8 @@ class TakerCoefficientEnum(Enum): class MakerCoefficientEnum(Enum): """ Attributes: - T_1: the maker fee coefficient is 1 - T_0: no fee + T_1: The maker fee coefficient is 1 + T_0: No fee """ T_1 = '1' T_0 = '0' @@ -57,7 +57,7 @@ class MakerCoefficientEnum(Enum): symbol: Optional[str] = Field(default=None, description="Symbol") symbol_name: Optional[str] = Field( default=None, - description="Name of trading pairs, it would change after renaming", + description="Name of trading pairs, it will change after renaming", alias="symbolName") buy: Optional[str] = Field(default=None, description="Best bid price") best_bid_size: Optional[str] = Field(default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_orderbook_level50_changes.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_call_auction_info_req.py similarity index 50% rename from sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_orderbook_level50_changes.py rename to sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_call_auction_info_req.py index bfcc1058..f2429839 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_orderbook_level50_changes.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_call_auction_info_req.py @@ -6,23 +6,21 @@ import pprint import json -from pydantic import BaseModel, ConfigDict -from typing import Any, Callable, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional -class OrderbookLevel50Changes(BaseModel): +class GetCallAuctionInfoReq(BaseModel): """ - OrderbookLevel50Changes + GetCallAuctionInfoReq Attributes: - asks (list[list[str]]): - bids (list[list[str]]): + symbol (str): symbol """ - asks: Optional[List[List[str]]] = None - bids: Optional[List[List[str]]] = None + symbol: Optional[str] = Field(default=None, description="symbol") - __properties: ClassVar[List[str]] = ["asks", "bids"] + __properties: ClassVar[List[str]] = ["symbol"] model_config = ConfigDict( populate_by_name=True, @@ -37,7 +35,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_none=True) @classmethod - def from_json(cls, json_str: str) -> Optional[OrderbookLevel50Changes]: + def from_json(cls, json_str: str) -> Optional[GetCallAuctionInfoReq]: return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -49,17 +47,29 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict( - cls, - obj: Optional[Dict[str, - Any]]) -> Optional[OrderbookLevel50Changes]: + cls, obj: Optional[Dict[str, + Any]]) -> Optional[GetCallAuctionInfoReq]: if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "asks": obj.get("asks"), - "bids": obj.get("bids") - }) + _obj = cls.model_validate({"symbol": obj.get("symbol")}) return _obj + + +class GetCallAuctionInfoReqBuilder: + + def __init__(self): + self.obj = {} + + def set_symbol(self, value: str) -> GetCallAuctionInfoReqBuilder: + """ + symbol + """ + self.obj['symbol'] = value + return self + + def build(self) -> GetCallAuctionInfoReq: + return GetCallAuctionInfoReq(**self.obj) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_call_auction_info_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_call_auction_info_resp.py new file mode 100644 index 00000000..e61d0c58 --- /dev/null +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_call_auction_info_resp.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +# Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +from __future__ import annotations +import pprint +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from kucoin_universal_sdk.internal.interfaces.response import Response +from kucoin_universal_sdk.model.common import RestResponse + + +class GetCallAuctionInfoResp(BaseModel, Response): + """ + GetCallAuctionInfoResp + + Attributes: + symbol (str): Symbol + estimated_price (str): Estimated price + estimated_size (str): Estimated size + sell_order_range_low_price (str): Sell ​​order minimum price + sell_order_range_high_price (str): Sell ​​order maximum price + buy_order_range_low_price (str): Buy order minimum price + buy_order_range_high_price (str): Buy ​​order maximum price + time (int): Timestamp (ms) + """ + + common_response: Optional[RestResponse] = Field( + default=None, description="Common response") + symbol: Optional[str] = Field(default=None, description="Symbol") + estimated_price: Optional[str] = Field(default=None, + description="Estimated price", + alias="estimatedPrice") + estimated_size: Optional[str] = Field(default=None, + description="Estimated size", + alias="estimatedSize") + sell_order_range_low_price: Optional[str] = Field( + default=None, + description="Sell ​​order minimum price", + alias="sellOrderRangeLowPrice") + sell_order_range_high_price: Optional[str] = Field( + default=None, + description="Sell ​​order maximum price", + alias="sellOrderRangeHighPrice") + buy_order_range_low_price: Optional[str] = Field( + default=None, + description="Buy order minimum price", + alias="buyOrderRangeLowPrice") + buy_order_range_high_price: Optional[str] = Field( + default=None, + description="Buy ​​order maximum price", + alias="buyOrderRangeHighPrice") + time: Optional[int] = Field(default=None, description="Timestamp (ms)") + + __properties: ClassVar[List[str]] = [ + "symbol", "estimatedPrice", "estimatedSize", "sellOrderRangeLowPrice", + "sellOrderRangeHighPrice", "buyOrderRangeLowPrice", + "buyOrderRangeHighPrice", "time" + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=False, + protected_namespaces=(), + ) + + def to_str(self) -> str: + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[GetCallAuctionInfoResp]: + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + _dict = self.model_dump( + by_alias=True, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict( + cls, obj: Optional[Dict[str, + Any]]) -> Optional[GetCallAuctionInfoResp]: + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": + obj.get("symbol"), + "estimatedPrice": + obj.get("estimatedPrice"), + "estimatedSize": + obj.get("estimatedSize"), + "sellOrderRangeLowPrice": + obj.get("sellOrderRangeLowPrice"), + "sellOrderRangeHighPrice": + obj.get("sellOrderRangeHighPrice"), + "buyOrderRangeLowPrice": + obj.get("buyOrderRangeLowPrice"), + "buyOrderRangeHighPrice": + obj.get("buyOrderRangeHighPrice"), + "time": + obj.get("time") + }) + return _obj + + def set_common_response(self, response: RestResponse): + self.common_response = response diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_call_auction_part_order_book_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_call_auction_part_order_book_req.py new file mode 100644 index 00000000..2b3328b0 --- /dev/null +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_call_auction_part_order_book_req.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +# Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +from __future__ import annotations +import pprint +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional + + +class GetCallAuctionPartOrderBookReq(BaseModel): + """ + GetCallAuctionPartOrderBookReq + + Attributes: + symbol (str): symbol + size (str): Get the depth layer, optional value: 20, 100 + """ + + symbol: Optional[str] = Field(default=None, description="symbol") + size: Optional[str] = Field( + default=None, + path_variable="True", + description="Get the depth layer, optional value: 20, 100") + + __properties: ClassVar[List[str]] = ["symbol", "size"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=False, + protected_namespaces=(), + ) + + def to_str(self) -> str: + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_none=True) + + @classmethod + def from_json(cls, + json_str: str) -> Optional[GetCallAuctionPartOrderBookReq]: + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + _dict = self.model_dump( + by_alias=True, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict( + cls, + obj: Optional[Dict[str, + Any]]) -> Optional[GetCallAuctionPartOrderBookReq]: + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "size": obj.get("size") + }) + return _obj + + +class GetCallAuctionPartOrderBookReqBuilder: + + def __init__(self): + self.obj = {} + + def set_symbol(self, value: str) -> GetCallAuctionPartOrderBookReqBuilder: + """ + symbol + """ + self.obj['symbol'] = value + return self + + def set_size(self, value: str) -> GetCallAuctionPartOrderBookReqBuilder: + """ + Get the depth layer, optional value: 20, 100 + """ + self.obj['size'] = value + return self + + def build(self) -> GetCallAuctionPartOrderBookReq: + return GetCallAuctionPartOrderBookReq(**self.obj) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_call_auction_part_order_book_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_call_auction_part_order_book_resp.py new file mode 100644 index 00000000..c00bf6a8 --- /dev/null +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_call_auction_part_order_book_resp.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +# Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +from __future__ import annotations +import pprint +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from kucoin_universal_sdk.internal.interfaces.response import Response +from kucoin_universal_sdk.model.common import RestResponse + + +class GetCallAuctionPartOrderBookResp(BaseModel, Response): + """ + GetCallAuctionPartOrderBookResp + + Attributes: + time (int): Timestamp (milliseconds) + sequence (str): Sequence number + bids (list[list[str]]): bids, from high to low + asks (list[list[str]]): asks, from low to high + """ + + common_response: Optional[RestResponse] = Field( + default=None, description="Common response") + time: Optional[int] = Field(default=None, + description="Timestamp (milliseconds)") + sequence: Optional[str] = Field(default=None, + description="Sequence number") + bids: Optional[List[List[str]]] = Field( + default=None, description="bids, from high to low") + asks: Optional[List[List[str]]] = Field( + default=None, description="asks, from low to high") + + __properties: ClassVar[List[str]] = ["time", "sequence", "bids", "asks"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=False, + protected_namespaces=(), + ) + + def to_str(self) -> str: + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_none=True) + + @classmethod + def from_json(cls, + json_str: str) -> Optional[GetCallAuctionPartOrderBookResp]: + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + _dict = self.model_dump( + by_alias=True, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict( + cls, obj: Optional[Dict[str, Any]] + ) -> Optional[GetCallAuctionPartOrderBookResp]: + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "time": obj.get("time"), + "sequence": obj.get("sequence"), + "bids": obj.get("bids"), + "asks": obj.get("asks") + }) + return _obj + + def set_common_response(self, response: RestResponse): + self.common_response = response diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_client_ip_address_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_client_ip_address_resp.py new file mode 100644 index 00000000..a25de787 --- /dev/null +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_client_ip_address_resp.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +# Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +from __future__ import annotations +import pprint +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from kucoin_universal_sdk.internal.interfaces.response import Response +from kucoin_universal_sdk.model.common import RestResponse + + +class GetClientIpAddressResp(BaseModel, Response): + """ + GetClientIpAddressResp + + Attributes: + data (str): + """ + + common_response: Optional[RestResponse] = Field( + default=None, description="Common response") + data: Optional[str] = None + + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=False, + protected_namespaces=(), + ) + + def to_str(self) -> str: + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[GetClientIpAddressResp]: + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + _dict = self.model_dump( + by_alias=True, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict( + cls, obj: Optional[Dict[str, + Any]]) -> Optional[GetClientIpAddressResp]: + if obj is None: + return None + + # original response + obj = {'data': obj} + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"data": obj.get("data")}) + return _obj + + def set_common_response(self, response: RestResponse): + self.common_response = response diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_currency_chains.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_currency_chains.py index e4c0364a..d703c9ba 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_currency_chains.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_currency_chains.py @@ -15,25 +15,25 @@ class GetCurrencyChains(BaseModel): GetCurrencyChains Attributes: - chain_name (str): chain name of currency + chain_name (str): Chain name of currency withdrawal_min_size (str): Minimum withdrawal amount deposit_min_size (str): Minimum deposit amount - withdraw_fee_rate (str): withdraw fee rate + withdraw_fee_rate (str): Withdraw fee rate withdrawal_min_fee (str): Minimum fees charged for withdrawal - is_withdraw_enabled (bool): Support withdrawal or not - is_deposit_enabled (bool): Support deposit or not + is_withdraw_enabled (bool): Withdrawal support or not + is_deposit_enabled (bool): Deposit support or not confirms (int): Number of block confirmations pre_confirms (int): The number of blocks (confirmations) for advance on-chain verification contract_address (str): Contract address withdraw_precision (int): Withdrawal precision bit, indicating the maximum supported length after the decimal point of the withdrawal amount max_withdraw (float): Maximum amount of single withdrawal max_deposit (str): Maximum amount of single deposit (only applicable to Lightning Network) - need_tag (bool): whether memo/tag is needed - chain_id (str): chain id of currency + need_tag (bool): Need for memo/tag or not + chain_id (str): Chain id of currency """ chain_name: Optional[str] = Field(default=None, - description="chain name of currency", + description="Chain name of currency", alias="chainName") withdrawal_min_size: Optional[str] = Field( default=None, @@ -44,7 +44,7 @@ class GetCurrencyChains(BaseModel): description="Minimum deposit amount", alias="depositMinSize") withdraw_fee_rate: Optional[str] = Field(default=None, - description="withdraw fee rate", + description="Withdraw fee rate", alias="withdrawFeeRate") withdrawal_min_fee: Optional[str] = Field( default=None, @@ -52,11 +52,11 @@ class GetCurrencyChains(BaseModel): alias="withdrawalMinFee") is_withdraw_enabled: Optional[bool] = Field( default=None, - description="Support withdrawal or not", + description="Withdrawal support or not", alias="isWithdrawEnabled") is_deposit_enabled: Optional[bool] = Field( default=None, - description="Support deposit or not", + description="Deposit support or not", alias="isDepositEnabled") confirms: Optional[int] = Field( default=None, description="Number of block confirmations") @@ -83,10 +83,10 @@ class GetCurrencyChains(BaseModel): "Maximum amount of single deposit (only applicable to Lightning Network)", alias="maxDeposit") need_tag: Optional[bool] = Field(default=None, - description="whether memo/tag is needed", + description="Need for memo/tag or not", alias="needTag") chain_id: Optional[str] = Field(default=None, - description="chain id of currency", + description="Chain id of currency", alias="chainId") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_currency_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_currency_req.py index 04ec0a9d..95a150f1 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_currency_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_currency_req.py @@ -16,7 +16,7 @@ class GetCurrencyReq(BaseModel): Attributes: currency (str): Path parameter, Currency - chain (str): Support for querying the chain of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20. This only apply for multi-chain currency, and there is no need for single chain currency. + chain (str): Support for querying the chain of currency, e.g. the available values for USDT are OMNI, ERC20, TRC20. This only applies to multi-chain currencies; no need for single-chain currencies. """ currency: Optional[str] = Field(default=None, @@ -25,7 +25,7 @@ class GetCurrencyReq(BaseModel): chain: Optional[str] = Field( default=None, description= - "Support for querying the chain of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20. This only apply for multi-chain currency, and there is no need for single chain currency." + "Support for querying the chain of currency, e.g. the available values for USDT are OMNI, ERC20, TRC20. This only applies to multi-chain currencies; no need for single-chain currencies." ) __properties: ClassVar[List[str]] = ["currency", "chain"] @@ -83,7 +83,7 @@ def set_currency(self, value: str) -> GetCurrencyReqBuilder: def set_chain(self, value: str) -> GetCurrencyReqBuilder: """ - Support for querying the chain of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20. This only apply for multi-chain currency, and there is no need for single chain currency. + Support for querying the chain of currency, e.g. the available values for USDT are OMNI, ERC20, TRC20. This only applies to multi-chain currencies; no need for single-chain currencies. """ self.obj['chain'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_currency_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_currency_resp.py index 26e80e97..095c6baf 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_currency_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_currency_resp.py @@ -19,14 +19,14 @@ class GetCurrencyResp(BaseModel, Response): Attributes: currency (str): A unique currency code that will never change - name (str): Currency name, will change after renaming - full_name (str): Full name of a currency, will change after renaming + name (str): Currency name; will change after renaming + full_name (str): Full currency name; will change after renaming precision (int): Currency precision confirms (int): Number of block confirmations contract_address (str): Contract address - is_margin_enabled (bool): Support margin or not - is_debit_enabled (bool): Support debit or not - chains (list[GetCurrencyChains]): chain list + is_margin_enabled (bool): Margin support or not + is_debit_enabled (bool): Debit support or not + chains (list[GetCurrencyChains]): Chain list """ common_response: Optional[RestResponse] = Field( @@ -35,10 +35,10 @@ class GetCurrencyResp(BaseModel, Response): default=None, description="A unique currency code that will never change") name: Optional[str] = Field( - default=None, description="Currency name, will change after renaming") + default=None, description="Currency name; will change after renaming") full_name: Optional[str] = Field( default=None, - description="Full name of a currency, will change after renaming", + description="Full currency name; will change after renaming", alias="fullName") precision: Optional[int] = Field(default=None, description="Currency precision") @@ -49,14 +49,14 @@ class GetCurrencyResp(BaseModel, Response): alias="contractAddress") is_margin_enabled: Optional[bool] = Field( default=None, - description="Support margin or not", + description="Margin support or not", alias="isMarginEnabled") is_debit_enabled: Optional[bool] = Field( default=None, - description="Support debit or not", + description="Debit support or not", alias="isDebitEnabled") chains: Optional[List[GetCurrencyChains]] = Field(default=None, - description="chain list") + description="Chain list") __properties: ClassVar[List[str]] = [ "currency", "name", "fullName", "precision", "confirms", diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_fiat_price_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_fiat_price_req.py index 5c0670d6..f4a18166 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_fiat_price_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_fiat_price_req.py @@ -15,14 +15,14 @@ class GetFiatPriceReq(BaseModel): GetFiatPriceReq Attributes: - base (str): Ticker symbol of a base currency,eg.USD,EUR. Default is USD + base (str): Ticker symbol of a base currency, e.g. USD, EUR. Default is USD currencies (str): Comma-separated cryptocurrencies to be converted into fiat, e.g.: BTC,ETH, etc. Default to return the fiat price of all currencies. """ base: Optional[str] = Field( default='USD', description= - "Ticker symbol of a base currency,eg.USD,EUR. Default is USD") + "Ticker symbol of a base currency, e.g. USD, EUR. Default is USD") currencies: Optional[str] = Field( default=None, description= @@ -79,7 +79,7 @@ def __init__(self): def set_base(self, value: str) -> GetFiatPriceReqBuilder: """ - Ticker symbol of a base currency,eg.USD,EUR. Default is USD + Ticker symbol of a base currency, e.g. USD, EUR. Default is USD """ self.obj['base'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_private_token_instance_servers.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_private_token_instance_servers.py index cf3c34f6..8de8d040 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_private_token_instance_servers.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_private_token_instance_servers.py @@ -16,24 +16,24 @@ class GetPrivateTokenInstanceServers(BaseModel): GetPrivateTokenInstanceServers Attributes: - endpoint (str): Websocket domain URL, It is recommended to use a dynamic URL as the URL may change + endpoint (str): Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. encrypt (bool): Whether to encrypt. Currently only supports wss, not ws protocol (ProtocolEnum): Network Protocol - ping_interval (int): Recommended ping interval(millisecond) - ping_timeout (int): Heartbeat timeout(millisecond) + ping_interval (int): Recommended ping interval (milliseconds) + ping_timeout (int): Heartbeat timeout (milliseconds) """ class ProtocolEnum(Enum): """ Attributes: - WEBSOCKET: websocket + WEBSOCKET: Websocket """ WEBSOCKET = 'websocket' endpoint: Optional[str] = Field( default=None, description= - "Websocket domain URL, It is recommended to use a dynamic URL as the URL may change" + "Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change." ) encrypt: Optional[bool] = Field( default=None, @@ -42,11 +42,11 @@ class ProtocolEnum(Enum): description="Network Protocol") ping_interval: Optional[int] = Field( default=None, - description="Recommended ping interval(millisecond)", + description="Recommended ping interval (milliseconds)", alias="pingInterval") ping_timeout: Optional[int] = Field( default=None, - description="Heartbeat timeout(millisecond)", + description="Heartbeat timeout (milliseconds)", alias="pingTimeout") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_private_token_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_private_token_resp.py index 6527108f..ee128392 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_private_token_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_private_token_resp.py @@ -18,7 +18,7 @@ class GetPrivateTokenResp(BaseModel, Response): GetPrivateTokenResp Attributes: - token (str): The token required to establish a websocket connection + token (str): The token required to establish a Websocket connection instance_servers (list[GetPrivateTokenInstanceServers]): """ @@ -26,7 +26,7 @@ class GetPrivateTokenResp(BaseModel, Response): default=None, description="Common response") token: Optional[str] = Field( default=None, - description="The token required to establish a websocket connection") + description="The token required to establish a Websocket connection") instance_servers: Optional[List[GetPrivateTokenInstanceServers]] = Field( default=None, alias="instanceServers") diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_public_token_instance_servers.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_public_token_instance_servers.py index d3bb94a1..55dfacab 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_public_token_instance_servers.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_public_token_instance_servers.py @@ -16,24 +16,24 @@ class GetPublicTokenInstanceServers(BaseModel): GetPublicTokenInstanceServers Attributes: - endpoint (str): Websocket domain URL, It is recommended to use a dynamic URL as the URL may change + endpoint (str): Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change. encrypt (bool): Whether to encrypt. Currently only supports wss, not ws protocol (ProtocolEnum): Network Protocol - ping_interval (int): Recommended ping interval(millisecond) - ping_timeout (int): Heartbeat timeout(millisecond) + ping_interval (int): Recommended ping interval (milliseconds) + ping_timeout (int): Heartbeat timeout (milliseconds) """ class ProtocolEnum(Enum): """ Attributes: - WEBSOCKET: websocket + WEBSOCKET: Websocket """ WEBSOCKET = 'websocket' endpoint: Optional[str] = Field( default=None, description= - "Websocket domain URL, It is recommended to use a dynamic URL as the URL may change" + "Websocket domain URL. It is recommended to use a dynamic URL, as the URL may change." ) encrypt: Optional[bool] = Field( default=None, @@ -42,11 +42,11 @@ class ProtocolEnum(Enum): description="Network Protocol") ping_interval: Optional[int] = Field( default=None, - description="Recommended ping interval(millisecond)", + description="Recommended ping interval (milliseconds)", alias="pingInterval") ping_timeout: Optional[int] = Field( default=None, - description="Heartbeat timeout(millisecond)", + description="Heartbeat timeout (milliseconds)", alias="pingTimeout") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_public_token_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_public_token_resp.py index 251efcde..c4600921 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_public_token_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_public_token_resp.py @@ -18,7 +18,7 @@ class GetPublicTokenResp(BaseModel, Response): GetPublicTokenResp Attributes: - token (str): The token required to establish a websocket connection + token (str): The token required to establish a Websocket connection instance_servers (list[GetPublicTokenInstanceServers]): """ @@ -26,7 +26,7 @@ class GetPublicTokenResp(BaseModel, Response): default=None, description="Common response") token: Optional[str] = Field( default=None, - description="The token required to establish a websocket connection") + description="The token required to establish a Websocket connection") instance_servers: Optional[List[GetPublicTokenInstanceServers]] = Field( default=None, alias="instanceServers") diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_server_time_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_server_time_resp.py index a5118cce..a02b65bc 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_server_time_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_server_time_resp.py @@ -17,13 +17,13 @@ class GetServerTimeResp(BaseModel, Response): GetServerTimeResp Attributes: - data (int): ServerTime(millisecond) + data (int): ServerTime (milliseconds) """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") data: Optional[int] = Field(default=None, - description="ServerTime(millisecond)") + description="ServerTime (milliseconds)") __properties: ClassVar[List[str]] = ["data"] diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_service_status_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_service_status_resp.py index aefbee99..6af1f874 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_service_status_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_service_status_resp.py @@ -18,7 +18,7 @@ class GetServiceStatusResp(BaseModel, Response): GetServiceStatusResp Attributes: - status (StatusEnum): Status of service: open:normal transaction, close:Stop Trading/Maintenance, cancelonly:can only cancel the order but not place order + status (StatusEnum): Status of service: open: normal transaction; close: Stop Trading/Maintenance; cancelonly: can only cancel the order but not place order msg (str): Remark for operation """ @@ -38,7 +38,7 @@ class StatusEnum(Enum): status: Optional[StatusEnum] = Field( default=None, description= - "Status of service: open:normal transaction, close:Stop Trading/Maintenance, cancelonly:can only cancel the order but not place order" + "Status of service: open: normal transaction; close: Stop Trading/Maintenance; cancelonly: can only cancel the order but not place order" ) msg: Optional[str] = Field(default=None, description="Remark for operation") diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_symbol_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_symbol_resp.py index 7dbaeb4a..7be397bc 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_symbol_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/market/model_get_symbol_resp.py @@ -32,13 +32,20 @@ class GetSymbolResp(BaseModel, Response): quote_increment (str): Quote increment: The funds for a market order must be a positive integer multiple of this increment. The funds refer to the quote currency amount. For example, for the ETH-USDT trading pair, if the quoteIncrement is 0.000001, the amount of USDT for the order can be 3000.000001 but not 3000.0000001. price_increment (str): Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001. price_limit_rate (str): Threshold for price portection - min_funds (str): the minimum trading amounts + min_funds (str): The minimum trading amounts is_margin_enabled (bool): Available for margin or not. enable_trading (bool): Available for transaction or not. fee_category (FeeCategoryEnum): [Fee Type](https://www.kucoin.com/vip/privilege) maker_fee_coefficient (str): The maker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee taker_fee_coefficient (str): The taker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee - st (bool): + st (bool): Whether it is a [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol + callauction_is_enabled (bool): The [call auction](https://www.kucoin.com/support/40999744334105) status returns true/false + callauction_price_floor (str): The lowest price declared in the call auction + callauction_price_ceiling (str): The highest bid price in the call auction + callauction_first_stage_start_time (int): The first phase of the call auction starts at (Allow add orders, allow cancel orders) + callauction_second_stage_start_time (int): The second phase of the call auction starts at (Allow add orders, don't allow cancel orders) + callauction_third_stage_start_time (int): The third phase of the call auction starts at (Don't allow add orders, don't allow cancel orders) + trading_start_time (int): Official opening time (end time of the third phase of call auction) """ class FeeCategoryEnum(Enum): @@ -110,7 +117,7 @@ class FeeCategoryEnum(Enum): description="Threshold for price portection", alias="priceLimitRate") min_funds: Optional[str] = Field(default=None, - description="the minimum trading amounts", + description="The minimum trading amounts", alias="minFunds") is_margin_enabled: Optional[bool] = Field( default=None, @@ -134,14 +141,55 @@ class FeeCategoryEnum(Enum): description= "The taker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee", alias="takerFeeCoefficient") - st: Optional[bool] = None + st: Optional[bool] = Field( + default=None, + description= + "Whether it is a [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol" + ) + callauction_is_enabled: Optional[bool] = Field( + default=None, + description= + "The [call auction](https://www.kucoin.com/support/40999744334105) status returns true/false", + alias="callauctionIsEnabled") + callauction_price_floor: Optional[str] = Field( + default=None, + description="The lowest price declared in the call auction", + alias="callauctionPriceFloor") + callauction_price_ceiling: Optional[str] = Field( + default=None, + description="The highest bid price in the call auction ", + alias="callauctionPriceCeiling") + callauction_first_stage_start_time: Optional[int] = Field( + default=None, + description= + "The first phase of the call auction starts at (Allow add orders, allow cancel orders)", + alias="callauctionFirstStageStartTime") + callauction_second_stage_start_time: Optional[int] = Field( + default=None, + description= + "The second phase of the call auction starts at (Allow add orders, don't allow cancel orders)", + alias="callauctionSecondStageStartTime") + callauction_third_stage_start_time: Optional[int] = Field( + default=None, + description= + "The third phase of the call auction starts at (Don't allow add orders, don't allow cancel orders)", + alias="callauctionThirdStageStartTime") + trading_start_time: Optional[int] = Field( + default=None, + description= + "Official opening time (end time of the third phase of call auction)", + alias="tradingStartTime") __properties: ClassVar[List[str]] = [ "symbol", "name", "baseCurrency", "quoteCurrency", "feeCurrency", "market", "baseMinSize", "quoteMinSize", "baseMaxSize", "quoteMaxSize", "baseIncrement", "quoteIncrement", "priceIncrement", "priceLimitRate", "minFunds", "isMarginEnabled", "enableTrading", "feeCategory", - "makerFeeCoefficient", "takerFeeCoefficient", "st" + "makerFeeCoefficient", "takerFeeCoefficient", "st", + "callauctionIsEnabled", "callauctionPriceFloor", + "callauctionPriceCeiling", "callauctionFirstStageStartTime", + "callauctionSecondStageStartTime", "callauctionThirdStageStartTime", + "tradingStartTime" ] model_config = ConfigDict( @@ -218,7 +266,21 @@ def from_dict(cls, obj: Optional[Dict[str, "takerFeeCoefficient": obj.get("takerFeeCoefficient"), "st": - obj.get("st") + obj.get("st"), + "callauctionIsEnabled": + obj.get("callauctionIsEnabled"), + "callauctionPriceFloor": + obj.get("callauctionPriceFloor"), + "callauctionPriceCeiling": + obj.get("callauctionPriceCeiling"), + "callauctionFirstStageStartTime": + obj.get("callauctionFirstStageStartTime"), + "callauctionSecondStageStartTime": + obj.get("callauctionSecondStageStartTime"), + "callauctionThirdStageStartTime": + obj.get("callauctionThirdStageStartTime"), + "tradingStartTime": + obj.get("tradingStartTime") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/__init__.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/__init__.py index c02c0547..c4616045 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/__init__.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/__init__.py @@ -103,6 +103,10 @@ from .model_get_oco_order_list_req import GetOcoOrderListReq from .model_get_oco_order_list_req import GetOcoOrderListReqBuilder from .model_get_oco_order_list_resp import GetOcoOrderListResp +from .model_get_open_orders_by_page_items import GetOpenOrdersByPageItems +from .model_get_open_orders_by_page_req import GetOpenOrdersByPageReq +from .model_get_open_orders_by_page_req import GetOpenOrdersByPageReqBuilder +from .model_get_open_orders_by_page_resp import GetOpenOrdersByPageResp from .model_get_open_orders_data import GetOpenOrdersData from .model_get_open_orders_req import GetOpenOrdersReq from .model_get_open_orders_req import GetOpenOrdersReqBuilder @@ -124,12 +128,8 @@ from .model_get_orders_list_old_req import GetOrdersListOldReqBuilder from .model_get_orders_list_old_resp import GetOrdersListOldResp from .model_get_recent_orders_list_old_data import GetRecentOrdersListOldData -from .model_get_recent_orders_list_old_req import GetRecentOrdersListOldReq -from .model_get_recent_orders_list_old_req import GetRecentOrdersListOldReqBuilder from .model_get_recent_orders_list_old_resp import GetRecentOrdersListOldResp from .model_get_recent_trade_history_old_data import GetRecentTradeHistoryOldData -from .model_get_recent_trade_history_old_req import GetRecentTradeHistoryOldReq -from .model_get_recent_trade_history_old_req import GetRecentTradeHistoryOldReqBuilder from .model_get_recent_trade_history_old_resp import GetRecentTradeHistoryOldResp from .model_get_stop_order_by_client_oid_data import GetStopOrderByClientOidData from .model_get_stop_order_by_client_oid_req import GetStopOrderByClientOidReq diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/api_order.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/api_order.py index 96d56796..2087fc28 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/api_order.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/api_order.py @@ -65,6 +65,8 @@ from .model_get_oco_order_detail_by_order_id_resp import GetOcoOrderDetailByOrderIdResp from .model_get_oco_order_list_req import GetOcoOrderListReq from .model_get_oco_order_list_resp import GetOcoOrderListResp +from .model_get_open_orders_by_page_req import GetOpenOrdersByPageReq +from .model_get_open_orders_by_page_resp import GetOpenOrdersByPageResp from .model_get_open_orders_req import GetOpenOrdersReq from .model_get_open_orders_resp import GetOpenOrdersResp from .model_get_order_by_client_oid_old_req import GetOrderByClientOidOldReq @@ -77,9 +79,7 @@ from .model_get_order_by_order_id_resp import GetOrderByOrderIdResp from .model_get_orders_list_old_req import GetOrdersListOldReq from .model_get_orders_list_old_resp import GetOrdersListOldResp -from .model_get_recent_orders_list_old_req import GetRecentOrdersListOldReq from .model_get_recent_orders_list_old_resp import GetRecentOrdersListOldResp -from .model_get_recent_trade_history_old_req import GetRecentTradeHistoryOldReq from .model_get_recent_trade_history_old_resp import GetRecentTradeHistoryOldResp from .model_get_stop_order_by_client_oid_req import GetStopOrderByClientOidReq from .model_get_stop_order_by_client_oid_resp import GetStopOrderByClientOidResp @@ -107,15 +107,15 @@ def add_order(self, req: AddOrderReq, **kwargs: Any) -> AddOrderResp: summary: Add Order description: Place order to the Spot 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. documentation: https://www.kucoin.com/docs-new/api-3470188 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -124,17 +124,17 @@ def add_order_sync(self, req: AddOrderSyncReq, **kwargs: Any) -> AddOrderSyncResp: """ summary: Add Order Sync - description: Place order to the spot trading system The difference between this interface and \"Add order\" is that this interface will synchronously return the order information after the order matching is completed. For higher latency requirements, please select the \"Add order\" interface. If there is a requirement for returning data integrity, please select this interface + description: Place order in the spot trading system. The difference between this interface and \"Add order\" is that this interface will synchronously return the order information after the order matching is completed. For higher latency requirements, please select the \"Add order\" interface. If there is a requirement for returning data integrity, please select this interface. documentation: https://www.kucoin.com/docs-new/api-3470170 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -145,15 +145,15 @@ def add_order_test(self, req: AddOrderTestReq, summary: Add Order Test description: Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. documentation: https://www.kucoin.com/docs-new/api-3470187 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -162,17 +162,17 @@ def batch_add_orders(self, req: BatchAddOrdersReq, **kwargs: Any) -> BatchAddOrdersResp: """ summary: Batch Add Orders - description: This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5orders can be placed simultaneously. The order types must be limit orders of the same trading pair + description: This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5 orders can be placed simultaneously. The order types must be limit orders of the same trading pair documentation: https://www.kucoin.com/docs-new/api-3470168 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -181,17 +181,17 @@ def batch_add_orders_sync(self, req: BatchAddOrdersSyncReq, **kwargs: Any) -> BatchAddOrdersSyncResp: """ summary: Batch Add Orders Sync - description: This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5orders can be placed simultaneously. The order types must be limit orders of the same trading pair + description: This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5 orders can be placed simultaneously. The order types must be limit orders of the same trading pair documentation: https://www.kucoin.com/docs-new/api-3470169 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -200,17 +200,17 @@ def cancel_order_by_order_id(self, req: CancelOrderByOrderIdReq, **kwargs: Any) -> CancelOrderByOrderIdResp: """ summary: Cancel Order By OrderId - description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. documentation: https://www.kucoin.com/docs-new/api-3470174 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -222,15 +222,15 @@ def cancel_order_by_order_id_sync( summary: Cancel Order By OrderId Sync description: This endpoint can be used to cancel a spot order by orderId. documentation: https://www.kucoin.com/docs-new/api-3470185 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -242,15 +242,15 @@ def cancel_order_by_client_oid( summary: Cancel Order By ClientOid description: This endpoint can be used to cancel a spot order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. documentation: https://www.kucoin.com/docs-new/api-3470184 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -262,15 +262,15 @@ def cancel_order_by_client_oid_sync( summary: Cancel Order By ClientOid Sync description: This endpoint can be used to cancel a spot order by orderId. documentation: https://www.kucoin.com/docs-new/api-3470186 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -281,15 +281,15 @@ def cancel_partial_order(self, req: CancelPartialOrderReq, summary: Cancel Partial Order description: This interface can cancel the specified quantity of the order according to the orderId. The order execution order is: price first, time first, this interface will not change the queue order documentation: https://www.kucoin.com/docs-new/api-3470183 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -301,15 +301,15 @@ def cancel_all_orders_by_symbol( summary: Cancel All Orders By Symbol description: This endpoint can cancel all spot orders for specific symbol. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. documentation: https://www.kucoin.com/docs-new/api-3470175 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -319,15 +319,15 @@ def cancel_all_orders(self, **kwargs: Any) -> CancelAllOrdersResp: summary: Cancel All Orders description: This endpoint can cancel all spot orders for all symbol. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. documentation: https://www.kucoin.com/docs-new/api-3470176 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 30 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 30 | + +-----------------------+---------+ """ pass @@ -336,17 +336,17 @@ def modify_order(self, req: ModifyOrderReq, **kwargs: Any) -> ModifyOrderResp: """ summary: Modify Order - description: This interface can modify the price and quantity of the order according to orderId or clientOid. The implementation of this interface is: cancel the order and place a new order on the same trading pair, and return the modification result to the client synchronously When the quantity of the new order updated by the user is less than the filled quantity of this order, the order will be considered as completed, and the order will be cancelled, and no new order will be placed + description: This interface can modify the price and quantity of the order according to orderId or clientOid. The implementation of this interface is: Cancel the order and place a new order on the same trading pair, and return the modification result to the client synchronously. When the quantity of the new order updated by the user is less than the filled quantity of this order, the order will be considered as completed, and the order will be canceled, and no new order will be placed. documentation: https://www.kucoin.com/docs-new/api-3470171 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -357,15 +357,15 @@ def get_order_by_order_id(self, req: GetOrderByOrderIdReq, summary: Get Order By OrderId description: This endpoint can be used to obtain information for a single Spot order using the order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. documentation: https://www.kucoin.com/docs-new/api-3470181 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -376,15 +376,15 @@ def get_order_by_client_oid(self, req: GetOrderByClientOidReq, summary: Get Order By ClientOid description: This endpoint can be used to obtain information for a single Spot order using the client order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. documentation: https://www.kucoin.com/docs-new/api-3470182 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -395,15 +395,15 @@ def get_symbols_with_open_order( summary: Get Symbols With Open Order description: This interface can query all spot symbol that has active orders documentation: https://www.kucoin.com/docs-new/api-3470177 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -414,15 +414,34 @@ def get_open_orders(self, req: GetOpenOrdersReq, summary: Get Open Orders description: This interface is to obtain all Spot active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. documentation: https://www.kucoin.com/docs-new/api-3470178 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ + """ + pass + + @abstractmethod + def get_open_orders_by_page(self, req: GetOpenOrdersByPageReq, + **kwargs: Any) -> GetOpenOrdersByPageResp: + """ + summary: Get Open Orders By Page + description: This interface is to obtain Spot active order (uncompleted order) lists by page. The returned data is sorted in descending order according to the create time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. + documentation: https://www.kucoin.com/docs-new/api-3471591 + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -433,15 +452,15 @@ def get_closed_orders(self, req: GetClosedOrdersReq, summary: Get Closed Orders description: This interface is to obtain all Spot closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status. documentation: https://www.kucoin.com/docs-new/api-3470179 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -452,15 +471,15 @@ def get_trade_history(self, req: GetTradeHistoryReq, summary: Get Trade History description: This endpoint can be used to obtain a list of the latest Spot transaction details. The returned data is sorted in descending order according to the latest update time of the order. documentation: https://www.kucoin.com/docs-new/api-3470180 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -468,17 +487,17 @@ def get_trade_history(self, req: GetTradeHistoryReq, def get_dcp(self, **kwargs: Any) -> GetDcpResp: """ summary: Get DCP - description: Get Disconnection Protect(Deadman Swich)Through this interface, you can query the settings of automatic order cancellation + description: Get Disconnection Protect (Deadman Switch). Through this interface, you can query the settings of automatic order cancellation. documentation: https://www.kucoin.com/docs-new/api-3470172 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -486,17 +505,17 @@ def get_dcp(self, **kwargs: Any) -> GetDcpResp: def set_dcp(self, req: SetDcpReq, **kwargs: Any) -> SetDcpResp: """ summary: Set DCP - description: Set Disconnection Protect(Deadman Swich)Through this interface, Call this interface to automatically cancel all orders of the set trading pair after the specified time. If this interface is not called again for renewal or cancellation before the set time, the system will help the user to cancel the order of the corresponding trading pair. Otherwise it will not. + description: Set Disconnection Protect (Deadman Switch). Through this interface, call this interface to automatically cancel all orders of the set trading pair after the specified time. If this interface is not called again for renewal or cancellation before the set time, the system will help the user to cancel the order of the corresponding trading pair. Otherwise it will not. documentation: https://www.kucoin.com/docs-new/api-3470173 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -508,15 +527,15 @@ def add_stop_order(self, req: AddStopOrderReq, summary: Add Stop Order description: Place stop order to the Spot 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. documentation: https://www.kucoin.com/docs-new/api-3470334 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 1 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 1 | + +-----------------------+---------+ """ pass @@ -529,15 +548,15 @@ def cancel_stop_order_by_client_oid( summary: Cancel Stop Order By ClientOid description: This endpoint can be used to cancel a spot stop order by clientOid. documentation: https://www.kucoin.com/docs-new/api-3470336 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 5 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+---------+ """ pass @@ -550,15 +569,15 @@ def cancel_stop_order_by_order_id( summary: Cancel Stop Order By OrderId description: This endpoint can be used to cancel a spot stop order by orderId. documentation: https://www.kucoin.com/docs-new/api-3470335 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -569,15 +588,15 @@ def batch_cancel_stop_order(self, req: BatchCancelStopOrderReq, summary: Batch Cancel Stop Orders description: This endpoint can be used to cancel a spot stop orders by batch. documentation: https://www.kucoin.com/docs-new/api-3470337 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -588,15 +607,15 @@ def get_stop_orders_list(self, req: GetStopOrdersListReq, summary: Get Stop Orders List description: This interface is to obtain all Spot active stop order lists documentation: https://www.kucoin.com/docs-new/api-3470338 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 8 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 8 | + +-----------------------+---------+ """ pass @@ -607,15 +626,15 @@ def get_stop_order_by_order_id(self, req: GetStopOrderByOrderIdReq, summary: Get Stop Order By OrderId description: This interface is to obtain Spot stop order details by orderId documentation: https://www.kucoin.com/docs-new/api-3470339 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -627,15 +646,15 @@ def get_stop_order_by_client_oid( summary: Get Stop Order By ClientOid description: This interface is to obtain Spot stop order details by orderId documentation: https://www.kucoin.com/docs-new/api-3470340 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -647,15 +666,15 @@ def add_oco_order(self, req: AddOcoOrderReq, summary: Add OCO Order description: Place OCO order to the Spot trading system documentation: https://www.kucoin.com/docs-new/api-3470353 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -666,17 +685,17 @@ def cancel_oco_order_by_order_id( **kwargs: Any) -> CancelOcoOrderByOrderIdResp: """ summary: Cancel OCO Order By OrderId - description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. documentation: https://www.kucoin.com/docs-new/api-3470354 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -689,15 +708,15 @@ def cancel_oco_order_by_client_oid( summary: Cancel OCO Order By ClientOid description: Request via this interface to cancel a stop order via the clientOid. You will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes. documentation: https://www.kucoin.com/docs-new/api-3470355 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -707,17 +726,17 @@ def batch_cancel_oco_orders(self, req: BatchCancelOcoOrdersReq, **kwargs: Any) -> BatchCancelOcoOrdersResp: """ summary: Batch Cancel OCO Order - description: This interface can batch cancel OCO orders through orderIds. You will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes. + description: This interface can batch cancel OCO orders through orderIds. You will receive canceledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes. documentation: https://www.kucoin.com/docs-new/api-3470356 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -727,17 +746,17 @@ def get_oco_order_by_order_id(self, req: GetOcoOrderByOrderIdReq, **kwargs: Any) -> GetOcoOrderByOrderIdResp: """ summary: Get OCO Order By OrderId - description: Request via this interface to get a oco order information via the order ID. + description: Request via this interface an OCO order information via the order ID. documentation: https://www.kucoin.com/docs-new/api-3470357 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -750,15 +769,15 @@ def get_oco_order_by_client_oid( summary: Get OCO Order By ClientOid description: Request via this interface to get a oco order information via the client order ID. documentation: https://www.kucoin.com/docs-new/api-3470358 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -771,15 +790,15 @@ def get_oco_order_detail_by_order_id( summary: Get OCO Order Detail By OrderId description: Request via this interface to get a oco order detail via the order ID. documentation: https://www.kucoin.com/docs-new/api-3470359 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -789,17 +808,17 @@ def get_oco_order_list(self, req: GetOcoOrderListReq, **kwargs: Any) -> GetOcoOrderListResp: """ summary: Get OCO Order List - description: Request via this endpoint to get your current OCO order list. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. + description: Request your current OCO order list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. documentation: https://www.kucoin.com/docs-new/api-3470360 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -811,15 +830,15 @@ def add_order_old(self, req: AddOrderOldReq, summary: Add Order - Old description: Place order to the Spot 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. documentation: https://www.kucoin.com/docs-new/api-3470333 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -831,15 +850,15 @@ def add_order_test_old(self, req: AddOrderTestOldReq, summary: Add Order Test - Old description: Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried. documentation: https://www.kucoin.com/docs-new/api-3470341 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -851,15 +870,15 @@ def batch_add_orders_old(self, req: BatchAddOrdersOldReq, summary: Batch Add Orders - Old description: Request via this endpoint to place 5 orders at the same time. The order type must be a limit order of the same symbol. documentation: https://www.kucoin.com/docs-new/api-3470342 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -870,17 +889,17 @@ def cancel_order_by_order_id_old( **kwargs: Any) -> CancelOrderByOrderIdOldResp: """ summary: Cancel Order By OrderId - Old - description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. + description: This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket. documentation: https://www.kucoin.com/docs-new/api-3470343 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -892,15 +911,15 @@ def cancel_order_by_client_oid_old( summary: Cancel Order By ClientOid - Old description: This endpoint can be used to cancel a spot order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket. documentation: https://www.kucoin.com/docs-new/api-3470344 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -912,15 +931,15 @@ def batch_cancel_order_old(self, req: BatchCancelOrderOldReq, summary: Batch Cancel Order - Old description: Request via this endpoint to cancel all open orders. The response is a list of ids of the canceled orders. documentation: https://www.kucoin.com/docs-new/api-3470345 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | SPOT | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 20 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | SPOT | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+---------+ """ pass @@ -930,38 +949,37 @@ def get_orders_list_old(self, req: GetOrdersListOldReq, **kwargs: Any) -> GetOrdersListOldResp: """ summary: Get Orders List - Old - description: Request via this endpoint to get your current order list. The return value is the data after Pagination, sorted in descending order according to time. + description: Request your current order list via this endpoint. The return value is the data after Pagination, sorted in descending order according to time. documentation: https://www.kucoin.com/docs-new/api-3470346 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @abstractmethod @deprecated('') def get_recent_orders_list_old( - self, req: GetRecentOrdersListOldReq, - **kwargs: Any) -> GetRecentOrdersListOldResp: + self, **kwargs: Any) -> GetRecentOrdersListOldResp: """ summary: Get Recent Orders List - Old - description: Request via this endpoint to get your current order list. The return value is the data after Pagination, sorted in descending order according to time. + description: Request your current order list via this endpoint. The return value is the data after Pagination, sorted in descending order according to time. documentation: https://www.kucoin.com/docs-new/api-3470347 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -971,17 +989,17 @@ def get_order_by_order_id_old(self, req: GetOrderByOrderIdOldReq, **kwargs: Any) -> GetOrderByOrderIdOldResp: """ summary: Get Order By OrderId - Old - description: Request via this endpoint to get a single order info by order ID. + description: Request a single order info by order ID via this endpoint. documentation: https://www.kucoin.com/docs-new/api-3470348 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 2 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 2 | + +-----------------------+---------+ """ pass @@ -992,17 +1010,17 @@ def get_order_by_client_oid_old( **kwargs: Any) -> GetOrderByClientOidOldResp: """ summary: Get Order By ClientOid - Old - description: Request via this interface to check the information of a single active order via clientOid. The system will prompt that the order does not exists if the order does not exist or has been settled. + description: Request via this interface to check the information of a single active order via clientOid. The system will send a prompt that the order does not exist if the order does not exist or has been settled. documentation: https://www.kucoin.com/docs-new/api-3470349 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 3 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 3 | + +-----------------------+---------+ """ pass @@ -1012,38 +1030,37 @@ def get_trade_history_old(self, req: GetTradeHistoryOldReq, **kwargs: Any) -> GetTradeHistoryOldResp: """ summary: Get Trade History - Old - description: Request via this endpoint to get the recent fills. The return value is the data after Pagination, sorted in descending order according to time. + description: Request recent fills via this endpoint. The return value is the data after Pagination, sorted in descending order according to time. documentation: https://www.kucoin.com/docs-new/api-3470350 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 10 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ """ pass @abstractmethod @deprecated('') def get_recent_trade_history_old( - self, req: GetRecentTradeHistoryOldReq, - **kwargs: Any) -> GetRecentTradeHistoryOldResp: + self, **kwargs: Any) -> GetRecentTradeHistoryOldResp: """ summary: Get Recent Trade History - Old - description: Request via this endpoint to get a list of 1000 fills in the last 24 hours. The return value is the data after Pagination, sorted in descending order according to time. + description: Request a list of 1000 fills in the last 24 hours via this endpoint. The return value is the data after Pagination, sorted in descending order according to time. documentation: https://www.kucoin.com/docs-new/api-3470351 - +---------------------+---------+ - | Extra API Info | Value | - +---------------------+---------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | SPOT | - | API-RATE-LIMIT | 20 | - +---------------------+---------+ + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | SPOT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+---------+ """ pass @@ -1161,6 +1178,12 @@ def get_open_orders(self, req: GetOpenOrdersReq, "/api/v1/hf/orders/active", req, GetOpenOrdersResp(), False, **kwargs) + def get_open_orders_by_page(self, req: GetOpenOrdersByPageReq, + **kwargs: Any) -> GetOpenOrdersByPageResp: + return self.transport.call("spot", False, "GET", + "/api/v1/hf/orders/active/page", req, + GetOpenOrdersByPageResp(), False, **kwargs) + def get_closed_orders(self, req: GetClosedOrdersReq, **kwargs: Any) -> GetClosedOrdersResp: return self.transport.call("spot", False, "GET", @@ -1213,7 +1236,7 @@ def get_stop_orders_list(self, req: GetStopOrdersListReq, **kwargs: Any) -> GetStopOrdersListResp: return self.transport.call("spot", False, "GET", "/api/v1/stop-order", req, - GetStopOrdersListResp(), True, **kwargs) + GetStopOrdersListResp(), False, **kwargs) def get_stop_order_by_order_id(self, req: GetStopOrderByOrderIdReq, **kwargs: Any) -> GetStopOrderByOrderIdResp: @@ -1329,10 +1352,9 @@ def get_orders_list_old(self, req: GetOrdersListOldReq, GetOrdersListOldResp(), False, **kwargs) def get_recent_orders_list_old( - self, req: GetRecentOrdersListOldReq, - **kwargs: Any) -> GetRecentOrdersListOldResp: + self, **kwargs: Any) -> GetRecentOrdersListOldResp: return self.transport.call("spot", False, "GET", - "/api/v1/limit/orders", req, + "/api/v1/limit/orders", None, GetRecentOrdersListOldResp(), False, **kwargs) @@ -1356,8 +1378,7 @@ def get_trade_history_old(self, req: GetTradeHistoryOldReq, GetTradeHistoryOldResp(), False, **kwargs) def get_recent_trade_history_old( - self, req: GetRecentTradeHistoryOldReq, - **kwargs: Any) -> GetRecentTradeHistoryOldResp: + self, **kwargs: Any) -> GetRecentTradeHistoryOldResp: return self.transport.call("spot", False, "GET", "/api/v1/limit/fills", - req, GetRecentTradeHistoryOldResp(), False, + None, GetRecentTradeHistoryOldResp(), False, **kwargs) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/api_order.template b/sdk/python/kucoin_universal_sdk/generate/spot/order/api_order.template index d4150bd4..ad512726 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/api_order.template +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/api_order.template @@ -9,7 +9,7 @@ def test_add_order_req(self): """ builder = AddOrderReqBuilder() - builder.set_client_oid(?).set_side(?).set_symbol(?).set_type(?).set_remark(?).set_stp(?).set_price(?).set_size(?).set_time_in_force(?).set_post_only(?).set_hidden(?).set_iceberg(?).set_visible_size(?).set_tags(?).set_cancel_after(?).set_funds(?) + builder.set_client_oid(?).set_side(?).set_symbol(?).set_type(?).set_remark(?).set_stp(?).set_price(?).set_size(?).set_time_in_force(?).set_post_only(?).set_hidden(?).set_iceberg(?).set_visible_size(?).set_tags(?).set_cancel_after(?).set_funds(?).set_allow_max_time_window(?).set_client_timestamp(?) req = builder.build() try: resp = self.api.add_order(req) @@ -28,7 +28,7 @@ def test_add_order_sync_req(self): """ builder = AddOrderSyncReqBuilder() - builder.set_client_oid(?).set_side(?).set_symbol(?).set_type(?).set_remark(?).set_stp(?).set_price(?).set_size(?).set_time_in_force(?).set_post_only(?).set_hidden(?).set_iceberg(?).set_visible_size(?).set_tags(?).set_cancel_after(?).set_funds(?) + builder.set_client_oid(?).set_side(?).set_symbol(?).set_type(?).set_remark(?).set_stp(?).set_price(?).set_size(?).set_time_in_force(?).set_post_only(?).set_hidden(?).set_iceberg(?).set_visible_size(?).set_tags(?).set_cancel_after(?).set_funds(?).set_allow_max_time_window(?).set_client_timestamp(?) req = builder.build() try: resp = self.api.add_order_sync(req) @@ -47,7 +47,7 @@ def test_add_order_test_req(self): """ builder = AddOrderTestReqBuilder() - builder.set_client_oid(?).set_side(?).set_symbol(?).set_type(?).set_remark(?).set_stp(?).set_price(?).set_size(?).set_time_in_force(?).set_post_only(?).set_hidden(?).set_iceberg(?).set_visible_size(?).set_tags(?).set_cancel_after(?).set_funds(?) + builder.set_client_oid(?).set_side(?).set_symbol(?).set_type(?).set_remark(?).set_stp(?).set_price(?).set_size(?).set_time_in_force(?).set_post_only(?).set_hidden(?).set_iceberg(?).set_visible_size(?).set_tags(?).set_cancel_after(?).set_funds(?).set_allow_max_time_window(?).set_client_timestamp(?) req = builder.build() try: resp = self.api.add_order_test(req) @@ -123,7 +123,7 @@ def test_cancel_order_by_order_id_sync_req(self): """ builder = CancelOrderByOrderIdSyncReqBuilder() - builder.set_order_id(?).set_symbol(?) + builder.set_symbol(?).set_order_id(?) req = builder.build() try: resp = self.api.cancel_order_by_order_id_sync(req) @@ -161,7 +161,7 @@ def test_cancel_order_by_client_oid_sync_req(self): """ builder = CancelOrderByClientOidSyncReqBuilder() - builder.set_client_oid(?).set_symbol(?) + builder.set_symbol(?).set_client_oid(?) req = builder.build() try: resp = self.api.cancel_order_by_client_oid_sync(req) @@ -318,6 +318,25 @@ def test_get_open_orders_req(self): print("error: ", e) raise e +def test_get_open_orders_by_page_req(self): + """ + get_open_orders_by_page + Get Open Orders By Page + /api/v1/hf/orders/active/page + """ + + builder = GetOpenOrdersByPageReqBuilder() + builder.set_symbol(?).set_page_num(?).set_page_size(?) + req = builder.build() + try: + resp = self.api.get_open_orders_by_page(req) + print("code: ", resp.common_response.code) + print("msg: ", resp.common_response.message) + print("data: ", resp.to_json()) + except Exception as e: + print("error: ", e) + raise e + def test_get_closed_orders_req(self): """ get_closed_orders @@ -741,7 +760,7 @@ def test_cancel_order_by_order_id_old_req(self): """ builder = CancelOrderByOrderIdOldReqBuilder() - builder.set_symbol(?).set_order_id(?) + builder.set_order_id(?) req = builder.build() try: resp = self.api.cancel_order_by_order_id_old(req) @@ -760,7 +779,7 @@ def test_cancel_order_by_client_oid_old_req(self): """ builder = CancelOrderByClientOidOldReqBuilder() - builder.set_symbol(?).set_client_oid(?) + builder.set_client_oid(?) req = builder.build() try: resp = self.api.cancel_order_by_client_oid_old(req) @@ -816,11 +835,8 @@ def test_get_recent_orders_list_old_req(self): /api/v1/limit/orders """ - builder = GetRecentOrdersListOldReqBuilder() - builder.set_current_page(?).set_page_size(?) - req = builder.build() try: - resp = self.api.get_recent_orders_list_old(req) + resp = self.api.get_recent_orders_list_old() print("code: ", resp.common_response.code) print("msg: ", resp.common_response.message) print("data: ", resp.to_json()) @@ -892,11 +908,8 @@ def test_get_recent_trade_history_old_req(self): /api/v1/limit/fills """ - builder = GetRecentTradeHistoryOldReqBuilder() - builder.set_current_page(?).set_page_size(?) - req = builder.build() try: - resp = self.api.get_recent_trade_history_old(req) + resp = self.api.get_recent_trade_history_old() print("code: ", resp.common_response.code) print("msg: ", resp.common_response.message) print("data: ", resp.to_json()) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/api_order_test.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/api_order_test.py index b88897c2..1a9027ce 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/api_order_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/api_order_test.py @@ -61,6 +61,8 @@ from .model_get_oco_order_detail_by_order_id_resp import GetOcoOrderDetailByOrderIdResp from .model_get_oco_order_list_req import GetOcoOrderListReq from .model_get_oco_order_list_resp import GetOcoOrderListResp +from .model_get_open_orders_by_page_req import GetOpenOrdersByPageReq +from .model_get_open_orders_by_page_resp import GetOpenOrdersByPageResp from .model_get_open_orders_req import GetOpenOrdersReq from .model_get_open_orders_resp import GetOpenOrdersResp from .model_get_order_by_client_oid_old_req import GetOrderByClientOidOldReq @@ -73,9 +75,7 @@ from .model_get_order_by_order_id_resp import GetOrderByOrderIdResp from .model_get_orders_list_old_req import GetOrdersListOldReq from .model_get_orders_list_old_resp import GetOrdersListOldResp -from .model_get_recent_orders_list_old_req import GetRecentOrdersListOldReq from .model_get_recent_orders_list_old_resp import GetRecentOrdersListOldResp -from .model_get_recent_trade_history_old_req import GetRecentTradeHistoryOldReq from .model_get_recent_trade_history_old_resp import GetRecentTradeHistoryOldResp from .model_get_stop_order_by_client_oid_req import GetStopOrderByClientOidReq from .model_get_stop_order_by_client_oid_resp import GetStopOrderByClientOidResp @@ -218,7 +218,7 @@ def test_cancel_order_by_order_id_sync_req_model(self): Cancel Order By OrderId Sync /api/v1/hf/orders/sync/{orderId} """ - data = "{\"orderId\": \"671128ee365ccb0007534d45\", \"symbol\": \"BTC-USDT\"}" + data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"671128ee365ccb0007534d45\"}" req = CancelOrderByOrderIdSyncReq.from_json(data) def test_cancel_order_by_order_id_sync_resp_model(self): @@ -256,7 +256,7 @@ def test_cancel_order_by_client_oid_sync_req_model(self): Cancel Order By ClientOid Sync /api/v1/hf/orders/sync/client-order/{clientOid} """ - data = "{\"clientOid\": \"5c52e11203aa677f33e493fb\", \"symbol\": \"BTC-USDT\"}" + data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e493fb\"}" req = CancelOrderByClientOidSyncReq.from_json(data) def test_cancel_order_by_client_oid_sync_resp_model(self): @@ -417,6 +417,25 @@ def test_get_open_orders_resp_model(self): common_response = RestResponse.from_json(data) resp = GetOpenOrdersResp.from_dict(common_response.data) + def test_get_open_orders_by_page_req_model(self): + """ + get_open_orders_by_page + Get Open Orders By Page + /api/v1/hf/orders/active/page + """ + data = "{\"symbol\": \"BTC-USDT\", \"pageNum\": 1, \"pageSize\": 20}" + req = GetOpenOrdersByPageReq.from_json(data) + + def test_get_open_orders_by_page_resp_model(self): + """ + get_open_orders_by_page + Get Open Orders By Page + /api/v1/hf/orders/active/page + """ + data = "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 20,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"id\": \"67c1437ea5226600071cc080\",\n \"symbol\": \"BTC-USDT\",\n \"opType\": \"DEAL\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"funds\": \"0.5\",\n \"dealSize\": \"0\",\n \"dealFunds\": \"0\",\n \"fee\": \"0\",\n \"feeCurrency\": \"USDT\",\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": \"0\",\n \"cancelAfter\": 0,\n \"channel\": \"API\",\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"remark\": \"order remarks\",\n \"tags\": null,\n \"cancelExist\": false,\n \"createdAt\": 1740718974367,\n \"lastUpdatedAt\": 1741867658590,\n \"tradeType\": \"TRADE\",\n \"inOrderBook\": true,\n \"cancelledSize\": \"0\",\n \"cancelledFunds\": \"0\",\n \"remainSize\": \"0.00001\",\n \"remainFunds\": \"0.5\",\n \"tax\": \"0\",\n \"active\": true\n }\n ]\n }\n}" + common_response = RestResponse.from_json(data) + resp = GetOpenOrdersByPageResp.from_dict(common_response.data) + def test_get_closed_orders_req_model(self): """ get_closed_orders @@ -497,7 +516,7 @@ def test_add_stop_order_req_model(self): Add Stop Order /api/v1/stop-order """ - data = "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\", \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493fb\", \"remark\": \"order remarks\"}" + data = "{\"type\": \"limit\", \"symbol\": \"BTC-USDT\", \"side\": \"buy\", \"price\": \"50000\", \"stopPrice\": \"50000\", \"size\": \"0.00001\", \"clientOid\": \"5c52e11203aa677f33e493fb\", \"remark\": \"order remarks\"}" req = AddStopOrderReq.from_json(data) def test_add_stop_order_resp_model(self): @@ -506,7 +525,7 @@ def test_add_stop_order_resp_model(self): Add Stop Order /api/v1/stop-order """ - data = "{\"code\":\"200000\",\"data\":{\"orderId\":\"670fd33bf9406e0007ab3945\",\"clientOid\":\"5c52e11203aa677f33e493fb\"}}" + data = "{\n \"code\": \"200000\",\n \"data\": {\n \"orderId\": \"670fd33bf9406e0007ab3945\"\n }\n}" common_response = RestResponse.from_json(data) resp = AddStopOrderResp.from_dict(common_response.data) @@ -573,7 +592,7 @@ def test_get_stop_orders_list_req_model(self): Get Stop Orders List /api/v1/stop-order """ - data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"670fd33bf9406e0007ab3945\", \"newPrice\": \"30000\", \"newSize\": \"0.0001\"}" + data = "{\"symbol\": \"example_string_default_value\", \"side\": \"example_string_default_value\", \"type\": \"limit\", \"tradeType\": \"example_string_default_value\", \"startAt\": 123456, \"endAt\": 123456, \"currentPage\": 1, \"orderIds\": \"example_string_default_value\", \"pageSize\": 50, \"stop\": \"example_string_default_value\"}" req = GetStopOrdersListReq.from_json(data) def test_get_stop_orders_list_resp_model(self): @@ -582,7 +601,7 @@ def test_get_stop_orders_list_resp_model(self): Get Stop Orders List /api/v1/stop-order """ - data = "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 50,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"id\": \"vs8hoo8kqjnklv4m0038lrfq\",\n \"symbol\": \"KCS-USDT\",\n \"userId\": \"60fe4956c43cbc0006562c2c\",\n \"status\": \"NEW\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"0.01000000000000000000\",\n \"size\": \"0.01000000000000000000\",\n \"funds\": null,\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"cancelAfter\": -1,\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": null,\n \"channel\": \"API\",\n \"clientOid\": \"404814a0fb4311eb9098acde48001122\",\n \"remark\": null,\n \"tags\": null,\n \"orderTime\": 1628755183702150100,\n \"domainId\": \"kucoin\",\n \"tradeSource\": \"USER\",\n \"tradeType\": \"TRADE\",\n \"feeCurrency\": \"USDT\",\n \"takerFeeRate\": \"0.00200000000000000000\",\n \"makerFeeRate\": \"0.00200000000000000000\",\n \"createdAt\": 1628755183704,\n \"stop\": \"loss\",\n \"stopTriggerTime\": null,\n \"stopPrice\": \"10.00000000000000000000\"\n }\n ]\n }\n}" + data = "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 50,\n \"totalNum\": 2,\n \"totalPage\": 1,\n \"items\": [\n {\n \"id\": \"vs93gptvr9t2fsql003l8k5p\",\n \"symbol\": \"BTC-USDT\",\n \"userId\": \"633559791e1cbc0001f319bc\",\n \"status\": \"NEW\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"50000.00000000000000000000\",\n \"size\": \"0.00001000000000000000\",\n \"funds\": null,\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"cancelAfter\": -1,\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": null,\n \"channel\": \"API\",\n \"clientOid\": \"5c52e11203aa677f222233e493fb\",\n \"remark\": \"order remarks\",\n \"tags\": null,\n \"relatedNo\": null,\n \"orderTime\": 1740626554883000024,\n \"domainId\": \"kucoin\",\n \"tradeSource\": \"USER\",\n \"tradeType\": \"TRADE\",\n \"feeCurrency\": \"USDT\",\n \"takerFeeRate\": \"0.00100000000000000000\",\n \"makerFeeRate\": \"0.00100000000000000000\",\n \"createdAt\": 1740626554884,\n \"stop\": \"loss\",\n \"stopTriggerTime\": null,\n \"stopPrice\": \"60000.00000000000000000000\",\n \"limitPrice\": null,\n \"pop\": null,\n \"activateCondition\": null\n }\n ]\n }\n}" common_response = RestResponse.from_json(data) resp = GetStopOrdersListResp.from_dict(common_response.data) @@ -839,7 +858,7 @@ def test_cancel_order_by_order_id_old_req_model(self): Cancel Order By OrderId - Old /api/v1/orders/{orderId} """ - data = "{\"symbol\": \"BTC-USDT\", \"orderId\": \"674a97dfef434f0007efc431\"}" + data = "{\"orderId\": \"674a97dfef434f0007efc431\"}" req = CancelOrderByOrderIdOldReq.from_json(data) def test_cancel_order_by_order_id_old_resp_model(self): @@ -858,7 +877,7 @@ def test_cancel_order_by_client_oid_old_req_model(self): Cancel Order By ClientOid - Old /api/v1/order/client-order/{clientOid} """ - data = "{\"symbol\": \"BTC-USDT\", \"clientOid\": \"5c52e11203aa677f33e4923fb\"}" + data = "{\"clientOid\": \"5c52e11203aa677f331e493fb\"}" req = CancelOrderByClientOidOldReq.from_json(data) def test_cancel_order_by_client_oid_old_resp_model(self): @@ -867,7 +886,7 @@ def test_cancel_order_by_client_oid_old_resp_model(self): Cancel Order By ClientOid - Old /api/v1/order/client-order/{clientOid} """ - data = "{\n \"code\": \"200000\",\n \"data\": {\n \"cancelledOrderId\": \"674a9a872033a50007e2790d\",\n \"clientOid\": \"5c52e11203aa677f33e4923fb\",\n \"cancelledOcoOrderIds\": null\n }\n}" + data = "{\n \"code\": \"200000\",\n \"data\": {\n \"cancelledOrderId\": \"67c3252a63d25e0007f91de9\",\n \"clientOid\": \"5c52e11203aa677f331e493fb\",\n \"cancelledOcoOrderIds\": null\n }\n}" common_response = RestResponse.from_json(data) resp = CancelOrderByClientOidOldResp.from_dict(common_response.data) @@ -915,8 +934,6 @@ def test_get_recent_orders_list_old_req_model(self): Get Recent Orders List - Old /api/v1/limit/orders """ - data = "{\"currentPage\": 1, \"pageSize\": 50}" - req = GetRecentOrdersListOldReq.from_json(data) def test_get_recent_orders_list_old_resp_model(self): """ @@ -991,8 +1008,6 @@ def test_get_recent_trade_history_old_req_model(self): Get Recent Trade History - Old /api/v1/limit/fills """ - data = "{\"currentPage\": 1, \"pageSize\": 50}" - req = GetRecentTradeHistoryOldReq.from_json(data) def test_get_recent_trade_history_old_resp_model(self): """ diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_req.py index 85a6d2b1..924eb282 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_req.py @@ -30,8 +30,10 @@ class AddOrderReq(BaseModel): iceberg (bool): Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) visible_size (str): Maximum visible quantity in iceberg orders tags (str): Order tag, length cannot exceed 20 characters (ASCII) - cancel_after (int): Cancel after n seconds,the order timing strategy is GTT - funds (str): When **type** is market, select one out of two: size or funds + cancel_after (int): Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 + funds (str): When **type** is market, select one out of two: size or funds When placing a market order, the funds field refers to the funds for the priced asset (the asset name written latter) of the trading pair. The funds must be based on the quoteIncrement of the trading pair. The quoteIncrement represents the precision of the trading pair. The funds value for an order must be a multiple of quoteIncrement and must be between quoteMinSize and quoteMaxSize. + allow_max_time_window (int): Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. + client_timestamp (int): Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. """ class SideEnum(Enum): @@ -138,18 +140,30 @@ class TimeInForceEnum(Enum): default=None, description="Order tag, length cannot exceed 20 characters (ASCII)") cancel_after: Optional[int] = Field( - default=None, - description="Cancel after n seconds,the order timing strategy is GTT", + default=-1, + description= + "Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 ", alias="cancelAfter") funds: Optional[str] = Field( default=None, description= - "When **type** is market, select one out of two: size or funds") + "When **type** is market, select one out of two: size or funds When placing a market order, the funds field refers to the funds for the priced asset (the asset name written latter) of the trading pair. The funds must be based on the quoteIncrement of the trading pair. The quoteIncrement represents the precision of the trading pair. The funds value for an order must be a multiple of quoteIncrement and must be between quoteMinSize and quoteMaxSize." + ) + allow_max_time_window: Optional[int] = Field( + default=None, + description= + "Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail.", + alias="allowMaxTimeWindow") + client_timestamp: Optional[int] = Field( + default=None, + description= + "Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified.", + alias="clientTimestamp") __properties: ClassVar[List[str]] = [ "clientOid", "side", "symbol", "type", "remark", "stp", "price", "size", "timeInForce", "postOnly", "hidden", "iceberg", "visibleSize", - "tags", "cancelAfter", "funds" + "tags", "cancelAfter", "funds", "allowMaxTimeWindow", "clientTimestamp" ] model_config = ConfigDict( @@ -214,9 +228,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[AddOrderReq]: "tags": obj.get("tags"), "cancelAfter": - obj.get("cancelAfter"), + obj.get("cancelAfter") + if obj.get("cancelAfter") is not None else -1, "funds": - obj.get("funds") + obj.get("funds"), + "allowMaxTimeWindow": + obj.get("allowMaxTimeWindow"), + "clientTimestamp": + obj.get("clientTimestamp") }) return _obj @@ -327,17 +346,31 @@ def set_tags(self, value: str) -> AddOrderReqBuilder: def set_cancel_after(self, value: int) -> AddOrderReqBuilder: """ - Cancel after n seconds,the order timing strategy is GTT + Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 """ self.obj['cancelAfter'] = value return self def set_funds(self, value: str) -> AddOrderReqBuilder: """ - When **type** is market, select one out of two: size or funds + When **type** is market, select one out of two: size or funds When placing a market order, the funds field refers to the funds for the priced asset (the asset name written latter) of the trading pair. The funds must be based on the quoteIncrement of the trading pair. The quoteIncrement represents the precision of the trading pair. The funds value for an order must be a multiple of quoteIncrement and must be between quoteMinSize and quoteMaxSize. """ self.obj['funds'] = value return self + def set_allow_max_time_window(self, value: int) -> AddOrderReqBuilder: + """ + Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. + """ + self.obj['allowMaxTimeWindow'] = value + return self + + def set_client_timestamp(self, value: int) -> AddOrderReqBuilder: + """ + Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. + """ + self.obj['clientTimestamp'] = value + return self + def build(self) -> AddOrderReq: return AddOrderReq(**self.obj) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_sync_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_sync_req.py index 0f6d28c0..58c27a42 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_sync_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_sync_req.py @@ -16,22 +16,24 @@ class AddOrderSyncReq(BaseModel): AddOrderSyncReq Attributes: - client_oid (str): Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. - side (SideEnum): specify if the order is to 'buy' or 'sell' + client_oid (str): Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + side (SideEnum): Specify if the order is to 'buy' or 'sell'. symbol (str): symbol - type (TypeEnum): specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. remark (str): Order placement remarks, length cannot exceed 20 characters (ASCII) stp (StpEnum): [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC price (str): Specify price for order When placing a limit order, the price must be based on priceIncrement for the trading pair. The price increment (priceIncrement) is the price precision for the trading pair. For example, for the BTC-USDT trading pair, the priceIncrement is 0.00001000. So the price for your orders cannot be less than 0.00001000 and must be a multiple of priceIncrement. Otherwise, the order will return an invalid priceIncrement error. - size (str): Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + size (str): Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds time_in_force (TimeInForceEnum): [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading post_only (bool): passive order labels, this is disabled when the order timing strategy is IOC or FOK hidden (bool): [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) iceberg (bool): Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) visible_size (str): Maximum visible quantity in iceberg orders tags (str): Order tag, length cannot exceed 20 characters (ASCII) - cancel_after (int): Cancel after n seconds,the order timing strategy is GTT + cancel_after (int): Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 funds (str): When **type** is market, select one out of two: size or funds + allow_max_time_window (int): The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + client_timestamp (int): Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. """ class SideEnum(Enum): @@ -81,15 +83,16 @@ class TimeInForceEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status.", + "Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status.", alias="clientOid") side: Optional[SideEnum] = Field( - default=None, description="specify if the order is to 'buy' or 'sell'") + default=None, + description="Specify if the order is to 'buy' or 'sell'.") symbol: Optional[str] = Field(default=None, description="symbol") type: Optional[TypeEnum] = Field( default=None, description= - "specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged." + "Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged." ) remark: Optional[str] = Field( default=None, @@ -108,7 +111,7 @@ class TimeInForceEnum(Enum): size: Optional[str] = Field( default=None, description= - "Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds" + "Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds" ) time_in_force: Optional[TimeInForceEnum] = Field( default=TimeInForceEnum.GTC, @@ -138,18 +141,29 @@ class TimeInForceEnum(Enum): default=None, description="Order tag, length cannot exceed 20 characters (ASCII)") cancel_after: Optional[int] = Field( - default=None, - description="Cancel after n seconds,the order timing strategy is GTT", + default=-1, + description= + "Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 ", alias="cancelAfter") funds: Optional[str] = Field( default=None, description= "When **type** is market, select one out of two: size or funds") + allow_max_time_window: Optional[int] = Field( + default=None, + description= + "The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail.", + alias="allowMaxTimeWindow") + client_timestamp: Optional[int] = Field( + default=None, + description= + "Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified.", + alias="clientTimestamp") __properties: ClassVar[List[str]] = [ "clientOid", "side", "symbol", "type", "remark", "stp", "price", "size", "timeInForce", "postOnly", "hidden", "iceberg", "visibleSize", - "tags", "cancelAfter", "funds" + "tags", "cancelAfter", "funds", "allowMaxTimeWindow", "clientTimestamp" ] model_config = ConfigDict( @@ -215,9 +229,14 @@ def from_dict(cls, obj: Optional[Dict[str, "tags": obj.get("tags"), "cancelAfter": - obj.get("cancelAfter"), + obj.get("cancelAfter") + if obj.get("cancelAfter") is not None else -1, "funds": - obj.get("funds") + obj.get("funds"), + "allowMaxTimeWindow": + obj.get("allowMaxTimeWindow"), + "clientTimestamp": + obj.get("clientTimestamp") }) return _obj @@ -229,7 +248,7 @@ def __init__(self): def set_client_oid(self, value: str) -> AddOrderSyncReqBuilder: """ - Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. + Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. """ self.obj['clientOid'] = value return self @@ -237,7 +256,7 @@ def set_client_oid(self, value: str) -> AddOrderSyncReqBuilder: def set_side(self, value: AddOrderSyncReq.SideEnum) -> AddOrderSyncReqBuilder: """ - specify if the order is to 'buy' or 'sell' + Specify if the order is to 'buy' or 'sell'. """ self.obj['side'] = value return self @@ -252,7 +271,7 @@ def set_symbol(self, value: str) -> AddOrderSyncReqBuilder: def set_type(self, value: AddOrderSyncReq.TypeEnum) -> AddOrderSyncReqBuilder: """ - specify if the order is an 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. + Specify if the order is a 'limit' order or 'market' order. The type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine. When placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels. Unlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged. """ self.obj['type'] = value return self @@ -281,7 +300,7 @@ def set_price(self, value: str) -> AddOrderSyncReqBuilder: def set_size(self, value: str) -> AddOrderSyncReqBuilder: """ - Specify quantity for order When **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + Specify quantity for order. When **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds """ self.obj['size'] = value return self @@ -332,7 +351,7 @@ def set_tags(self, value: str) -> AddOrderSyncReqBuilder: def set_cancel_after(self, value: int) -> AddOrderSyncReqBuilder: """ - Cancel after n seconds,the order timing strategy is GTT + Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 """ self.obj['cancelAfter'] = value return self @@ -344,5 +363,19 @@ def set_funds(self, value: str) -> AddOrderSyncReqBuilder: self.obj['funds'] = value return self + def set_allow_max_time_window(self, value: int) -> AddOrderSyncReqBuilder: + """ + The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + """ + self.obj['allowMaxTimeWindow'] = value + return self + + def set_client_timestamp(self, value: int) -> AddOrderSyncReqBuilder: + """ + Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + """ + self.obj['clientTimestamp'] = value + return self + def build(self) -> AddOrderSyncReq: return AddOrderSyncReq(**self.obj) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_sync_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_sync_resp.py index 10e2990e..14d4413f 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_sync_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_sync_resp.py @@ -18,14 +18,14 @@ class AddOrderSyncResp(BaseModel, Response): AddOrderSyncResp Attributes: - order_id (str): The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. - client_oid (str): The user self-defined order id. + order_id (str): The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. + client_oid (str): The user self-defined order ID. order_time (int): - origin_size (str): original order size - deal_size (str): deal size - remain_size (str): remain size + origin_size (str): Original order size + deal_size (str): Deal size + remain_size (str): Remain size canceled_size (str): Cumulative canceled size - status (StatusEnum): Order Status. open:order is active; done:order has been completed + status (StatusEnum): Order Status. open: order is active; done: order has been completed match_time (int): """ @@ -43,21 +43,21 @@ class StatusEnum(Enum): order_id: Optional[str] = Field( default=None, description= - "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order.", + "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order.", alias="orderId") client_oid: Optional[str] = Field( default=None, - description="The user self-defined order id.", + description="The user self-defined order ID.", alias="clientOid") order_time: Optional[int] = Field(default=None, alias="orderTime") origin_size: Optional[str] = Field(default=None, - description="original order size", + description="Original order size", alias="originSize") deal_size: Optional[str] = Field(default=None, - description="deal size", + description="Deal size", alias="dealSize") remain_size: Optional[str] = Field(default=None, - description="remain size", + description="Remain size", alias="remainSize") canceled_size: Optional[str] = Field( default=None, @@ -66,7 +66,7 @@ class StatusEnum(Enum): status: Optional[StatusEnum] = Field( default=None, description= - "Order Status. open:order is active; done:order has been completed") + "Order Status. open: order is active; done: order has been completed") match_time: Optional[int] = Field(default=None, alias="matchTime") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_test_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_test_req.py index c3c08570..e395d700 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_test_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_order_test_req.py @@ -30,8 +30,10 @@ class AddOrderTestReq(BaseModel): iceberg (bool): Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) visible_size (str): Maximum visible quantity in iceberg orders tags (str): Order tag, length cannot exceed 20 characters (ASCII) - cancel_after (int): Cancel after n seconds,the order timing strategy is GTT + cancel_after (int): Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 funds (str): When **type** is market, select one out of two: size or funds + allow_max_time_window (int): Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. + client_timestamp (int): Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. """ class SideEnum(Enum): @@ -138,18 +140,29 @@ class TimeInForceEnum(Enum): default=None, description="Order tag, length cannot exceed 20 characters (ASCII)") cancel_after: Optional[int] = Field( - default=None, - description="Cancel after n seconds,the order timing strategy is GTT", + default=-1, + description= + "Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 ", alias="cancelAfter") funds: Optional[str] = Field( default=None, description= "When **type** is market, select one out of two: size or funds") + allow_max_time_window: Optional[int] = Field( + default=None, + description= + "Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail.", + alias="allowMaxTimeWindow") + client_timestamp: Optional[int] = Field( + default=None, + description= + "Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified.", + alias="clientTimestamp") __properties: ClassVar[List[str]] = [ "clientOid", "side", "symbol", "type", "remark", "stp", "price", "size", "timeInForce", "postOnly", "hidden", "iceberg", "visibleSize", - "tags", "cancelAfter", "funds" + "tags", "cancelAfter", "funds", "allowMaxTimeWindow", "clientTimestamp" ] model_config = ConfigDict( @@ -215,9 +228,14 @@ def from_dict(cls, obj: Optional[Dict[str, "tags": obj.get("tags"), "cancelAfter": - obj.get("cancelAfter"), + obj.get("cancelAfter") + if obj.get("cancelAfter") is not None else -1, "funds": - obj.get("funds") + obj.get("funds"), + "allowMaxTimeWindow": + obj.get("allowMaxTimeWindow"), + "clientTimestamp": + obj.get("clientTimestamp") }) return _obj @@ -332,7 +350,7 @@ def set_tags(self, value: str) -> AddOrderTestReqBuilder: def set_cancel_after(self, value: int) -> AddOrderTestReqBuilder: """ - Cancel after n seconds,the order timing strategy is GTT + Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 """ self.obj['cancelAfter'] = value return self @@ -344,5 +362,19 @@ def set_funds(self, value: str) -> AddOrderTestReqBuilder: self.obj['funds'] = value return self + def set_allow_max_time_window(self, value: int) -> AddOrderTestReqBuilder: + """ + Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail. + """ + self.obj['allowMaxTimeWindow'] = value + return self + + def set_client_timestamp(self, value: int) -> AddOrderTestReqBuilder: + """ + Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified. + """ + self.obj['clientTimestamp'] = value + return self + def build(self) -> AddOrderTestReq: return AddOrderTestReq(**self.obj) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_stop_order_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_stop_order_req.py index 273eb262..c3a3ae51 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_stop_order_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_stop_order_req.py @@ -29,7 +29,7 @@ class AddStopOrderReq(BaseModel): hidden (bool): [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) iceberg (bool): Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) visible_size (str): When **type** is limit, this is Maximum visible quantity in iceberg orders. - cancel_after (int): Cancel after n seconds,the order timing strategy is GTT when **type** is limit. + cancel_after (int): Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 funds (str): When **type** is market, select one out of two: size or funds stop_price (str): The trigger price. trade_type (str): The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE @@ -137,9 +137,9 @@ class TimeInForceEnum(Enum): "When **type** is limit, this is Maximum visible quantity in iceberg orders.", alias="visibleSize") cancel_after: Optional[int] = Field( - default=None, + default=-1, description= - "Cancel after n seconds,the order timing strategy is GTT when **type** is limit.", + "Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 ", alias="cancelAfter") funds: Optional[str] = Field( default=None, @@ -221,7 +221,8 @@ def from_dict(cls, obj: Optional[Dict[str, "visibleSize": obj.get("visibleSize"), "cancelAfter": - obj.get("cancelAfter"), + obj.get("cancelAfter") + if obj.get("cancelAfter") is not None else -1, "funds": obj.get("funds"), "stopPrice": @@ -335,7 +336,7 @@ def set_visible_size(self, value: str) -> AddStopOrderReqBuilder: def set_cancel_after(self, value: int) -> AddStopOrderReqBuilder: """ - Cancel after n seconds,the order timing strategy is GTT when **type** is limit. + Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 """ self.obj['cancelAfter'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_stop_order_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_stop_order_resp.py index 4bcb9192..f6ead294 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_stop_order_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_add_stop_order_resp.py @@ -18,7 +18,6 @@ class AddStopOrderResp(BaseModel, Response): Attributes: order_id (str): The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. - client_oid (str): The user self-defined order id. """ common_response: Optional[RestResponse] = Field( @@ -28,12 +27,8 @@ class AddStopOrderResp(BaseModel, Response): description= "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order.", alias="orderId") - client_oid: Optional[str] = Field( - default=None, - description="The user self-defined order id.", - alias="clientOid") - __properties: ClassVar[List[str]] = ["orderId", "clientOid"] + __properties: ClassVar[List[str]] = ["orderId"] model_config = ConfigDict( populate_by_name=True, @@ -67,10 +62,7 @@ def from_dict(cls, obj: Optional[Dict[str, if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "orderId": obj.get("orderId"), - "clientOid": obj.get("clientOid") - }) + _obj = cls.model_validate({"orderId": obj.get("orderId")}) return _obj def set_common_response(self, response: RestResponse): diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_data.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_data.py index 3f7c44c7..86e91cc7 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_data.py @@ -15,25 +15,25 @@ class BatchAddOrdersData(BaseModel): BatchAddOrdersData Attributes: - order_id (str): The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. - client_oid (str): The user self-defined order id. + order_id (str): The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. + client_oid (str): The user self-defined order ID. success (bool): Add order success/failure - fail_msg (str): error message + fail_msg (str): Error message """ order_id: Optional[str] = Field( default=None, description= - "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order.", + "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order.", alias="orderId") client_oid: Optional[str] = Field( default=None, - description="The user self-defined order id.", + description="The user self-defined order ID.", alias="clientOid") success: Optional[bool] = Field(default=None, description="Add order success/failure") fail_msg: Optional[str] = Field(default=None, - description="error message", + description="Error message", alias="failMsg") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_order_list.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_order_list.py index 370eb4a0..f4fbbbe7 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_order_list.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_order_list.py @@ -16,15 +16,15 @@ class BatchAddOrdersOrderList(BaseModel): BatchAddOrdersOrderList Attributes: - client_oid (str): Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. + client_oid (str): Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. symbol (str): symbol - type (TypeEnum): Specify if the order is an 'limit' order or 'market' order. + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order. time_in_force (TimeInForceEnum): [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading - side (SideEnum): Specify if the order is to 'buy' or 'sell' + side (SideEnum): Specify if the order is to 'buy' or 'sell'. price (str): Specify price for order - size (str): Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + size (str): Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds stp (StpEnum): [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC - cancel_after (int): Cancel after n seconds,the order timing strategy is GTT + cancel_after (int): Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 post_only (bool): passive order labels, this is disabled when the order timing strategy is IOC or FOK hidden (bool): [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) iceberg (bool): Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) @@ -32,6 +32,8 @@ class BatchAddOrdersOrderList(BaseModel): tags (str): Order tag, length cannot exceed 20 characters (ASCII) remark (str): Order placement remarks, length cannot exceed 20 characters (ASCII) funds (str): When **type** is market, select one out of two: size or funds + client_timestamp (int): Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + allow_max_time_window (int): The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. """ class TypeEnum(Enum): @@ -79,26 +81,27 @@ class StpEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. ", + "Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. ", alias="clientOid") symbol: Optional[str] = Field(default=None, description="symbol") type: Optional[TypeEnum] = Field( default=None, description= - "Specify if the order is an 'limit' order or 'market' order. ") + "Specify if the order is a 'limit' order or 'market' order. ") time_in_force: Optional[TimeInForceEnum] = Field( default=TimeInForceEnum.GTC, description= "[Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading", alias="timeInForce") side: Optional[SideEnum] = Field( - default=None, description="Specify if the order is to 'buy' or 'sell'") + default=None, + description="Specify if the order is to 'buy' or 'sell'.") price: Optional[str] = Field(default=None, description="Specify price for order") size: Optional[str] = Field( default=None, description= - "Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds" + "Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds" ) stp: Optional[StpEnum] = Field( default=None, @@ -106,8 +109,9 @@ class StpEnum(Enum): "[Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC" ) cancel_after: Optional[int] = Field( - default=None, - description="Cancel after n seconds,the order timing strategy is GTT", + default=-1, + description= + "Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 ", alias="cancelAfter") post_only: Optional[bool] = Field( default=False, @@ -139,11 +143,21 @@ class StpEnum(Enum): default=None, description= "When **type** is market, select one out of two: size or funds") + client_timestamp: Optional[int] = Field( + default=None, + description= + "Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified.", + alias="clientTimestamp") + allow_max_time_window: Optional[int] = Field( + default=None, + description= + "The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail.", + alias="allowMaxTimeWindow") __properties: ClassVar[List[str]] = [ "clientOid", "symbol", "type", "timeInForce", "side", "price", "size", "stp", "cancelAfter", "postOnly", "hidden", "iceberg", "visibleSize", - "tags", "remark", "funds" + "tags", "remark", "funds", "clientTimestamp", "allowMaxTimeWindow" ] model_config = ConfigDict( @@ -199,7 +213,8 @@ def from_dict( "stp": obj.get("stp"), "cancelAfter": - obj.get("cancelAfter"), + obj.get("cancelAfter") + if obj.get("cancelAfter") is not None else -1, "postOnly": obj.get("postOnly") if obj.get("postOnly") is not None else False, "hidden": @@ -213,7 +228,11 @@ def from_dict( "remark": obj.get("remark"), "funds": - obj.get("funds") + obj.get("funds"), + "clientTimestamp": + obj.get("clientTimestamp"), + "allowMaxTimeWindow": + obj.get("allowMaxTimeWindow") }) return _obj @@ -225,7 +244,7 @@ def __init__(self): def set_client_oid(self, value: str) -> BatchAddOrdersOrderListBuilder: """ - Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. + Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. """ self.obj['clientOid'] = value return self @@ -241,7 +260,7 @@ def set_type( self, value: BatchAddOrdersOrderList.TypeEnum ) -> BatchAddOrdersOrderListBuilder: """ - Specify if the order is an 'limit' order or 'market' order. + Specify if the order is a 'limit' order or 'market' order. """ self.obj['type'] = value return self @@ -259,7 +278,7 @@ def set_side( self, value: BatchAddOrdersOrderList.SideEnum ) -> BatchAddOrdersOrderListBuilder: """ - Specify if the order is to 'buy' or 'sell' + Specify if the order is to 'buy' or 'sell'. """ self.obj['side'] = value return self @@ -273,7 +292,7 @@ def set_price(self, value: str) -> BatchAddOrdersOrderListBuilder: def set_size(self, value: str) -> BatchAddOrdersOrderListBuilder: """ - Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds """ self.obj['size'] = value return self @@ -289,7 +308,7 @@ def set_stp( def set_cancel_after(self, value: int) -> BatchAddOrdersOrderListBuilder: """ - Cancel after n seconds,the order timing strategy is GTT + Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 """ self.obj['cancelAfter'] = value return self @@ -343,5 +362,21 @@ def set_funds(self, value: str) -> BatchAddOrdersOrderListBuilder: self.obj['funds'] = value return self + def set_client_timestamp(self, + value: int) -> BatchAddOrdersOrderListBuilder: + """ + Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + """ + self.obj['clientTimestamp'] = value + return self + + def set_allow_max_time_window( + self, value: int) -> BatchAddOrdersOrderListBuilder: + """ + The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + """ + self.obj['allowMaxTimeWindow'] = value + return self + def build(self) -> BatchAddOrdersOrderList: return BatchAddOrdersOrderList(**self.obj) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_sync_data.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_sync_data.py index 65a4a7f1..107e6008 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_sync_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_sync_data.py @@ -16,17 +16,17 @@ class BatchAddOrdersSyncData(BaseModel): BatchAddOrdersSyncData Attributes: - order_id (str): The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. - client_oid (str): The user self-defined order id. + order_id (str): The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. + client_oid (str): The user self-defined order ID. order_time (int): - origin_size (str): original order size - deal_size (str): deal size - remain_size (str): remain size + origin_size (str): Original order size + deal_size (str): Deal size + remain_size (str): Remain size canceled_size (str): Cumulative canceled size - status (StatusEnum): Order Status. open:order is active; done:order has been completed + status (StatusEnum): Order Status. open: order is active; done: order has been completed match_time (int): success (bool): Add order success/failure - fail_msg (str): error message + fail_msg (str): Error message """ class StatusEnum(Enum): @@ -41,21 +41,21 @@ class StatusEnum(Enum): order_id: Optional[str] = Field( default=None, description= - "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order.", + "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order.", alias="orderId") client_oid: Optional[str] = Field( default=None, - description="The user self-defined order id.", + description="The user self-defined order ID.", alias="clientOid") order_time: Optional[int] = Field(default=None, alias="orderTime") origin_size: Optional[str] = Field(default=None, - description="original order size", + description="Original order size", alias="originSize") deal_size: Optional[str] = Field(default=None, - description="deal size", + description="Deal size", alias="dealSize") remain_size: Optional[str] = Field(default=None, - description="remain size", + description="Remain size", alias="remainSize") canceled_size: Optional[str] = Field( default=None, @@ -64,12 +64,12 @@ class StatusEnum(Enum): status: Optional[StatusEnum] = Field( default=None, description= - "Order Status. open:order is active; done:order has been completed") + "Order Status. open: order is active; done: order has been completed") match_time: Optional[int] = Field(default=None, alias="matchTime") success: Optional[bool] = Field(default=None, description="Add order success/failure") fail_msg: Optional[str] = Field(default=None, - description="error message", + description="Error message", alias="failMsg") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_sync_order_list.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_sync_order_list.py index a89b2657..03ef1234 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_sync_order_list.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_add_orders_sync_order_list.py @@ -16,15 +16,15 @@ class BatchAddOrdersSyncOrderList(BaseModel): BatchAddOrdersSyncOrderList Attributes: - client_oid (str): Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. + client_oid (str): Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. symbol (str): symbol - type (TypeEnum): Specify if the order is an 'limit' order or 'market' order. + type (TypeEnum): Specify if the order is a 'limit' order or 'market' order. time_in_force (TimeInForceEnum): [Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading - side (SideEnum): Specify if the order is to 'buy' or 'sell' + side (SideEnum): Specify if the order is to 'buy' or 'sell'. price (str): Specify price for order - size (str): Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + size (str): Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds stp (StpEnum): [Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC - cancel_after (int): Cancel after n seconds,the order timing strategy is GTT + cancel_after (int): Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 post_only (bool): passive order labels, this is disabled when the order timing strategy is IOC or FOK hidden (bool): [Hidden order](https://www.kucoin.com/docs-new/doc-338146) or not (not shown in order book) iceberg (bool): Whether or not only visible portions of orders are shown in [Iceberg orders](https://www.kucoin.com/docs-new/doc-338146) @@ -32,6 +32,8 @@ class BatchAddOrdersSyncOrderList(BaseModel): tags (str): Order tag, length cannot exceed 20 characters (ASCII) remark (str): Order placement remarks, length cannot exceed 20 characters (ASCII) funds (str): When **type** is market, select one out of two: size or funds + allow_max_time_window (int): The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + client_timestamp (int): Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. """ class TypeEnum(Enum): @@ -79,26 +81,27 @@ class StpEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. ", + "Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. ", alias="clientOid") symbol: Optional[str] = Field(default=None, description="symbol") type: Optional[TypeEnum] = Field( default=None, description= - "Specify if the order is an 'limit' order or 'market' order. ") + "Specify if the order is a 'limit' order or 'market' order. ") time_in_force: Optional[TimeInForceEnum] = Field( default=TimeInForceEnum.GTC, description= "[Time in force](https://www.kucoin.com/docs-new/doc-338146) is a special strategy used during trading", alias="timeInForce") side: Optional[SideEnum] = Field( - default=None, description="Specify if the order is to 'buy' or 'sell'") + default=None, + description="Specify if the order is to 'buy' or 'sell'.") price: Optional[str] = Field(default=None, description="Specify price for order") size: Optional[str] = Field( default=None, description= - "Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds" + "Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds" ) stp: Optional[StpEnum] = Field( default=None, @@ -106,8 +109,9 @@ class StpEnum(Enum): "[Self Trade Prevention](https://www.kucoin.com/docs-new/doc-338146) is divided into four strategies: CN, CO, CB , and DC" ) cancel_after: Optional[int] = Field( - default=None, - description="Cancel after n seconds,the order timing strategy is GTT", + default=-1, + description= + "Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 ", alias="cancelAfter") post_only: Optional[bool] = Field( default=False, @@ -139,11 +143,21 @@ class StpEnum(Enum): default=None, description= "When **type** is market, select one out of two: size or funds") + allow_max_time_window: Optional[int] = Field( + default=None, + description= + "The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail.", + alias="allowMaxTimeWindow") + client_timestamp: Optional[int] = Field( + default=None, + description= + "Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified.", + alias="clientTimestamp") __properties: ClassVar[List[str]] = [ "clientOid", "symbol", "type", "timeInForce", "side", "price", "size", "stp", "cancelAfter", "postOnly", "hidden", "iceberg", "visibleSize", - "tags", "remark", "funds" + "tags", "remark", "funds", "allowMaxTimeWindow", "clientTimestamp" ] model_config = ConfigDict( @@ -199,7 +213,8 @@ def from_dict( "stp": obj.get("stp"), "cancelAfter": - obj.get("cancelAfter"), + obj.get("cancelAfter") + if obj.get("cancelAfter") is not None else -1, "postOnly": obj.get("postOnly") if obj.get("postOnly") is not None else False, "hidden": @@ -213,7 +228,11 @@ def from_dict( "remark": obj.get("remark"), "funds": - obj.get("funds") + obj.get("funds"), + "allowMaxTimeWindow": + obj.get("allowMaxTimeWindow"), + "clientTimestamp": + obj.get("clientTimestamp") }) return _obj @@ -225,7 +244,7 @@ def __init__(self): def set_client_oid(self, value: str) -> BatchAddOrdersSyncOrderListBuilder: """ - Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. + Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. """ self.obj['clientOid'] = value return self @@ -241,7 +260,7 @@ def set_type( self, value: BatchAddOrdersSyncOrderList.TypeEnum ) -> BatchAddOrdersSyncOrderListBuilder: """ - Specify if the order is an 'limit' order or 'market' order. + Specify if the order is a 'limit' order or 'market' order. """ self.obj['type'] = value return self @@ -259,7 +278,7 @@ def set_side( self, value: BatchAddOrdersSyncOrderList.SideEnum ) -> BatchAddOrdersSyncOrderListBuilder: """ - Specify if the order is to 'buy' or 'sell' + Specify if the order is to 'buy' or 'sell'. """ self.obj['side'] = value return self @@ -273,7 +292,7 @@ def set_price(self, value: str) -> BatchAddOrdersSyncOrderListBuilder: def set_size(self, value: str) -> BatchAddOrdersSyncOrderListBuilder: """ - Specify quantity for order When **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds + Specify quantity for order. When **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize. When **type** is market, select one out of two: size or funds """ self.obj['size'] = value return self @@ -290,7 +309,7 @@ def set_stp( def set_cancel_after(self, value: int) -> BatchAddOrdersSyncOrderListBuilder: """ - Cancel after n seconds,the order timing strategy is GTT + Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1 """ self.obj['cancelAfter'] = value return self @@ -345,5 +364,21 @@ def set_funds(self, value: str) -> BatchAddOrdersSyncOrderListBuilder: self.obj['funds'] = value return self + def set_allow_max_time_window( + self, value: int) -> BatchAddOrdersSyncOrderListBuilder: + """ + The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail. + """ + self.obj['allowMaxTimeWindow'] = value + return self + + def set_client_timestamp(self, + value: int) -> BatchAddOrdersSyncOrderListBuilder: + """ + Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified. + """ + self.obj['clientTimestamp'] = value + return self + def build(self) -> BatchAddOrdersSyncOrderList: return BatchAddOrdersSyncOrderList(**self.obj) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_cancel_oco_orders_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_cancel_oco_orders_req.py index fdd3f01c..d9c88bc1 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_cancel_oco_orders_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_cancel_oco_orders_req.py @@ -15,19 +15,19 @@ class BatchCancelOcoOrdersReq(BaseModel): BatchCancelOcoOrdersReq Attributes: - order_ids (str): Specify the order id, there can be multiple orders, separated by commas. If not passed, all oco orders will be canceled by default. - symbol (str): trading pair. If not passed, the oco orders of all symbols will be canceled by default. + order_ids (str): Specify the order ID; there can be multiple orders, separated by commas. If not passed, all OCO orders will be canceled by default. + symbol (str): Trading pair. If not passed, the OCO orders of all symbols will be canceled by default. """ order_ids: Optional[str] = Field( default=None, description= - "Specify the order id, there can be multiple orders, separated by commas. If not passed, all oco orders will be canceled by default.", + "Specify the order ID; there can be multiple orders, separated by commas. If not passed, all OCO orders will be canceled by default.", alias="orderIds") symbol: Optional[str] = Field( default=None, description= - "trading pair. If not passed, the oco orders of all symbols will be canceled by default." + "Trading pair. If not passed, the OCO orders of all symbols will be canceled by default." ) __properties: ClassVar[List[str]] = ["orderIds", "symbol"] @@ -80,14 +80,14 @@ def __init__(self): def set_order_ids(self, value: str) -> BatchCancelOcoOrdersReqBuilder: """ - Specify the order id, there can be multiple orders, separated by commas. If not passed, all oco orders will be canceled by default. + Specify the order ID; there can be multiple orders, separated by commas. If not passed, all OCO orders will be canceled by default. """ self.obj['orderIds'] = value return self def set_symbol(self, value: str) -> BatchCancelOcoOrdersReqBuilder: """ - trading pair. If not passed, the oco orders of all symbols will be canceled by default. + Trading pair. If not passed, the OCO orders of all symbols will be canceled by default. """ self.obj['symbol'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_cancel_stop_order_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_cancel_stop_order_req.py index 5f30235a..c275a33b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_cancel_stop_order_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_batch_cancel_stop_order_req.py @@ -16,7 +16,7 @@ class BatchCancelStopOrderReq(BaseModel): Attributes: symbol (str): Cancel the open order for the specified symbol - trade_type (str): The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE + trade_type (str): The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). order_ids (str): Comma seperated order IDs. """ @@ -26,7 +26,7 @@ class BatchCancelStopOrderReq(BaseModel): trade_type: Optional[str] = Field( default=None, description= - "The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE", + "The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin).", alias="tradeType") order_ids: Optional[str] = Field(default=None, description="Comma seperated order IDs.", @@ -90,7 +90,7 @@ def set_symbol(self, value: str) -> BatchCancelStopOrderReqBuilder: def set_trade_type(self, value: str) -> BatchCancelStopOrderReqBuilder: """ - The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE + The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). """ self.obj['tradeType'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_old_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_old_req.py index 54efb283..d843559f 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_old_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_old_req.py @@ -15,18 +15,16 @@ class CancelOrderByClientOidOldReq(BaseModel): CancelOrderByClientOidOldReq Attributes: - symbol (str): symbol client_oid (str): Client Order Id,unique identifier created by the user """ - symbol: Optional[str] = Field(default=None, description="symbol") client_oid: Optional[str] = Field( default=None, path_variable="True", description="Client Order Id,unique identifier created by the user", alias="clientOid") - __properties: ClassVar[List[str]] = ["symbol", "clientOid"] + __properties: ClassVar[List[str]] = ["clientOid"] model_config = ConfigDict( populate_by_name=True, @@ -63,10 +61,7 @@ def from_dict( if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "symbol": obj.get("symbol"), - "clientOid": obj.get("clientOid") - }) + _obj = cls.model_validate({"clientOid": obj.get("clientOid")}) return _obj @@ -75,13 +70,6 @@ class CancelOrderByClientOidOldReqBuilder: def __init__(self): self.obj = {} - def set_symbol(self, value: str) -> CancelOrderByClientOidOldReqBuilder: - """ - symbol - """ - self.obj['symbol'] = value - return self - def set_client_oid(self, value: str) -> CancelOrderByClientOidOldReqBuilder: """ diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_old_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_old_resp.py index c64c06f8..68af9f2b 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_old_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_old_resp.py @@ -18,8 +18,8 @@ class CancelOrderByClientOidOldResp(BaseModel, Response): Attributes: client_oid (str): Client Order Id,unique identifier created by the user - cancelled_order_id (str): - cancelled_oco_order_ids (str): + cancelled_order_id (str): The unique order id generated by the trading system + cancelled_oco_order_ids (list[str]): """ common_response: Optional[RestResponse] = Field( @@ -28,9 +28,11 @@ class CancelOrderByClientOidOldResp(BaseModel, Response): default=None, description="Client Order Id,unique identifier created by the user", alias="clientOid") - cancelled_order_id: Optional[str] = Field(default=None, - alias="cancelledOrderId") - cancelled_oco_order_ids: Optional[str] = Field( + cancelled_order_id: Optional[str] = Field( + default=None, + description="The unique order id generated by the trading system", + alias="cancelledOrderId") + cancelled_oco_order_ids: Optional[List[str]] = Field( default=None, alias="cancelledOcoOrderIds") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_sync_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_sync_req.py index b277276f..2f86032f 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_sync_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_sync_req.py @@ -15,18 +15,18 @@ class CancelOrderByClientOidSyncReq(BaseModel): CancelOrderByClientOidSyncReq Attributes: - client_oid (str): Client Order Id,unique identifier created by the user symbol (str): symbol + client_oid (str): Client Order Id,unique identifier created by the user """ + symbol: Optional[str] = Field(default=None, description="symbol") client_oid: Optional[str] = Field( default=None, path_variable="True", description="Client Order Id,unique identifier created by the user", alias="clientOid") - symbol: Optional[str] = Field(default=None, description="symbol") - __properties: ClassVar[List[str]] = ["clientOid", "symbol"] + __properties: ClassVar[List[str]] = ["symbol", "clientOid"] model_config = ConfigDict( populate_by_name=True, @@ -64,8 +64,8 @@ def from_dict( return cls.model_validate(obj) _obj = cls.model_validate({ - "clientOid": obj.get("clientOid"), - "symbol": obj.get("symbol") + "symbol": obj.get("symbol"), + "clientOid": obj.get("clientOid") }) return _obj @@ -75,19 +75,19 @@ class CancelOrderByClientOidSyncReqBuilder: def __init__(self): self.obj = {} - def set_client_oid(self, - value: str) -> CancelOrderByClientOidSyncReqBuilder: + def set_symbol(self, value: str) -> CancelOrderByClientOidSyncReqBuilder: """ - Client Order Id,unique identifier created by the user + symbol """ - self.obj['clientOid'] = value + self.obj['symbol'] = value return self - def set_symbol(self, value: str) -> CancelOrderByClientOidSyncReqBuilder: + def set_client_oid(self, + value: str) -> CancelOrderByClientOidSyncReqBuilder: """ - symbol + Client Order Id,unique identifier created by the user """ - self.obj['symbol'] = value + self.obj['clientOid'] = value return self def build(self) -> CancelOrderByClientOidSyncReq: diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_sync_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_sync_resp.py index 291ad5b5..9a67bb6f 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_sync_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_client_oid_sync_resp.py @@ -29,8 +29,8 @@ class CancelOrderByClientOidSyncResp(BaseModel, Response): class StatusEnum(Enum): """ Attributes: - OPEN: - DONE: + OPEN: order is active + DONE: order has been completed """ OPEN = 'open' DONE = 'done' diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_old_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_old_req.py index 8e965bf4..1f68c174 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_old_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_old_req.py @@ -15,18 +15,16 @@ class CancelOrderByOrderIdOldReq(BaseModel): CancelOrderByOrderIdOldReq Attributes: - symbol (str): symbol order_id (str): The unique order id generated by the trading system """ - symbol: Optional[str] = Field(default=None, description="symbol") order_id: Optional[str] = Field( default=None, path_variable="True", description="The unique order id generated by the trading system", alias="orderId") - __properties: ClassVar[List[str]] = ["symbol", "orderId"] + __properties: ClassVar[List[str]] = ["orderId"] model_config = ConfigDict( populate_by_name=True, @@ -62,10 +60,7 @@ def from_dict( if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "symbol": obj.get("symbol"), - "orderId": obj.get("orderId") - }) + _obj = cls.model_validate({"orderId": obj.get("orderId")}) return _obj @@ -74,13 +69,6 @@ class CancelOrderByOrderIdOldReqBuilder: def __init__(self): self.obj = {} - def set_symbol(self, value: str) -> CancelOrderByOrderIdOldReqBuilder: - """ - symbol - """ - self.obj['symbol'] = value - return self - def set_order_id(self, value: str) -> CancelOrderByOrderIdOldReqBuilder: """ The unique order id generated by the trading system diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_resp.py index ff2d7834..08149532 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_resp.py @@ -17,13 +17,13 @@ class CancelOrderByOrderIdResp(BaseModel, Response): CancelOrderByOrderIdResp Attributes: - order_id (str): order id + order_id (str): Order id """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") order_id: Optional[str] = Field(default=None, - description="order id", + description="Order id", alias="orderId") __properties: ClassVar[List[str]] = ["orderId"] diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_sync_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_sync_req.py index e6b68a55..3d2f37de 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_sync_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_sync_req.py @@ -15,18 +15,18 @@ class CancelOrderByOrderIdSyncReq(BaseModel): CancelOrderByOrderIdSyncReq Attributes: - order_id (str): The unique order id generated by the trading system symbol (str): symbol + order_id (str): The unique order id generated by the trading system """ + symbol: Optional[str] = Field(default=None, description="symbol") order_id: Optional[str] = Field( default=None, path_variable="True", description="The unique order id generated by the trading system", alias="orderId") - symbol: Optional[str] = Field(default=None, description="symbol") - __properties: ClassVar[List[str]] = ["orderId", "symbol"] + __properties: ClassVar[List[str]] = ["symbol", "orderId"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +63,8 @@ def from_dict( return cls.model_validate(obj) _obj = cls.model_validate({ - "orderId": obj.get("orderId"), - "symbol": obj.get("symbol") + "symbol": obj.get("symbol"), + "orderId": obj.get("orderId") }) return _obj @@ -74,18 +74,18 @@ class CancelOrderByOrderIdSyncReqBuilder: def __init__(self): self.obj = {} - def set_order_id(self, value: str) -> CancelOrderByOrderIdSyncReqBuilder: + def set_symbol(self, value: str) -> CancelOrderByOrderIdSyncReqBuilder: """ - The unique order id generated by the trading system + symbol """ - self.obj['orderId'] = value + self.obj['symbol'] = value return self - def set_symbol(self, value: str) -> CancelOrderByOrderIdSyncReqBuilder: + def set_order_id(self, value: str) -> CancelOrderByOrderIdSyncReqBuilder: """ - symbol + The unique order id generated by the trading system """ - self.obj['symbol'] = value + self.obj['orderId'] = value return self def build(self) -> CancelOrderByOrderIdSyncReq: diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_sync_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_sync_resp.py index b1ce6020..59c43d93 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_sync_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_order_by_order_id_sync_resp.py @@ -29,8 +29,8 @@ class CancelOrderByOrderIdSyncResp(BaseModel, Response): class StatusEnum(Enum): """ Attributes: - OPEN: - DONE: + OPEN: order is active + DONE: order has been completed """ OPEN = 'open' DONE = 'done' diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_stop_order_by_order_id_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_stop_order_by_order_id_resp.py index b6616eb2..ebbff06c 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_stop_order_by_order_id_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_cancel_stop_order_by_order_id_resp.py @@ -17,13 +17,13 @@ class CancelStopOrderByOrderIdResp(BaseModel, Response): CancelStopOrderByOrderIdResp Attributes: - cancelled_order_ids (list[str]): order id array + cancelled_order_ids (list[str]): order ID array """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") cancelled_order_ids: Optional[List[str]] = Field( - default=None, description="order id array", alias="cancelledOrderIds") + default=None, description="order ID array", alias="cancelledOrderIds") __properties: ClassVar[List[str]] = ["cancelledOrderIds"] diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_closed_orders_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_closed_orders_req.py index 63ce27af..3b2802cb 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_closed_orders_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_closed_orders_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetClosedOrdersReq(BaseModel): @@ -56,8 +55,7 @@ class TypeEnum(Enum): description= "The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page.", alias="lastId") - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = Field( - default=20, description="Default20,Max100") + limit: Optional[int] = Field(default=20, description="Default20,Max100") start_at: Optional[int] = Field(default=None, description="Start time (milisecond)", alias="startAt") diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_dcp_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_dcp_resp.py index 364fdb18..3639dec0 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_dcp_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_dcp_resp.py @@ -17,8 +17,8 @@ class GetDcpResp(BaseModel, Response): If the data is empty, it means that DCP is not set. Attributes: - timeout (int): Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400 - symbols (str): List of trading pairs. Separated by commas, empty means all trading pairs + timeout (int): Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400 + symbols (str): List of trading pairs. Separated by commas; empty means all trading pairs current_time (int): System current time (in seconds) trigger_time (int): Trigger cancellation time (in seconds) """ @@ -28,12 +28,12 @@ class GetDcpResp(BaseModel, Response): timeout: Optional[int] = Field( default=None, description= - "Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400" + "Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400" ) symbols: Optional[str] = Field( default=None, description= - "List of trading pairs. Separated by commas, empty means all trading pairs" + "List of trading pairs. Separated by commas; empty means all trading pairs" ) current_time: Optional[int] = Field( default=None, diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_oco_order_by_order_id_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_oco_order_by_order_id_resp.py index 8abbd236..12fc1492 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_oco_order_by_order_id_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_oco_order_by_order_id_resp.py @@ -19,10 +19,10 @@ class GetOcoOrderByOrderIdResp(BaseModel, Response): Attributes: symbol (str): symbol - client_oid (str): Client Order Id - order_id (str): The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + client_oid (str): Client Order ID + order_id (str): The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. order_time (int): Order placement time, milliseconds - status (StatusEnum): Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELLED: Cancelled + status (StatusEnum): Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELED: Canceled """ class StatusEnum(Enum): @@ -31,23 +31,23 @@ class StatusEnum(Enum): NEW: New DONE: Completed TRIGGERED: Triggered - CANCELLED: Cancelled + CANCELED: Canceled """ NEW = 'NEW' DONE = 'DONE' TRIGGERED = 'TRIGGERED' - CANCELLED = 'CANCELLED' + CANCELED = 'CANCELLED' common_response: Optional[RestResponse] = Field( default=None, description="Common response") symbol: Optional[str] = Field(default=None, description="symbol") client_oid: Optional[str] = Field(default=None, - description="Client Order Id", + description="Client Order ID", alias="clientOid") order_id: Optional[str] = Field( default=None, description= - "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order.", + "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order.", alias="orderId") order_time: Optional[int] = Field( default=None, @@ -56,7 +56,7 @@ class StatusEnum(Enum): status: Optional[StatusEnum] = Field( default=None, description= - "Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELLED: Cancelled" + "Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELED: Canceled" ) __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_oco_order_list_items.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_oco_order_list_items.py index d3562d2e..16d03247 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_oco_order_list_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_oco_order_list_items.py @@ -16,11 +16,11 @@ class GetOcoOrderListItems(BaseModel): GetOcoOrderListItems Attributes: - order_id (str): The unique order id generated by the trading system,which can be used later for further actions such as canceling the order. + order_id (str): The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order. symbol (str): symbol - client_oid (str): Client Order Id + client_oid (str): Client Order ID order_time (int): Order placement time, milliseconds - status (StatusEnum): Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELLED: Cancelled + status (StatusEnum): Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELED: Canceled """ class StatusEnum(Enum): @@ -29,21 +29,21 @@ class StatusEnum(Enum): NEW: New DONE: Completed TRIGGERED: Triggered - CANCELLED: Cancelled + CANCELED: Canceled """ NEW = 'NEW' DONE = 'DONE' TRIGGERED = 'TRIGGERED' - CANCELLED = 'CANCELLED' + CANCELED = 'CANCELLED' order_id: Optional[str] = Field( default=None, description= - "The unique order id generated by the trading system,which can be used later for further actions such as canceling the order.", + "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order.", alias="orderId") symbol: Optional[str] = Field(default=None, description="symbol") client_oid: Optional[str] = Field(default=None, - description="Client Order Id", + description="Client Order ID", alias="clientOid") order_time: Optional[int] = Field( default=None, @@ -52,7 +52,7 @@ class StatusEnum(Enum): status: Optional[StatusEnum] = Field( default=None, description= - "Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELLED: Cancelled" + "Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELED: Canceled" ) __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_oco_order_list_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_oco_order_list_req.py index fc74823e..d34ce8cb 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_oco_order_list_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_oco_order_list_req.py @@ -8,7 +8,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetOcoOrderListReq(BaseModel): @@ -35,11 +34,10 @@ class GetOcoOrderListReq(BaseModel): default=None, description="Specify orderId collection, up to 500 orders ", alias="orderIds") - page_size: Optional[Annotated[ - int, Field(le=500, strict=True, ge=10)]] = Field( - default=50, - description="Size per page, minimum value 10, maximum value 500", - alias="pageSize") + page_size: Optional[int] = Field( + default=50, + description="Size per page, minimum value 10, maximum value 500", + alias="pageSize") current_page: Optional[int] = Field( default=1, description="Page number, minimum value 1 ", diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_open_orders_by_page_items.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_open_orders_by_page_items.py new file mode 100644 index 00000000..7af21f88 --- /dev/null +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_open_orders_by_page_items.py @@ -0,0 +1,277 @@ +# coding: utf-8 + +# Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +from __future__ import annotations +import pprint +import json + +from enum import Enum +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional + + +class GetOpenOrdersByPageItems(BaseModel): + """ + GetOpenOrdersByPageItems + + Attributes: + id (str): The unique order id generated by the trading system + symbol (str): symbol + op_type (str): + type (TypeEnum): Specify if the order is an 'limit' order or 'market' order. + side (SideEnum): Buy or sell + price (str): Order price + size (str): Order size + funds (str): Order Funds + deal_size (str): Number of filled transactions + deal_funds (str): Funds of filled transactions + fee (str): [Handling fees](https://www.kucoin.com/docs-new/api-5327739) + fee_currency (str): currency used to calculate trading fee + stp (StpEnum): [Self Trade Prevention](https://www.kucoin.com/docs-new/api-5176570) + time_in_force (TimeInForceEnum): Time in force + post_only (bool): Whether its a postOnly order. + hidden (bool): Whether its a hidden order. + iceberg (bool): Whether its a iceberg order. + visible_size (str): Visible size of iceberg order in order book. + cancel_after (int): A GTT timeInForce that expires in n seconds + channel (str): + client_oid (str): Client Order Id,unique identifier created by the user + remark (str): Order placement remarks + tags (str): Order tag + cancel_exist (bool): Whether there is a cancellation record for the order. + created_at (int): + last_updated_at (int): + trade_type (str): Trade type, redundancy param + in_order_book (bool): Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook + cancelled_size (str): Number of canceled transactions + cancelled_funds (str): Funds of canceled transactions + remain_size (str): Number of remain transactions + remain_funds (str): Funds of remain transactions + tax (str): Users in some regions need query this field + active (bool): Order status: true-The status of the order isactive; false-The status of the order is done + """ + + class TypeEnum(Enum): + """ + Attributes: + LIMIT: + MARKET: + """ + LIMIT = 'limit' + MARKET = 'market' + + class SideEnum(Enum): + """ + Attributes: + BUY: + SELL: + """ + BUY = 'buy' + SELL = 'sell' + + class StpEnum(Enum): + """ + Attributes: + DC: + CO: + CN: + CB: + """ + DC = 'DC' + CO = 'CO' + CN = 'CN' + CB = 'CB' + + class TimeInForceEnum(Enum): + """ + Attributes: + GTC: + GTT: + IOC: + FOK: + """ + GTC = 'GTC' + GTT = 'GTT' + IOC = 'IOC' + FOK = 'FOK' + + id: Optional[str] = Field( + default=None, + description="The unique order id generated by the trading system") + symbol: Optional[str] = Field(default=None, description="symbol") + op_type: Optional[str] = Field(default=None, alias="opType") + type: Optional[TypeEnum] = Field( + default=None, + description= + "Specify if the order is an 'limit' order or 'market' order. ") + side: Optional[SideEnum] = Field(default=None, description="Buy or sell") + price: Optional[str] = Field(default=None, description="Order price") + size: Optional[str] = Field(default=None, description="Order size") + funds: Optional[str] = Field(default=None, description="Order Funds") + deal_size: Optional[str] = Field( + default=None, + description="Number of filled transactions", + alias="dealSize") + deal_funds: Optional[str] = Field( + default=None, + description="Funds of filled transactions", + alias="dealFunds") + fee: Optional[str] = Field( + default=None, + description= + "[Handling fees](https://www.kucoin.com/docs-new/api-5327739)") + fee_currency: Optional[str] = Field( + default=None, + description="currency used to calculate trading fee", + alias="feeCurrency") + stp: Optional[StpEnum] = Field( + default=None, + description= + "[Self Trade Prevention](https://www.kucoin.com/docs-new/api-5176570)") + time_in_force: Optional[TimeInForceEnum] = Field( + default=None, description="Time in force", alias="timeInForce") + post_only: Optional[bool] = Field( + default=None, + description="Whether its a postOnly order.", + alias="postOnly") + hidden: Optional[bool] = Field(default=None, + description="Whether its a hidden order.") + iceberg: Optional[bool] = Field(default=None, + description="Whether its a iceberg order.") + visible_size: Optional[str] = Field( + default=None, + description="Visible size of iceberg order in order book.", + alias="visibleSize") + cancel_after: Optional[int] = Field( + default=None, + description="A GTT timeInForce that expires in n seconds", + alias="cancelAfter") + channel: Optional[str] = None + client_oid: Optional[str] = Field( + default=None, + description="Client Order Id,unique identifier created by the user", + alias="clientOid") + remark: Optional[str] = Field(default=None, + description="Order placement remarks") + tags: Optional[str] = Field(default=None, description="Order tag") + cancel_exist: Optional[bool] = Field( + default=None, + description="Whether there is a cancellation record for the order.", + alias="cancelExist") + created_at: Optional[int] = Field(default=None, alias="createdAt") + last_updated_at: Optional[int] = Field(default=None, alias="lastUpdatedAt") + trade_type: Optional[str] = Field( + default=None, + description="Trade type, redundancy param", + alias="tradeType") + in_order_book: Optional[bool] = Field( + default=None, + description= + "Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook", + alias="inOrderBook") + cancelled_size: Optional[str] = Field( + default=None, + description="Number of canceled transactions", + alias="cancelledSize") + cancelled_funds: Optional[str] = Field( + default=None, + description="Funds of canceled transactions", + alias="cancelledFunds") + remain_size: Optional[str] = Field( + default=None, + description="Number of remain transactions", + alias="remainSize") + remain_funds: Optional[str] = Field( + default=None, + description="Funds of remain transactions", + alias="remainFunds") + tax: Optional[str] = Field( + default=None, + description="Users in some regions need query this field") + active: Optional[bool] = Field( + default=None, + description= + "Order status: true-The status of the order isactive; false-The status of the order is done" + ) + + __properties: ClassVar[List[str]] = [ + "id", "symbol", "opType", "type", "side", "price", "size", "funds", + "dealSize", "dealFunds", "fee", "feeCurrency", "stp", "timeInForce", + "postOnly", "hidden", "iceberg", "visibleSize", "cancelAfter", + "channel", "clientOid", "remark", "tags", "cancelExist", "createdAt", + "lastUpdatedAt", "tradeType", "inOrderBook", "cancelledSize", + "cancelledFunds", "remainSize", "remainFunds", "tax", "active" + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=False, + protected_namespaces=(), + ) + + def to_str(self) -> str: + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[GetOpenOrdersByPageItems]: + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + _dict = self.model_dump( + by_alias=True, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict( + cls, + obj: Optional[Dict[str, + Any]]) -> Optional[GetOpenOrdersByPageItems]: + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "symbol": obj.get("symbol"), + "opType": obj.get("opType"), + "type": obj.get("type"), + "side": obj.get("side"), + "price": obj.get("price"), + "size": obj.get("size"), + "funds": obj.get("funds"), + "dealSize": obj.get("dealSize"), + "dealFunds": obj.get("dealFunds"), + "fee": obj.get("fee"), + "feeCurrency": obj.get("feeCurrency"), + "stp": obj.get("stp"), + "timeInForce": obj.get("timeInForce"), + "postOnly": obj.get("postOnly"), + "hidden": obj.get("hidden"), + "iceberg": obj.get("iceberg"), + "visibleSize": obj.get("visibleSize"), + "cancelAfter": obj.get("cancelAfter"), + "channel": obj.get("channel"), + "clientOid": obj.get("clientOid"), + "remark": obj.get("remark"), + "tags": obj.get("tags"), + "cancelExist": obj.get("cancelExist"), + "createdAt": obj.get("createdAt"), + "lastUpdatedAt": obj.get("lastUpdatedAt"), + "tradeType": obj.get("tradeType"), + "inOrderBook": obj.get("inOrderBook"), + "cancelledSize": obj.get("cancelledSize"), + "cancelledFunds": obj.get("cancelledFunds"), + "remainSize": obj.get("remainSize"), + "remainFunds": obj.get("remainFunds"), + "tax": obj.get("tax"), + "active": obj.get("active") + }) + return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_open_orders_by_page_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_open_orders_by_page_req.py new file mode 100644 index 00000000..2ae20bc7 --- /dev/null +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_open_orders_by_page_req.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +# Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +from __future__ import annotations +import pprint +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional + + +class GetOpenOrdersByPageReq(BaseModel): + """ + GetOpenOrdersByPageReq + + Attributes: + symbol (str): Symbol + page_num (int): Current page + page_size (int): Size per page + """ + + symbol: Optional[str] = Field(default=None, description="Symbol") + page_num: Optional[int] = Field(default=1, + description="Current page", + alias="pageNum") + page_size: Optional[int] = Field(default=20, + description="Size per page", + alias="pageSize") + + __properties: ClassVar[List[str]] = ["symbol", "pageNum", "pageSize"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=False, + protected_namespaces=(), + ) + + def to_str(self) -> str: + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[GetOpenOrdersByPageReq]: + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + _dict = self.model_dump( + by_alias=True, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict( + cls, obj: Optional[Dict[str, + Any]]) -> Optional[GetOpenOrdersByPageReq]: + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": + obj.get("symbol"), + "pageNum": + obj.get("pageNum") if obj.get("pageNum") is not None else 1, + "pageSize": + obj.get("pageSize") if obj.get("pageSize") is not None else 20 + }) + return _obj + + +class GetOpenOrdersByPageReqBuilder: + + def __init__(self): + self.obj = {} + + def set_symbol(self, value: str) -> GetOpenOrdersByPageReqBuilder: + """ + Symbol + """ + self.obj['symbol'] = value + return self + + def set_page_num(self, value: int) -> GetOpenOrdersByPageReqBuilder: + """ + Current page + """ + self.obj['pageNum'] = value + return self + + def set_page_size(self, value: int) -> GetOpenOrdersByPageReqBuilder: + """ + Size per page + """ + self.obj['pageSize'] = value + return self + + def build(self) -> GetOpenOrdersByPageReq: + return GetOpenOrdersByPageReq(**self.obj) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_open_orders_by_page_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_open_orders_by_page_resp.py new file mode 100644 index 00000000..40c8f561 --- /dev/null +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_open_orders_by_page_resp.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +# Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +from __future__ import annotations +import pprint +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from .model_get_open_orders_by_page_items import GetOpenOrdersByPageItems +from kucoin_universal_sdk.internal.interfaces.response import Response +from kucoin_universal_sdk.model.common import RestResponse + + +class GetOpenOrdersByPageResp(BaseModel, Response): + """ + GetOpenOrdersByPageResp + + Attributes: + current_page (int): + page_size (int): + total_num (int): + total_page (int): + items (list[GetOpenOrdersByPageItems]): + """ + + common_response: Optional[RestResponse] = Field( + default=None, description="Common response") + current_page: Optional[int] = Field(default=None, alias="currentPage") + page_size: Optional[int] = Field(default=None, alias="pageSize") + total_num: Optional[int] = Field(default=None, alias="totalNum") + total_page: Optional[int] = Field(default=None, alias="totalPage") + items: Optional[List[GetOpenOrdersByPageItems]] = None + + __properties: ClassVar[List[str]] = [ + "currentPage", "pageSize", "totalNum", "totalPage", "items" + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=False, + protected_namespaces=(), + ) + + def to_str(self) -> str: + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[GetOpenOrdersByPageResp]: + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + _dict = self.model_dump( + by_alias=True, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + return _dict + + @classmethod + def from_dict( + cls, + obj: Optional[Dict[str, + Any]]) -> Optional[GetOpenOrdersByPageResp]: + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "currentPage": + obj.get("currentPage"), + "pageSize": + obj.get("pageSize"), + "totalNum": + obj.get("totalNum"), + "totalPage": + obj.get("totalPage"), + "items": [ + GetOpenOrdersByPageItems.from_dict(_item) + for _item in obj["items"] + ] if obj.get("items") is not None else None + }) + return _obj + + def set_common_response(self, response: RestResponse): + self.common_response = response diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_order_by_client_oid_old_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_order_by_client_oid_old_req.py index c0f2023b..136550ae 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_order_by_client_oid_old_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_order_by_client_oid_old_req.py @@ -15,13 +15,13 @@ class GetOrderByClientOidOldReq(BaseModel): GetOrderByClientOidOldReq Attributes: - client_oid (str): Unique order id created by users to identify their orders + client_oid (str): Unique order ID created by users to identify their orders """ client_oid: Optional[str] = Field( default=None, path_variable="True", - description="Unique order id created by users to identify their orders", + description="Unique order ID created by users to identify their orders", alias="clientOid") __properties: ClassVar[List[str]] = ["clientOid"] @@ -71,7 +71,7 @@ def __init__(self): def set_client_oid(self, value: str) -> GetOrderByClientOidOldReqBuilder: """ - Unique order id created by users to identify their orders + Unique order ID created by users to identify their orders """ self.obj['clientOid'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_order_by_client_oid_old_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_order_by_client_oid_old_resp.py index 28d3ebb3..d0d365e6 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_order_by_client_oid_old_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_order_by_client_oid_old_resp.py @@ -47,6 +47,9 @@ class GetOrderByClientOidOldResp(BaseModel, Response): cancel_exist (bool): created_at (int): trade_type (str): + tax (str): + tax_rate (str): + tax_currency (str): """ common_response: Optional[RestResponse] = Field( @@ -81,13 +84,17 @@ class GetOrderByClientOidOldResp(BaseModel, Response): cancel_exist: Optional[bool] = Field(default=None, alias="cancelExist") created_at: Optional[int] = Field(default=None, alias="createdAt") trade_type: Optional[str] = Field(default=None, alias="tradeType") + tax: Optional[str] = None + tax_rate: Optional[str] = Field(default=None, alias="taxRate") + tax_currency: Optional[str] = Field(default=None, alias="taxCurrency") __properties: ClassVar[List[str]] = [ "id", "symbol", "opType", "type", "side", "price", "size", "funds", "dealFunds", "dealSize", "fee", "feeCurrency", "stp", "stop", "stopTriggered", "stopPrice", "timeInForce", "postOnly", "hidden", "iceberg", "visibleSize", "cancelAfter", "channel", "clientOid", - "remark", "tags", "isActive", "cancelExist", "createdAt", "tradeType" + "remark", "tags", "isActive", "cancelExist", "createdAt", "tradeType", + "tax", "taxRate", "taxCurrency" ] model_config = ConfigDict( @@ -154,7 +161,10 @@ def from_dict( "isActive": obj.get("isActive"), "cancelExist": obj.get("cancelExist"), "createdAt": obj.get("createdAt"), - "tradeType": obj.get("tradeType") + "tradeType": obj.get("tradeType"), + "tax": obj.get("tax"), + "taxRate": obj.get("taxRate"), + "taxCurrency": obj.get("taxCurrency") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_order_by_order_id_old_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_order_by_order_id_old_resp.py index e718d828..0ebbdf26 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_order_by_order_id_old_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_order_by_order_id_old_resp.py @@ -47,6 +47,9 @@ class GetOrderByOrderIdOldResp(BaseModel, Response): cancel_exist (bool): created_at (int): trade_type (str): + tax (str): + tax_rate (str): + tax_currency (str): """ common_response: Optional[RestResponse] = Field( @@ -81,13 +84,17 @@ class GetOrderByOrderIdOldResp(BaseModel, Response): cancel_exist: Optional[bool] = Field(default=None, alias="cancelExist") created_at: Optional[int] = Field(default=None, alias="createdAt") trade_type: Optional[str] = Field(default=None, alias="tradeType") + tax: Optional[str] = None + tax_rate: Optional[str] = Field(default=None, alias="taxRate") + tax_currency: Optional[str] = Field(default=None, alias="taxCurrency") __properties: ClassVar[List[str]] = [ "id", "symbol", "opType", "type", "side", "price", "size", "funds", "dealFunds", "dealSize", "fee", "feeCurrency", "stp", "stop", "stopTriggered", "stopPrice", "timeInForce", "postOnly", "hidden", "iceberg", "visibleSize", "cancelAfter", "channel", "clientOid", - "remark", "tags", "isActive", "cancelExist", "createdAt", "tradeType" + "remark", "tags", "isActive", "cancelExist", "createdAt", "tradeType", + "tax", "taxRate", "taxCurrency" ] model_config = ConfigDict( @@ -154,7 +161,10 @@ def from_dict( "isActive": obj.get("isActive"), "cancelExist": obj.get("cancelExist"), "createdAt": obj.get("createdAt"), - "tradeType": obj.get("tradeType") + "tradeType": obj.get("tradeType"), + "tax": obj.get("tax"), + "taxRate": obj.get("taxRate"), + "taxCurrency": obj.get("taxCurrency") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_orders_list_old_items.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_orders_list_old_items.py index f83e15ad..4f3903af 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_orders_list_old_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_orders_list_old_items.py @@ -45,6 +45,9 @@ class GetOrdersListOldItems(BaseModel): cancel_exist (bool): created_at (int): trade_type (str): + tax (str): + tax_rate (str): + tax_currency (str): """ id: Optional[str] = None @@ -77,13 +80,17 @@ class GetOrdersListOldItems(BaseModel): cancel_exist: Optional[bool] = Field(default=None, alias="cancelExist") created_at: Optional[int] = Field(default=None, alias="createdAt") trade_type: Optional[str] = Field(default=None, alias="tradeType") + tax: Optional[str] = None + tax_rate: Optional[str] = Field(default=None, alias="taxRate") + tax_currency: Optional[str] = Field(default=None, alias="taxCurrency") __properties: ClassVar[List[str]] = [ "id", "symbol", "opType", "type", "side", "price", "size", "funds", "dealFunds", "dealSize", "fee", "feeCurrency", "stp", "stop", "stopTriggered", "stopPrice", "timeInForce", "postOnly", "hidden", "iceberg", "visibleSize", "cancelAfter", "channel", "clientOid", - "remark", "tags", "isActive", "cancelExist", "createdAt", "tradeType" + "remark", "tags", "isActive", "cancelExist", "createdAt", "tradeType", + "tax", "taxRate", "taxCurrency" ] model_config = ConfigDict( @@ -149,6 +156,9 @@ def from_dict( "isActive": obj.get("isActive"), "cancelExist": obj.get("cancelExist"), "createdAt": obj.get("createdAt"), - "tradeType": obj.get("tradeType") + "tradeType": obj.get("tradeType"), + "tax": obj.get("tax"), + "taxRate": obj.get("taxRate"), + "taxCurrency": obj.get("taxCurrency") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_orders_list_old_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_orders_list_old_req.py index dd3088e9..b839b522 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_orders_list_old_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_orders_list_old_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetOrdersListOldReq(BaseModel): @@ -17,13 +16,13 @@ class GetOrdersListOldReq(BaseModel): GetOrdersListOldReq Attributes: - symbol (str): symbol - status (StatusEnum): active or done(done as default), Only list orders with a specific status . - side (SideEnum): buy or sell - type (TypeEnum): limit, market, limit_stop or market_stop - trade_type (TradeTypeEnum): The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) + symbol (str): Symbol + status (StatusEnum): Active or done (done as default); only list orders with a specific status. + side (SideEnum): Buy or Sell + type (TypeEnum): Order type + trade_type (TradeTypeEnum): The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) current_page (int): Current request page. page_size (int): Number of results per request. Minimum is 10, maximum is 500. """ @@ -53,11 +52,15 @@ class TypeEnum(Enum): MARKET: market LIMIT_STOP: limit_stop MARKET_STOP: market_stop + OCO_LIMIT: oco_limit + OCO_STOP: oco_stop """ LIMIT = 'limit' MARKET = 'market' LIMIT_STOP = 'limit_stop' MARKET_STOP = 'market_stop' + OCO_LIMIT = 'oco_limit' + OCO_STOP = 'oco_stop' class TradeTypeEnum(Enum): """ @@ -70,35 +73,33 @@ class TradeTypeEnum(Enum): MARGIN_TRADE = 'MARGIN_TRADE' MARGIN_ISOLATED_TRADE = 'MARGIN_ISOLATED_TRADE' - symbol: Optional[str] = Field(default=None, description="symbol") + symbol: Optional[str] = Field(default=None, description="Symbol") status: Optional[StatusEnum] = Field( default=StatusEnum.DONE, description= - "active or done(done as default), Only list orders with a specific status ." + "Active or done (done as default); only list orders with a specific status." ) - side: Optional[SideEnum] = Field(default=None, description="buy or sell") - type: Optional[TypeEnum] = Field( - default=None, description="limit, market, limit_stop or market_stop") + side: Optional[SideEnum] = Field(default=None, description="Buy or Sell") + type: Optional[TypeEnum] = Field(default=None, description="Order type") trade_type: Optional[TradeTypeEnum] = Field( default=TradeTypeEnum.TRADE, description= - "The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading.", + "The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading.", alias="tradeType") start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") current_page: Optional[int] = Field(default=1, description="Current request page.", alias="currentPage") - page_size: Optional[Annotated[ - int, Field(le=500, strict=True, ge=10)]] = Field( - default=50, - description= - "Number of results per request. Minimum is 10, maximum is 500.", - alias="pageSize") + page_size: Optional[int] = Field( + default=50, + description= + "Number of results per request. Minimum is 10, maximum is 500.", + alias="pageSize") __properties: ClassVar[List[str]] = [ "symbol", "status", "side", "type", "tradeType", "startAt", "endAt", @@ -171,7 +172,7 @@ def __init__(self): def set_symbol(self, value: str) -> GetOrdersListOldReqBuilder: """ - symbol + Symbol """ self.obj['symbol'] = value return self @@ -180,7 +181,7 @@ def set_status( self, value: GetOrdersListOldReq.StatusEnum ) -> GetOrdersListOldReqBuilder: """ - active or done(done as default), Only list orders with a specific status . + Active or done (done as default); only list orders with a specific status. """ self.obj['status'] = value return self @@ -189,7 +190,7 @@ def set_side( self, value: GetOrdersListOldReq.SideEnum) -> GetOrdersListOldReqBuilder: """ - buy or sell + Buy or Sell """ self.obj['side'] = value return self @@ -198,7 +199,7 @@ def set_type( self, value: GetOrdersListOldReq.TypeEnum) -> GetOrdersListOldReqBuilder: """ - limit, market, limit_stop or market_stop + Order type """ self.obj['type'] = value return self @@ -207,21 +208,21 @@ def set_trade_type( self, value: GetOrdersListOldReq.TradeTypeEnum ) -> GetOrdersListOldReqBuilder: """ - The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. + The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. """ self.obj['tradeType'] = value return self def set_start_at(self, value: int) -> GetOrdersListOldReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetOrdersListOldReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_recent_orders_list_old_data.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_recent_orders_list_old_data.py index 8d9e7e5d..44855651 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_recent_orders_list_old_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_recent_orders_list_old_data.py @@ -45,6 +45,9 @@ class GetRecentOrdersListOldData(BaseModel): cancel_exist (bool): created_at (int): trade_type (str): + tax (str): + tax_rate (str): + tax_currency (str): """ id: Optional[str] = None @@ -77,13 +80,17 @@ class GetRecentOrdersListOldData(BaseModel): cancel_exist: Optional[bool] = Field(default=None, alias="cancelExist") created_at: Optional[int] = Field(default=None, alias="createdAt") trade_type: Optional[str] = Field(default=None, alias="tradeType") + tax: Optional[str] = None + tax_rate: Optional[str] = Field(default=None, alias="taxRate") + tax_currency: Optional[str] = Field(default=None, alias="taxCurrency") __properties: ClassVar[List[str]] = [ "id", "symbol", "opType", "type", "side", "price", "size", "funds", "dealFunds", "dealSize", "fee", "feeCurrency", "stp", "stop", "stopTriggered", "stopPrice", "timeInForce", "postOnly", "hidden", "iceberg", "visibleSize", "cancelAfter", "channel", "clientOid", - "remark", "tags", "isActive", "cancelExist", "createdAt", "tradeType" + "remark", "tags", "isActive", "cancelExist", "createdAt", "tradeType", + "tax", "taxRate", "taxCurrency" ] model_config = ConfigDict( @@ -150,6 +157,9 @@ def from_dict( "isActive": obj.get("isActive"), "cancelExist": obj.get("cancelExist"), "createdAt": obj.get("createdAt"), - "tradeType": obj.get("tradeType") + "tradeType": obj.get("tradeType"), + "tax": obj.get("tax"), + "taxRate": obj.get("taxRate"), + "taxCurrency": obj.get("taxCurrency") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_recent_orders_list_old_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_recent_orders_list_old_req.py deleted file mode 100644 index 88b02782..00000000 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_recent_orders_list_old_req.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -# Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. - -from __future__ import annotations -import pprint -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated - - -class GetRecentOrdersListOldReq(BaseModel): - """ - GetRecentOrdersListOldReq - - Attributes: - current_page (int): Current request page. - page_size (int): Number of results per request. Minimum is 10, maximum is 500. - """ - - current_page: Optional[int] = Field(default=1, - description="Current request page.", - alias="currentPage") - page_size: Optional[Annotated[ - int, Field(le=500, strict=True, ge=10)]] = Field( - default=50, - description= - "Number of results per request. Minimum is 10, maximum is 500.", - alias="pageSize") - - __properties: ClassVar[List[str]] = ["currentPage", "pageSize"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=False, - protected_namespaces=(), - ) - - def to_str(self) -> str: - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - return self.model_dump_json(by_alias=True, exclude_none=True) - - @classmethod - def from_json(cls, json_str: str) -> Optional[GetRecentOrdersListOldReq]: - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - _dict = self.model_dump( - by_alias=True, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict( - cls, - obj: Optional[Dict[str, - Any]]) -> Optional[GetRecentOrdersListOldReq]: - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "currentPage": - obj.get("currentPage") - if obj.get("currentPage") is not None else 1, - "pageSize": - obj.get("pageSize") if obj.get("pageSize") is not None else 50 - }) - return _obj - - -class GetRecentOrdersListOldReqBuilder: - - def __init__(self): - self.obj = {} - - def set_current_page(self, value: int) -> GetRecentOrdersListOldReqBuilder: - """ - Current request page. - """ - self.obj['currentPage'] = value - return self - - def set_page_size(self, value: int) -> GetRecentOrdersListOldReqBuilder: - """ - Number of results per request. Minimum is 10, maximum is 500. - """ - self.obj['pageSize'] = value - return self - - def build(self) -> GetRecentOrdersListOldReq: - return GetRecentOrdersListOldReq(**self.obj) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_recent_trade_history_old_data.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_recent_trade_history_old_data.py index d76e22dc..9122e15f 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_recent_trade_history_old_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_recent_trade_history_old_data.py @@ -32,6 +32,9 @@ class GetRecentTradeHistoryOldData(BaseModel): trade_type (str): type (str): created_at (int): + tax (str): + tax_currency (str): + tax_rate (str): """ symbol: Optional[str] = None @@ -52,11 +55,15 @@ class GetRecentTradeHistoryOldData(BaseModel): trade_type: Optional[str] = Field(default=None, alias="tradeType") type: Optional[str] = None created_at: Optional[int] = Field(default=None, alias="createdAt") + tax: Optional[str] = None + tax_currency: Optional[str] = Field(default=None, alias="taxCurrency") + tax_rate: Optional[str] = Field(default=None, alias="taxRate") __properties: ClassVar[List[str]] = [ "symbol", "tradeId", "orderId", "counterOrderId", "side", "liquidity", "forceTaker", "price", "size", "funds", "fee", "feeRate", - "feeCurrency", "stop", "tradeType", "type", "createdAt" + "feeCurrency", "stop", "tradeType", "type", "createdAt", "tax", + "taxCurrency", "taxRate" ] model_config = ConfigDict( @@ -111,6 +118,9 @@ def from_dict( "stop": obj.get("stop"), "tradeType": obj.get("tradeType"), "type": obj.get("type"), - "createdAt": obj.get("createdAt") + "createdAt": obj.get("createdAt"), + "tax": obj.get("tax"), + "taxCurrency": obj.get("taxCurrency"), + "taxRate": obj.get("taxRate") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_recent_trade_history_old_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_recent_trade_history_old_req.py deleted file mode 100644 index edcc1127..00000000 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_recent_trade_history_old_req.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -# Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. - -from __future__ import annotations -import pprint -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated - - -class GetRecentTradeHistoryOldReq(BaseModel): - """ - GetRecentTradeHistoryOldReq - - Attributes: - current_page (int): Current request page. - page_size (int): Number of results per request. Minimum is 10, maximum is 500. - """ - - current_page: Optional[int] = Field(default=1, - description="Current request page.", - alias="currentPage") - page_size: Optional[Annotated[ - int, Field(le=500, strict=True, ge=10)]] = Field( - default=None, - description= - "Number of results per request. Minimum is 10, maximum is 500.", - alias="pageSize") - - __properties: ClassVar[List[str]] = ["currentPage", "pageSize"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=False, - protected_namespaces=(), - ) - - def to_str(self) -> str: - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - return self.model_dump_json(by_alias=True, exclude_none=True) - - @classmethod - def from_json(cls, json_str: str) -> Optional[GetRecentTradeHistoryOldReq]: - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - _dict = self.model_dump( - by_alias=True, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict( - cls, - obj: Optional[Dict[str, - Any]]) -> Optional[GetRecentTradeHistoryOldReq]: - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "currentPage": - obj.get("currentPage") - if obj.get("currentPage") is not None else 1, - "pageSize": - obj.get("pageSize") - }) - return _obj - - -class GetRecentTradeHistoryOldReqBuilder: - - def __init__(self): - self.obj = {} - - def set_current_page(self, - value: int) -> GetRecentTradeHistoryOldReqBuilder: - """ - Current request page. - """ - self.obj['currentPage'] = value - return self - - def set_page_size(self, value: int) -> GetRecentTradeHistoryOldReqBuilder: - """ - Number of results per request. Minimum is 10, maximum is 500. - """ - self.obj['pageSize'] = value - return self - - def build(self) -> GetRecentTradeHistoryOldReq: - return GetRecentTradeHistoryOldReq(**self.obj) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_order_by_client_oid_data.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_order_by_client_oid_data.py index bbda0624..68e5f155 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_order_by_client_oid_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_order_by_client_oid_data.py @@ -6,6 +6,7 @@ import pprint import json +from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional @@ -19,7 +20,7 @@ class GetStopOrderByClientOidData(BaseModel): symbol (str): Symbol name user_id (str): User ID status (str): Order status, include NEW, TRIGGERED - type (str): Order type,limit, market, limit_stop or market_stop + type (TypeEnum): Order type side (str): transaction direction,include buy and sell price (str): order price size (str): order quantity @@ -48,6 +49,15 @@ class GetStopOrderByClientOidData(BaseModel): order_time (int): Time of place a stop order, accurate to nanoseconds """ + class TypeEnum(Enum): + """ + Attributes: + LIMIT: Limit order + MARKET: Market order + """ + LIMIT = 'limit' + MARKET = 'market' + id: Optional[str] = Field(default=None, description="Order ID, the ID of an order.") symbol: Optional[str] = Field(default=None, description="Symbol name") @@ -56,9 +66,7 @@ class GetStopOrderByClientOidData(BaseModel): alias="userId") status: Optional[str] = Field( default=None, description="Order status, include NEW, TRIGGERED") - type: Optional[str] = Field( - default=None, - description="Order type,limit, market, limit_stop or market_stop") + type: Optional[TypeEnum] = Field(default=None, description="Order type") side: Optional[str] = Field( default=None, description="transaction direction,include buy and sell") price: Optional[str] = Field(default=None, description="order price") diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_order_by_order_id_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_order_by_order_id_resp.py index d110eabe..dbfe30b7 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_order_by_order_id_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_order_by_order_id_resp.py @@ -6,6 +6,7 @@ import pprint import json +from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional from kucoin_universal_sdk.internal.interfaces.response import Response @@ -21,7 +22,7 @@ class GetStopOrderByOrderIdResp(BaseModel, Response): symbol (str): Symbol name user_id (str): User ID status (str): Order status, include NEW, TRIGGERED - type (str): Order type,limit, market, limit_stop or market_stop + type (TypeEnum): Order type side (str): transaction direction,include buy and sell price (str): order price size (str): order quantity @@ -50,6 +51,15 @@ class GetStopOrderByOrderIdResp(BaseModel, Response): order_time (int): Time of place a stop order, accurate to nanoseconds """ + class TypeEnum(Enum): + """ + Attributes: + LIMIT: Limit order + MARKET: Market order + """ + LIMIT = 'limit' + MARKET = 'market' + common_response: Optional[RestResponse] = Field( default=None, description="Common response") id: Optional[str] = Field(default=None, @@ -60,9 +70,7 @@ class GetStopOrderByOrderIdResp(BaseModel, Response): alias="userId") status: Optional[str] = Field( default=None, description="Order status, include NEW, TRIGGERED") - type: Optional[str] = Field( - default=None, - description="Order type,limit, market, limit_stop or market_stop") + type: Optional[TypeEnum] = Field(default=None, description="Order type") side: Optional[str] = Field( default=None, description="transaction direction,include buy and sell") price: Optional[str] = Field(default=None, description="order price") diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_orders_list_items.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_orders_list_items.py index 9bcac3ed..ac8d0abb 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_orders_list_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_orders_list_items.py @@ -6,6 +6,7 @@ import pprint import json +from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional @@ -19,7 +20,7 @@ class GetStopOrdersListItems(BaseModel): symbol (str): Symbol name user_id (str): User ID status (str): Order status, include NEW, TRIGGERED - type (str): Order type,limit, market, limit_stop or market_stop + type (TypeEnum): Order type side (str): transaction direction,include buy and sell price (str): order price size (str): order quantity @@ -46,8 +47,21 @@ class GetStopOrdersListItems(BaseModel): stop (str): Stop order type, include loss and entry stop_trigger_time (int): The trigger time of the stop order stop_price (str): stop price + related_no (str): + limit_price (str): + pop (str): + activate_condition (str): """ + class TypeEnum(Enum): + """ + Attributes: + LIMIT: Limit order + MARKET: Market order + """ + LIMIT = 'limit' + MARKET = 'market' + id: Optional[str] = Field(default=None, description="Order ID, the ID of an order.") symbol: Optional[str] = Field(default=None, description="Symbol name") @@ -56,9 +70,7 @@ class GetStopOrdersListItems(BaseModel): alias="userId") status: Optional[str] = Field( default=None, description="Order status, include NEW, TRIGGERED") - type: Optional[str] = Field( - default=None, - description="Order type,limit, market, limit_stop or market_stop") + type: Optional[TypeEnum] = Field(default=None, description="Order type") side: Optional[str] = Field( default=None, description="transaction direction,include buy and sell") price: Optional[str] = Field(default=None, description="order price") @@ -129,6 +141,11 @@ class GetStopOrdersListItems(BaseModel): stop_price: Optional[str] = Field(default=None, description="stop price", alias="stopPrice") + related_no: Optional[str] = Field(default=None, alias="relatedNo") + limit_price: Optional[str] = Field(default=None, alias="limitPrice") + pop: Optional[str] = None + activate_condition: Optional[str] = Field(default=None, + alias="activateCondition") __properties: ClassVar[List[str]] = [ "id", "symbol", "userId", "status", "type", "side", "price", "size", @@ -136,7 +153,7 @@ class GetStopOrdersListItems(BaseModel): "iceberg", "visibleSize", "channel", "clientOid", "remark", "tags", "orderTime", "domainId", "tradeSource", "tradeType", "feeCurrency", "takerFeeRate", "makerFeeRate", "createdAt", "stop", "stopTriggerTime", - "stopPrice" + "stopPrice", "relatedNo", "limitPrice", "pop", "activateCondition" ] model_config = ConfigDict( @@ -173,36 +190,75 @@ def from_dict( return cls.model_validate(obj) _obj = cls.model_validate({ - "id": obj.get("id"), - "symbol": obj.get("symbol"), - "userId": obj.get("userId"), - "status": obj.get("status"), - "type": obj.get("type"), - "side": obj.get("side"), - "price": obj.get("price"), - "size": obj.get("size"), - "funds": obj.get("funds"), - "stp": obj.get("stp"), - "timeInForce": obj.get("timeInForce"), - "cancelAfter": obj.get("cancelAfter"), - "postOnly": obj.get("postOnly"), - "hidden": obj.get("hidden"), - "iceberg": obj.get("iceberg"), - "visibleSize": obj.get("visibleSize"), - "channel": obj.get("channel"), - "clientOid": obj.get("clientOid"), - "remark": obj.get("remark"), - "tags": obj.get("tags"), - "orderTime": obj.get("orderTime"), - "domainId": obj.get("domainId"), - "tradeSource": obj.get("tradeSource"), - "tradeType": obj.get("tradeType"), - "feeCurrency": obj.get("feeCurrency"), - "takerFeeRate": obj.get("takerFeeRate"), - "makerFeeRate": obj.get("makerFeeRate"), - "createdAt": obj.get("createdAt"), - "stop": obj.get("stop"), - "stopTriggerTime": obj.get("stopTriggerTime"), - "stopPrice": obj.get("stopPrice") + "id": + obj.get("id"), + "symbol": + obj.get("symbol"), + "userId": + obj.get("userId"), + "status": + obj.get("status"), + "type": + obj.get("type"), + "side": + obj.get("side"), + "price": + obj.get("price"), + "size": + obj.get("size"), + "funds": + obj.get("funds"), + "stp": + obj.get("stp"), + "timeInForce": + obj.get("timeInForce"), + "cancelAfter": + obj.get("cancelAfter"), + "postOnly": + obj.get("postOnly"), + "hidden": + obj.get("hidden"), + "iceberg": + obj.get("iceberg"), + "visibleSize": + obj.get("visibleSize"), + "channel": + obj.get("channel"), + "clientOid": + obj.get("clientOid"), + "remark": + obj.get("remark"), + "tags": + obj.get("tags"), + "orderTime": + obj.get("orderTime"), + "domainId": + obj.get("domainId"), + "tradeSource": + obj.get("tradeSource"), + "tradeType": + obj.get("tradeType"), + "feeCurrency": + obj.get("feeCurrency"), + "takerFeeRate": + obj.get("takerFeeRate"), + "makerFeeRate": + obj.get("makerFeeRate"), + "createdAt": + obj.get("createdAt"), + "stop": + obj.get("stop"), + "stopTriggerTime": + obj.get("stopTriggerTime"), + "stopPrice": + obj.get("stopPrice"), + "relatedNo": + obj.get("relatedNo"), + "limitPrice": + obj.get("limitPrice"), + "pop": + obj.get("pop"), + "activateCondition": + obj.get("activateCondition") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_orders_list_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_orders_list_req.py index 95184105..0403fa45 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_orders_list_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_stop_orders_list_req.py @@ -17,75 +17,50 @@ class GetStopOrdersListReq(BaseModel): Attributes: symbol (str): Only list orders for a specific symbol - side (SideEnum): buy or sell - type (TypeEnum): limit, market, limit_stop or market_stop - trade_type (TradeTypeEnum): The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE - start_at (float): Start time (milisecond) - end_at (float): End time (milisecond) - current_page (int): current page - order_ids (str): comma seperated order ID list - page_size (int): page size + side (str): buy or sell + type (TypeEnum): limit, market + trade_type (str): The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE + start_at (int): Start time (milisecond) + end_at (int): End time (milisecond) + current_page (int): Current page + order_ids (str): Comma seperated order ID list + page_size (int): Page size stop (str): Order type: stop: stop loss order, oco: oco order """ - class SideEnum(Enum): - """ - Attributes: - BUY: - SELL: - """ - BUY = 'buy' - SELL = 'sell' - class TypeEnum(Enum): """ Attributes: - LIMIT: - MARKET: - LIMIT_STOP: - MARKET_STOP: + LIMIT: limit order + MARKET: market order """ LIMIT = 'limit' MARKET = 'market' - LIMIT_STOP = 'limit_stop' - MARKET_STOP = 'market_stop' - - class TradeTypeEnum(Enum): - """ - Attributes: - TRADE: - MARGIN_TRADE: - MARGIN_ISOLATED_TRADE: - """ - TRADE = 'TRADE' - MARGIN_TRADE = 'MARGIN_TRADE' - MARGIN_ISOLATED_TRADE = 'MARGIN_ISOLATED_TRADE' symbol: Optional[str] = Field( default=None, description="Only list orders for a specific symbol") - side: Optional[SideEnum] = Field(default=None, description="buy or sell") - type: Optional[TypeEnum] = Field( - default=None, description="limit, market, limit_stop or market_stop") - trade_type: Optional[TradeTypeEnum] = Field( + side: Optional[str] = Field(default=None, description="buy or sell") + type: Optional[TypeEnum] = Field(default=None, description="limit, market") + trade_type: Optional[str] = Field( default=None, description= "The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE", alias="tradeType") - start_at: Optional[float] = Field(default=None, - description="Start time (milisecond)", - alias="startAt") - end_at: Optional[float] = Field(default=None, - description="End time (milisecond)", - alias="endAt") - current_page: Optional[int] = Field(default=None, - description="current page", + start_at: Optional[int] = Field(default=None, + description="Start time (milisecond)", + alias="startAt") + end_at: Optional[int] = Field(default=None, + description="End time (milisecond)", + alias="endAt") + current_page: Optional[int] = Field(default=1, + description="Current page ", alias="currentPage") order_ids: Optional[str] = Field( default=None, - description="comma seperated order ID list", + description="Comma seperated order ID list", alias="orderIds") - page_size: Optional[int] = Field(default=None, - description="page size", + page_size: Optional[int] = Field(default=50, + description="Page size", alias="pageSize") stop: Optional[str] = Field( default=None, @@ -130,16 +105,27 @@ def from_dict( return cls.model_validate(obj) _obj = cls.model_validate({ - "symbol": obj.get("symbol"), - "side": obj.get("side"), - "type": obj.get("type"), - "tradeType": obj.get("tradeType"), - "startAt": obj.get("startAt"), - "endAt": obj.get("endAt"), - "currentPage": obj.get("currentPage"), - "orderIds": obj.get("orderIds"), - "pageSize": obj.get("pageSize"), - "stop": obj.get("stop") + "symbol": + obj.get("symbol"), + "side": + obj.get("side"), + "type": + obj.get("type"), + "tradeType": + obj.get("tradeType"), + "startAt": + obj.get("startAt"), + "endAt": + obj.get("endAt"), + "currentPage": + obj.get("currentPage") + if obj.get("currentPage") is not None else 1, + "orderIds": + obj.get("orderIds"), + "pageSize": + obj.get("pageSize") if obj.get("pageSize") is not None else 50, + "stop": + obj.get("stop") }) return _obj @@ -156,9 +142,7 @@ def set_symbol(self, value: str) -> GetStopOrdersListReqBuilder: self.obj['symbol'] = value return self - def set_side( - self, value: GetStopOrdersListReq.SideEnum - ) -> GetStopOrdersListReqBuilder: + def set_side(self, value: str) -> GetStopOrdersListReqBuilder: """ buy or sell """ @@ -169,28 +153,26 @@ def set_type( self, value: GetStopOrdersListReq.TypeEnum ) -> GetStopOrdersListReqBuilder: """ - limit, market, limit_stop or market_stop + limit, market """ self.obj['type'] = value return self - def set_trade_type( - self, value: GetStopOrdersListReq.TradeTypeEnum - ) -> GetStopOrdersListReqBuilder: + def set_trade_type(self, value: str) -> GetStopOrdersListReqBuilder: """ The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE """ self.obj['tradeType'] = value return self - def set_start_at(self, value: float) -> GetStopOrdersListReqBuilder: + def set_start_at(self, value: int) -> GetStopOrdersListReqBuilder: """ Start time (milisecond) """ self.obj['startAt'] = value return self - def set_end_at(self, value: float) -> GetStopOrdersListReqBuilder: + def set_end_at(self, value: int) -> GetStopOrdersListReqBuilder: """ End time (milisecond) """ @@ -199,21 +181,21 @@ def set_end_at(self, value: float) -> GetStopOrdersListReqBuilder: def set_current_page(self, value: int) -> GetStopOrdersListReqBuilder: """ - current page + Current page """ self.obj['currentPage'] = value return self def set_order_ids(self, value: str) -> GetStopOrdersListReqBuilder: """ - comma seperated order ID list + Comma seperated order ID list """ self.obj['orderIds'] = value return self def set_page_size(self, value: int) -> GetStopOrdersListReqBuilder: """ - page size + Page size """ self.obj['pageSize'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_trade_history_old_items.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_trade_history_old_items.py index e68b2031..08d85fec 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_trade_history_old_items.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_trade_history_old_items.py @@ -18,19 +18,19 @@ class GetTradeHistoryOldItems(BaseModel): symbol (str): symbol trade_id (str): order_id (str): The unique order id generated by the trading system - counter_order_id (str): Counterparty order Id + counter_order_id (str): Counterparty order ID side (str): Buy or sell liquidity (str): Liquidity type: taker or maker force_taker (bool): - price (str): Order price - size (str): Order size + price (str): Order Price + size (str): Order Size funds (str): Order Funds fee (str): [Handling fees](https://www.kucoin.com/docs-new/api-5327739) fee_rate (str): Fee rate - fee_currency (str): currency used to calculate trading fee + fee_currency (str): Currency used to calculate trading fee stop (str): Take Profit and Stop Loss type, currently HFT does not support the Take Profit and Stop Loss type, so it is empty trade_type (str): Trade type, redundancy param - type (str): Specify if the order is an 'limit' order or 'market' order. + type (str): Specify if the order is a 'limit' order or 'market' order. created_at (int): """ @@ -42,14 +42,14 @@ class GetTradeHistoryOldItems(BaseModel): alias="orderId") counter_order_id: Optional[str] = Field( default=None, - description="Counterparty order Id", + description="Counterparty order ID", alias="counterOrderId") side: Optional[str] = Field(default=None, description="Buy or sell") liquidity: Optional[str] = Field( default=None, description="Liquidity type: taker or maker") force_taker: Optional[bool] = Field(default=None, alias="forceTaker") - price: Optional[str] = Field(default=None, description="Order price") - size: Optional[str] = Field(default=None, description="Order size") + price: Optional[str] = Field(default=None, description="Order Price") + size: Optional[str] = Field(default=None, description="Order Size") funds: Optional[str] = Field(default=None, description="Order Funds") fee: Optional[str] = Field( default=None, @@ -60,7 +60,7 @@ class GetTradeHistoryOldItems(BaseModel): alias="feeRate") fee_currency: Optional[str] = Field( default=None, - description="currency used to calculate trading fee", + description="Currency used to calculate trading fee", alias="feeCurrency") stop: Optional[str] = Field( default=None, @@ -74,7 +74,7 @@ class GetTradeHistoryOldItems(BaseModel): type: Optional[str] = Field( default=None, description= - "Specify if the order is an 'limit' order or 'market' order. ") + "Specify if the order is a 'limit' order or 'market' order. ") created_at: Optional[int] = Field(default=None, alias="createdAt") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_trade_history_old_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_trade_history_old_req.py index e6212942..fad5eb48 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_trade_history_old_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_trade_history_old_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetTradeHistoryOldReq(BaseModel): @@ -18,12 +17,12 @@ class GetTradeHistoryOldReq(BaseModel): Attributes: symbol (str): symbol - order_id (str): The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters) - side (SideEnum): specify if the order is to 'buy' or 'sell' + order_id (str): The unique order ID generated by the trading system. (If orderId is specified, please ignore the other query parameters.) + side (SideEnum): Specify if the order is to 'buy' or 'sell'. type (TypeEnum): limit, market, limit_stop or market_stop - trade_type (TradeTypeEnum): The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. - start_at (int): Start time (milisecond) - end_at (int): End time (milisecond) + trade_type (TradeTypeEnum): The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. + start_at (int): Start time (milliseconds) + end_at (int): End time (milliseconds) current_page (int): Current request page. page_size (int): Number of results per request. Minimum is 10, maximum is 500. """ @@ -65,32 +64,32 @@ class TradeTypeEnum(Enum): order_id: Optional[str] = Field( default=None, description= - "The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters)", + "The unique order ID generated by the trading system. (If orderId is specified, please ignore the other query parameters.)", alias="orderId") side: Optional[SideEnum] = Field( - default=None, description="specify if the order is to 'buy' or 'sell'") + default=None, + description="Specify if the order is to 'buy' or 'sell'.") type: Optional[TypeEnum] = Field( default=None, description="limit, market, limit_stop or market_stop ") trade_type: Optional[TradeTypeEnum] = Field( default=TradeTypeEnum.TRADE, description= - "The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading.", + "The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading.", alias="tradeType") start_at: Optional[int] = Field(default=None, - description="Start time (milisecond)", + description="Start time (milliseconds)", alias="startAt") end_at: Optional[int] = Field(default=None, - description="End time (milisecond)", + description="End time (milliseconds)", alias="endAt") current_page: Optional[int] = Field(default=1, description="Current request page.", alias="currentPage") - page_size: Optional[Annotated[ - int, Field(le=500, strict=True, ge=10)]] = Field( - default=None, - description= - "Number of results per request. Minimum is 10, maximum is 500.", - alias="pageSize") + page_size: Optional[int] = Field( + default=None, + description= + "Number of results per request. Minimum is 10, maximum is 500.", + alias="pageSize") __properties: ClassVar[List[str]] = [ "symbol", "orderId", "side", "type", "tradeType", "startAt", "endAt", @@ -169,7 +168,7 @@ def set_symbol(self, value: str) -> GetTradeHistoryOldReqBuilder: def set_order_id(self, value: str) -> GetTradeHistoryOldReqBuilder: """ - The unique order id generated by the trading system (If orderId is specified,please ignore the other query parameters) + The unique order ID generated by the trading system. (If orderId is specified, please ignore the other query parameters.) """ self.obj['orderId'] = value return self @@ -178,7 +177,7 @@ def set_side( self, value: GetTradeHistoryOldReq.SideEnum ) -> GetTradeHistoryOldReqBuilder: """ - specify if the order is to 'buy' or 'sell' + Specify if the order is to 'buy' or 'sell'. """ self.obj['side'] = value return self @@ -196,21 +195,21 @@ def set_trade_type( self, value: GetTradeHistoryOldReq.TradeTypeEnum ) -> GetTradeHistoryOldReqBuilder: """ - The type of trading:TRADE - Spot Trading(TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. + The type of trading: TRADE - Spot Trading (TRADE as default), MARGIN_TRADE - Cross Margin Trading, MARGIN_ISOLATED_TRADE - Isolated Margin Trading. """ self.obj['tradeType'] = value return self def set_start_at(self, value: int) -> GetTradeHistoryOldReqBuilder: """ - Start time (milisecond) + Start time (milliseconds) """ self.obj['startAt'] = value return self def set_end_at(self, value: int) -> GetTradeHistoryOldReqBuilder: """ - End time (milisecond) + End time (milliseconds) """ self.obj['endAt'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_trade_history_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_trade_history_req.py index f988295b..60c49ab7 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_trade_history_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_get_trade_history_req.py @@ -9,7 +9,6 @@ from enum import Enum from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated class GetTradeHistoryReq(BaseModel): @@ -62,8 +61,7 @@ class TypeEnum(Enum): description= "The id of the last set of data from the previous batch of data. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page.", alias="lastId") - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = Field( - default=20, description="Default20,Max100") + limit: Optional[int] = Field(default=20, description="Default20,Max100") start_at: Optional[int] = Field(default=None, description="Start time (milisecond)", alias="startAt") diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_modify_order_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_modify_order_req.py index 628b5f95..ac93f8a6 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_modify_order_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_modify_order_req.py @@ -15,32 +15,33 @@ class ModifyOrderReq(BaseModel): ModifyOrderReq Attributes: - client_oid (str): The old client order id,orderId and clientOid must choose one + client_oid (str): One must be chose out of the old client order ID, orderId and clientOid symbol (str): symbol - order_id (str): The old order id, orderId and clientOid must choose one - new_price (str): The modified price of the new order, newPrice and newSize must choose one - new_size (str): The modified size of the new order, newPrice and newSize must choose one + order_id (str): One must be chosen out of the old order id, orderId and clientOid + new_price (str): One must be chosen out of the modified price of the new order, newPrice and newSize + new_size (str): One must be chosen out of the modified size of the new order, newPrice and newSize """ client_oid: Optional[str] = Field( default=None, description= - "The old client order id,orderId and clientOid must choose one", + "One must be chose out of the old client order ID, orderId and clientOid", alias="clientOid") symbol: Optional[str] = Field(default=None, description="symbol") order_id: Optional[str] = Field( default=None, - description="The old order id, orderId and clientOid must choose one", + description= + "One must be chosen out of the old order id, orderId and clientOid", alias="orderId") new_price: Optional[str] = Field( default=None, description= - "The modified price of the new order, newPrice and newSize must choose one", + "One must be chosen out of the modified price of the new order, newPrice and newSize", alias="newPrice") new_size: Optional[str] = Field( default=None, description= - "The modified size of the new order, newPrice and newSize must choose one", + "One must be chosen out of the modified size of the new order, newPrice and newSize", alias="newSize") __properties: ClassVar[List[str]] = [ @@ -96,7 +97,7 @@ def __init__(self): def set_client_oid(self, value: str) -> ModifyOrderReqBuilder: """ - The old client order id,orderId and clientOid must choose one + One must be chose out of the old client order ID, orderId and clientOid """ self.obj['clientOid'] = value return self @@ -110,21 +111,21 @@ def set_symbol(self, value: str) -> ModifyOrderReqBuilder: def set_order_id(self, value: str) -> ModifyOrderReqBuilder: """ - The old order id, orderId and clientOid must choose one + One must be chosen out of the old order id, orderId and clientOid """ self.obj['orderId'] = value return self def set_new_price(self, value: str) -> ModifyOrderReqBuilder: """ - The modified price of the new order, newPrice and newSize must choose one + One must be chosen out of the modified price of the new order, newPrice and newSize """ self.obj['newPrice'] = value return self def set_new_size(self, value: str) -> ModifyOrderReqBuilder: """ - The modified size of the new order, newPrice and newSize must choose one + One must be chosen out of the modified size of the new order, newPrice and newSize """ self.obj['newSize'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_modify_order_resp.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_modify_order_resp.py index ad4921e1..ce416298 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_modify_order_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_modify_order_resp.py @@ -17,18 +17,18 @@ class ModifyOrderResp(BaseModel, Response): ModifyOrderResp Attributes: - new_order_id (str): The new order id - client_oid (str): The original client order id + new_order_id (str): The new order ID + client_oid (str): The original client order ID """ common_response: Optional[RestResponse] = Field( default=None, description="Common response") new_order_id: Optional[str] = Field(default=None, - description="The new order id", + description="The new order ID", alias="newOrderId") client_oid: Optional[str] = Field( default=None, - description="The original client order id", + description="The original client order ID", alias="clientOid") __properties: ClassVar[List[str]] = ["newOrderId", "clientOid"] diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_set_dcp_req.py b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_set_dcp_req.py index c0278ce5..96ab48e0 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/order/model_set_dcp_req.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/order/model_set_dcp_req.py @@ -15,14 +15,14 @@ class SetDcpReq(BaseModel): SetDcpReq Attributes: - timeout (int): Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. + timeout (int): Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. symbols (str): List of trading pairs. When this parameter is not empty, separate it with commas and support up to 50 trading pairs. Empty means all trading pairs. When this parameter is changed, the previous setting will be overwritten. """ timeout: Optional[int] = Field( default=None, description= - "Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten." + "Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten." ) symbols: Optional[str] = Field( default=None, @@ -77,7 +77,7 @@ def __init__(self): def set_timeout(self, value: int) -> SetDcpReqBuilder: """ - Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. + Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten. """ self.obj['timeout'] = value return self diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/__init__.py b/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/__init__.py index cead4c42..40704fc2 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/__init__.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/__init__.py @@ -2,4 +2,5 @@ from .model_account_relation_context import AccountRelationContext from .model_order_v1_event import OrderV1Event from .model_order_v2_event import OrderV2Event +from .model_stop_order_event import StopOrderEvent from .ws_spot_private import SpotPrivateWS diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/api_spot_private_test.py b/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/api_spot_private_test.py index e0d8c5fe..08b4ddb7 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/api_spot_private_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/api_spot_private_test.py @@ -2,6 +2,7 @@ from .model_account_event import AccountEvent from .model_order_v1_event import OrderV1Event from .model_order_v2_event import OrderV2Event +from .model_stop_order_event import StopOrderEvent from kucoin_universal_sdk.model.common import WsMessage @@ -36,3 +37,13 @@ def test_order_v2_resp_model(self): data = "{\"topic\":\"/spotMarket/tradeOrdersV2\",\"type\":\"message\",\"subject\":\"orderChange\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"clientOid\":\"5c52e11203aa677f33e493fc\",\"orderId\":\"6720da3fa30a360007f5f832\",\"orderTime\":1730206271588,\"orderType\":\"market\",\"originSize\":\"0.00001\",\"side\":\"buy\",\"status\":\"new\",\"symbol\":\"BTC-USDT\",\"ts\":1730206271616000000,\"type\":\"received\"}}" common_response = WsMessage.from_json(data) resp = OrderV2Event.from_dict(common_response.raw_data) + + def test_stop_order_resp_model(self): + """ + stop_order + Get Stop Order + /stopOrder/spotMarket/advancedOrders + """ + data = "{\"topic\":\"/spotMarket/advancedOrders\",\"type\":\"message\",\"subject\":\"stopOrder\",\"userId\":\"633559791e1cbc0001f319bc\",\"channelType\":\"private\",\"data\":{\"orderId\":\"vs93gpupfa48anof003u85mb\",\"orderPrice\":\"70000\",\"orderType\":\"stop\",\"side\":\"buy\",\"size\":\"0.00007142\",\"stop\":\"loss\",\"stopPrice\":\"71000\",\"symbol\":\"BTC-USDT\",\"tradeType\":\"TRADE\",\"type\":\"open\",\"createdAt\":1742305928064,\"ts\":1742305928091268493}}" + common_response = WsMessage.from_json(data) + resp = StopOrderEvent.from_dict(common_response.raw_data) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/model_order_v1_event.py b/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/model_order_v1_event.py index e32906f3..54666ae4 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/model_order_v1_event.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/model_order_v1_event.py @@ -19,10 +19,10 @@ class OrderV1Event(BaseModel): Attributes: canceled_size (str): Cumulative number of cancellations - client_oid (str): Client Order Id,The ClientOid field is a unique ID created by the user - filled_size (str): Cumulative number of filled + client_oid (str): Client Order ID: The ClientOid field is a unique ID created by the user + filled_size (str): Cumulative number filled order_id (str): The unique order id generated by the trading system - order_time (int): Order time(millisecond) + order_time (int): Order time (milliseconds) order_type (OrderTypeEnum): User-specified order type origin_size (str): User-specified order size price (str): Specify price for currency @@ -32,14 +32,14 @@ class OrderV1Event(BaseModel): size (str): User-specified order size status (StatusEnum): Order Status symbol (str): Symbol - ts (int): Push time(Nanosecond) + ts (int): Push time (nanoseconds) type (TypeEnum): Order Type old_size (str): The size before order update fee_type (FeeTypeEnum): Actual Fee Type liquidity (LiquidityEnum): Actual transaction order type, If the counterparty order is an [Hidden/Iceberg Order](https://www.kucoin.com/docs-new/doc-338146), even if it is a maker order, this param will be displayed as taker. For actual trading fee, please refer to the **feeType** match_price (str): Match Price (when the type is \"match\") match_size (str): Match Size (when the type is \"match\") - trade_id (str): Trade id, it is generated by Matching engine. + trade_id (str): Trade ID: Generated by Matching engine. """ class OrderTypeEnum(Enum): @@ -64,7 +64,7 @@ class StatusEnum(Enum): """ Attributes: NEW: the order enters the matching system - OPEN: the order is in the order book(maker order) + OPEN: the order is in the order book (maker order) MATCH: when taker order executes with orders in the order book, the taker order status is “match” DONE: the order is fully executed successfully """ @@ -76,9 +76,9 @@ class StatusEnum(Enum): class TypeEnum(Enum): """ Attributes: - OPEN: the order is in the order book(maker order) - MATCH: the message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. - UPDATE: The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three situations: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. + OPEN: the order is in the order book (maker order) + MATCH: The message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. + UPDATE: The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three scenarios: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. FILLED: The message sent when the status of the order changes to DONE after the transaction CANCELED: The message sent when the status of the order changes to DONE due to being canceled """ @@ -115,18 +115,17 @@ class LiquidityEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Client Order Id,The ClientOid field is a unique ID created by the user", + "Client Order ID: The ClientOid field is a unique ID created by the user", alias="clientOid") - filled_size: Optional[str] = Field( - default=None, - description="Cumulative number of filled", - alias="filledSize") + filled_size: Optional[str] = Field(default=None, + description="Cumulative number filled", + alias="filledSize") order_id: Optional[str] = Field( default=None, description="The unique order id generated by the trading system", alias="orderId") order_time: Optional[int] = Field(default=None, - description="Order time(millisecond)", + description="Order time (milliseconds)", alias="orderTime") order_type: Optional[OrderTypeEnum] = Field( default=None, @@ -150,7 +149,7 @@ class LiquidityEnum(Enum): description="Order Status") symbol: Optional[str] = Field(default=None, description="Symbol") ts: Optional[int] = Field(default=None, - description="Push time(Nanosecond)") + description="Push time (nanoseconds)") type: Optional[TypeEnum] = Field(default=None, description="Order Type") old_size: Optional[str] = Field(default=None, description="The size before order update", @@ -173,7 +172,7 @@ class LiquidityEnum(Enum): alias="matchSize") trade_id: Optional[str] = Field( default=None, - description="Trade id, it is generated by Matching engine.", + description="Trade ID: Generated by Matching engine.", alias="tradeId") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/model_order_v2_event.py b/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/model_order_v2_event.py index 19e3d7c3..67537d07 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/model_order_v2_event.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/model_order_v2_event.py @@ -19,10 +19,10 @@ class OrderV2Event(BaseModel): Attributes: canceled_size (str): Cumulative number of cancellations - client_oid (str): Client Order Id,The ClientOid field is a unique ID created by the user - filled_size (str): Cumulative number of filled + client_oid (str): Client Order ID: The ClientOid field is a unique ID created by the user + filled_size (str): Cumulative number filled order_id (str): The unique order id generated by the trading system - order_time (int): Order time(millisecond) + order_time (int): Order time (milliseconds) order_type (OrderTypeEnum): User-specified order type origin_size (str): User-specified order size price (str): Price @@ -32,14 +32,14 @@ class OrderV2Event(BaseModel): size (str): User-specified order size status (StatusEnum): Order Status symbol (str): Symbol - ts (int): Push time(Nanosecond) + ts (int): Push time (nanoseconds) type (TypeEnum): Order Type old_size (str): The size before order update fee_type (FeeTypeEnum): Actual Fee Type liquidity (LiquidityEnum): Actual transaction order type, If the counterparty order is an [Hidden/Iceberg Order](https://www.kucoin.com/docs-new/doc-338146), even if it is a maker order, this param will be displayed as taker. For actual trading fee, please refer to the **feeType** match_price (str): Match Price (when the type is \"match\") match_size (str): Match Size (when the type is \"match\") - trade_id (str): Trade id, it is generated by Matching engine. + trade_id (str): Trade ID: Generated by Matching engine. """ class OrderTypeEnum(Enum): @@ -64,7 +64,7 @@ class StatusEnum(Enum): """ Attributes: NEW: the order enters the matching system - OPEN: the order is in the order book(maker order) + OPEN: the order is in the order book (maker order) MATCH: when taker order executes with orders in the order book, the taker order status is “match” DONE: the order is fully executed successfully """ @@ -76,9 +76,9 @@ class StatusEnum(Enum): class TypeEnum(Enum): """ Attributes: - OPEN: the order is in the order book(maker order) - MATCH: the message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. - UPDATE: The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three situations: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. + OPEN: the order is in the order book (maker order) + MATCH: The message sent when the order is match, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. + UPDATE: The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three scenarios: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. FILLED: The message sent when the status of the order changes to DONE after the transaction CANCELED: The message sent when the status of the order changes to DONE due to being canceled RECEIVED: The message sent when the order enters the matching system. When the order has just entered the matching system and has not yet done matching logic with the counterparty, a private message with the message type "received" and the order status "new" will be pushed. @@ -117,18 +117,17 @@ class LiquidityEnum(Enum): client_oid: Optional[str] = Field( default=None, description= - "Client Order Id,The ClientOid field is a unique ID created by the user", + "Client Order ID: The ClientOid field is a unique ID created by the user", alias="clientOid") - filled_size: Optional[str] = Field( - default=None, - description="Cumulative number of filled", - alias="filledSize") + filled_size: Optional[str] = Field(default=None, + description="Cumulative number filled", + alias="filledSize") order_id: Optional[str] = Field( default=None, description="The unique order id generated by the trading system", alias="orderId") order_time: Optional[int] = Field(default=None, - description="Order time(millisecond)", + description="Order time (milliseconds)", alias="orderTime") order_type: Optional[OrderTypeEnum] = Field( default=None, @@ -151,7 +150,7 @@ class LiquidityEnum(Enum): description="Order Status") symbol: Optional[str] = Field(default=None, description="Symbol") ts: Optional[int] = Field(default=None, - description="Push time(Nanosecond)") + description="Push time (nanoseconds)") type: Optional[TypeEnum] = Field(default=None, description="Order Type") old_size: Optional[str] = Field(default=None, description="The size before order update", @@ -174,7 +173,7 @@ class LiquidityEnum(Enum): alias="matchSize") trade_id: Optional[str] = Field( default=None, - description="Trade id, it is generated by Matching engine.", + description="Trade ID: Generated by Matching engine.", alias="tradeId") __properties: ClassVar[List[str]] = [ diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/model_stop_order_event.py b/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/model_stop_order_event.py new file mode 100644 index 00000000..a910a926 --- /dev/null +++ b/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/model_stop_order_event.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +# Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +from __future__ import annotations +import pprint +import json + +from enum import Enum +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, Callable, ClassVar, Dict, List, Optional +from kucoin_universal_sdk.internal.interfaces.websocket import WebSocketMessageCallback +from kucoin_universal_sdk.model.common import WsMessage + + +class StopOrderEvent(BaseModel): + """ + StopOrderEvent + + Attributes: + created_at (int): Order created time (milliseconds) + order_id (str): The unique order id generated by the trading system + order_price (str): Price + order_type (OrderTypeEnum): User-specified order type + side (SideEnum): buy or sell + size (str): User-specified order size + stop (StopEnum): Order type: loss: stop loss order, oco: oco order + stop_price (str): Stop Price + symbol (str): symbol + trade_type (TradeTypeEnum): The type of trading: TRADE (Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). + ts (int): Push time (nanoseconds) + type (TypeEnum): Order Type + """ + + class OrderTypeEnum(Enum): + """ + Attributes: + STOP: stop + """ + STOP = 'stop' + + class SideEnum(Enum): + """ + Attributes: + BUY: buy + SELL: sell + """ + BUY = 'buy' + SELL = 'sell' + + class StopEnum(Enum): + """ + Attributes: + LOSS: stop loss order + OCO: oco order + """ + LOSS = 'loss' + OCO = 'oco' + + class TradeTypeEnum(Enum): + """ + Attributes: + TRADE: Spot + MARGIN_TRADE: Spot margin trade + MARGIN_ISOLATED_TRADE: Spot margin isolated trade + """ + TRADE = 'TRADE' + MARGIN_TRADE = 'MARGIN_TRADE' + MARGIN_ISOLATED_TRADE = 'MARGIN_ISOLATED_TRADE' + + class TypeEnum(Enum): + """ + Attributes: + OPEN: The order is in the order book (maker order) + MATCH: The message sent when the order is matched, 1. When the status is open and the type is match, it is a maker match. 2. When the status is match and the type is match, it is a taker match. + UPDATE: The message sent due to the order being modified: STP triggering, partial cancellation of the order. Includes these three scenarios: 1. When the status is open and the type is update: partial amounts of the order have been canceled, or STP triggers 2. When the status is match and the type is update: STP triggers 3. When the status is done and the type is update: partial amounts of the order have been filled and the unfilled part got canceled, or STP is triggered. + FILLED: The message sent when the status of the order changes to DONE after the transaction + CANCEL: The message sent when the status of the order changes to DONE due to being canceled + RECEIVED: The message sent when the order enters the matching system. When the order has just entered the matching system and has not yet done matching logic with the counterparty, a private message with the message type "received" and the order status "new" will be pushed. + """ + OPEN = 'open' + MATCH = 'match' + UPDATE = 'update' + FILLED = 'filled' + CANCEL = 'cancel' + RECEIVED = 'received' + + common_response: Optional[WsMessage] = Field(default=None, + description="Common response") + created_at: Optional[int] = Field( + default=None, + description="Order created time (milliseconds)", + alias="createdAt") + order_id: Optional[str] = Field( + default=None, + description="The unique order id generated by the trading system", + alias="orderId") + order_price: Optional[str] = Field(default=None, + description="Price", + alias="orderPrice") + order_type: Optional[OrderTypeEnum] = Field( + default=None, + description="User-specified order type", + alias="orderType") + side: Optional[SideEnum] = Field(default=None, description="buy or sell") + size: Optional[str] = Field(default=None, + description="User-specified order size") + stop: Optional[StopEnum] = Field( + default=None, + description="Order type: loss: stop loss order, oco: oco order") + stop_price: Optional[str] = Field(default=None, + description="Stop Price", + alias="stopPrice") + symbol: Optional[str] = Field(default=None, description="symbol") + trade_type: Optional[TradeTypeEnum] = Field( + default=None, + description= + "The type of trading: TRADE (Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin).", + alias="tradeType") + ts: Optional[int] = Field(default=None, + description="Push time (nanoseconds)") + type: Optional[TypeEnum] = Field(default=None, description="Order Type") + + __properties: ClassVar[List[str]] = [ + "createdAt", "orderId", "orderPrice", "orderType", "side", "size", + "stop", "stopPrice", "symbol", "tradeType", "ts", "type" + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=False, + protected_namespaces=(), + ) + + def to_str(self) -> str: + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[StopOrderEvent]: + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + _dict = self.model_dump( + by_alias=True, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, + Any]]) -> Optional[StopOrderEvent]: + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdAt": obj.get("createdAt"), + "orderId": obj.get("orderId"), + "orderPrice": obj.get("orderPrice"), + "orderType": obj.get("orderType"), + "side": obj.get("side"), + "size": obj.get("size"), + "stop": obj.get("stop"), + "stopPrice": obj.get("stopPrice"), + "symbol": obj.get("symbol"), + "tradeType": obj.get("tradeType"), + "ts": obj.get("ts"), + "type": obj.get("type") + }) + return _obj + + +StopOrderEventCallback = Callable[[str, str, StopOrderEvent], None] +""" +args: + - topic (str) : topic + - subject (str): subject + - data (StopOrderEvent): event data +""" + + +class StopOrderEventCallbackWrapper(WebSocketMessageCallback): + + def __init__(self, cb: StopOrderEventCallback): + self.callback = cb + + def on_message(self, message: WsMessage): + event = StopOrderEvent.from_dict(message.raw_data) + event.common_response = message + self.callback(message.topic, message.subject, event) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/ws_spot_private.py b/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/ws_spot_private.py index c660dd49..7b6b48d2 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/ws_spot_private.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/spot_private/ws_spot_private.py @@ -5,6 +5,7 @@ from .model_account_event import AccountEventCallback, AccountEventCallbackWrapper from .model_order_v1_event import OrderV1EventCallback, OrderV1EventCallbackWrapper from .model_order_v2_event import OrderV2EventCallback, OrderV2EventCallbackWrapper +from .model_stop_order_event import StopOrderEventCallback, StopOrderEventCallbackWrapper class SpotPrivateWS(ABC): @@ -36,6 +37,15 @@ def order_v2(self, callback: OrderV2EventCallback) -> str: """ pass + @abstractmethod + def stop_order(self, callback: StopOrderEventCallback) -> str: + """ + summary: Get Stop Order + description: This topic will push all change events of your stop orders. + push frequency: real-time + """ + pass + @abstractmethod def unsubscribe(self, id: str): pass @@ -78,6 +88,14 @@ def order_v2(self, callback: OrderV2EventCallback) -> str: return self.transport.subscribe(topic_prefix, args, OrderV2EventCallbackWrapper(callback)) + def stop_order(self, callback: StopOrderEventCallback) -> str: + topic_prefix = "/spotMarket/advancedOrders" + + args = [] + + return self.transport.subscribe( + topic_prefix, args, StopOrderEventCallbackWrapper(callback)) + def unsubscribe(self, id: str): self.transport.unsubscribe(id) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/__init__.py b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/__init__.py index 35a6ec74..53bd9459 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/__init__.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/__init__.py @@ -1,4 +1,6 @@ from .model_all_tickers_event import AllTickersEvent +from .model_call_auction_info_event import CallAuctionInfoEvent +from .model_call_auction_orderbook_level50_event import CallAuctionOrderbookLevel50Event from .model_klines_event import KlinesEvent from .model_market_snapshot_data import MarketSnapshotData from .model_market_snapshot_data_market_change1h import MarketSnapshotDataMarketChange1h @@ -8,7 +10,6 @@ from .model_orderbook_increment_changes import OrderbookIncrementChanges from .model_orderbook_increment_event import OrderbookIncrementEvent from .model_orderbook_level1_event import OrderbookLevel1Event -from .model_orderbook_level50_changes import OrderbookLevel50Changes from .model_orderbook_level50_event import OrderbookLevel50Event from .model_orderbook_level5_event import OrderbookLevel5Event from .model_symbol_snapshot_data import SymbolSnapshotData diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/api_spot_public_test.py b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/api_spot_public_test.py index 5f913c0b..63e6c652 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/api_spot_public_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/api_spot_public_test.py @@ -1,5 +1,7 @@ import unittest from .model_all_tickers_event import AllTickersEvent +from .model_call_auction_info_event import CallAuctionInfoEvent +from .model_call_auction_orderbook_level50_event import CallAuctionOrderbookLevel50Event from .model_klines_event import KlinesEvent from .model_market_snapshot_event import MarketSnapshotEvent from .model_orderbook_increment_event import OrderbookIncrementEvent @@ -25,6 +27,27 @@ def test_all_tickers_resp_model(self): common_response = WsMessage.from_json(data) resp = AllTickersEvent.from_dict(common_response.raw_data) + def test_call_auction_info_resp_model(self): + """ + call_auction_info + Get Call Auction Info + /callAuctionInfo/callauction/callauctionData:_symbol_ + """ + data = "{\"type\":\"message\",\"topic\":\"/callauction/callauctionData:BTC-USDT\",\"subject\":\"callauction.callauctionData\",\"data\":{\"symbol\":\"BTC-USDT\",\"estimatedPrice\":\"0.17\",\"estimatedSize\":\"0.03715004\",\"sellOrderRangeLowPrice\":\"1.788\",\"sellOrderRangeHighPrice\":\"2.788\",\"buyOrderRangeLowPrice\":\"1.788\",\"buyOrderRangeHighPrice\":\"2.788\",\"time\":1550653727731}}" + common_response = WsMessage.from_json(data) + resp = CallAuctionInfoEvent.from_dict(common_response.raw_data) + + def test_call_auction_orderbook_level50_resp_model(self): + """ + call_auction_orderbook_level50 + CallAuctionOrderbook - Level50 + /callAuctionOrderbookLevel50/callauction/level2Depth50:_symbol_ + """ + data = "{\"topic\":\"/spotMarket/level2Depth50:BTC-USDT\",\"type\":\"message\",\"subject\":\"level2\",\"data\":{\"asks\":[[\"95964.3\",\"0.08168874\"],[\"95967.9\",\"0.00985094\"],[\"95969.9\",\"0.00078081\"],[\"95971.2\",\"0.10016039\"],[\"95971.3\",\"0.12531139\"],[\"95971.7\",\"0.00291\"],[\"95971.9\",\"0.10271829\"],[\"95973.3\",\"0.00021\"],[\"95974.7\",\"0.10271829\"],[\"95976.9\",\"0.03095177\"],[\"95977\",\"0.10271829\"],[\"95978.7\",\"0.00022411\"],[\"95979.1\",\"0.00023017\"],[\"95981\",\"0.00022008\"],[\"95981.2\",\"0.14330324\"],[\"95982.3\",\"0.27922082\"],[\"95982.5\",\"0.02302674\"],[\"95983.8\",\"0.00011035\"],[\"95985\",\"0.00104222\"],[\"95985.1\",\"0.00021808\"],[\"95985.5\",\"0.211127\"],[\"95986.2\",\"0.09690904\"],[\"95986.3\",\"0.31261\"],[\"95986.9\",\"0.09225037\"],[\"95987\",\"0.01042013\"],[\"95990.5\",\"0.12712438\"],[\"95990.6\",\"0.0916115\"],[\"95992.2\",\"0.279\"],[\"95992.7\",\"0.00521084\"],[\"95995.2\",\"0.00033\"],[\"95999.1\",\"0.02973561\"],[\"96001.1\",\"0.083825\"],[\"96002.6\",\"0.01900906\"],[\"96002.7\",\"0.00041665\"],[\"96002.8\",\"0.12531139\"],[\"96002.9\",\"0.279\"],[\"96004.8\",\"0.02081884\"],[\"96006.3\",\"0.00065542\"],[\"96008.5\",\"0.00033166\"],[\"96011\",\"0.08776246\"],[\"96012.5\",\"0.279\"],[\"96013.3\",\"0.00066666\"],[\"96013.9\",\"0.26097183\"],[\"96014\",\"0.01087009\"],[\"96017\",\"0.06248892\"],[\"96017.1\",\"0.20829641\"],[\"96022\",\"0.00107066\"],[\"96022.1\",\"0.279\"],[\"96022.9\",\"0.0006499\"],[\"96024.6\",\"0.00104131\"]],\"bids\":[[\"95964.2\",\"1.35483359\"],[\"95964.1\",\"0.01117492\"],[\"95962.1\",\"0.0062\"],[\"95961.8\",\"0.03081549\"],[\"95961.7\",\"0.10271829\"],[\"95958.5\",\"0.04681571\"],[\"95958.4\",\"0.05177498\"],[\"95958.2\",\"0.00155911\"],[\"95957.8\",\"0.10271829\"],[\"95954.7\",\"0.16312181\"],[\"95954.6\",\"0.44102109\"],[\"95952.6\",\"0.10271829\"],[\"95951.3\",\"0.0062\"],[\"95951\",\"0.17075141\"],[\"95950.9\",\"0.279\"],[\"95949.5\",\"0.13567811\"],[\"95949.2\",\"0.05177498\"],[\"95948.3\",\"0.10271829\"],[\"95947.2\",\"0.04634798\"],[\"95944.7\",\"0.10271829\"],[\"95944.2\",\"0.05177498\"],[\"95942.3\",\"0.26028569\"],[\"95942.2\",\"0.10271829\"],[\"95940.6\",\"0.12531139\"],[\"95940.2\",\"0.43349327\"],[\"95938.3\",\"0.01041604\"],[\"95937.4\",\"0.04957577\"],[\"95937.2\",\"0.00305\"],[\"95936.3\",\"0.10271829\"],[\"95934\",\"0.05177498\"],[\"95931.9\",\"0.03394093\"],[\"95931.8\",\"0.10271829\"],[\"95930\",\"0.01041814\"],[\"95927.9\",\"0.10271829\"],[\"95927\",\"0.13312774\"],[\"95926.9\",\"0.33077498\"],[\"95924.9\",\"0.10271829\"],[\"95924\",\"0.00180915\"],[\"95923.8\",\"0.00022434\"],[\"95919.6\",\"0.00021854\"],[\"95919.1\",\"0.01471872\"],[\"95919\",\"0.05177498\"],[\"95918.1\",\"0.00001889\"],[\"95917.8\",\"0.1521089\"],[\"95917.5\",\"0.00010962\"],[\"95916.2\",\"0.00021958\"],[\"95915.5\",\"0.12531139\"],[\"95915.3\",\"0.279\"],[\"95913.6\",\"0.01739249\"],[\"95913.5\",\"0.05177498\"]],\"timestamp\":1733124805073}}" + common_response = WsMessage.from_json(data) + resp = CallAuctionOrderbookLevel50Event.from_dict( + common_response.raw_data) + def test_klines_resp_model(self): """ klines @@ -69,7 +92,7 @@ def test_orderbook_level50_resp_model(self): """ orderbook_level50 Orderbook - Level50 - /orderbookLevel50/market/level2:_symbol_,_symbol_ + /orderbookLevel50/spotMarket/level2Depth50:_symbol_,_symbol_ """ data = "{\"topic\":\"/spotMarket/level2Depth50:BTC-USDT\",\"type\":\"message\",\"subject\":\"level2\",\"data\":{\"asks\":[[\"95964.3\",\"0.08168874\"],[\"95967.9\",\"0.00985094\"],[\"95969.9\",\"0.00078081\"],[\"95971.2\",\"0.10016039\"],[\"95971.3\",\"0.12531139\"],[\"95971.7\",\"0.00291\"],[\"95971.9\",\"0.10271829\"],[\"95973.3\",\"0.00021\"],[\"95974.7\",\"0.10271829\"],[\"95976.9\",\"0.03095177\"],[\"95977\",\"0.10271829\"],[\"95978.7\",\"0.00022411\"],[\"95979.1\",\"0.00023017\"],[\"95981\",\"0.00022008\"],[\"95981.2\",\"0.14330324\"],[\"95982.3\",\"0.27922082\"],[\"95982.5\",\"0.02302674\"],[\"95983.8\",\"0.00011035\"],[\"95985\",\"0.00104222\"],[\"95985.1\",\"0.00021808\"],[\"95985.5\",\"0.211127\"],[\"95986.2\",\"0.09690904\"],[\"95986.3\",\"0.31261\"],[\"95986.9\",\"0.09225037\"],[\"95987\",\"0.01042013\"],[\"95990.5\",\"0.12712438\"],[\"95990.6\",\"0.0916115\"],[\"95992.2\",\"0.279\"],[\"95992.7\",\"0.00521084\"],[\"95995.2\",\"0.00033\"],[\"95999.1\",\"0.02973561\"],[\"96001.1\",\"0.083825\"],[\"96002.6\",\"0.01900906\"],[\"96002.7\",\"0.00041665\"],[\"96002.8\",\"0.12531139\"],[\"96002.9\",\"0.279\"],[\"96004.8\",\"0.02081884\"],[\"96006.3\",\"0.00065542\"],[\"96008.5\",\"0.00033166\"],[\"96011\",\"0.08776246\"],[\"96012.5\",\"0.279\"],[\"96013.3\",\"0.00066666\"],[\"96013.9\",\"0.26097183\"],[\"96014\",\"0.01087009\"],[\"96017\",\"0.06248892\"],[\"96017.1\",\"0.20829641\"],[\"96022\",\"0.00107066\"],[\"96022.1\",\"0.279\"],[\"96022.9\",\"0.0006499\"],[\"96024.6\",\"0.00104131\"]],\"bids\":[[\"95964.2\",\"1.35483359\"],[\"95964.1\",\"0.01117492\"],[\"95962.1\",\"0.0062\"],[\"95961.8\",\"0.03081549\"],[\"95961.7\",\"0.10271829\"],[\"95958.5\",\"0.04681571\"],[\"95958.4\",\"0.05177498\"],[\"95958.2\",\"0.00155911\"],[\"95957.8\",\"0.10271829\"],[\"95954.7\",\"0.16312181\"],[\"95954.6\",\"0.44102109\"],[\"95952.6\",\"0.10271829\"],[\"95951.3\",\"0.0062\"],[\"95951\",\"0.17075141\"],[\"95950.9\",\"0.279\"],[\"95949.5\",\"0.13567811\"],[\"95949.2\",\"0.05177498\"],[\"95948.3\",\"0.10271829\"],[\"95947.2\",\"0.04634798\"],[\"95944.7\",\"0.10271829\"],[\"95944.2\",\"0.05177498\"],[\"95942.3\",\"0.26028569\"],[\"95942.2\",\"0.10271829\"],[\"95940.6\",\"0.12531139\"],[\"95940.2\",\"0.43349327\"],[\"95938.3\",\"0.01041604\"],[\"95937.4\",\"0.04957577\"],[\"95937.2\",\"0.00305\"],[\"95936.3\",\"0.10271829\"],[\"95934\",\"0.05177498\"],[\"95931.9\",\"0.03394093\"],[\"95931.8\",\"0.10271829\"],[\"95930\",\"0.01041814\"],[\"95927.9\",\"0.10271829\"],[\"95927\",\"0.13312774\"],[\"95926.9\",\"0.33077498\"],[\"95924.9\",\"0.10271829\"],[\"95924\",\"0.00180915\"],[\"95923.8\",\"0.00022434\"],[\"95919.6\",\"0.00021854\"],[\"95919.1\",\"0.01471872\"],[\"95919\",\"0.05177498\"],[\"95918.1\",\"0.00001889\"],[\"95917.8\",\"0.1521089\"],[\"95917.5\",\"0.00010962\"],[\"95916.2\",\"0.00021958\"],[\"95915.5\",\"0.12531139\"],[\"95915.3\",\"0.279\"],[\"95913.6\",\"0.01739249\"],[\"95913.5\",\"0.05177498\"]],\"timestamp\":1733124805073}}" common_response = WsMessage.from_json(data) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_call_auction_info_event.py b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_call_auction_info_event.py new file mode 100644 index 00000000..bfc7a955 --- /dev/null +++ b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_call_auction_info_event.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +# Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +from __future__ import annotations +import pprint +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, Callable, ClassVar, Dict, List, Optional +from kucoin_universal_sdk.internal.interfaces.websocket import WebSocketMessageCallback +from kucoin_universal_sdk.model.common import WsMessage + + +class CallAuctionInfoEvent(BaseModel): + """ + CallAuctionInfoEvent + + Attributes: + symbol (str): Symbol + estimated_price (str): Estimated price + estimated_size (str): Estimated size + sell_order_range_low_price (str): Sell ​​order minimum price + sell_order_range_high_price (str): Sell ​​order maximum price + buy_order_range_low_price (str): Buy ​​order minimum price + buy_order_range_high_price (str): Buy ​​order maximum price + time (int): Timestamp (ms) + """ + + common_response: Optional[WsMessage] = Field(default=None, + description="Common response") + symbol: Optional[str] = Field(default=None, description="Symbol") + estimated_price: Optional[str] = Field(default=None, + description="Estimated price", + alias="estimatedPrice") + estimated_size: Optional[str] = Field(default=None, + description="Estimated size", + alias="estimatedSize") + sell_order_range_low_price: Optional[str] = Field( + default=None, + description="Sell ​​order minimum price", + alias="sellOrderRangeLowPrice") + sell_order_range_high_price: Optional[str] = Field( + default=None, + description="Sell ​​order maximum price", + alias="sellOrderRangeHighPrice") + buy_order_range_low_price: Optional[str] = Field( + default=None, + description="Buy ​​order minimum price", + alias="buyOrderRangeLowPrice") + buy_order_range_high_price: Optional[str] = Field( + default=None, + description="Buy ​​order maximum price", + alias="buyOrderRangeHighPrice") + time: Optional[int] = Field(default=None, description="Timestamp (ms)") + + __properties: ClassVar[List[str]] = [ + "symbol", "estimatedPrice", "estimatedSize", "sellOrderRangeLowPrice", + "sellOrderRangeHighPrice", "buyOrderRangeLowPrice", + "buyOrderRangeHighPrice", "time" + ] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=False, + protected_namespaces=(), + ) + + def to_str(self) -> str: + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[CallAuctionInfoEvent]: + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + _dict = self.model_dump( + by_alias=True, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict( + cls, obj: Optional[Dict[str, + Any]]) -> Optional[CallAuctionInfoEvent]: + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": + obj.get("symbol"), + "estimatedPrice": + obj.get("estimatedPrice"), + "estimatedSize": + obj.get("estimatedSize"), + "sellOrderRangeLowPrice": + obj.get("sellOrderRangeLowPrice"), + "sellOrderRangeHighPrice": + obj.get("sellOrderRangeHighPrice"), + "buyOrderRangeLowPrice": + obj.get("buyOrderRangeLowPrice"), + "buyOrderRangeHighPrice": + obj.get("buyOrderRangeHighPrice"), + "time": + obj.get("time") + }) + return _obj + + +CallAuctionInfoEventCallback = Callable[[str, str, CallAuctionInfoEvent], None] +""" +args: + - topic (str) : topic + - subject (str): subject + - data (CallAuctionInfoEvent): event data +""" + + +class CallAuctionInfoEventCallbackWrapper(WebSocketMessageCallback): + + def __init__(self, cb: CallAuctionInfoEventCallback): + self.callback = cb + + def on_message(self, message: WsMessage): + event = CallAuctionInfoEvent.from_dict(message.raw_data) + event.common_response = message + self.callback(message.topic, message.subject, event) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_call_auction_orderbook_level50_event.py b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_call_auction_orderbook_level50_event.py new file mode 100644 index 00000000..0e579d7c --- /dev/null +++ b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_call_auction_orderbook_level50_event.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +# Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +from __future__ import annotations +import pprint +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, Callable, ClassVar, Dict, List, Optional +from kucoin_universal_sdk.internal.interfaces.websocket import WebSocketMessageCallback +from kucoin_universal_sdk.model.common import WsMessage + + +class CallAuctionOrderbookLevel50Event(BaseModel): + """ + CallAuctionOrderbookLevel50Event + + Attributes: + asks (list[list[str]]): price, size + bids (list[list[str]]): + timestamp (int): + """ + + common_response: Optional[WsMessage] = Field(default=None, + description="Common response") + asks: Optional[List[List[str]]] = Field(default=None, + description="price, size") + bids: Optional[List[List[str]]] = None + timestamp: Optional[int] = None + + __properties: ClassVar[List[str]] = ["asks", "bids", "timestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=False, + protected_namespaces=(), + ) + + def to_str(self) -> str: + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_none=True) + + @classmethod + def from_json(cls, + json_str: str) -> Optional[CallAuctionOrderbookLevel50Event]: + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + _dict = self.model_dump( + by_alias=True, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict( + cls, obj: Optional[Dict[str, Any]] + ) -> Optional[CallAuctionOrderbookLevel50Event]: + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asks": obj.get("asks"), + "bids": obj.get("bids"), + "timestamp": obj.get("timestamp") + }) + return _obj + + +CallAuctionOrderbookLevel50EventCallback = Callable[ + [str, str, CallAuctionOrderbookLevel50Event], None] +""" +args: + - topic (str) : topic + - subject (str): subject + - data (CallAuctionOrderbookLevel50Event): event data +""" + + +class CallAuctionOrderbookLevel50EventCallbackWrapper(WebSocketMessageCallback + ): + + def __init__(self, cb: CallAuctionOrderbookLevel50EventCallback): + self.callback = cb + + def on_message(self, message: WsMessage): + event = CallAuctionOrderbookLevel50Event.from_dict(message.raw_data) + event.common_response = message + self.callback(message.topic, message.subject, event) diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_market_snapshot_data.py b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_market_snapshot_data.py index e949366a..342f74dd 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_market_snapshot_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_market_snapshot_data.py @@ -23,7 +23,7 @@ class MarketSnapshotData(BaseModel): average_price (float): base_currency (str): bid_size (float): - board (BoardEnum): Trading pair partition: 0.primary partition 1.KuCoin Plus\", example = \"1\" + board (BoardEnum): Trading pair partition: 0. Primary partition 1.KuCoin Plus\", example = \"1\" buy (float): change_price (float): change_rate (float): @@ -35,7 +35,7 @@ class MarketSnapshotData(BaseModel): maker_coefficient (float): maker_fee_rate (float): margin_trade (bool): - mark (MarkEnum): Trading Pair Mark: 0.default 1.ST. 2.NEW\", example = \"1\" + mark (MarkEnum): Trading Pair Mark: 0. Default 1.ST. 2.NEW\", example = \"1\" market (str): market_change1h (MarketSnapshotDataMarketChange1h): market_change24h (MarketSnapshotDataMarketChange24h): @@ -82,7 +82,7 @@ class MarkEnum(Enum): board: Optional[BoardEnum] = Field( default=None, description= - "Trading pair partition: 0.primary partition 1.KuCoin Plus\", example = \"1\"" + "Trading pair partition: 0. Primary partition 1.KuCoin Plus\", example = \"1\"" ) buy: Optional[float] = None change_price: Optional[float] = Field(default=None, alias="changePrice") @@ -100,7 +100,7 @@ class MarkEnum(Enum): mark: Optional[MarkEnum] = Field( default=None, description= - "Trading Pair Mark: 0.default 1.ST. 2.NEW\", example = \"1\"") + "Trading Pair Mark: 0. Default 1.ST. 2.NEW\", example = \"1\"") market: Optional[str] = None market_change1h: Optional[MarketSnapshotDataMarketChange1h] = Field( default=None, alias="marketChange1h") diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_orderbook_level50_event.py b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_orderbook_level50_event.py index 82a91cb7..8baa9ea6 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_orderbook_level50_event.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_orderbook_level50_event.py @@ -8,7 +8,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, Callable, ClassVar, Dict, List, Optional -from .model_orderbook_level50_changes import OrderbookLevel50Changes from kucoin_universal_sdk.internal.interfaces.websocket import WebSocketMessageCallback from kucoin_universal_sdk.model.common import WsMessage @@ -18,24 +17,19 @@ class OrderbookLevel50Event(BaseModel): OrderbookLevel50Event Attributes: - changes (OrderbookLevel50Changes): - sequence_end (int): - sequence_start (int): - symbol (str): - time (int): + asks (list[list[str]]): price, size + bids (list[list[str]]): + timestamp (int): """ common_response: Optional[WsMessage] = Field(default=None, description="Common response") - changes: Optional[OrderbookLevel50Changes] = None - sequence_end: Optional[int] = Field(default=None, alias="sequenceEnd") - sequence_start: Optional[int] = Field(default=None, alias="sequenceStart") - symbol: Optional[str] = None - time: Optional[int] = None + asks: Optional[List[List[str]]] = Field(default=None, + description="price, size") + bids: Optional[List[List[str]]] = None + timestamp: Optional[int] = None - __properties: ClassVar[List[str]] = [ - "changes", "sequenceEnd", "sequenceStart", "symbol", "time" - ] + __properties: ClassVar[List[str]] = ["asks", "bids", "timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -58,9 +52,6 @@ def to_dict(self) -> Dict[str, Any]: by_alias=True, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of changes - if self.changes: - _dict['changes'] = self.changes.to_dict() return _dict @classmethod @@ -74,17 +65,9 @@ def from_dict( return cls.model_validate(obj) _obj = cls.model_validate({ - "changes": - OrderbookLevel50Changes.from_dict(obj["changes"]) - if obj.get("changes") is not None else None, - "sequenceEnd": - obj.get("sequenceEnd"), - "sequenceStart": - obj.get("sequenceStart"), - "symbol": - obj.get("symbol"), - "time": - obj.get("time") + "asks": obj.get("asks"), + "bids": obj.get("bids"), + "timestamp": obj.get("timestamp") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_symbol_snapshot_data.py b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_symbol_snapshot_data.py index 6ff61c3a..60cd2dff 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_symbol_snapshot_data.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_symbol_snapshot_data.py @@ -23,7 +23,7 @@ class SymbolSnapshotData(BaseModel): average_price (float): base_currency (str): bid_size (float): - board (BoardEnum): Trading pair partition: 0.primary partition 1.KuCoin Plus\", example = \"1\" + board (BoardEnum): Trading pair partition: 0. Primary partition 1.KuCoin Plus\", example = \"1\" buy (float): change_price (float): change_rate (float): @@ -35,7 +35,7 @@ class SymbolSnapshotData(BaseModel): maker_coefficient (float): maker_fee_rate (float): margin_trade (bool): - mark (MarkEnum): Trading Pair Mark: 0.default 1.ST. 2.NEW\", example = \"1\" + mark (MarkEnum): Trading Pair Mark: 0. Default 1.ST. 2.NEW\", example = \"1\" market (str): market_change1h (SymbolSnapshotDataMarketChange1h): market_change24h (SymbolSnapshotDataMarketChange24h): @@ -82,7 +82,7 @@ class MarkEnum(Enum): board: Optional[BoardEnum] = Field( default=None, description= - "Trading pair partition: 0.primary partition 1.KuCoin Plus\", example = \"1\"" + "Trading pair partition: 0. Primary partition 1.KuCoin Plus\", example = \"1\"" ) buy: Optional[float] = None change_price: Optional[float] = Field(default=None, alias="changePrice") @@ -100,7 +100,7 @@ class MarkEnum(Enum): mark: Optional[MarkEnum] = Field( default=None, description= - "Trading Pair Mark: 0.default 1.ST. 2.NEW\", example = \"1\"") + "Trading Pair Mark: 0. Default 1.ST. 2.NEW\", example = \"1\"") market: Optional[str] = None market_change1h: Optional[SymbolSnapshotDataMarketChange1h] = Field( default=None, alias="marketChange1h") diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_ticker_event.py b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_ticker_event.py index 53f345f5..e2159ba1 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_ticker_event.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/model_ticker_event.py @@ -47,12 +47,11 @@ class TickerEvent(BaseModel): alias="bestBidSize") time: Optional[int] = Field( default=None, - description="The matching time of the latest transaction", - alias="Time") + description="The matching time of the latest transaction") __properties: ClassVar[List[str]] = [ "sequence", "price", "size", "bestAsk", "bestAskSize", "bestBid", - "bestBidSize", "Time" + "bestBidSize", "time" ] model_config = ConfigDict( @@ -94,7 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[TickerEvent]: "bestAskSize": obj.get("bestAskSize"), "bestBid": obj.get("bestBid"), "bestBidSize": obj.get("bestBidSize"), - "Time": obj.get("Time") + "time": obj.get("time") }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/ws_spot_public.py b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/ws_spot_public.py index 1bc10d93..af2b6fb0 100644 --- a/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/ws_spot_public.py +++ b/sdk/python/kucoin_universal_sdk/generate/spot/spot_public/ws_spot_public.py @@ -3,6 +3,8 @@ from abc import ABC, abstractmethod from kucoin_universal_sdk.internal.interfaces.websocket import WebSocketService from .model_all_tickers_event import AllTickersEventCallback, AllTickersEventCallbackWrapper +from .model_call_auction_info_event import CallAuctionInfoEventCallback, CallAuctionInfoEventCallbackWrapper +from .model_call_auction_orderbook_level50_event import CallAuctionOrderbookLevel50EventCallback, CallAuctionOrderbookLevel50EventCallbackWrapper from .model_klines_event import KlinesEventCallback, KlinesEventCallbackWrapper from .model_market_snapshot_event import MarketSnapshotEventCallback, MarketSnapshotEventCallbackWrapper from .model_orderbook_increment_event import OrderbookIncrementEventCallback, OrderbookIncrementEventCallbackWrapper @@ -21,7 +23,28 @@ class SpotPublicWS(ABC): def all_tickers(self, callback: AllTickersEventCallback) -> str: """ summary: Get All Tickers - description: Subscribe to this topic to get the push of all market symbols BBO change. + description: Subscribe to this topic to get pushes on all market symbol BBO changes. + push frequency: once every 100ms + """ + pass + + @abstractmethod + def call_auction_info(self, symbol: str, + callback: CallAuctionInfoEventCallback) -> str: + """ + summary: Get Call Auction Info + description: Subscribe to this topic to get the specified symbol call auction info. + push frequency: once every 100ms + """ + pass + + @abstractmethod + def call_auction_orderbook_level50( + self, symbol: str, + callback: CallAuctionOrderbookLevel50EventCallback) -> str: + """ + summary: CallAuctionOrderbook - Level50 + description: The system will return the call auction 50 best ask/bid orders data; if there is no change in the market, data will not be pushed push frequency: once every 100ms """ pass @@ -41,7 +64,7 @@ def market_snapshot(self, market: str, callback: MarketSnapshotEventCallback) -> str: """ summary: Market Snapshot - description: Subscribe this topic to get the snapshot data of for the entire market. + description: Subscribe to this topic to get snapshot data for the entire market. push frequency: once every 2s """ pass @@ -51,7 +74,7 @@ def orderbook_increment(self, symbol: List[str], callback: OrderbookIncrementEventCallback) -> str: """ summary: Orderbook - Increment - description: The system will return the increment change orderbook data(All depth), A topic supports up to 100 symbols. If there is no change in the market, data will not be pushed + description: The system will return the increment change orderbook data (all depths); a topic supports up to 100 symbols. If there is no change in the market, data will not be pushed push frequency: real-time """ pass @@ -61,7 +84,7 @@ def orderbook_level1(self, symbol: List[str], callback: OrderbookLevel1EventCallback) -> str: """ summary: Orderbook - Level1 - description: The system will return the 1 best ask/bid orders data, A topic supports up to 100 symbols. If there is no change in the market, data will not be pushed + description: The system will return the 1 best ask/bid orders data; a topic supports up to 100 symbols. If there is no change in the market, data will not be pushed push frequency: once every 10ms """ pass @@ -71,7 +94,7 @@ def orderbook_level50(self, symbol: List[str], callback: OrderbookLevel50EventCallback) -> str: """ summary: Orderbook - Level50 - description: The system will return the 50 best ask/bid orders data, A topic supports up to 100 symbols. If there is no change in the market, data will not be pushed + description: The system will return data for the 50 best ask/bid orders; a topic supports up to 100 symbols. If there is no change in the market, data will not be pushed push frequency: once every 100ms """ pass @@ -81,7 +104,7 @@ def orderbook_level5(self, symbol: List[str], callback: OrderbookLevel5EventCallback) -> str: """ summary: Orderbook - Level5 - description: The system will return the 5 best ask/bid orders data,A topic supports up to 100 symbols. If there is no change in the market, data will not be pushed + description: The system will return the 5 best ask/bid orders data; a topic supports up to 100 symbols. If there is no change in the market, data will not be pushed push frequency: once every 100ms """ pass @@ -100,7 +123,7 @@ def symbol_snapshot(self, symbol: str, def ticker(self, symbol: List[str], callback: TickerEventCallback) -> str: """ summary: Get Ticker - description: Subscribe to this topic to get the specified symbol push of BBO changes. + description: Subscribe to this topic to get specified symbol pushes on BBO changes. push frequency: once every 100ms """ pass @@ -109,7 +132,7 @@ def ticker(self, symbol: List[str], callback: TickerEventCallback) -> str: def trade(self, symbol: List[str], callback: TradeEventCallback) -> str: """ summary: Trade - description: Subscribe to this topic to get the matching event data flow of Level 3. A topic supports up to 100 symbols. + description: Subscribe to this topic to get Level 3 matching event data flows. A topic supports up to 100 symbols. push frequency: real-time """ pass @@ -140,6 +163,26 @@ def all_tickers(self, callback: AllTickersEventCallback) -> str: return self.transport.subscribe( topic_prefix, args, AllTickersEventCallbackWrapper(callback)) + def call_auction_info(self, symbol: str, + callback: CallAuctionInfoEventCallback) -> str: + topic_prefix = "/callauction/callauctionData" + + args = [symbol] + + return self.transport.subscribe( + topic_prefix, args, CallAuctionInfoEventCallbackWrapper(callback)) + + def call_auction_orderbook_level50( + self, symbol: str, + callback: CallAuctionOrderbookLevel50EventCallback) -> str: + topic_prefix = "/callauction/level2Depth50" + + args = [symbol] + + return self.transport.subscribe( + topic_prefix, args, + CallAuctionOrderbookLevel50EventCallbackWrapper(callback)) + def klines(self, symbol: str, type: str, callback: KlinesEventCallback) -> str: topic_prefix = "/market/candles" @@ -182,7 +225,7 @@ def orderbook_level1(self, symbol: List[str], def orderbook_level50(self, symbol: List[str], callback: OrderbookLevel50EventCallback) -> str: - topic_prefix = "/market/level2" + topic_prefix = "/spotMarket/level2Depth50" args = symbol diff --git a/sdk/python/kucoin_universal_sdk/generate/version.py b/sdk/python/kucoin_universal_sdk/generate/version.py index cc259a67..a7c94240 100644 --- a/sdk/python/kucoin_universal_sdk/generate/version.py +++ b/sdk/python/kucoin_universal_sdk/generate/version.py @@ -1,2 +1,2 @@ -sdk_version = "v1.1.1" -sdk_generate_date = "2025-03-04" +sdk_version = "v1.2.0" +sdk_generate_date = "2025-03-21" diff --git a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/__init__.py b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/__init__.py index 86d3642b..723bc99d 100644 --- a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/__init__.py +++ b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/__init__.py @@ -1,7 +1,10 @@ -from .model_get_account_detail_ltv import GetAccountDetailLtv -from .model_get_account_detail_margins import GetAccountDetailMargins -from .model_get_account_detail_orders import GetAccountDetailOrders -from .model_get_account_detail_resp import GetAccountDetailResp from .model_get_accounts_data import GetAccountsData from .model_get_accounts_resp import GetAccountsResp +from .model_get_discount_rate_configs_data import GetDiscountRateConfigsData +from .model_get_discount_rate_configs_data_usdt_levels import GetDiscountRateConfigsDataUsdtLevels +from .model_get_discount_rate_configs_resp import GetDiscountRateConfigsResp +from .model_get_loan_info_ltv import GetLoanInfoLtv +from .model_get_loan_info_margins import GetLoanInfoMargins +from .model_get_loan_info_orders import GetLoanInfoOrders +from .model_get_loan_info_resp import GetLoanInfoResp from .api_vip_lending import VIPLendingAPI diff --git a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/api_vip_lending.py b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/api_vip_lending.py index f7d40d95..b912a10a 100644 --- a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/api_vip_lending.py +++ b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/api_vip_lending.py @@ -3,27 +3,47 @@ from abc import ABC, abstractmethod from typing import Any from kucoin_universal_sdk.internal.interfaces.transport import Transport -from .model_get_account_detail_resp import GetAccountDetailResp from .model_get_accounts_resp import GetAccountsResp +from .model_get_discount_rate_configs_resp import GetDiscountRateConfigsResp +from .model_get_loan_info_resp import GetLoanInfoResp class VIPLendingAPI(ABC): @abstractmethod - def get_account_detail(self, **kwargs: Any) -> GetAccountDetailResp: + def get_discount_rate_configs(self, + **kwargs: Any) -> GetDiscountRateConfigsResp: """ - summary: Get Account Detail - description: The following information is only applicable to loans. Get information on off-exchange funding and loans, This endpoint is only for querying accounts that are currently involved in loans. + summary: Get Discount Rate Configs + description: Get the gradient discount rate of each currency + documentation: https://www.kucoin.com/docs-new/api-3471463 + +-----------------------+---------+ + | Extra API Info | Value | + +-----------------------+---------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | NULL | + | API-RATE-LIMIT-POOL | PUBLIC | + | API-RATE-LIMIT-WEIGHT | 10 | + +-----------------------+---------+ + """ + pass + + @abstractmethod + def get_loan_info(self, **kwargs: Any) -> GetLoanInfoResp: + """ + summary: Get Loan Info + description: The following information is only applicable to loans. Get information on off-exchange funding and loans. This endpoint is only for querying accounts that are currently involved in loans. documentation: https://www.kucoin.com/docs-new/api-3470277 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 1 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 5 | + +-----------------------+------------+ """ pass @@ -31,17 +51,17 @@ def get_account_detail(self, **kwargs: Any) -> GetAccountDetailResp: def get_accounts(self, **kwargs: Any) -> GetAccountsResp: """ summary: Get Accounts - description: Accounts participating in OTC lending, This interface is only for querying accounts currently running OTC lending. + description: Accounts participating in OTC lending. This interface is only for querying accounts currently running OTC lending. documentation: https://www.kucoin.com/docs-new/api-3470278 - +---------------------+------------+ - | Extra API Info | Value | - +---------------------+------------+ - | API-DOMAIN | SPOT | - | API-CHANNEL | PRIVATE | - | API-PERMISSION | GENERAL | - | API-RATE-LIMIT-POOL | MANAGEMENT | - | API-RATE-LIMIT | 1 | - +---------------------+------------+ + +-----------------------+------------+ + | Extra API Info | Value | + +-----------------------+------------+ + | API-DOMAIN | SPOT | + | API-CHANNEL | PRIVATE | + | API-PERMISSION | GENERAL | + | API-RATE-LIMIT-POOL | MANAGEMENT | + | API-RATE-LIMIT-WEIGHT | 20 | + +-----------------------+------------+ """ pass @@ -51,10 +71,17 @@ class VIPLendingAPIImpl(VIPLendingAPI): def __init__(self, transport: Transport): self.transport = transport - def get_account_detail(self, **kwargs: Any) -> GetAccountDetailResp: + def get_discount_rate_configs(self, + **kwargs: Any) -> GetDiscountRateConfigsResp: + return self.transport.call("spot", False, "GET", + "/api/v1/otc-loan/discount-rate-configs", + None, GetDiscountRateConfigsResp(), False, + **kwargs) + + def get_loan_info(self, **kwargs: Any) -> GetLoanInfoResp: return self.transport.call("spot", False, "GET", "/api/v1/otc-loan/loan", None, - GetAccountDetailResp(), False, **kwargs) + GetLoanInfoResp(), False, **kwargs) def get_accounts(self, **kwargs: Any) -> GetAccountsResp: return self.transport.call("spot", False, "GET", diff --git a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/api_vip_lending.template b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/api_vip_lending.template index d8e4638f..bed3149c 100644 --- a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/api_vip_lending.template +++ b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/api_vip_lending.template @@ -1,15 +1,31 @@ # API FUNCTION TEMPLATE -def test_get_account_detail_req(self): +def test_get_discount_rate_configs_req(self): """ - get_account_detail - Get Account Detail + get_discount_rate_configs + Get Discount Rate Configs + /api/v1/otc-loan/discount-rate-configs + """ + + try: + resp = self.api.get_discount_rate_configs() + print("code: ", resp.common_response.code) + print("msg: ", resp.common_response.message) + print("data: ", resp.to_json()) + except Exception as e: + print("error: ", e) + raise e + +def test_get_loan_info_req(self): + """ + get_loan_info + Get Loan Info /api/v1/otc-loan/loan """ try: - resp = self.api.get_account_detail() + resp = self.api.get_loan_info() print("code: ", resp.common_response.code) print("msg: ", resp.common_response.message) print("data: ", resp.to_json()) diff --git a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/api_vip_lending_test.py b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/api_vip_lending_test.py index 48fb49b7..71a158e5 100644 --- a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/api_vip_lending_test.py +++ b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/api_vip_lending_test.py @@ -1,27 +1,45 @@ import unittest -from .model_get_account_detail_resp import GetAccountDetailResp from .model_get_accounts_resp import GetAccountsResp +from .model_get_discount_rate_configs_resp import GetDiscountRateConfigsResp +from .model_get_loan_info_resp import GetLoanInfoResp from kucoin_universal_sdk.model.common import RestResponse class VIPLendingAPITest(unittest.TestCase): - def test_get_account_detail_req_model(self): + def test_get_discount_rate_configs_req_model(self): """ - get_account_detail - Get Account Detail + get_discount_rate_configs + Get Discount Rate Configs + /api/v1/otc-loan/discount-rate-configs + """ + + def test_get_discount_rate_configs_resp_model(self): + """ + get_discount_rate_configs + Get Discount Rate Configs + /api/v1/otc-loan/discount-rate-configs + """ + data = "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"currency\": \"BTC\",\n \"usdtLevels\": [\n {\n \"left\": 0,\n \"right\": 20000000,\n \"discountRate\": \"1.00000000\"\n },\n {\n \"left\": 20000000,\n \"right\": 50000000,\n \"discountRate\": \"0.95000000\"\n },\n {\n \"left\": 50000000,\n \"right\": 100000000,\n \"discountRate\": \"0.90000000\"\n },\n {\n \"left\": 100000000,\n \"right\": 300000000,\n \"discountRate\": \"0.50000000\"\n },\n {\n \"left\": 300000000,\n \"right\": 99999999999,\n \"discountRate\": \"0.00000000\"\n }\n ]\n }\n ]\n}" + common_response = RestResponse.from_json(data) + resp = GetDiscountRateConfigsResp.from_dict(common_response.data) + + def test_get_loan_info_req_model(self): + """ + get_loan_info + Get Loan Info /api/v1/otc-loan/loan """ - def test_get_account_detail_resp_model(self): + def test_get_loan_info_resp_model(self): """ - get_account_detail - Get Account Detail + get_loan_info + Get Loan Info /api/v1/otc-loan/loan """ data = "{\n \"code\": \"200000\",\n \"data\": {\n \"parentUid\": \"1260004199\",\n \"orders\": [{\n \"orderId\": \"671a2be815f4140007a588e1\",\n \"principal\": \"100\",\n \"interest\": \"0\",\n \"currency\": \"USDT\"\n }],\n \"ltv\": {\n \"transferLtv\": \"0.6000\",\n \"onlyClosePosLtv\": \"0.7500\",\n \"delayedLiquidationLtv\": \"0.7500\",\n \"instantLiquidationLtv\": \"0.8000\",\n \"currentLtv\": \"0.1111\"\n },\n \"totalMarginAmount\": \"900.00000000\",\n \"transferMarginAmount\": \"166.66666666\",\n \"margins\": [{\n \"marginCcy\": \"USDT\",\n \"marginQty\": \"1000.00000000\",\n \"marginFactor\": \"0.9000000000\"\n }]\n }\n}" common_response = RestResponse.from_json(data) - resp = GetAccountDetailResp.from_dict(common_response.data) + resp = GetLoanInfoResp.from_dict(common_response.data) def test_get_accounts_req_model(self): """ diff --git a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_discount_rate_configs_data.py b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_discount_rate_configs_data.py new file mode 100644 index 00000000..a5decc07 --- /dev/null +++ b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_discount_rate_configs_data.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +# Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +from __future__ import annotations +import pprint +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from .model_get_discount_rate_configs_data_usdt_levels import GetDiscountRateConfigsDataUsdtLevels + + +class GetDiscountRateConfigsData(BaseModel): + """ + GetDiscountRateConfigsData + + Attributes: + currency (str): Currency + usdt_levels (list[GetDiscountRateConfigsDataUsdtLevels]): Gradient configuration list, amount converted into USDT + """ + + currency: Optional[str] = Field(default=None, description="Currency") + usdt_levels: Optional[List[GetDiscountRateConfigsDataUsdtLevels]] = Field( + default=None, + description="Gradient configuration list, amount converted into USDT", + alias="usdtLevels") + + __properties: ClassVar[List[str]] = ["currency", "usdtLevels"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=False, + protected_namespaces=(), + ) + + def to_str(self) -> str: + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[GetDiscountRateConfigsData]: + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + _dict = self.model_dump( + by_alias=True, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in usdt_levels (list) + _items = [] + if self.usdt_levels: + for _item_usdt_levels in self.usdt_levels: + if _item_usdt_levels: + _items.append(_item_usdt_levels.to_dict()) + _dict['usdtLevels'] = _items + return _dict + + @classmethod + def from_dict( + cls, + obj: Optional[Dict[str, + Any]]) -> Optional[GetDiscountRateConfigsData]: + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "currency": + obj.get("currency"), + "usdtLevels": [ + GetDiscountRateConfigsDataUsdtLevels.from_dict(_item) + for _item in obj["usdtLevels"] + ] if obj.get("usdtLevels") is not None else None + }) + return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_discount_rate_configs_data_usdt_levels.py b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_discount_rate_configs_data_usdt_levels.py new file mode 100644 index 00000000..25b22b6b --- /dev/null +++ b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_discount_rate_configs_data_usdt_levels.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +# Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +from __future__ import annotations +import pprint +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional + + +class GetDiscountRateConfigsDataUsdtLevels(BaseModel): + """ + GetDiscountRateConfigsDataUsdtLevels + + Attributes: + left (int): Left end point of gradient interval, left str: + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_none=True) + + @classmethod + def from_json( + cls, + json_str: str) -> Optional[GetDiscountRateConfigsDataUsdtLevels]: + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + _dict = self.model_dump( + by_alias=True, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict( + cls, obj: Optional[Dict[str, Any]] + ) -> Optional[GetDiscountRateConfigsDataUsdtLevels]: + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "left": obj.get("left"), + "right": obj.get("right"), + "discountRate": obj.get("discountRate") + }) + return _obj diff --git a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_discount_rate_configs_resp.py b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_discount_rate_configs_resp.py new file mode 100644 index 00000000..d0cd8b5e --- /dev/null +++ b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_discount_rate_configs_resp.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +# Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. + +from __future__ import annotations +import pprint +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from .model_get_discount_rate_configs_data import GetDiscountRateConfigsData +from kucoin_universal_sdk.internal.interfaces.response import Response +from kucoin_universal_sdk.model.common import RestResponse + + +class GetDiscountRateConfigsResp(BaseModel, Response): + """ + GetDiscountRateConfigsResp + + Attributes: + data (list[GetDiscountRateConfigsData]): + """ + + common_response: Optional[RestResponse] = Field( + default=None, description="Common response") + data: Optional[List[GetDiscountRateConfigsData]] = None + + __properties: ClassVar[List[str]] = ["data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=False, + protected_namespaces=(), + ) + + def to_str(self) -> str: + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + return self.model_dump_json(by_alias=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[GetDiscountRateConfigsResp]: + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + _dict = self.model_dump( + by_alias=True, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict( + cls, + obj: Optional[Dict[str, + Any]]) -> Optional[GetDiscountRateConfigsResp]: + if obj is None: + return None + + # original response + obj = {'data': obj} + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [ + GetDiscountRateConfigsData.from_dict(_item) + for _item in obj["data"] + ] if obj.get("data") is not None else None + }) + return _obj + + def set_common_response(self, response: RestResponse): + self.common_response = response diff --git a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_account_detail_ltv.py b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_loan_info_ltv.py similarity index 91% rename from sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_account_detail_ltv.py rename to sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_loan_info_ltv.py index 51e3895f..18cabfcf 100644 --- a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_account_detail_ltv.py +++ b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_loan_info_ltv.py @@ -10,7 +10,7 @@ from typing import Any, ClassVar, Dict, List, Optional -class GetAccountDetailLtv(BaseModel): +class GetLoanInfoLtv(BaseModel): """ Loan-to-Value Ratio @@ -60,7 +60,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_none=True) @classmethod - def from_json(cls, json_str: str) -> Optional[GetAccountDetailLtv]: + def from_json(cls, json_str: str) -> Optional[GetLoanInfoLtv]: return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,9 +71,8 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict( - cls, obj: Optional[Dict[str, - Any]]) -> Optional[GetAccountDetailLtv]: + def from_dict(cls, obj: Optional[Dict[str, + Any]]) -> Optional[GetLoanInfoLtv]: if obj is None: return None diff --git a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_account_detail_margins.py b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_loan_info_margins.py similarity index 82% rename from sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_account_detail_margins.py rename to sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_loan_info_margins.py index b8cc644a..9f0092c3 100644 --- a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_account_detail_margins.py +++ b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_loan_info_margins.py @@ -10,14 +10,14 @@ from typing import Any, ClassVar, Dict, List, Optional -class GetAccountDetailMargins(BaseModel): +class GetLoanInfoMargins(BaseModel): """ - GetAccountDetailMargins + GetLoanInfoMargins Attributes: margin_ccy (str): Margin Currency margin_qty (str): Maintenance Quantity (Calculated with Margin Coefficient) - margin_factor (str): Margin Coefficient return real time margin discount rate to USDT + margin_factor (str): Margin Coefficient return real-time margin discount rate to USDT """ margin_ccy: Optional[str] = Field(default=None, @@ -30,7 +30,7 @@ class GetAccountDetailMargins(BaseModel): margin_factor: Optional[str] = Field( default=None, description= - "Margin Coefficient return real time margin discount rate to USDT", + "Margin Coefficient return real-time margin discount rate to USDT", alias="marginFactor") __properties: ClassVar[List[str]] = [ @@ -50,7 +50,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_none=True) @classmethod - def from_json(cls, json_str: str) -> Optional[GetAccountDetailMargins]: + def from_json(cls, json_str: str) -> Optional[GetLoanInfoMargins]: return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -62,9 +62,8 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict( - cls, - obj: Optional[Dict[str, - Any]]) -> Optional[GetAccountDetailMargins]: + cls, obj: Optional[Dict[str, + Any]]) -> Optional[GetLoanInfoMargins]: if obj is None: return None diff --git a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_account_detail_orders.py b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_loan_info_orders.py similarity index 88% rename from sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_account_detail_orders.py rename to sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_loan_info_orders.py index 3751cea5..d8c13454 100644 --- a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_account_detail_orders.py +++ b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_loan_info_orders.py @@ -10,9 +10,9 @@ from typing import Any, ClassVar, Dict, List, Optional -class GetAccountDetailOrders(BaseModel): +class GetLoanInfoOrders(BaseModel): """ - GetAccountDetailOrders + GetLoanInfoOrders Attributes: order_id (str): Loan Orders ID @@ -47,7 +47,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_none=True) @classmethod - def from_json(cls, json_str: str) -> Optional[GetAccountDetailOrders]: + def from_json(cls, json_str: str) -> Optional[GetLoanInfoOrders]: return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -59,8 +59,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict( - cls, obj: Optional[Dict[str, - Any]]) -> Optional[GetAccountDetailOrders]: + cls, obj: Optional[Dict[str, Any]]) -> Optional[GetLoanInfoOrders]: if obj is None: return None diff --git a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_account_detail_resp.py b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_loan_info_resp.py similarity index 73% rename from sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_account_detail_resp.py rename to sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_loan_info_resp.py index b3229bb8..e6c76f88 100644 --- a/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_account_detail_resp.py +++ b/sdk/python/kucoin_universal_sdk/generate/viplending/viplending/model_get_loan_info_resp.py @@ -8,24 +8,24 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from .model_get_account_detail_ltv import GetAccountDetailLtv -from .model_get_account_detail_margins import GetAccountDetailMargins -from .model_get_account_detail_orders import GetAccountDetailOrders +from .model_get_loan_info_ltv import GetLoanInfoLtv +from .model_get_loan_info_margins import GetLoanInfoMargins +from .model_get_loan_info_orders import GetLoanInfoOrders from kucoin_universal_sdk.internal.interfaces.response import Response from kucoin_universal_sdk.model.common import RestResponse -class GetAccountDetailResp(BaseModel, Response): +class GetLoanInfoResp(BaseModel, Response): """ - GetAccountDetailResp + GetLoanInfoResp Attributes: parent_uid (str): Master UID - orders (list[GetAccountDetailOrders]): Loan Orders - ltv (GetAccountDetailLtv): + orders (list[GetLoanInfoOrders]): Loan Orders + ltv (GetLoanInfoLtv): total_margin_amount (str): Total Margin Amount (USDT) transfer_margin_amount (str): Total Maintenance Margin for Restricted Transfers (USDT) - margins (list[GetAccountDetailMargins]): + margins (list[GetLoanInfoMargins]): """ common_response: Optional[RestResponse] = Field( @@ -33,9 +33,9 @@ class GetAccountDetailResp(BaseModel, Response): parent_uid: Optional[str] = Field(default=None, description="Master UID", alias="parentUid") - orders: Optional[List[GetAccountDetailOrders]] = Field( + orders: Optional[List[GetLoanInfoOrders]] = Field( default=None, description="Loan Orders") - ltv: Optional[GetAccountDetailLtv] = None + ltv: Optional[GetLoanInfoLtv] = None total_margin_amount: Optional[str] = Field( default=None, description="Total Margin Amount (USDT)", @@ -44,7 +44,7 @@ class GetAccountDetailResp(BaseModel, Response): default=None, description="Total Maintenance Margin for Restricted Transfers (USDT)", alias="transferMarginAmount") - margins: Optional[List[GetAccountDetailMargins]] = None + margins: Optional[List[GetLoanInfoMargins]] = None __properties: ClassVar[List[str]] = [ "parentUid", "orders", "ltv", "totalMarginAmount", @@ -64,7 +64,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_none=True) @classmethod - def from_json(cls, json_str: str) -> Optional[GetAccountDetailResp]: + def from_json(cls, json_str: str) -> Optional[GetLoanInfoResp]: return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -92,9 +92,8 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict( - cls, obj: Optional[Dict[str, - Any]]) -> Optional[GetAccountDetailResp]: + def from_dict(cls, obj: Optional[Dict[str, + Any]]) -> Optional[GetLoanInfoResp]: if obj is None: return None @@ -104,21 +103,19 @@ def from_dict( _obj = cls.model_validate({ "parentUid": obj.get("parentUid"), - "orders": [ - GetAccountDetailOrders.from_dict(_item) - for _item in obj["orders"] - ] if obj.get("orders") is not None else None, + "orders": + [GetLoanInfoOrders.from_dict(_item) for _item in obj["orders"]] + if obj.get("orders") is not None else None, "ltv": - GetAccountDetailLtv.from_dict(obj["ltv"]) + GetLoanInfoLtv.from_dict(obj["ltv"]) if obj.get("ltv") is not None else None, "totalMarginAmount": obj.get("totalMarginAmount"), "transferMarginAmount": obj.get("transferMarginAmount"), - "margins": [ - GetAccountDetailMargins.from_dict(_item) - for _item in obj["margins"] - ] if obj.get("margins") is not None else None + "margins": + [GetLoanInfoMargins.from_dict(_item) for _item in obj["margins"]] + if obj.get("margins") is not None else None }) return _obj diff --git a/sdk/python/kucoin_universal_sdk/internal/infra/default_signer.py b/sdk/python/kucoin_universal_sdk/internal/infra/default_signer.py index d3c87ac4..120b305f 100644 --- a/sdk/python/kucoin_universal_sdk/internal/infra/default_signer.py +++ b/sdk/python/kucoin_universal_sdk/internal/infra/default_signer.py @@ -41,7 +41,7 @@ def headers(self, plain: str) -> dict: "KC-API-PASSPHRASE": self.api_passphrase, "KC-API-TIMESTAMP": timestamp, "KC-API-SIGN": signature, - "KC-API-KEY-VERSION": "2" + "KC-API-KEY-VERSION": "3" } def broker_headers(self, plain: str) -> dict: @@ -59,7 +59,7 @@ def broker_headers(self, plain: str) -> dict: "KC-API-PASSPHRASE": self.api_passphrase, "KC-API-TIMESTAMP": timestamp, "KC-API-SIGN": signature, - "KC-API-KEY-VERSION": "2", + "KC-API-KEY-VERSION": "3", "KC-API-PARTNER": self.broker_partner, "KC-BROKER-NAME": self.broker_name, "KC-API-PARTNER-VERIFY": "true", diff --git a/sdk/python/kucoin_universal_sdk/internal/infra/default_ws_callback.py b/sdk/python/kucoin_universal_sdk/internal/infra/default_ws_callback.py index 58fca478..dc9d2b9d 100644 --- a/sdk/python/kucoin_universal_sdk/internal/infra/default_ws_callback.py +++ b/sdk/python/kucoin_universal_sdk/internal/infra/default_ws_callback.py @@ -30,7 +30,7 @@ def get_sub_info(self) -> List[SubInfo]: info = SubInfo(prefix=self.topic_prefix, args=[], callback=None) for topic in topics: parts = topic.split(":") - if len(parts) == 2: + if len(parts) == 2 and parts[1] != "all": info.args.append(parts[1]) if topic in self.topic_callback_mapping: info.callback = self.topic_callback_mapping[topic].callback diff --git a/sdk/python/kucoin_universal_sdk/internal/infra/default_ws_client.py b/sdk/python/kucoin_universal_sdk/internal/infra/default_ws_client.py index eca0b214..ba7d89d5 100644 --- a/sdk/python/kucoin_universal_sdk/internal/infra/default_ws_client.py +++ b/sdk/python/kucoin_universal_sdk/internal/infra/default_ws_client.py @@ -116,7 +116,8 @@ def on_open(self, ws): logging.info("WebSocket connection opened.") def on_message(self, ws, message): - logging.debug(f"Received message: {message}") + if logging.root.level <= logging.DEBUG: + logging.debug(f"Received message: {message}") m = WsMessage.from_json(message) if m.type == WsMessageType.WELCOME.value: self.welcome_received.set() diff --git a/sdk/python/kucoin_universal_sdk/internal/infra/test_default_signer.py b/sdk/python/kucoin_universal_sdk/internal/infra/test_default_signer.py index 00c200d1..a8bc5556 100644 --- a/sdk/python/kucoin_universal_sdk/internal/infra/test_default_signer.py +++ b/sdk/python/kucoin_universal_sdk/internal/infra/test_default_signer.py @@ -40,7 +40,7 @@ def test_headers(self, mock_time): self.assertEqual(headers["KC-API-KEY"], self.api_key) self.assertEqual(headers["KC-API-PASSPHRASE"], self.signer.api_passphrase) - self.assertEqual(headers["KC-API-KEY-VERSION"], "2") + self.assertEqual(headers["KC-API-KEY-VERSION"], "3") self.assertEqual(headers["KC-API-TIMESTAMP"], "1234567890000") @patch("time.time", return_value=1234567890) @@ -60,7 +60,7 @@ def test_broker_headers(self, mock_time): self.assertEqual(headers["KC-API-KEY"], self.api_key) self.assertEqual(headers["KC-API-PASSPHRASE"], self.signer.api_passphrase) - self.assertEqual(headers["KC-API-KEY-VERSION"], "2") + self.assertEqual(headers["KC-API-KEY-VERSION"], "3") self.assertEqual(headers["KC-API-PARTNER"], self.broker_partner) self.assertEqual(headers["KC-BROKER-NAME"], self.broker_name) self.assertEqual(headers["KC-API-PARTNER-VERIFY"], "true") diff --git a/sdk/python/run_test.sh b/sdk/python/run_test.sh index 45d9e96f..593def73 100644 --- a/sdk/python/run_test.sh +++ b/sdk/python/run_test.sh @@ -2,7 +2,7 @@ VENV_DIR=".venv-test" -if [ ! -d "$VENV_DIR" ]; then +if [ ! -d "$VENV_DIR" ] || [ -z "$(ls -A "$VENV_DIR" 2>/dev/null)" ]; then echo "Virtual environment not found. Creating a new one..." python3 -m venv "$VENV_DIR" || { echo "Failed to create virtual environment"; exit 1; } echo "Virtual environment created at $VENV_DIR." diff --git a/sdk/python/setup.py b/sdk/python/setup.py index 8bd8c6a6..075ed990 100644 --- a/sdk/python/setup.py +++ b/sdk/python/setup.py @@ -2,7 +2,7 @@ setup( name="kucoin-universal-sdk", - version="1.1.1", + version="1.2.0", description="Official KuCoin Universal SDK", author="KuCoin", author_email="api@kucoin.com", diff --git a/sdk/python/test/e2e/rest/account_test/account_deposit_api_test.py b/sdk/python/test/e2e/rest/account_test/account_deposit_api_test.py index 7085fa2a..ca506126 100644 --- a/sdk/python/test/e2e/rest/account_test/account_deposit_api_test.py +++ b/sdk/python/test/e2e/rest/account_test/account_deposit_api_test.py @@ -3,7 +3,8 @@ from kucoin_universal_sdk.api.client import DefaultClient from kucoin_universal_sdk.extension.interceptor.logging import LoggingInterceptor -from kucoin_universal_sdk.generate.account.deposit.model_add_deposit_address_v1_req import AddDepositAddressV1ReqBuilder +from kucoin_universal_sdk.generate.account.deposit.model_add_deposit_address_v1_req import \ + AddDepositAddressV1ReqBuilder, AddDepositAddressV1Req from kucoin_universal_sdk.generate.account.deposit.model_add_deposit_address_v3_req import \ AddDepositAddressV3ReqBuilder, AddDepositAddressV3Req from kucoin_universal_sdk.generate.account.deposit.model_get_deposit_address_v1_req import GetDepositAddressV1ReqBuilder @@ -76,7 +77,7 @@ def test_add_deposit_address_v1_req(self): """ builder = AddDepositAddressV1ReqBuilder() - builder.set_currency('ETH').set_chain('eth') + builder.set_currency('ETH').set_chain('eth').set_to(AddDepositAddressV1Req.ToEnum.MAIN) req = builder.build() try: resp = self.api.add_deposit_address_v1(req) @@ -134,7 +135,7 @@ def test_get_deposit_address_v2_req(self): """ builder = GetDepositAddressV2ReqBuilder() - builder.set_currency("USDT") + builder.set_currency("USDT").set_chain("SOL") req = builder.build() try: resp = self.api.get_deposit_address_v2(req) @@ -153,7 +154,7 @@ def test_add_deposit_address_v3_req(self): """ builder = AddDepositAddressV3ReqBuilder() - builder.set_currency("USDT").set_chain("ton").set_to(AddDepositAddressV3Req.ToEnum.MAIN).set_amount("1") + builder.set_currency("USDT").set_chain("xtz").set_to(AddDepositAddressV3Req.ToEnum.MAIN).set_amount("1") req = builder.build() try: resp = self.api.add_deposit_address_v3(req) diff --git a/sdk/python/test/e2e/rest/account_test/account_subaccount_api_test.py b/sdk/python/test/e2e/rest/account_test/account_subaccount_api_test.py index b0fad6b5..949e0894 100644 --- a/sdk/python/test/e2e/rest/account_test/account_subaccount_api_test.py +++ b/sdk/python/test/e2e/rest/account_test/account_subaccount_api_test.py @@ -105,7 +105,7 @@ def test_get_spot_sub_account_detail_req(self): """ builder = GetSpotSubAccountDetailReqBuilder() - builder.set_sub_user_id("6744227ce235b300012232d6").set_include_base_amount(False) + builder.set_sub_user_id("6745b7bc890ba20001911363").set_include_base_amount(False).set_base_amount("USDT").set_base_amount("0.1") req = builder.build() try: resp = self.api.get_spot_sub_account_detail(req) diff --git a/sdk/python/test/e2e/rest/copytrading_test/copytrading_futures.py b/sdk/python/test/e2e/rest/copytrading_test/copytrading_futures.py index 4d050fae..c72cc2ef 100644 --- a/sdk/python/test/e2e/rest/copytrading_test/copytrading_futures.py +++ b/sdk/python/test/e2e/rest/copytrading_test/copytrading_futures.py @@ -68,8 +68,7 @@ def test_add_order_req(self): builder = AddOrderReqBuilder() builder.set_client_oid(uuid.uuid4().__str__()).set_side(AddOrderReq.SideEnum.BUY).set_symbol( - 'XBTUSDTM').set_leverage(3).set_type(AddOrderReq.TypeEnum.MARKET).set_remark( - 'order remarks').set_size(1) + 'XBTUSDTM').set_leverage(3).set_type(AddOrderReq.TypeEnum.MARKET).set_size(1) req = builder.build() try: resp = self.api.add_order(req) @@ -111,8 +110,7 @@ def test_add_tpsl_order_req(self): builder = AddTpslOrderReqBuilder() builder.set_client_oid(uuid.uuid4().__str__()).set_side(AddTpslOrderReq.SideEnum.BUY).set_symbol( - 'XBTUSDTM').set_leverage(3).set_type(AddTpslOrderReq.TypeEnum.LIMIT).set_remark( - 'order remarks').set_reduce_only(False).set_margin_mode(AddTpslOrderReq.MarginModeEnum.ISOLATED).set_price( + 'XBTUSDTM').set_leverage(3).set_type(AddTpslOrderReq.TypeEnum.LIMIT).set_reduce_only(False).set_margin_mode(AddTpslOrderReq.MarginModeEnum.ISOLATED).set_price( '0.1').set_size(1).set_time_in_force( AddTpslOrderReq.TimeInForceEnum.GOOD_TILL_CANCELED).set_trigger_stop_up_price( '0.3').set_trigger_stop_down_price('0.1').set_stop_price_type(AddTpslOrderReq.StopPriceTypeEnum.TRADE_PRICE) @@ -172,7 +170,7 @@ def test_get_max_open_size_req(self): """ builder = GetMaxOpenSizeReqBuilder() - builder.set_symbol('XBTUSDTM').set_price('0.1').set_leverage(10) + builder.set_symbol('XBTUSDTM').set_price(0.1).set_leverage(10) req = builder.build() try: resp = self.api.get_max_open_size(req) @@ -229,7 +227,7 @@ def test_remove_isolated_margin_req(self): """ builder = RemoveIsolatedMarginReqBuilder() - builder.set_symbol('XBTUSDTM').set_withdraw_amount('0.0000001') + builder.set_symbol('XBTUSDTM').set_withdraw_amount(0.0000001) req = builder.build() try: resp = self.api.remove_isolated_margin(req) diff --git a/sdk/python/test/e2e/rest/futures_test/futures_fundingfees_test.py b/sdk/python/test/e2e/rest/futures_test/futures_fundingfees_test.py index 0b91b2c7..7033899d 100644 --- a/sdk/python/test/e2e/rest/futures_test/futures_fundingfees_test.py +++ b/sdk/python/test/e2e/rest/futures_test/futures_fundingfees_test.py @@ -73,7 +73,7 @@ def test_get_private_funding_history_req(self): """ builder = GetPrivateFundingHistoryReqBuilder() - builder.set_symbol("DOGEUSDTM").set_from_(1732550400000).set_to(1732723200000).set_reverse(True).set_max_count( + builder.set_symbol("DOGEUSDTM").set_start_at(1732550400000).set_end_at(1732723200000).set_reverse(True).set_max_count( 100) req = builder.build() try: diff --git a/sdk/python/test/e2e/rest/spot_test/spot_market_api_test.py b/sdk/python/test/e2e/rest/spot_test/spot_market_api_test.py index 803d4275..f44aa3d0 100644 --- a/sdk/python/test/e2e/rest/spot_test/spot_market_api_test.py +++ b/sdk/python/test/e2e/rest/spot_test/spot_market_api_test.py @@ -3,6 +3,8 @@ from kucoin_universal_sdk.api.client import DefaultClient from kucoin_universal_sdk.extension.interceptor.logging import LoggingInterceptor +from kucoin_universal_sdk.generate.spot.market import GetCallAuctionPartOrderBookReqBuilder, \ + GetCallAuctionInfoReqBuilder from kucoin_universal_sdk.generate.spot.market.model_get24hr_stats_req import Get24hrStatsReqBuilder from kucoin_universal_sdk.generate.spot.market.model_get_all_symbols_req import GetAllSymbolsReqBuilder from kucoin_universal_sdk.generate.spot.market.model_get_announcements_req import GetAnnouncementsReqBuilder, \ @@ -373,3 +375,57 @@ def test_get_full_order_book_req(self): except Exception as e: print("error: ", e) raise e + + def test_get_call_auction_part_order_book_req(self): + """ + get_call_auction_part_order_book + Get Call Auction Part OrderBook + /api/v1/market/orderbook/callauction/level2_{size} + """ + + builder = GetCallAuctionPartOrderBookReqBuilder() + builder.set_symbol("HBAR-USDC").set_size("20") + req = builder.build() + try: + resp = self.api.get_call_auction_part_order_book(req) + print("code: ", resp.common_response.code) + print("msg: ", resp.common_response.message) + print("data: ", resp.to_json()) + except Exception as e: + print("error: ", e) + raise e + + def test_get_call_auction_info_req(self): + """ + get_call_auction_info + Get Call Auction Info + /api/v1/market/callauctionData + """ + + builder = GetCallAuctionInfoReqBuilder() + builder.set_symbol("HBAR-USDC") + req = builder.build() + try: + resp = self.api.get_call_auction_info(req) + print("code: ", resp.common_response.code) + print("msg: ", resp.common_response.message) + print("data: ", resp.to_json()) + except Exception as e: + print("error: ", e) + raise e + + def test_get_client_ip_address_req(self): + """ + get_client_ip_address + Get Client IP Address + /api/v1/my-ip + """ + + try: + resp = self.api.get_client_ip_address() + print("code: ", resp.common_response.code) + print("msg: ", resp.common_response.message) + print("data: ", resp.to_json()) + except Exception as e: + print("error: ", e) + raise e \ No newline at end of file diff --git a/sdk/python/test/e2e/rest/spot_test/spot_order_api_test.py b/sdk/python/test/e2e/rest/spot_test/spot_order_api_test.py index 2968546f..3de539ff 100644 --- a/sdk/python/test/e2e/rest/spot_test/spot_order_api_test.py +++ b/sdk/python/test/e2e/rest/spot_test/spot_order_api_test.py @@ -4,6 +4,7 @@ from kucoin_universal_sdk.api.client import DefaultClient from kucoin_universal_sdk.extension.interceptor.logging import LoggingInterceptor +from kucoin_universal_sdk.generate.spot.order import CancelOrderByClientOidOldReqBuilder, GetOpenOrdersByPageReqBuilder from kucoin_universal_sdk.generate.spot.order.model_add_oco_order_req import AddOcoOrderReqBuilder, AddOcoOrderReq from kucoin_universal_sdk.generate.spot.order.model_add_order_old_req import AddOrderOldReqBuilder, AddOrderOldReq from kucoin_universal_sdk.generate.spot.order.model_add_order_req import AddOrderReqBuilder, AddOrderReq @@ -31,8 +32,6 @@ CancelOcoOrderByClientOidReqBuilder from kucoin_universal_sdk.generate.spot.order.model_cancel_oco_order_by_order_id_req import \ CancelOcoOrderByOrderIdReqBuilder -from kucoin_universal_sdk.generate.spot.order.model_cancel_order_by_client_oid_old_req import \ - CancelOrderByClientOidOldReqBuilder from kucoin_universal_sdk.generate.spot.order.model_cancel_order_by_client_oid_req import \ CancelOrderByClientOidReqBuilder from kucoin_universal_sdk.generate.spot.order.model_cancel_order_by_client_oid_sync_req import \ @@ -63,10 +62,6 @@ from kucoin_universal_sdk.generate.spot.order.model_get_order_by_order_id_req import GetOrderByOrderIdReqBuilder from kucoin_universal_sdk.generate.spot.order.model_get_orders_list_old_req import GetOrdersListOldReqBuilder, \ GetOrdersListOldReq -from kucoin_universal_sdk.generate.spot.order.model_get_recent_orders_list_old_req import \ - GetRecentOrdersListOldReqBuilder -from kucoin_universal_sdk.generate.spot.order.model_get_recent_trade_history_old_req import \ - GetRecentTradeHistoryOldReqBuilder from kucoin_universal_sdk.generate.spot.order.model_get_stop_order_by_client_oid_req import \ GetStopOrderByClientOidReqBuilder from kucoin_universal_sdk.generate.spot.order.model_get_stop_order_by_order_id_req import \ @@ -339,6 +334,25 @@ def test_cancel_all_orders_by_symbol_req(self): print("error: ", e) raise e + def test_get_open_orders_by_page_req(self): + """ + get_open_orders_by_page + Get Open Orders By Page + /api/v1/hf/orders/active/page + """ + + builder = GetOpenOrdersByPageReqBuilder() + builder.set_symbol("BTC-USDT").set_page_num(1).set_page_size(50) + req = builder.build() + try: + resp = self.api.get_open_orders_by_page(req) + print("code: ", resp.common_response.code) + print("msg: ", resp.common_response.message) + print("data: ", resp.to_json()) + except Exception as e: + print("error: ", e) + raise e + def test_get_closed_orders_req(self): """ get_closed_orders @@ -443,7 +457,7 @@ def test_get_order_by_order_id_req(self): """ builder = GetOrderByOrderIdReqBuilder() - builder.set_symbol("BTC-USDT").set_order_id("674693c0f1bf4000077dc838") + builder.set_symbol("BTC-USDT").set_order_id("67d8dc675de54400076be9f2") req = builder.build() try: resp = self.api.get_order_by_order_id(req) @@ -502,7 +516,7 @@ def test_cancel_order_by_order_id_sync_req(self): """ builder = CancelOrderByOrderIdSyncReqBuilder() - builder.set_order_id("6746915837061e00071f0047").set_symbol("BTC-USDT") + builder.set_order_id("67d8dc675de54400076be9f2").set_symbol("BTC-USDT") req = builder.build() try: resp = self.api.cancel_order_by_order_id_sync(req) @@ -561,12 +575,8 @@ def test_get_recent_trade_history_old_req(self): Get Recent Trade History - Old /api/v1/limit/fills """ - - builder = GetRecentTradeHistoryOldReqBuilder() - builder.set_current_page(1).set_page_size(10) - req = builder.build() try: - resp = self.api.get_recent_trade_history_old(req) + resp = self.api.get_recent_trade_history_old() print("code: ", resp.common_response.code) print("msg: ", resp.common_response.message) print("data: ", resp.to_json()) @@ -580,12 +590,8 @@ def test_get_recent_orders_list_old_req(self): Get Recent Orders List - Old /api/v1/limit/orders """ - - builder = GetRecentOrdersListOldReqBuilder() - builder.set_current_page(1).set_page_size(10) - req = builder.build() try: - resp = self.api.get_recent_orders_list_old(req) + resp = self.api.get_recent_orders_list_old() print("code: ", resp.common_response.code) print("msg: ", resp.common_response.message) print("data: ", resp.to_json()) @@ -593,7 +599,6 @@ def test_get_recent_orders_list_old_req(self): print("error: ", e) raise e - # TODO limit def test_cancel_order_by_client_oid_old_req(self): """ cancel_order_by_client_oid_old @@ -602,7 +607,7 @@ def test_cancel_order_by_client_oid_old_req(self): """ builder = CancelOrderByClientOidOldReqBuilder() - builder.set_symbol("BTC-USDT").set_client_oid("27e2e92f-29d5-41b2-9580-d010c6277239") + builder.set_client_oid("5d1962d9-5010-4d59-8872-75264c86c95e") req = builder.build() try: resp = self.api.cancel_order_by_client_oid_old(req) diff --git a/sdk/python/test/e2e/ws/spot_test/private_test.py b/sdk/python/test/e2e/ws/spot_test/private_test.py index 5ea81418..ef9a66bf 100644 --- a/sdk/python/test/e2e/ws/spot_test/private_test.py +++ b/sdk/python/test/e2e/ws/spot_test/private_test.py @@ -14,6 +14,12 @@ class SpotPrivateWsTest(unittest.TestCase): def setUp(self): + logging.basicConfig( + level=logging.INFO, + format='%(asctime)s %(levelname)s - %(message)s', + datefmt='%Y-%m-%d %H:%M:%S' + ) + key = os.getenv("API_KEY") secret = os.getenv("API_SECRET") passphrase = os.getenv("API_PASSPHRASE") @@ -74,4 +80,7 @@ def test_private_order_v1(self): self._test_subscription(self.api.order_v1) def test_private_order_v2(self): - self._test_subscription(self.api.order_v2) \ No newline at end of file + self._test_subscription(self.api.order_v2) + + def test_private_stop_order(self): + self._test_subscription(self.api.stop_order) \ No newline at end of file diff --git a/sdk/python/test/e2e/ws/spot_test/public_test.py b/sdk/python/test/e2e/ws/spot_test/public_test.py index 7d7893b6..eac0ad29 100644 --- a/sdk/python/test/e2e/ws/spot_test/public_test.py +++ b/sdk/python/test/e2e/ws/spot_test/public_test.py @@ -99,3 +99,11 @@ def test_public_orderbook_lever50(self): def test_public_orderbook_increment(self): symbols = ["BTC-USDT", "ETH-USDT"] self._test_subscription(self.api.orderbook_increment, symbols) + + def test_public_call_auction_info(self): + symbols = "PAWS-USDT" + self._test_subscription(self.api.call_auction_info, symbols) + + def test_public_call_auction_orderbook_level50(self): + symbols = "PAWS-USDT" + self._test_subscription(self.api.call_auction_orderbook_level50, symbols) \ No newline at end of file diff --git a/spec/apis.csv b/spec/apis.csv index 24dd148b..acbbf27b 100644 --- a/spec/apis.csv +++ b/spec/apis.csv @@ -14,39 +14,39 @@ account,account,/api/v1/transaction-history,get,Get Account Ledgers - Futures account,account,/api/v1/margin/account,get,Get Account Detail - Margin account,account,/api/v1/isolated/accounts,get,Get Account List - Isolated Margin - V1 account,account,/api/v1/isolated/account/{symbol},get,Get Account Detail - Isolated Margin - V1 -account,subaccount,/api/v2/sub/user/created,post,Add SubAccount -account,subaccount,/api/v3/sub/user/margin/enable,post,Add SubAccount Margin Permission -account,subaccount,/api/v3/sub/user/futures/enable,post,Add SubAccount Futures Permission -account,subaccount,/api/v2/sub/user,get,Get SubAccount List - Summary Info -account,subaccount,/api/v1/sub-accounts/{subUserId},get,Get SubAccount Detail - Balance -account,subaccount,/api/v2/sub-accounts,get,Get SubAccount List - Spot Balance(V2) -account,subaccount,/api/v1/account-overview-all,get,Get SubAccount List - Futures Balance(V2) -account,subaccount,/api/v1/sub/api-key,post,Add SubAccount API -account,subaccount,/api/v1/sub/api-key/update,post,Modify SubAccount API -account,subaccount,/api/v1/sub/api-key,get,Get SubAccount API List -account,subaccount,/api/v1/sub/api-key,delete,Delete SubAccount API -account,subaccount,/api/v1/sub/user,get,Get SubAccount List - Summary Info(V1) -account,subaccount,/api/v1/sub-accounts,get,Get SubAccount List - Spot Balance(V1) -account,deposit,/api/v3/deposit-address/create,post,Add Deposit Address(V3) -account,deposit,/api/v3/deposit-addresses,get,Get Deposit Address(V3) +account,subaccount,/api/v2/sub/user/created,post,Add sub-account +account,subaccount,/api/v3/sub/user/margin/enable,post,Add sub-account Margin Permission +account,subaccount,/api/v3/sub/user/futures/enable,post,Add sub-account Futures Permission +account,subaccount,/api/v2/sub/user,get,Get sub-account List - Summary Info +account,subaccount,/api/v1/sub-accounts/{subUserId},get,Get sub-account Detail - Balance +account,subaccount,/api/v2/sub-accounts,get,Get sub-account List - Spot Balance (V2) +account,subaccount,/api/v1/account-overview-all,get,Get sub-account List - Futures Balance (V2) +account,subaccount,/api/v1/sub/api-key,post,Add sub-account API +account,subaccount,/api/v1/sub/api-key/update,post,Modify sub-account API +account,subaccount,/api/v1/sub/api-key,get,Get sub-account API List +account,subaccount,/api/v1/sub/api-key,delete,Delete sub-account API +account,subaccount,/api/v1/sub/user,get,Get sub-account List - Summary Info (V1) +account,subaccount,/api/v1/sub-accounts,get,Get sub-account List - Spot Balance (V1) +account,deposit,/api/v3/deposit-address/create,post,Add Deposit Address (V3) +account,deposit,/api/v3/deposit-addresses,get,Get Deposit Address (V3) account,deposit,/api/v1/deposits,get,Get Deposit History -account,deposit,/api/v2/deposit-addresses,get,Get Deposit Addresses(V2) +account,deposit,/api/v2/deposit-addresses,get,Get Deposit Addresses (V2) account,deposit,/api/v1/deposit-addresses,get,Get Deposit Addresses - V1 account,deposit,/api/v1/hist-deposits,get,Get Deposit History - Old account,deposit,/api/v1/deposit-addresses,post,Add Deposit Address - V1 account,withdrawal,/api/v1/withdrawals/quotas,get,Get Withdrawal Quotas -account,withdrawal,/api/v3/withdrawals,post,Withdraw(V3) +account,withdrawal,/api/v3/withdrawals,post,Withdraw (V3) account,withdrawal,/api/v1/withdrawals/{withdrawalId},delete,Cancel Withdrawal account,withdrawal,/api/v1/withdrawals,get,Get Withdrawal History account,withdrawal,/api/v1/hist-withdrawals,get,Get Withdrawal History - Old account,withdrawal,/api/v1/withdrawals,post,Withdraw - V1 account,transfer,/api/v1/accounts/transferable,get,Get Transfer Quotas account,transfer,/api/v3/accounts/universal-transfer,post,Flex Transfer -account,transfer,/api/v2/accounts/sub-transfer,post,SubAccount Transfer -account,transfer,/api/v2/accounts/inner-transfer,post,Inner Transfer +account,transfer,/api/v2/accounts/sub-transfer,post,Sub-account Transfer +account,transfer,/api/v2/accounts/inner-transfer,post,Internal Transfer +account,transfer,/api/v1/transfer-list,get,Get Futures Account Transfer Out Ledger account,transfer,/api/v3/transfer-out,post,Futures Account Transfer Out account,transfer,/api/v1/transfer-in,post,Futures Account Transfer In -account,transfer,/api/v1/transfer-list,get,Get Futures Account Transfer Out Ledger account,fee,/api/v1/base-fee,get,Get Basic Fee - Spot/Margin account,fee,/api/v1/trade-fees,get,Get Actual Fee - Spot/Margin account,fee,/api/v1/trade-fees,get,Get Actual Fee - Futures @@ -61,9 +61,12 @@ spot,market,/api/v1/market/histories,get,Get Trade History spot,market,/api/v1/market/candles,get,Get Klines spot,market,/api/v1/market/orderbook/level2_{size},get,Get Part OrderBook spot,market,/api/v3/market/orderbook/level2,get,Get Full OrderBook +spot,market,/api/v1/market/orderbook/callauction/level2_{size},get,Get Call Auction Part OrderBook +spot,market,/api/v1/market/callauctionData,get,Get Call Auction Info spot,market,/api/v1/prices,get,Get Fiat Price spot,market,/api/v1/market/stats,get,Get 24hr Stats spot,market,/api/v1/markets,get,Get Market List +spot,market,/api/v1/my-ip,get,Get Client IP Address spot,market,/api/v1/timestamp,get,Get Server Time spot,market,/api/v1/status,get,Get Service Status spot,market,/api/v1/bullet-public,post,Get Public Token - Spot/Margin @@ -85,6 +88,7 @@ spot,order,/api/v1/hf/orders/{orderId},get,Get Order By OrderId spot,order,/api/v1/hf/orders/client-order/{clientOid},get,Get Order By ClientOid spot,order,/api/v1/hf/orders/active/symbols,get,Get Symbols With Open Order spot,order,/api/v1/hf/orders/active,get,Get Open Orders +spot,order,/api/v1/hf/orders/active/page,get,Get Open Orders By Page spot,order,/api/v1/hf/orders/done,get,Get Closed Orders spot,order,/api/v1/hf/fills,get,Get Trade History spot,order,/api/v1/hf/orders/dead-cancel-all/query,get,Get DCP @@ -117,10 +121,10 @@ spot,order,/api/v1/order/client-order/{clientOid},get,Get Order By ClientOid - O spot,order,/api/v1/fills,get,Get Trade History - Old spot,order,/api/v1/limit/fills,get,Get Recent Trade History - Old margin,market,/api/v3/margin/symbols,get,Get Symbols - Cross Margin -margin,market,/api/v1/margin/config,get,Get Margin Config margin,market,/api/v3/etf/info,get,Get ETF Info -margin,market,/api/v3/mark-price/all-symbols,get,Get Mark Price List margin,market,/api/v1/mark-price/{symbol}/current,get,Get Mark Price Detail +margin,market,/api/v1/margin/config,get,Get Margin Config +margin,market,/api/v3/mark-price/all-symbols,get,Get Mark Price List margin,market,/api/v1/isolated/symbols,get,Get Symbols - Isolated Margin margin,order,/api/v3/hf/margin/order,post,Add Order margin,order,/api/v3/hf/margin/order/test,post,Add Order Test @@ -139,7 +143,7 @@ margin,debit,/api/v3/margin/borrow,post,Borrow margin,debit,/api/v3/margin/borrow,get,Get Borrow History margin,debit,/api/v3/margin/repay,post,Repay margin,debit,/api/v3/margin/repay,get,Get Repay History -margin,debit,/api/v3/margin/interest,get,Get Interest History +margin,debit,/api/v3/margin/interest,get,Get Interest History. margin,debit,/api/v3/position/update-user-leverage,post,Modify Leverage margin,credit,/api/v3/project/list,get,Get Loan Market margin,credit,/api/v3/project/marketInterestRate,get,Get Loan Market Interest Rate @@ -161,7 +165,7 @@ futures,market,/api/v1/mark-price/{symbol}/current,get,Get Mark Price futures,market,/api/v1/index/query,get,Get Spot Index Price futures,market,/api/v1/interest/query,get,Get Interest Rate Index futures,market,/api/v1/premium/query,get,Get Premium Index -futures,market,/api/v1/trade-statistics,get,Get 24hr Stats +futures,market,/api/v1/trade-statistics,get,Get 24hr stats futures,market,/api/v1/timestamp,get,Get Server Time futures,market,/api/v1/status,get,Get Service Status futures,market,/api/v1/bullet-public,post,Get Public Token - Futures @@ -198,29 +202,30 @@ futures,positions,/api/v1/margin/withdrawMargin,post,Remove Isolated Margin futures,positions,/api/v1/contracts/risk-limit/{symbol},get,Get Isolated Margin Risk Limit futures,positions,/api/v1/position/risk-limit-level/change,post,Modify Isolated Margin Risk Limit futures,positions,/api/v1/position/margin/auto-deposit-status,post,Modify Isolated Margin Auto-Deposit Status -futures,fundingfees,/api/v1/funding-rate/{symbol}/current,get,Get Current Funding Rate +futures,fundingfees,/api/v1/funding-rate/{symbol}/current,get,Get Current Funding Rate. futures,fundingfees,/api/v1/contract/funding-rates,get,Get Public Funding History futures,fundingfees,/api/v1/funding-history,get,Get Private Funding History -earn,earn,/api/v1/earn/orders,post,purchase +earn,earn,/api/v1/earn/orders,post,Purchase earn,earn,/api/v1/earn/redeem-preview,get,Get Redeem Preview earn,earn,/api/v1/earn/orders,delete,Redeem earn,earn,/api/v1/earn/saving/products,get,Get Savings Products earn,earn,/api/v1/earn/promotion/products,get,Get Promotion Products -earn,earn,/api/v1/earn/hold-assets,get,Get Account Holding earn,earn,/api/v1/earn/staking/products,get,Get Staking Products earn,earn,/api/v1/earn/kcs-staking/products,get,Get KCS Staking Products earn,earn,/api/v1/earn/eth-staking/products,get,Get ETH Staking Products -viplending,viplending,/api/v1/otc-loan/loan,get,Get Account Detail +earn,earn,/api/v1/earn/hold-assets,get,Get Account Holding +viplending,viplending,/api/v1/otc-loan/discount-rate-configs,get,Get Discount Rate Configs +viplending,viplending,/api/v1/otc-loan/loan,get,Get Loan Info viplending,viplending,/api/v1/otc-loan/accounts,get,Get Accounts affiliate,affiliate,/api/v2/affiliate/inviter/statistics,get,Get Account broker,apibroker,/api/v1/broker/api/rebase/download,get,Get Broker Rebate broker,ndbroker,/api/v1/broker/nd/info,get,Get Broker Info -broker,ndbroker,/api/v1/broker/nd/account,post,Add SubAccount -broker,ndbroker,/api/v1/broker/nd/account,get,Get SubAccount -broker,ndbroker,/api/v1/broker/nd/account/apikey,post,Add SubAccount API -broker,ndbroker,/api/v1/broker/nd/account/apikey,get,Get SubAccount API -broker,ndbroker,/api/v1/broker/nd/account/update-apikey,post,Modify SubAccount API -broker,ndbroker,/api/v1/broker/nd/account/apikey,delete,Delete SubAccount API +broker,ndbroker,/api/v1/broker/nd/account,post,Add sub-account +broker,ndbroker,/api/v1/broker/nd/account,get,Get sub-account +broker,ndbroker,/api/v1/broker/nd/account/apikey,post,Add sub-account API +broker,ndbroker,/api/v1/broker/nd/account/apikey,get,Get sub-account API +broker,ndbroker,/api/v1/broker/nd/account/update-apikey,post,Modify sub-account API +broker,ndbroker,/api/v1/broker/nd/account/apikey,delete,Delete sub-account API broker,ndbroker,/api/v1/broker/nd/transfer,post,Transfer broker,ndbroker,/api/v3/broker/nd/transfer/detail,get,Get Transfer History broker,ndbroker,/api/v1/asset/ndbroker/deposit/list,get,Get Deposit List diff --git a/spec/original/meta.json b/spec/original/meta.json index c22b0515..378d32cc 100644 --- a/spec/original/meta.json +++ b/spec/original/meta.json @@ -79,27 +79,27 @@ }, "maxSubQuantity": { "type": "integer", - "description": "Max number of sub-accounts = maxDefaultSubQuantity + maxSpotSubQuantity" + "description": "Max. number of sub-accounts = maxDefaultSubQuantity + maxSpotSubQuantity" }, "maxDefaultSubQuantity": { "type": "integer", - "description": "Max number of default open sub-accounts (according to VIP level)" + "description": "Max. number of default open sub-accounts (according to VIP level)" }, "maxSpotSubQuantity": { "type": "integer", - "description": "Max number of sub-accounts with additional Spot trading permissions" + "description": "Max. number of sub-accounts with additional spot trading permissions" }, "maxMarginSubQuantity": { "type": "integer", - "description": "Max number of sub-accounts with additional margin trading permissions" + "description": "Max. number of sub-accounts with additional margin trading permissions" }, "maxFuturesSubQuantity": { "type": "integer", - "description": "Max number of sub-accounts with additional futures trading permissions" + "description": "Max. number of sub-accounts with additional futures trading permissions" }, "maxOptionSubQuantity": { "type": "integer", - "description": "Max number of sub-accounts with additional Option trading permissions" + "description": "Max. number of sub-accounts with additional option trading permissions" } }, "required": [ @@ -146,7 +146,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can be used to obtain account summary information.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getAccountInfo\",\"sdk-method-description\":\"This endpoint can be used to obtain account summary information.\",\"api-rate-limit\":20}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getAccountInfo\",\"sdk-method-description\":\"This endpoint can be used to obtain account summary information.\",\"api-rate-limit-weight\":20}" } }, { @@ -252,8 +252,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nGet the information of the api key. Use the api key pending to be checked to call the endpoint. Both master and sub user's api key are applicable.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getApikeyInfo\",\"sdk-method-description\":\"Get the information of the api key. Use the api key pending to be checked to call the endpoint. Both master and sub user's api key are applicable.\",\"api-rate-limit\":20}" + "description": ":::info[Description]\nGet the api key information. Use the api key awaiting checking to call the endpoint. Both master and sub user's api key are applicable.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getApikeyInfo\",\"sdk-method-description\":\"Get the api key information. Use the api key awaiting checking to call the endpoint. Both master and sub user's api key are applicable.\",\"api-rate-limit-weight\":20}" } }, { @@ -263,8 +263,8 @@ "method": "get", "path": "/api/v1/hf/accounts/opened", "parameters": { - "path": [], "query": [], + "path": [], "cookie": [], "header": [] }, @@ -312,8 +312,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis interface determines whether the current user is a spot high-frequency user or a spot low-frequency user.\n:::\n\n:::tip[Tips]\nThis interface is a compatibility interface left over from the old version upgrade. Only some old users need to use it (high frequency will be opened before 2024 and trade_hf has been used). Most user do not need to use this interface. When the return is true, you need to use trade_hf to transfer assets and query assets When the return is false, you need to use trade to transfer assets and query assets.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getSpotAccountType\",\"sdk-method-description\":\"This interface determines whether the current user is a spot high-frequency user or a spot low-frequency user.\",\"api-rate-limit\":30}" + "description": ":::info[Description]\nThis interface determines whether the current user is a spot high-frequency user or a spot low-frequency user.\n:::\n\n:::tip[Tips]\nThis interface is a compatibility interface left over from the old version upgrade. Only some old users need to use it (high frequency will be opened before 2024 and trade_hf has been used). Most users do not need to use this interface. When the return is true, you need to use trade_hf to transfer assets and query assets. When the return is false, you need to use trade to transfer assets and query assets.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getSpotAccountType\",\"sdk-method-description\":\"This interface determines whether the current user is a spot high-frequency user or a spot low-frequency user.\",\"api-rate-limit-weight\":30}" } }, { @@ -323,6 +323,7 @@ "method": "get", "path": "/api/v1/accounts", "parameters": { + "path": [], "query": [ { "id": "RczLsmHFq3", @@ -330,21 +331,21 @@ "required": false, "description": "currency", "example": "USDT", - "type": "string", - "enable": true + "type": "string" }, { "id": "RHGp3FAE9z", "name": "type", "required": false, - "description": "Account type main、trade", + "description": "Account type", "example": "main", "type": "string", "schema": { "type": "string", "enum": [ "main", - "trade" + "trade", + "option" ], "x-api-enum": [ { @@ -356,13 +357,16 @@ "value": "trade", "name": "trade", "description": "Spot account" + }, + { + "value": "option", + "name": "option", + "description": "Option account" } ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -393,7 +397,7 @@ }, "type": { "type": "string", - "description": "Account type:,main、trade、isolated(abandon)、margin(abandon)\n", + "description": "Account type: main, trade, isolated (abandon), margin (abandon)\n", "enum": [ "main", "trade" @@ -462,8 +466,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nGet a list of accounts. Please Deposit to the main account firstly, then transfer the funds to the trade account via Inner Transfer before transaction.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getSpotAccountList\",\"sdk-method-description\":\"Get a list of accounts. Please Deposit to the main account firstly, then transfer the funds to the trade account via Inner Transfer before transaction.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nGet a list of accounts. Please deposit funds into the **main** account first, then use the Transfer function to move them to the trade account before trading.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getSpotAccountList\",\"sdk-method-description\":\"Get a list of accounts. Please deposit funds into the main account first, then use the Transfer function to move them to the trade account before trading.\",\"api-rate-limit-weight\":5}" } }, { @@ -554,8 +558,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nget Information for a single spot account. Use this endpoint when you know the accountId.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getSpotAccountDetail\",\"sdk-method-description\":\"get Information for a single spot account. Use this endpoint when you know the accountId.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nGet information for a single spot account. Use this endpoint when you know the accountId.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getSpotAccountDetail\",\"sdk-method-description\":\"Get information for a single spot account. Use this endpoint when you know the accountId.\",\"api-rate-limit-weight\":5}" } }, { @@ -668,7 +672,7 @@ }, "status": { "type": "string", - "description": "Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW borrowing", + "description": "Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW-borrowing", "enum": [ "EFFECTIVE", "BANKRUPTCY", @@ -792,8 +796,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to get the info of the cross margin account.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getCrossMarginAccount\",\"sdk-method-description\":\"Request via this endpoint to get the info of the cross margin account.\",\"api-rate-limit\":15}" + "description": ":::info[Description]\nRequest cross margin account info via this endpoint.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getCrossMarginAccount\",\"sdk-method-description\":\"Request cross margin account info via this endpoint.\",\"api-rate-limit-weight\":15}" } }, { @@ -803,14 +807,14 @@ "method": "get", "path": "/api/v3/isolated/accounts", "parameters": { + "path": [], "query": [ { "id": "0GJu6LYq3T", "name": "symbol", "required": false, "description": "For isolated trading pairs, query all without passing", - "type": "string", - "enable": true + "type": "string" }, { "id": "PjWvwo4LmP", @@ -844,8 +848,7 @@ "description": "" } ] - }, - "enable": true + } }, { "id": "waIqv5MOOW", @@ -879,11 +882,9 @@ "description": "" } ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -926,7 +927,7 @@ }, "status": { "type": "string", - "description": "Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW borrowing", + "description": "Position status; EFFECTIVE-effective, BANKRUPTCY-bankruptcy liquidation, LIQUIDATION-closing, REPAY-repayment, BORROW-borrowing", "enum": [ "EFFECTIVE", "BANKRUPTCY", @@ -1108,8 +1109,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to get the info of the isolated margin account.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getIsolatedMarginAccount\",\"sdk-method-description\":\"Request via this endpoint to get the info of the isolated margin account.\",\"api-rate-limit\":15}" + "description": ":::info[Description]\nRequest isolated margin account info via this endpoint.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getIsolatedMarginAccount\",\"sdk-method-description\":\"Request isolated margin account info via this endpoint.\",\"api-rate-limit-weight\":15}" } }, { @@ -1119,12 +1120,13 @@ "method": "get", "path": "/api/v1/account-overview", "parameters": { + "path": [], "query": [ { "id": "0GJu6LYq3T", "name": "currency", "required": false, - "description": "Currecny, Default XBT", + "description": "Currency, Default XBT", "example": "", "type": "string", "schema": { @@ -1132,13 +1134,13 @@ "default": "XBT", "examples": [ "USDT", + "USDC", + "XBT", "ETH" ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -1159,15 +1161,15 @@ "properties": { "accountEquity": { "type": "number", - "description": "Account equity = marginBalance + Unrealised PNL" + "description": "Account equity = marginBalance + unrealizedPNL" }, "unrealisedPNL": { "type": "number", - "description": "Unrealised profit and loss" + "description": "Unrealized profit and loss" }, "marginBalance": { "type": "number", - "description": "Margin balance = positionMargin + orderMargin + frozenFunds + availableBalance - unrealisedPNL" + "description": "Margin balance = positionMargin + orderMargin + frozenFunds + availableBalance - unrealizedPNL" }, "positionMargin": { "type": "number", @@ -1197,6 +1199,10 @@ "riskRatio": { "type": "number", "description": "Cross margin risk rate" + }, + "maxWithdrawAmount": { + "type": "number", + "description": "Maximum amount that can be withdrawn/transferred." } }, "required": [ @@ -1208,7 +1214,8 @@ "frozenFunds", "availableBalance", "currency", - "riskRatio" + "riskRatio", + "maxWithdrawAmount" ] } }, @@ -1225,7 +1232,7 @@ "responseExamples": [ { "name": "Success", - "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"currency\": \"USDT\",\n \"accountEquity\": 48.921913718,\n \"unrealisedPNL\": 1.59475,\n \"marginBalance\": 47.548728628,\n \"positionMargin\": 34.1577964733,\n \"orderMargin\": 0,\n \"frozenFunds\": 0,\n \"availableBalance\": 14.7876172447,\n \"riskRatio\": 0.0090285199\n }\n}", + "data": "{\r\n \"code\": \"200000\",\r\n \"data\": {\r\n \"accountEquity\": 394.439280806,\r\n \"unrealisedPNL\": 20.15278,\r\n \"marginBalance\": 371.394298816,\r\n \"positionMargin\": 102.20664159,\r\n \"orderMargin\": 10.06002012,\r\n \"frozenFunds\": 0.0,\r\n \"availableBalance\": 290.326799096,\r\n \"currency\": \"USDT\",\r\n \"riskRatio\": 0.0065289525,\r\n \"maxWithdrawAmount\": 290.326419096\r\n }\r\n}", "responseId": 10093, "ordering": 1 } @@ -1239,8 +1246,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to get the info of the futures account.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getFuturesAccount\",\"sdk-method-description\":\"Request via this endpoint to get the info of the futures account.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nRequest futures account info via this endpoint.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getFuturesAccount\",\"sdk-method-description\":\"Request futures account info via this endpoint.\",\"api-rate-limit-weight\":5}" } }, { @@ -1255,7 +1262,7 @@ "id": "8YpRjfgiQY", "name": "currency", "required": false, - "description": "Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default.", + "description": "Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default.", "example": "BTC", "type": "string", "enable": true @@ -1276,13 +1283,13 @@ "x-api-enum": [ { "value": "in", - "name": "", - "description": "" + "name": "in", + "description": "Funds in" }, { "value": "out", - "name": "", - "description": "" + "name": "out", + "description": "Funds out" } ] }, @@ -1292,7 +1299,7 @@ "id": "79t7ddnYAv", "name": "bizType", "required": false, - "description": "Type: DEPOSIT -deposit, WITHDRAW -withdraw, TRANSFER -transfer, SUB_TRANSFER -subaccount transfer,TRADE_EXCHANGE -trade, MARGIN_EXCHANGE -margin trade, KUCOIN_BONUS -bonus, BROKER_TRANSFER -Broker transfer record", + "description": "Type: DEPOSIT-deposit, WITHDRAW-withdraw, TRANSFER-transfer, SUB_TRANSFER-sub-account transfer, TRADE_EXCHANGE-trade, MARGIN_EXCHANGE-margin trade, KUCOIN_BONUS-bonus, BROKER_TRANSFER-Broker transfer record", "example": "TRANSFER", "type": "string", "schema": { @@ -1304,7 +1311,7 @@ "id": "nRkUqJX2U6", "name": "startAt", "required": false, - "description": "Start time (milisecond)", + "description": "Start time (milliseconds)", "example": "1728663338000", "type": "integer", "schema": { @@ -1317,7 +1324,7 @@ "id": "rqSOV202LJ", "name": "endAt", "required": false, - "description": "End time (milisecond)", + "description": "End time (milliseconds)", "example": "1728692138000", "type": "integer", "schema": { @@ -1388,7 +1395,7 @@ }, "totalPage": { "type": "integer", - "description": "total page" + "description": "total pages" }, "items": { "type": "array", @@ -1401,11 +1408,11 @@ }, "currency": { "type": "string", - "description": "The currency of an account" + "description": "Currency" }, "amount": { "type": "string", - "description": "The total amount of assets (fees included) involved in assets changes such as transaction, withdrawal and bonus distribution." + "description": "The total amount of assets (fees included) involved in assets changes such as transactions, withdrawals and bonus distributions." }, "fee": { "type": "string", @@ -1413,15 +1420,15 @@ }, "balance": { "type": "string", - "description": "Remaining funds after the transaction." + "description": "Remaining funds after the transaction. (Deprecated field, no actual use of the value field)" }, "accountType": { "type": "string", - "description": "The account type of the master user: MAIN, TRADE, MARGIN or CONTRACT." + "description": "Master user account types: MAIN, TRADE, MARGIN or CONTRACT." }, "bizType": { "type": "string", - "description": "Business type leading to the changes in funds, such as exchange, withdrawal, deposit, KUCOIN_BONUS, REFERRAL_BONUS, Lendings etc." + "description": "Business type leading to changes in funds, such as exchange, withdrawal, deposit, KUCOIN_BONUS, REFERRAL_BONUS, Lendings, etc." }, "direction": { "type": "string", @@ -1429,12 +1436,12 @@ }, "createdAt": { "type": "integer", - "description": "Time of the event", + "description": "Time of event", "format": "int64" }, "context": { "type": "string", - "description": "Business related information such as order ID, serial No., etc." + "description": "Business related information such as order ID, serial no., etc." } } } @@ -1476,8 +1483,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis interface is for transaction records from all types of your accounts, supporting inquiry of various currencies. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::\n\n:::tip[Tips]\nthe start and end time range cannot exceed 24 hours. An error will occur if the specified time window exceeds the range. If you specify the end time only, the system will automatically calculate the start time as end time minus 24 hours, and vice versa.\n:::\n\n:::tip[Tips]\nSupport to obtain 1 year historical data, if need to obtain longer historical data, please submit a ticket: https://kucoin.zendesk.com/hc/en-us/requests/new\n:::\n\n**context**\n\nIf the returned value under bizType is “trade exchange”, the additional info. (such as order ID and trade ID, trading pair, etc.) of the trade will be returned in field context.\n\n**BizType Description**\n\n| Field | Description |\n| ------ | ---------- |\n| Assets Transferred in After Upgrading | Assets Transferred in After V1 to V2 Upgrading |\n| Deposit | Deposit |\n| Withdrawal | Withdrawal |\n| Transfer | Transfer |\n| Trade_Exchange | Trade |\n| Vote for Coin | Vote for Coin |\n| KuCoin Bonus | KuCoin Bonus |\n| Referral Bonus | Referral Bonus |\n| Rewards | Activities Rewards |\n| Distribution | Distribution, such as get GAS by holding NEO |\n| Airdrop/Fork | Airdrop/Fork |\n| Other rewards | Other rewards, except Vote, Airdrop, Fork |\n| Fee Rebate | Fee Rebate |\n| Buy Crypto | Use credit card to buy crypto |\n| Sell Crypto | Use credit card to sell crypto |\n| Public Offering Purchase | Public Offering Purchase for Spotlight |\n| Send red envelope | Send red envelope |\n| Open red envelope | Open red envelope |\n| Staking | Staking |\n| LockDrop Vesting | LockDrop Vesting |\n| Staking Profits | Staking Profits |\n| Redemption | Redemption |\n| Refunded Fees | Refunded Fees |\n| KCS Pay Fees | KCS Pay Fees |\n| Margin Trade | Margin Trade |\n| Loans | Loans |\n| Borrowings | Borrowings |\n| Debt Repayment | Debt Repayment |\n| Loans Repaid | Loans Repaid |\n| Lendings | Lendings |\n| Pool transactions | Pool-X transactions |\n| Instant Exchange | Instant Exchange |\n| Sub Account Transfer | Sub-account transfer |\n| Liquidation Fees | Liquidation Fees |\n| Soft Staking Profits | Soft Staking Profits |\n| Voting Earnings | Voting Earnings on Pool-X |\n| Redemption of Voting | Redemption of Voting on Pool-X |\n| Convert to KCS | Convert to KCS |\n| BROKER_TRANSFER | Broker transfer record |\n\n\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getSpotLedger\",\"sdk-method-description\":\"This interface is for transaction records from all types of your accounts, supporting inquiry of various currencies. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\",\"api-rate-limit\":2}" + "description": ":::info[Description]\nThis interface is for transaction records from all your account types, supporting various currency inquiries. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::\n\n:::tip[Tips]\nThe start and end time range cannot exceed 24 hours. An error will occur if the specified time window exceeds the range. If you specify the end time only, the system will automatically calculate the start time as end time minus 24 hours, and vice versa.\n:::\n\n:::tip[Tips]\nSupport to obtain 1-year historical data. If you need to obtain longer historical data, please submit a ticket: https://kucoin.zendesk.com/hc/en-us/requests/new\n:::\n\n**context**\n\nIf the returned value under bizType is “trade exchange”, the additional trade info (such as order ID, trade ID, trading pair, etc.) will be returned in field context.\n\n**BizType Description**\n\n| Field | Description |\n| ------ | ---------- |\n| Assets Transferred in After Upgrading | Assets Transferred in After V1 to V2 Upgrading |\n| Deposit | Deposit |\n| Withdrawal | Withdrawal |\n| Transfer | Transfer |\n| Trade_Exchange | Trade |\n| Vote for Coin | Vote for Coin |\n| KuCoin Bonus | KuCoin Bonus |\n| Referral Bonus | Referral Bonus |\n| Rewards | Activities Rewards |\n| Distribution | Distribution, such as get GAS by holding NEO |\n| Airdrop/Fork | Airdrop/Fork |\n| Other rewards | Other rewards, except Vote, Airdrop, Fork |\n| Fee Rebate | Fee Rebate |\n| Buy Crypto | Use credit card to buy crypto |\n| Sell Crypto | Use credit card to sell crypto |\n| Public Offering Purchase | Public Offering Purchase for Spotlight |\n| Send red envelope | Send red envelope |\n| Open red envelope | Open red envelope |\n| Staking | Staking |\n| LockDrop Vesting | LockDrop Vesting |\n| Staking Profits | Staking Profits |\n| Redemption | Redemption |\n| Refunded Fees | Refunded Fees |\n| KCS Pay Fees | KCS Pay Fees |\n| Margin Trade | Margin Trade |\n| Loans | Loans |\n| Borrowings | Borrowings |\n| Debt Repayment | Debt Repayment |\n| Loans Repaid | Loans Repaid |\n| Lendings | Lendings |\n| Pool transactions | Pool-X transactions |\n| Instant Exchange | Instant Exchange |\n| Sub Account Transfer | Sub-account transfer |\n| Liquidation Fees | Liquidation Fees |\n| Soft Staking Profits | Soft Staking Profits |\n| Voting Earnings | Voting Earnings on Pool-X |\n| Redemption of Voting | Redemption of Voting on Pool-X |\n| Convert to KCS | Convert to KCS |\n| BROKER_TRANSFER | Broker transfer record |", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getSpotLedger\",\"sdk-method-description\":\"This interface is for transaction records from all your account types, supporting various currency inquiries. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\",\"api-rate-limit-weight\":2}" } }, { @@ -1487,15 +1494,15 @@ "method": "get", "path": "/api/v1/hf/accounts/ledgers", "parameters": { + "path": [], "query": [ { "id": "8YpRjfgiQY", "name": "currency", "required": false, - "description": "Currency ( you can choose more than one currency). You can specify 10 currencies at most for one time. If not specified, all currencies will be inquired by default.", + "description": "Currency (you can choose more than one currency). You can specify a max. of 10 currencies in one go. If not specified, all currencies will be queried by default.", "example": "BTC", - "type": "string", - "enable": true + "type": "string" }, { "id": "iwlQIVyBkb", @@ -1522,55 +1529,70 @@ "description": "" } ] - }, - "enable": true + } }, { "id": "79t7ddnYAv", "name": "bizType", "required": false, - "description": "Transaction type: TRANSFER-transfer funds,TRADE_EXCHANGE-Trade", + "description": "Transaction type", "example": "TRANSFER", "type": "string", "schema": { "type": "string", "enum": [ "TRADE_EXCHANGE", - "TRANSFER" + "TRANSFER", + "RETURNED_FEES", + "DEDUCTION_FEES", + "OTHER" ], "x-api-enum": [ { "value": "TRADE_EXCHANGE", - "name": "", - "description": "" + "name": "TRADE_EXCHANGE", + "description": "trade exchange" }, { "value": "TRANSFER", - "name": "", - "description": "" + "name": "TRANSFER", + "description": "transfer" + }, + { + "value": "RETURNED_FEES", + "name": "RETURNED_FEES", + "description": "returned fees" + }, + { + "value": "DEDUCTION_FEES", + "name": "DEDUCTION_FEES", + "description": "deduction fees" + }, + { + "value": "OTHER", + "name": "OTHER", + "description": "other" } ] - }, - "enable": true + } }, { "id": "pPnKFH2DlI", "name": "lastId", "required": false, - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given.", + "description": "The ID of the last set of data from the previous data batch. By default, the latest information is given.", "example": "254062248624417", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "TJwaZEZ59O", "name": "limit", "required": false, - "description": "Default100,Max200", + "description": "Default100, Max200", "example": "100", "type": "integer", "schema": { @@ -1578,37 +1600,37 @@ "default": 100, "maximum": 200, "minimum": 1 - }, - "enable": true + } }, { "id": "nRkUqJX2U6", "name": "startAt", "required": false, - "description": "Start time (milisecond)", + "description": "Start time (milliseconds)", "example": "1728663338000", "type": "integer", "schema": { "type": "integer", - "format": "int64" - }, - "enable": true + "format": "int64", + "maximum": 9999999999999, + "minimum": 0 + } }, { "id": "rqSOV202LJ", "name": "endAt", "required": false, - "description": "End time (milisecond)", + "description": "End time (milliseconds)", "example": "1728692138000", "type": "integer", "schema": { "type": "integer", - "format": "int64" - }, - "enable": true + "format": "int64", + "maximum": 9999999999999, + "minimum": 0 + } } ], - "path": [], "cookie": [], "header": [] }, @@ -1631,7 +1653,7 @@ "properties": { "id": { "type": "string", - "description": "Unique id" + "description": "Unique ID" }, "currency": { "type": "string", @@ -1643,7 +1665,7 @@ }, "fee": { "type": "string", - "description": "Deposit or withdrawal fee" + "description": "Transaction, Deposit or withdrawal fee" }, "tax": { "type": "string" @@ -1658,11 +1680,11 @@ }, "bizType": { "type": "string", - "description": "Trnasaction type,such as TRANSFER, TRADE_EXCHANGE, etc." + "description": "Trnasaction type, such as TRANSFER, TRADE_EXCHANGE, etc." }, "direction": { "type": "string", - "description": "Direction of transfer( out or in)", + "description": "Direction of transfer (out or in)", "enum": [ "in", "out" @@ -1738,8 +1760,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis API endpoint returns all transfer (in and out) records in high-frequency trading account and supports multi-coin queries. The query results are sorted in descending order by createdAt and id.\n:::\n\n\n\n:::tip[Tips]\nIf lastId is configured, the information obtained < lastId. Otherwise, it will go back to the latest information.\n\nYou can only obtain data from within a 3 _ 24 hour time range (i.e., from 3 _ 24 hours ago up to now) If you specify a time range that exceeds this limit, the system will default to data from within 3 * 24 hours.\n:::\n\n**context**\n\nIf the bizType is TRADE_EXCHANGE, the context field will include additional transaction information (order id, transaction id, and trading pair).\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getSpotHFLedger\",\"sdk-method-description\":\"This API endpoint returns all transfer (in and out) records in high-frequency trading account and supports multi-coin queries. The query results are sorted in descending order by createdAt and id.\",\"api-rate-limit\":2}" + "description": ":::info[Description]\nThis API endpoint returns all transfer (in and out) records in high-frequency trading accounts and supports multi-coin queries. The query results are sorted in descending order by createdAt and ID.\n:::\n\n\n\n:::tip[Tips]\nIf lastId is configured, the information obtained < lastId. Otherwise, it will revert to the latest information.\n\nYou can only obtain data from within a 3 * 24 hour time range (i.e., from 3 * 24 hours ago up to now). If you specify a time range that exceeds this limit, the system will default to data from within 3 * 24 hours.\n:::\n\n**context**\n\nIf the bizType is TRADE_EXCHANGE, the context field will include additional transaction information (order ID, transaction ID, and trading pair).", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getSpotHFLedger\",\"sdk-method-description\":\"This API endpoint returns all transfer (in and out) records in high-frequency trading accounts and supports multi-coin queries. The query results are sorted in descending order by createdAt and ID.\",\"api-rate-limit-weight\":2}" } }, { @@ -1749,15 +1771,15 @@ "method": "get", "path": "/api/v3/hf/margin/account/ledgers", "parameters": { + "path": [], "query": [ { "id": "8YpRjfgiQY", "name": "currency", "required": false, - "description": "currency, optional,can select more than one,separate with commas,select no more than 10 currencys,the default will be to query for all currencys if left empty", + "description": "Currency optional; more than one can be selected; separate using commas; select no more than 10 currencies; the default will be to query for all currencies if left empty", "example": "BTC", - "type": "string", - "enable": true + "type": "string" }, { "id": "iwlQIVyBkb", @@ -1784,39 +1806,36 @@ "description": "" } ] - }, - "enable": true + } }, { "id": "79t7ddnYAv", "name": "bizType", "required": false, - "description": "Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE - cross margin trade, ISOLATED_EXCHANGE - isolated margin trade, LIQUIDATION - liquidation, ASSERT_RETURN - forced liquidation asset return", + "description": "Transaction type: TRANSFER- transfer funds, MARGIN_EXCHANGE-cross margin trade, ISOLATED_EXCHANGE-isolated margin trade, LIQUIDATION-liquidation, ASSERT_RETURN-forced liquidation asset return", "example": "TRANSFER", "type": "string", "schema": { "type": "string" - }, - "enable": true + } }, { "id": "pPnKFH2DlI", "name": "lastId", "required": false, - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given.", + "description": "The ID of the last set of data from the previous data batch. By default, the latest information is given.", "example": "254062248624417", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "TJwaZEZ59O", "name": "limit", "required": false, - "description": "Default100,Max200", + "description": "Default100, Max200", "example": "100", "type": "integer", "schema": { @@ -1824,37 +1843,33 @@ "default": 100, "maximum": 200, "minimum": 1 - }, - "enable": true + } }, { "id": "nRkUqJX2U6", "name": "startAt", "required": false, - "description": "Start time (milisecond)", + "description": "Start time (milliseconds)", "example": "1728663338000", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "rqSOV202LJ", "name": "endAt", "required": false, - "description": "End time (milisecond)", + "description": "End time (milliseconds)", "example": "1728692138000", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -1889,7 +1904,7 @@ }, "fee": { "type": "string", - "description": "Deposit or withdrawal fee" + "description": "Transaction, Deposit or withdrawal fee" }, "balance": { "type": "string", @@ -1901,11 +1916,11 @@ }, "bizType": { "type": "string", - "description": "Trnasaction type,such as TRANSFER, TRADE_EXCHANGE, etc." + "description": "Trnasaction type, such as TRANSFER, TRADE_EXCHANGE, etc." }, "direction": { "type": "string", - "description": "Direction of transfer( out or in)" + "description": "Direction of transfer (out or in)" }, "createdAt": { "type": "integer", @@ -1950,8 +1965,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis API endpoint returns all transfer (in and out) records in high-frequency margin trading account and supports multi-coin queries. The query results are sorted in descending order by createdAt and id.\n:::\n\n\n:::tip[Tips]\nIf lastId is configured, the information obtained < lastId. Otherwise, it will go back to the latest information.\n\nYou can only obtain data from within a 3 _ 24 hour time range (i.e., from 3 _ 24 hours ago up to now) If you specify a time range that exceeds this limit, the system will default to data from within 3 * 24 hours.\n\nIf bizType is MARGIN_EXCHANGE or ISOLATED_EXCHANGE, the context field will contain additional information about the transaction (order id, transaction id, transaction pair).\n:::\n\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getMarginHFLedger\",\"sdk-method-description\":\"This API endpoint returns all transfer (in and out) records in high-frequency margin trading account and supports multi-coin queries. The query results are sorted in descending order by createdAt and id.\",\"api-rate-limit\":2}" + "description": ":::info[Description]\nThis API endpoint returns all transfer (in and out) records in high-frequency margin trading accounts and supports multi-coin queries. The query results are sorted in descending order by createdAt and ID.\n:::\n\n\n:::tip[Tips]\nIf lastId is configured, the information obtained < lastId. Otherwise, it will revert to the latest information.\n\nYou can only obtain data from within a 3 * 24 hour time range (i.e., from 3 * 24 hours ago up to now). If you specify a time range that exceeds this limit, the system will default to data from within 3 * 24 hours.\n\nIf bizType is MARGIN_EXCHANGE or ISOLATED_EXCHANGE, the context field will contain additional information about the transaction (order ID, transaction ID, transaction pair).\n:::\n\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getMarginHFLedger\",\"sdk-method-description\":\"This API endpoint returns all transfer (in and out) records in high-frequency margin trading accounts and supports multi-coin queries. The query results are sorted in descending order by createdAt and ID.\",\"api-rate-limit-weight\":2}" } }, { @@ -1975,7 +1990,7 @@ "id": "79t7ddnYAv", "name": "type", "required": false, - "description": "Type RealisedPNL-Realised profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out", + "description": "Type RealizedPNL-Realized profit and loss, Deposit-Deposit, Withdrawal-withdraw, Transferin-Transfer in, TransferOut-Transfer out", "example": "Transferin", "type": "string", "schema": { @@ -1987,7 +2002,7 @@ "id": "pPnKFH2DlI", "name": "offset", "required": false, - "description": "Start offset. Generally, the only attribute of the last returned result of the previous request is used, and the first page is returned by default", + "description": "Start offset. Generally, only the attributes of the last returned result of the previous request are used, and the first page is returned by default", "example": "254062248624417", "type": "integer", "schema": { @@ -2000,7 +2015,7 @@ "id": "Y9kMltt1Nl", "name": "forward", "required": false, - "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", + "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.", "example": "false", "type": "boolean", "schema": { @@ -2027,7 +2042,7 @@ "id": "nRkUqJX2U6", "name": "startAt", "required": false, - "description": "Start time (milisecond)", + "description": "Start time (milliseconds)", "example": "1728663338000", "type": "integer", "schema": { @@ -2040,7 +2055,7 @@ "id": "rqSOV202LJ", "name": "endAt", "required": false, - "description": "End time (milisecond)", + "description": "End time (milliseconds)", "example": "1728692138000", "type": "integer", "schema": { @@ -2076,7 +2091,7 @@ "properties": { "time": { "type": "integer", - "description": "ledger time", + "description": "Ledger time", "format": "int64" }, "type": { @@ -2127,7 +2142,7 @@ }, "hasMore": { "type": "boolean", - "description": "Is it the last page. If it is false, it means it is the last page, and if it is true, it means need to turn the page." + "description": "Is it the last page? If it is false, it means it is the last page, and if it is true, it means you need to move to the next page." } }, "required": [ @@ -2163,8 +2178,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis interface can query the ledger records of the futures business line\n:::\n\n\n\n:::tip[Tips]\nIf there are open positions, the status of the first page returned will be Pending, indicating the realised profit and loss in the current 8-hour settlement period. Please specify the minimum offset number of the current page into the offset field to turn the page.\n:::\n\n:::tip[Tips]\nSupplementary instructions for startAt and endAt: startAt must be less than endAt; and the interval cannot exceed 1 day; only one field is allowed, and if only one field is passed, another field will be automatically added or subtracted by the system 1 day to complete\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getFuturesLedger\",\"sdk-method-description\":\"This interface can query the ledger records of the futures business line\",\"api-rate-limit\":2}" + "description": ":::info[Description]\nThis interface can query the ledger records of the futures business line.\n:::\n\n:::tip[Tips]\nIf there are open positions, the status of the first page returned will be Pending, indicating the realized profit and loss in the current 8-hour settlement period. Please specify the minimum offset number of the current page into the offset field to move to the next page.\n:::\n\n:::tip[Tips]\nSupplementary instructions for startAt and endAt: startAt must be less than endAt; and the interval cannot exceed 1 day; only one field is allowed, and if only one field is passed, another field will be automatically added or subtracted by the system 1 day to complete\n:::\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Account\",\"sdk-method-name\":\"getFuturesLedger\",\"sdk-method-description\":\"This interface can query the ledger records of the futures business line.\",\"api-rate-limit-weight\":2}" } } ] @@ -2175,7 +2190,7 @@ "description": "", "items": [ { - "name": "Add SubAccount", + "name": "Add sub-account", "api": { "id": "3470135", "method": "post", @@ -2253,15 +2268,15 @@ "properties": { "password": { "type": "string", - "description": "Password(7-24 characters, must contain letters and numbers, cannot only contain numbers or include special characters)" + "description": "Password (7–24 characters, must contain letters and numbers, cannot only contain numbers or include special characters)" }, "remarks": { "type": "string", - "description": "Remarks(1~24 characters)" + "description": "Remarks (1–24 characters)" }, "subName": { "type": "string", - "description": "Sub-account name(must contain 7-32 characters, at least one number and one letter. Cannot contain any spaces.)" + "description": "Sub-account name (must contain 7–32 characters, at least one number and one letter. Cannot contain any spaces.)" }, "access": { "type": "string", @@ -2300,11 +2315,11 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can be used to create sub-accounts.\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"addSubAccount\",\"sdk-method-description\":\"This endpoint can be used to create sub-accounts.\",\"api-rate-limit\":15}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"addSubAccount\",\"sdk-method-description\":\"This endpoint can be used to create sub-accounts.\",\"api-rate-limit-weight\":15}" } }, { - "name": "Add SubAccount Margin Permission", + "name": "Add sub-account Margin Permission", "api": { "id": "3470331", "method": "post", @@ -2368,12 +2383,12 @@ "example": "{\n \"uid\": \"169579801\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint can be used to add sub-accounts Margin permission. Before using this endpoints, you need to ensure that the master account apikey has Margin permissions and the Margin function has been activated.\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"addSubAccountMarginPermission\",\"sdk-method-description\":\"This endpoint can be used to add sub-accounts Margin permission. Before using this endpoints, you need to ensure that the master account apikey has Margin permissions and the Margin function has been activated.\",\"api-rate-limit\":15}" + "description": ":::info[Description]\nThis endpoint can be used to add sub-account Margin permissions. Before using this endpoint, you need to ensure that the master account apikey has Margin permissions and the Margin function has been activated.\n:::\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"addSubAccountMarginPermission\",\"sdk-method-description\":\"This endpoint can be used to add sub-account Margin permissions. Before using this endpoint, you need to ensure that the master account apikey has Margin permissions and the Margin function has been activated.\",\"api-rate-limit-weight\":15}" } }, { - "name": "Add SubAccount Futures Permission", + "name": "Add sub-account Futures Permission", "api": { "id": "3470332", "method": "post", @@ -2437,17 +2452,18 @@ "example": "{\n \"uid\": \"169579801\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint can be used to add sub-accounts Futures permission. Before using this endpoints, you need to ensure that the master account apikey has Futures permissions and the Futures function has been activated.\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"addSubAccountFuturesPermission\",\"sdk-method-description\":\"This endpoint can be used to add sub-accounts Futures permission. Before using this endpoints, you need to ensure that the master account apikey has Futures permissions and the Futures function has been activated.\",\"api-rate-limit\":15}" + "description": ":::info[Description]\nThis endpoint can be used to add sub-account Futures permissions. Before using this endpoint, you need to ensure that the master account apikey has Futures permissions and the Futures function has been activated.\n:::\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"addSubAccountFuturesPermission\",\"sdk-method-description\":\"This endpoint can be used to add sub-account Futures permissions. Before using this endpoint, you need to ensure that the master account apikey has Futures permissions and the Futures function has been activated.\",\"api-rate-limit-weight\":15}" } }, { - "name": "Get SubAccount List - Summary Info", + "name": "Get sub-account List - Summary Info", "api": { "id": "3470131", "method": "get", "path": "/api/v2/sub/user", "parameters": { + "path": [], "query": [ { "id": "7kYgoQX9d6", @@ -2455,8 +2471,7 @@ "required": false, "description": "Current request page. Default is 1", "example": "1", - "type": "integer", - "enable": true + "type": "integer" }, { "id": "iIrspuNh6x", @@ -2471,11 +2486,9 @@ "default": 10, "minimum": 1, "maximum": 100 - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -2508,7 +2521,7 @@ }, "totalPage": { "type": "integer", - "description": "Total number of page" + "description": "Total number of pages" }, "items": { "type": "array", @@ -2517,7 +2530,7 @@ "properties": { "userId": { "type": "string", - "description": "Sub-account User Id" + "description": "Sub-account User ID" }, "uid": { "type": "integer", @@ -2560,12 +2573,12 @@ { "value": 0, "name": "NORMAL", - "description": "Normal subaccount" + "description": "Normal sub-account" }, { "value": 1, "name": "ROBOT", - "description": "Robot subaccount" + "description": "Robot sub-account" }, { "value": 2, @@ -2575,7 +2588,7 @@ { "value": 5, "name": "HOSTED", - "description": "Asset management subaccount" + "description": "Asset management sub-account" } ] }, @@ -2585,7 +2598,7 @@ }, "createdAt": { "type": "integer", - "description": "Time of the event", + "description": "Time of event", "format": "int64" }, "remarks": { @@ -2597,14 +2610,14 @@ "items": { "type": "string" }, - "description": "Subaccount Permissions" + "description": "Sub-account Permissions" }, "openedTradeTypes": { "type": "array", "items": { "type": "string" }, - "description": "Subaccount active permissions,If do not have the corresponding permissions, need to log in to the sub-account and go to the corresponding web page to activate" + "description": "Sub-account active permissions: If you do not have the corresponding permissions, you must log in to the sub-account and go to the corresponding web page to activate." }, "hostedStatus": { "type": "string" @@ -2663,11 +2676,11 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can be used to get a paginated list of sub-accounts. Pagination is required.\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"getSpotSubAccountsSummaryV2\",\"sdk-method-description\":\"This endpoint can be used to get a paginated list of sub-accounts. Pagination is required.\",\"api-rate-limit\":20}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"getSpotSubAccountsSummaryV2\",\"sdk-method-description\":\"This endpoint can be used to get a paginated list of sub-accounts. Pagination is required.\",\"api-rate-limit-weight\":20}" } }, { - "name": "Get SubAccount Detail - Balance", + "name": "Get sub-account Detail - Balance", "api": { "id": "3470132", "method": "get", @@ -2687,13 +2700,28 @@ { "id": "iIrspuNh6x", "name": "includeBaseAmount", - "required": true, - "description": "false: do not display the currency which asset is 0, true: display all currency", - "example": "false", + "required": false, + "description": "False: Do not display currencies with 0 assets; True: display all currencies", + "example": "", "type": "boolean", "schema": { - "type": "boolean" + "type": "boolean", + "default": false } + }, + { + "id": "Gi62c8xnBW", + "name": "baseCurrency", + "required": false, + "description": "Specify the currency used to convert assets", + "type": "string" + }, + { + "id": "GIUrXa6OZV", + "name": "baseAmount", + "required": false, + "description": "The currency balance specified must be greater than or equal to the amount", + "type": "string" } ], "cookie": [], @@ -2888,11 +2916,11 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint returns the account info of a sub-user specified by the subUserId.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"getSpotSubAccountDetail\",\"sdk-method-description\":\"This endpoint returns the account info of a sub-user specified by the subUserId.\",\"api-rate-limit\":15}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"getSpotSubAccountDetail\",\"sdk-method-description\":\"This endpoint returns the account info of a sub-user specified by the subUserId.\",\"api-rate-limit-weight\":15}" } }, { - "name": "Get SubAccount List - Spot Balance(V2)", + "name": "Get sub-account List - Spot Balance (V2)", "api": { "id": "3470133", "method": "get", @@ -3152,22 +3180,23 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can be used to get paginated Spot sub-account information. Pagination is required.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"getSpotSubAccountListV2\",\"sdk-method-description\":\"This endpoint can be used to get paginated Spot sub-account information. Pagination is required.\",\"api-rate-limit\":20}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"getSpotSubAccountListV2\",\"sdk-method-description\":\"This endpoint can be used to get paginated Spot sub-account information. Pagination is required.\",\"api-rate-limit-weight\":20}" } }, { - "name": "Get SubAccount List - Futures Balance(V2)", + "name": "Get sub-account List - Futures Balance (V2)", "api": { "id": "3470134", "method": "get", "path": "/api/v1/account-overview-all", "parameters": { + "path": [], "query": [ { "id": "iIrspuNh6x", "name": "currency", "required": false, - "description": "Currecny, Default XBT", + "description": "Currency, Default XBT", "example": "USDT", "type": "string", "schema": { @@ -3177,11 +3206,9 @@ "USDT", "ETH" ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -3209,7 +3236,7 @@ }, "unrealisedPNLTotal": { "type": "number", - "description": "Total unrealisedPNL" + "description": "Total unrealizedPNL" }, "marginBalanceTotal": { "type": "number", @@ -3228,7 +3255,7 @@ }, "availableBalanceTotal": { "type": "number", - "description": "total available balance" + "description": "Total available balance" }, "currency": { "type": "string" @@ -3332,7 +3359,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can be used to get Futures sub-account information. \n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"getFuturesSubAccountListV2\",\"sdk-method-description\":\"This endpoint can be used to get Futures sub-account information. \",\"api-rate-limit\":6}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"getFuturesSubAccountListV2\",\"sdk-method-description\":\"This endpoint can be used to get Futures sub-account information. \",\"api-rate-limit-weight\":6}" } } ] @@ -3343,7 +3370,7 @@ "description": "", "items": [ { - "name": "Add SubAccount API", + "name": "Add sub-account API", "api": { "id": "3470138", "method": "post", @@ -3403,7 +3430,7 @@ }, "createdAt": { "type": "integer", - "description": "Time of the event", + "description": "Time of event", "format": "int64" } }, @@ -3446,15 +3473,15 @@ "properties": { "passphrase": { "type": "string", - "description": "Password(Must contain 7-32 characters. Cannot contain any spaces.)" + "description": "Password (Must contain 7–32 characters. Cannot contain any spaces.)" }, "remark": { "type": "string", - "description": "Remarks(1~24 characters)" + "description": "Remarks (1–24 characters)" }, "permission": { "type": "string", - "description": "[Permissions](apidog://link/pages/338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\")", + "description": "[Permissions](apidog://link/pages/338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\")", "default": "General", "examples": [ "General, Trade" @@ -3462,11 +3489,11 @@ }, "ipWhitelist": { "type": "string", - "description": "IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP)" + "description": "IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP)" }, "expire": { "type": "string", - "description": "API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360", + "description": "API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360", "default": "-1", "enum": [ "-1", @@ -3521,11 +3548,11 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can be used to create APIs for sub-accounts.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"addSubAccountApi\",\"sdk-method-description\":\"This endpoint can be used to create APIs for sub-accounts.\",\"api-rate-limit\":20}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"addSubAccountApi\",\"sdk-method-description\":\"This endpoint can be used to create APIs for sub-accounts.\",\"api-rate-limit-weight\":20}" } }, { - "name": "Modify SubAccount API", + "name": "Modify sub-account API", "api": { "id": "3470139", "method": "post", @@ -3602,11 +3629,11 @@ "properties": { "passphrase": { "type": "string", - "description": "Password(Must contain 7-32 characters. Cannot contain any spaces.)" + "description": "Password (Must contain 7–32 characters. Cannot contain any spaces.)" }, "permission": { "type": "string", - "description": "[Permissions](apidog://link/pages/338144)(Only General、Spot、Futures、Margin、InnerTransfer(Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\")", + "description": "[Permissions](apidog://link/pages/338144)(Only General, Spot, Futures, Margin, InnerTransfer (Flex Transfer) permissions can be set, such as \"General, Trade\". The default is \"General\")", "examples": [ "General,Trade" ], @@ -3614,11 +3641,11 @@ }, "ipWhitelist": { "type": "string", - "description": "IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP)" + "description": "IP whitelist (You may add up to 20 IPs. Use a halfwidth comma to each IP)" }, "expire": { "type": "string", - "description": "API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360", + "description": "API expiration time: Never expire(default)-1, 30Day30, 90Day90, 180Day180, 360Day360", "default": "-1", "enum": [ "-1", @@ -3664,7 +3691,7 @@ }, "apiKey": { "type": "string", - "description": "API-Key(Sub-account APIKey)" + "description": "API-Key (Sub-account APIKey)" } }, "required": [ @@ -3677,16 +3704,17 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can be used to modify sub-account APIs.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"modifySubAccountApi\",\"sdk-method-description\":\"This endpoint can be used to modify sub-account APIs.\",\"api-rate-limit\":30}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"modifySubAccountApi\",\"sdk-method-description\":\"This endpoint can be used to modify sub-account APIs.\",\"api-rate-limit-weight\":30}" } }, { - "name": "Get SubAccount API List", + "name": "Get sub-account API List", "api": { "id": "3470136", "method": "get", "path": "/api/v1/sub/api-key", "parameters": { + "path": [], "query": [ { "id": "iIrspuNh6x", @@ -3697,8 +3725,7 @@ "type": "string", "schema": { "type": "string" - }, - "enable": true + } }, { "id": "ZHD0fezlqh", @@ -3706,11 +3733,9 @@ "required": true, "description": "Sub-account name.", "example": "testapi6", - "type": "string", - "enable": true + "type": "string" } ], - "path": [], "cookie": [], "header": [] }, @@ -3799,12 +3824,12 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint can be used to obtain a list of APIs pertaining to a sub-account.(Not contain ND Broker Sub Account)\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"getSubAccountApiList\",\"sdk-method-description\":\"This endpoint can be used to obtain a list of APIs pertaining to a sub-account.(Not contain ND Broker Sub Account)\",\"api-rate-limit\":20}" + "description": ":::info[Description]\nThis endpoint can be used to obtain a list of APIs pertaining to a sub-account (not including ND broker sub-accounts).\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"getSubAccountApiList\",\"sdk-method-description\":\"This endpoint can be used to obtain a list of APIs pertaining to a sub-account (not including ND broker sub-accounts).\",\"api-rate-limit-weight\":20}" } }, { - "name": "Delete SubAccount API", + "name": "Delete sub-account API", "api": { "id": "3470137", "method": "delete", @@ -3835,7 +3860,7 @@ "id": "BcPTs91zPK", "name": "passphrase", "required": true, - "description": "Password(Password of the API key)", + "description": "Password (password of the API key)", "example": "11223344", "type": "string" } @@ -3901,7 +3926,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can be used to delete sub-account APIs.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"deleteSubAccountApi\",\"sdk-method-description\":\"This endpoint can be used to delete sub-account APIs.\",\"api-rate-limit\":30}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"SubAccount\",\"sdk-method-name\":\"deleteSubAccountApi\",\"sdk-method-description\":\"This endpoint can be used to delete sub-account APIs.\",\"api-rate-limit-weight\":30}" } } ] @@ -3912,7 +3937,7 @@ "description": "", "items": [ { - "name": "Add Deposit Address(V3)", + "name": "Add Deposit Address (V3)", "api": { "id": "3470142", "method": "post", @@ -3944,7 +3969,7 @@ }, "memo": { "type": "string", - "description": "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious." + "description": "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available." }, "chainId": { "type": "string", @@ -3963,11 +3988,11 @@ }, "to": { "type": "string", - "description": "Deposit account type: main (funding account), trade (spot trading account)" + "description": "Deposit account type: MAIN (funding account), TRADE (spot trading account)" }, "expirationDate": { "type": "integer", - "description": "Expiration time, Lightning network expiration time, non-Lightning network this field is invalid" + "description": "Expiration time; Lightning network expiration time; this field is not applicable to non-Lightning networks" }, "currency": { "type": "string", @@ -4030,7 +4055,7 @@ }, "chain": { "type": "string", - "description": "The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency.", + "description": "The currency chainId, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. ", "default": "eth", "examples": [ "eth", @@ -4046,7 +4071,7 @@ }, "to": { "type": "string", - "description": "Deposit account type: main (funding account), trade (spot trading account), the default is main", + "description": "Deposit account type: MAIN (funding account), TRADE (spot trading account); the default is MAIN", "enum": [ "main", "trade" @@ -4055,13 +4080,13 @@ "x-api-enum": [ { "value": "main", - "name": "", - "description": "" + "name": "main", + "description": "Funding account" }, { "value": "trade", - "name": "", - "description": "" + "name": "trade", + "description": "Spot account" } ] }, @@ -4071,23 +4096,25 @@ } }, "required": [ - "currency" + "currency", + "chain" ] }, "example": "{\n \"currency\": \"TON\",\n \"chain\": \"ton\",\n \"to\": \"trade\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to create a deposit address for a currency you intend to deposit.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Deposit\",\"sdk-method-name\":\"addDepositAddressV3\",\"sdk-method-description\":\"Request via this endpoint to create a deposit address for a currency you intend to deposit.\",\"api-rate-limit\":20}" + "description": ":::info[Description]\nRequest via this endpoint the creation of a deposit address for a currency you intend to deposit.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Deposit\",\"sdk-method-name\":\"addDepositAddressV3\",\"sdk-method-description\":\"Request via this endpoint the creation of a deposit address for a currency you intend to deposit.\",\"api-rate-limit-weight\":20}" } }, { - "name": "Get Deposit Address(V3)", + "name": "Get Deposit Address (V3)", "api": { "id": "3470140", "method": "get", "path": "/api/v3/deposit-addresses", "parameters": { + "path": [], "query": [ { "id": "iIrspuNh6x", @@ -4103,16 +4130,14 @@ "ETH", "USDT" ] - }, - "enable": true + } }, { "id": "xpmD1ldX5o", "name": "amount", "required": false, "description": "Deposit amount. This parameter is only used when applying for invoices on the Lightning Network. This parameter is invalid if it is not passed through the Lightning Network.", - "type": "string", - "enable": true + "type": "string" }, { "id": "eO27DXUL3U", @@ -4120,10 +4145,22 @@ "required": false, "description": "The chain Id of currency.", "type": "string", - "enable": true + "schema": { + "type": "string", + "examples": [ + "eth", + "bech32", + "btc", + "kcc", + "trx", + "bsc", + "arbitrum", + "ton", + "optimism" + ] + } } ], - "path": [], "cookie": [], "header": [] }, @@ -4150,7 +4187,7 @@ }, "memo": { "type": "string", - "description": "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious." + "description": "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available." }, "chainId": { "type": "string", @@ -4169,11 +4206,27 @@ }, "to": { "type": "string", - "description": "Deposit account type: main (funding account), trade (spot trading account)" + "description": "Deposit account type: MAIN (funding account), TRADE (spot trading account)", + "enum": [ + "MAIN", + "TRADE" + ], + "x-api-enum": [ + { + "value": "MAIN", + "name": "MAIN", + "description": "Funding account" + }, + { + "value": "TRADE", + "name": "TRADE", + "description": "Spot account" + } + ] }, "expirationDate": { "type": "integer", - "description": "Expiration time, Lightning network expiration time, non-Lightning network this field is invalid" + "description": "Expiration time; Lightning network expiration time; this field is not applicable to non-Lightning networks" }, "currency": { "type": "string", @@ -4233,8 +4286,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nGet all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to Add Deposit Address first.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Deposit\",\"sdk-method-name\":\"getDepositAddressV3\",\"sdk-method-description\":\"Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to Add Deposit Address first.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nGet all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to add the deposit address first.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Deposit\",\"sdk-method-name\":\"getDepositAddressV3\",\"sdk-method-description\":\"Get all deposit addresses for the currency you intend to deposit. If the returned data is empty, you may need to add the deposit address first.\",\"api-rate-limit-weight\":5}" } }, { @@ -4244,6 +4297,7 @@ "method": "get", "path": "/api/v1/deposits", "parameters": { + "path": [], "query": [ { "id": "iIrspuNh6x", @@ -4259,8 +4313,7 @@ "ETH", "USDT" ] - }, - "enable": true + } }, { "id": "0cGmW3GSC0", @@ -4279,48 +4332,45 @@ "x-api-enum": [ { "value": "PROCESSING", - "name": "", - "description": "" + "name": "PROCESSING", + "description": "Deposit processing" }, { "value": "SUCCESS", - "name": "", - "description": "" + "name": "SUCCESS", + "description": "Deposit success" }, { "value": "FAILURE", - "name": "", - "description": "" + "name": "FAILURE", + "description": "Deposit fail" } ] - }, - "enable": true + } }, { "id": "5Lwpfvg7zz", "name": "startAt", "required": false, - "description": "Start time (milisecond)", + "description": "Start time (milliseconds)", "example": "1728663338000", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "WvwRPqp0J5", "name": "endAt", "required": false, - "description": "End time (milisecond)", + "description": "End time (milliseconds)", "example": "1728692138000", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "veUIPKz0h5", @@ -4331,8 +4381,7 @@ "type": "integer", "schema": { "type": "integer" - }, - "enable": true + } }, { "id": "ghmIBiuNgn", @@ -4346,11 +4395,9 @@ "minimum": 10, "maximum": 500, "default": 50 - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -4383,7 +4430,7 @@ }, "totalPage": { "type": "integer", - "description": "total page" + "description": "total pages" }, "items": { "type": "array", @@ -4461,7 +4508,7 @@ }, "createdAt": { "type": "integer", - "description": "Creation time of the database record", + "description": "Database record creation time", "format": "int64" }, "updatedAt": { @@ -4517,8 +4564,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to get deposit list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::\n\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Deposit\",\"sdk-method-name\":\"getDepositHistory\",\"sdk-method-description\":\"Request via this endpoint to get deposit list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nRequest a deposit list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::\n\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Deposit\",\"sdk-method-name\":\"getDepositHistory\",\"sdk-method-description\":\"Request a deposit list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\",\"api-rate-limit-weight\":5}" } } ] @@ -4557,7 +4604,7 @@ "id": "Dn0j2ITQMe", "name": "chain", "required": false, - "description": "The chainId of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20, default is ERC20. The available value for BTC are Native, Segwit, TRC20, the parameters are bech32, btc, trx, default is Native. This only apply for multi-chain currency, and there is no need for single chain currency.", + "description": "The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies.", "type": "string", "schema": { "type": "string", @@ -4605,15 +4652,15 @@ }, "quotaCurrency": { "type": "string", - "description": "withdrawal limit currency" + "description": "Withdrawal limit currency" }, "limitQuotaCurrencyAmount": { "type": "string", - "description": "The intraday available withdrawal amount(withdrawal limit currency)" + "description": "The intraday available withdrawal amount (withdrawal limit currency)" }, "usedQuotaCurrencyAmount": { "type": "string", - "description": "The intraday cumulative withdrawal amount(withdrawal limit currency)" + "description": "The intraday cumulative withdrawal amount (withdrawal limit currency)" }, "remainAmount": { "type": "string", @@ -4637,7 +4684,7 @@ }, "isWithdrawEnabled": { "type": "boolean", - "description": "Is the withdraw function enabled or not" + "description": "Is the withdraw function enabled?" }, "precision": { "type": "integer", @@ -4660,7 +4707,7 @@ }, "reason": { "type": "string", - "description": "Reasons for restriction, Usually empty" + "description": "Reasons for restriction. Usually empty." }, "lockedAmount": { "type": "string", @@ -4714,12 +4761,12 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis interface can obtain the withdrawal quotas information of this currency.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Withdrawal\",\"sdk-method-name\":\"getWithdrawalQuotas\",\"sdk-method-description\":\"This interface can obtain the withdrawal quotas information of this currency.\",\"api-rate-limit\":20}" + "description": ":::info[Description]\nThis interface can obtain the withdrawal quota information of this currency.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Withdrawal\",\"sdk-method-name\":\"getWithdrawalQuotas\",\"sdk-method-description\":\"This interface can obtain the withdrawal quota information of this currency.\",\"api-rate-limit-weight\":20}" } }, { - "name": "Withdraw(V3)", + "name": "Withdraw (V3)", "api": { "id": "3470146", "method": "post", @@ -4791,7 +4838,7 @@ }, "chain": { "type": "string", - "description": "The chainId of currency, For a currency with multiple chains, it is recommended to specify chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface.", + "description": "The chainId of currency, For a currency with multiple chains, it is recommended to specify the chain parameter instead of using the default chain; you can query the chainId through the response of the GET /api/v3/currencies/{currency} interface.", "default": "eth", "examples": [ "eth", @@ -4812,20 +4859,20 @@ }, "memo": { "type": "string", - "description": "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to the KuCoin, you need to fill in memo(tag). If you do not fill memo (tag), your deposit may not be available, please be cautious." + "description": "Address remark. If there’s no remark, it is empty. When you withdraw from other platforms to KuCoin, you need to fill in memo(tag). Be careful: If you do not fill in memo(tag), your deposit may not be available." }, "isInner": { "type": "boolean", - "description": "Internal withdrawal or not. Default : false", + "description": "Internal withdrawal or not. Default: False", "default": false }, "remark": { "type": "string", - "description": "remark" + "description": "Remark" }, "feeDeductType": { "type": "string", - "description": "Withdrawal fee deduction type: INTERNAL or EXTERNAL or not specified\n\n1. INTERNAL- deduct the transaction fees from your withdrawal amount\n2. EXTERNAL- deduct the transaction fees from your main account\n3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC." + "description": "Withdrawal fee deduction type: INTERNAL, EXTERNAL, or not specified\n\n1. INTERNAL: Deduct the transaction fees from your withdrawal amount\n2. EXTERNAL: Deduct the transaction fees from your main account\n3. If you don't specify the feeDeductType parameter, when the balance in your main account is sufficient to support the withdrawal, the system will initially deduct the transaction fees from your main account. But if the balance in your main account is not sufficient to support the withdrawal, the system will deduct the fees from your withdrawal amount. For example: Suppose you are going to withdraw 1 BTC from the KuCoin platform (transaction fee: 0.0001BTC), if the balance in your main account is insufficient, the system will deduct the transaction fees from your withdrawal amount. In this case, you will be receiving 0.9999BTC." }, "toAddress": { "type": "string", @@ -4839,7 +4886,7 @@ }, "withdrawType": { "type": "string", - "description": "Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will have rate limited: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time)", + "description": "Withdrawal type, ADDRESS (withdrawal address), UID, MAIL (email), PHONE (mobile phone number). Note: If you withdraw by uid/mail/phone, there will be rate limits: 3 times/10 seconds, 50 times/24 hours (calculated on a rolling basis based on the first request time)", "enum": [ "ADDRESS", "UID", @@ -4880,8 +4927,8 @@ "example": "{\n \"currency\": \"USDT\",\n \"toAddress\": \"TKFRQXSDcY****GmLrjJggwX8\",\n \"amount\": 3,\n \"withdrawType\": \"ADDRESS\",\n \"chain\": \"trx\",\n \"isInner\": true,\n \"remark\": \"this is Remark\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nUse this interface to withdraw the specified currency\n:::\n\n:::tip[Tips]\nOn the WEB end, you can open the switch of specified favorite addresses for withdrawal, and when it is turned on, it will verify whether your withdrawal address(including chain) is a favorite address(it is case sensitive); if it fails validation, it will respond with the error message {\"msg\":\"Already set withdraw whitelist, this address is not favorite address\",\"code\":\"260325\"}.\n:::\n\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Withdrawal\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Withdrawal\",\"sdk-method-name\":\"withdrawalV3\",\"sdk-method-description\":\"Use this interface to withdraw the specified currency\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nUse this interface to withdraw the specified currency.\n:::\n\n:::tip[Tips]\nOn the WEB end, you can open the switch of specified favorite addresses for withdrawal, and when it is turned on, it will verify whether your withdrawal address (including chain) is a favorite address (it is case sensitive); if it fails validation, it will respond with the error message {\"msg\":\"Already set withdraw whitelist, this address is not favorite address\",\"code\":\"260325\"}.\n:::\n\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Withdrawal\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Withdrawal\",\"sdk-method-name\":\"withdrawalV3\",\"sdk-method-description\":\"Use this interface to withdraw the specified currency.\",\"api-rate-limit-weight\":5}" } }, { @@ -4948,8 +4995,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis interface can cancel the withdrawal, Only withdrawals requests of PROCESSING status could be canceled.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Withdrawal\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Withdrawal\",\"sdk-method-name\":\"cancelWithdrawal\",\"sdk-method-description\":\"This interface can cancel the withdrawal, Only withdrawals requests of PROCESSING status could be canceled.\",\"api-rate-limit\":20}" + "description": ":::info[Description]\nThis interface can cancel the withdrawal. Only withdrawal requests with PROCESSING status can be canceled.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Withdrawal\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Withdrawal\",\"sdk-method-name\":\"cancelWithdrawal\",\"sdk-method-description\":\"This interface can cancel the withdrawal. Only withdrawal requests with PROCESSING status can be canceled.\",\"api-rate-limit-weight\":20}" } }, { @@ -4959,6 +5006,7 @@ "method": "get", "path": "/api/v1/withdrawals", "parameters": { + "path": [], "query": [ { "id": "iIrspuNh6x", @@ -4974,20 +5022,20 @@ "ETH", "USDT" ] - }, - "enable": true + } }, { "id": "0cGmW3GSC0", "name": "status", "required": false, - "description": "Status. Available value: PROCESSING, WALLET_PROCESSING, SUCCESS, and FAILURE", + "description": "Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE", "example": "SUCCESS", "type": "string", "schema": { "type": "string", "enum": [ "PROCESSING", + "REVIEW", "WALLET_PROCESSING", "SUCCESS", "FAILURE" @@ -4995,53 +5043,55 @@ "x-api-enum": [ { "value": "PROCESSING", - "name": "", + "name": "PROCESSING", + "description": "" + }, + { + "value": "REVIEW", + "name": "REVIEW", "description": "" }, { "value": "WALLET_PROCESSING", - "name": "", + "name": "WALLET_PROCESSING", "description": "" }, { "value": "SUCCESS", - "name": "", + "name": "SUCCESS", "description": "" }, { "value": "FAILURE", - "name": "", + "name": "FAILURE", "description": "" } ] - }, - "enable": true + } }, { "id": "5Lwpfvg7zz", "name": "startAt", "required": false, - "description": "Start time (milisecond)", + "description": "Start time (milliseconds)", "example": "1728663338000", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "WvwRPqp0J5", "name": "endAt", "required": false, - "description": "End time (milisecond)", + "description": "End time (milliseconds)", "example": "1728692138000", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "tYmztUdnR2", @@ -5053,8 +5103,7 @@ "schema": { "type": "integer", "default": 1 - }, - "enable": true + } }, { "id": "StNqU7nXlg", @@ -5068,11 +5117,9 @@ "minimum": 10, "maximum": 500, "default": 50 - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -5105,7 +5152,7 @@ }, "totalPage": { "type": "integer", - "description": "total page" + "description": "total pages" }, "items": { "type": "array", @@ -5114,7 +5161,7 @@ "properties": { "id": { "type": "string", - "description": "Unique id" + "description": "Unique ID" }, "currency": { "type": "string", @@ -5137,32 +5184,38 @@ }, "status": { "type": "string", - "description": "Status", "enum": [ + "REVIEW", "PROCESSING", "WALLET_PROCESSING", - "SUCCESS", - "FAILURE" + "FAILURE", + "SUCCESS" ], + "description": "Status. Available value: REVIEW, PROCESSING, WALLET_PROCESSING, SUCCESS and FAILURE", "x-api-enum": [ + { + "value": "REVIEW", + "name": "REVIEW", + "description": "" + }, { "value": "PROCESSING", - "name": "", + "name": "PROCESSING", "description": "" }, { "value": "WALLET_PROCESSING", - "name": "", + "name": "WALLET_PROCESSING", "description": "" }, { - "value": "SUCCESS", - "name": "", + "value": "FAILURE", + "name": "FAILURE", "description": "" }, { - "value": "FAILURE", - "name": "", + "value": "SUCCESS", + "name": "SUCCESS", "description": "" } ] @@ -5193,7 +5246,7 @@ }, "createdAt": { "type": "integer", - "description": "Creation time of the database record", + "description": "Database record creation time", "format": "int64" }, "updatedAt": { @@ -5203,7 +5256,7 @@ }, "remark": { "type": "string", - "description": "remark" + "description": "Remark" } } } @@ -5245,8 +5298,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to get withdrawal list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Withdrawal\",\"sdk-method-name\":\"getWithdrawalHistory\",\"sdk-method-description\":\"Request via this endpoint to get deposit list Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\",\"api-rate-limit\":20}" + "description": ":::info[Description]\nRequest a withdrawal list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Withdrawal\",\"sdk-method-name\":\"getWithdrawalHistory\",\"sdk-method-description\":\"Request a withdrawal list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\",\"api-rate-limit-weight\":20}" } } ] @@ -5263,6 +5316,7 @@ "method": "get", "path": "/api/v1/accounts/transferable", "parameters": { + "path": [], "query": [ { "id": "iIrspuNh6x", @@ -5278,14 +5332,14 @@ "ETH", "USDT" ] - }, - "enable": true + } }, { "id": "Dn0j2ITQMe", "name": "type", "required": true, - "description": "The account type:MAIN、TRADE、MARGIN、ISOLATED", + "description": "The account type:MAIN, TRADE, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2", + "example": "MAIN", "type": "string", "schema": { "type": "string", @@ -5294,7 +5348,9 @@ "TRADE", "MARGIN", "ISOLATED", - "OPTION" + "OPTION", + "MARGIN_V2", + "ISOLATED_V2" ], "x-api-enum": [ { @@ -5310,28 +5366,36 @@ { "value": "MARGIN", "name": "MARGIN", - "description": "Cross margin account" + "description": "Spot cross margin account" }, { "value": "ISOLATED", "name": "ISOLATED", - "description": "Isolated margin account" + "description": "Spot isolated margin account" }, { "value": "OPTION", "name": "OPTION", "description": "Option account" + }, + { + "value": "MARGIN_V2", + "name": "MARGIN_V2", + "description": "Spot cross margin HF account" + }, + { + "value": "ISOLATED_V2", + "name": "ISOLATED_V2", + "description": "Spot isolated margin HF account" } ] - }, - "enable": true, - "example": "MAIN" + } }, { "id": "pU2UVFoaY6", "name": "tag", "required": false, - "description": "Trading pair, required when the account type is ISOLATED; other types are not passed, e.g.: BTC-USDT", + "description": "Trading pair required when the account type is ISOLATED; other types do not pass, e.g.: BTC-USDT", "type": "string", "schema": { "type": "string", @@ -5340,11 +5404,9 @@ "ETH-USDT", "KCS-USDT" ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -5421,7 +5483,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint returns the transferable balance of a specified account.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Transfer\",\"sdk-method-name\":\"getTransferQuotas\",\"sdk-method-description\":\"This endpoint returns the transferable balance of a specified account.\",\"api-rate-limit\":20}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Transfer\",\"sdk-method-name\":\"getTransferQuotas\",\"sdk-method-description\":\"This endpoint returns the transferable balance of a specified account.\",\"api-rate-limit-weight\":20}" } }, { @@ -5488,7 +5550,7 @@ "properties": { "clientOid": { "type": "string", - "description": "Unique order id created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits" + "description": "Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits" }, "currency": { "type": "string", @@ -5496,15 +5558,15 @@ }, "amount": { "type": "string", - "description": "Transfer amount, the amount is a positive integer multiple of the currency precision." + "description": "Transfer amount: The amount is a positive integer multiple of the currency precision." }, "fromUserId": { "type": "string", - "description": "Transfer out UserId, This is required when transferring sub-account to master-account. It is optional for internal transfers." + "description": "Transfer out UserId: This is required when transferring from sub-account to master-account. It is optional for internal transfers." }, "fromAccountType": { "type": "string", - "description": "Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2", + "description": "Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2", "enum": [ "MAIN", "TRADE", @@ -5560,11 +5622,11 @@ }, "fromAccountTag": { "type": "string", - "description": "Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT" + "description": "Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT" }, "type": { "type": "string", - "description": "Transfer type:INTERNAL(Transfer within account)、PARENT_TO_SUB(Transfer from master-account to sub-account),SUB_TO_PARENT(Transfer from sub-account to master-account)", + "description": "Transfer type: INTERNAL (Transfer within account), PARENT_TO_SUB (Transfer from master-account to sub-account), SUB_TO_PARENT (Transfer from sub-account to master-account)", "enum": [ "INTERNAL", "PARENT_TO_SUB", @@ -5590,11 +5652,11 @@ }, "toUserId": { "type": "string", - "description": "Transfer in UserId, This is required when transferring master-account to sub-account. It is optional for internal transfers." + "description": "Transfer in UserId: This is required when transferring master-account to sub-account. It is optional for internal transfers." }, "toAccountType": { "type": "string", - "description": "Account type:MAIN、TRADE、CONTRACT、MARGIN、ISOLATED、MARGIN_V2、ISOLATED_V2", + "description": "Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2", "enum": [ "MAIN", "TRADE", @@ -5650,7 +5712,7 @@ }, "toAccountTag": { "type": "string", - "description": "Symbol, required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT" + "description": "Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT" } }, "required": [ @@ -5665,8 +5727,8 @@ "example": "//transfer from master-account to sub-account\n{\n \"clientOid\": \"64ccc0f164781800010d8c09\",\n \"type\": \"PARENT_TO_SUB\",\n \"currency\": \"USDT\",\n \"amount\": \"0.01\",\n \"fromAccountType\": \"TRADE\",\n \"toUserId\": \"63743f07e0c5230001761d08\",\n \"toAccountType\": \"TRADE\"\n}\n\n//transfer from sub-account to master-account\n// {\n// \"clientOid\": \"64ccc0f164781800010d8c09\",\n// \"type\": \"SUB_TO_PARENT\",\n// \"currency\": \"BTC\",\n// \"amount\": 1,\n// \"fromUserId\": \"62f5f5d4d72aaf000122707e\",\n// \"fromAccountType\": \"TRADE\",\n// \"toAccountType\": \"CONTRACT\"\n// }\n\n// internal transfer\n// {\n// \"clientOid\": \"53666633336123\",\n// \"type\": \"INTERNAL\",\n// \"currency\": \"BTC\",\n// \"amount\": 0.0003,\n// \"fromAccountType\": \"TRADE\",\n// \"toAccountType\": \"MAIN\"\n// }\n\n\n\n\n\n", "mediaType": "" }, - "description": ":::info[Description]\nThis interface can be used for transfers between master and sub accounts and inner transfers\n:::\n\n\n\nThe API Key needs to have universal transfer permission when calling.\n\nSupport internal transfer,do not support transfers between sub-accounts.\n\nSupport transfer between master and sub accounts (only applicable to master account APIKey).\n\nMARGIN_V2 only supports internal transfers between MARGIN and does not support transfers between master and sub accounts.\n\nISOLATED_V2 only supports internal transfers between ISOLATED and does not support transfers between master and sub accounts.", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"FlexTransfers\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Transfer\",\"sdk-method-name\":\"flexTransfer\",\"sdk-method-description\":\"This interface can be used for transfers between master and sub accounts and inner transfers\",\"api-rate-limit\":4}" + "description": ":::info[Description]\nThis interface can be used for transfers between master- and sub-accounts and transfers\n:::\n\nThe API Key needs universal transfer permission when calling.\n\nIt supports transfers between master account and sub-accounts, and also supports transfers between different types of accounts.\n\nIt supports transfer between master account and sub-accounts (only applicable to master account APIKey).\n\nMARGIN_V2 only supports internal transfers between MARGIN and does not support transfers between master- and sub-accounts.\n\nISOLATED_V2 only supports internal transfers between ISOLATED and does not support transfers between master- and sub-accounts.", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"FlexTransfers\",\"api-rate-limit-pool\":\"Management\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Transfer\",\"sdk-method-name\":\"flexTransfer\",\"sdk-method-description\":\"This interface can be used for transfers between master- and sub-accounts and transfers\",\"api-rate-limit-weight\":4}" } } ] @@ -5683,12 +5745,13 @@ "method": "get", "path": "/api/v1/base-fee", "parameters": { + "path": [], "query": [ { "id": "iIrspuNh6x", "name": "currencyType", "required": false, - "description": "Currency type: 0-crypto currency, 1-fiat currency. default is 0-crypto currency\n", + "description": "Currency type: 0-crypto currency, 1-fiat currency. Default is 0-crypto currency", "example": "", "type": "integer", "schema": { @@ -5705,7 +5768,7 @@ { "value": 0, "name": "", - "description": "crypto currency" + "description": "cryptocurrency" }, { "value": 1, @@ -5713,11 +5776,9 @@ "description": "fiat currency" } ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -5778,8 +5839,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis interface is for the spot/margin basic fee rate of users\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Fee\",\"sdk-method-name\":\"getBasicFee\",\"sdk-method-description\":\"This interface is for the spot/margin basic fee rate of users\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nThis interface is for the user’s spot/margin basic fee rate.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Fee\",\"sdk-method-name\":\"getBasicFee\",\"sdk-method-description\":\"This interface is for the user’s spot/margin basic fee rate.\",\"api-rate-limit-weight\":3}" } }, { @@ -5795,7 +5856,7 @@ "id": "iIrspuNh6x", "name": "symbols", "required": true, - "description": "Trading pair (optional, you can inquire fee rates of 10 trading pairs each time at most)", + "description": "Trading pair (optional; you can inquire fee rates of 10 trading pairs each time at most)", "example": "", "type": "string", "schema": { @@ -5829,7 +5890,7 @@ "properties": { "symbol": { "type": "string", - "description": "The unique identity of the trading pair and will not change even if the trading pair is renamed" + "description": "The unique identity of the trading pair; will not change even if the trading pair is renamed" }, "takerFeeRate": { "type": "string", @@ -5838,6 +5899,14 @@ "makerFeeRate": { "type": "string", "description": "Actual maker fee rate of the symbol" + }, + "sellTaxRate": { + "type": "string", + "description": "Buy tax rate; this field is visible to users in certain countries" + }, + "buyTaxRate": { + "type": "string", + "description": "Sell tax rate; this field is visible to users in certain countries" } }, "required": [ @@ -5875,8 +5944,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis interface is for the actual fee rate of the trading pair. You can inquire about fee rates of 10 trading pairs each time at most. The fee rate of your sub-account is the same as that of the master account.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Fee\",\"sdk-method-name\":\"getSpotActualFee\",\"sdk-method-description\":\"This interface is for the actual fee rate of the trading pair. You can inquire about fee rates of 10 trading pairs each time at most. The fee rate of your sub-account is the same as that of the master account.\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nThis interface is for the trading pair’s actual fee rate. You can inquire about fee rates of 10 trading pairs each time at most. The fee rate of your sub-account is the same as that of the master account.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Fee\",\"sdk-method-name\":\"getSpotActualFee\",\"sdk-method-description\":\"This interface is for the trading pair’s actual fee rate. You can inquire about fee rates of 10 trading pairs each time at most. The fee rate of your sub-account is the same as that of the master account.\",\"api-rate-limit-weight\":3}" } }, { @@ -5892,7 +5961,7 @@ "id": "iIrspuNh6x", "name": "symbol", "required": true, - "description": "Trading pair", + "description": "The unique identity of the trading pair; will not change even if the trading pair is renamed", "example": "", "type": "string", "schema": { @@ -5925,7 +5994,7 @@ "properties": { "symbol": { "type": "string", - "description": "The unique identity of the trading pair and will not change even if the trading pair is renamed" + "description": "The unique identity of the trading pair; will not change even if the trading pair is renamed" }, "takerFeeRate": { "type": "string", @@ -5970,8 +6039,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis interface is for the actual futures fee rate of the trading pair. The fee rate of your sub-account is the same as that of the master account.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Fee\",\"sdk-method-name\":\"getFuturesActualFee\",\"sdk-method-description\":\"This interface is for the actual futures fee rate of the trading pair. The fee rate of your sub-account is the same as that of the master account.\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nThis interface is for the trading pair’s actual futures fee rate. The fee rate of your sub-account is the same as that of the master account.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Account\",\"sdk-sub-service\":\"Fee\",\"sdk-method-name\":\"getFuturesActualFee\",\"sdk-method-description\":\"This interface is for the trading pair’s actual futures fee rate. The fee rate of your sub-account is the same as that of the master account.\",\"api-rate-limit-weight\":3}" } } ] @@ -6391,7 +6460,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis interface can obtain the latest news announcements, and the default page search is for announcements within a month.\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getAnnouncements\",\"sdk-method-description\":\"This interface can obtain the latest news announcements, and the default page search is for announcements within a month.\",\"api-rate-limit\":20}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getAnnouncements\",\"sdk-method-description\":\"This interface can obtain the latest news announcements, and the default page search is for announcements within a month.\",\"api-rate-limit-weight\":20}" } }, { @@ -6424,7 +6493,7 @@ "id": "nSUWM8eRPB", "name": "chain", "required": false, - "description": "Support for querying the chain of currency, e.g. The available value for USDT are OMNI, ERC20, TRC20. This only apply for multi-chain currency, and there is no need for single chain currency.", + "description": "Support for querying the chain of currency, e.g. the available values for USDT are OMNI, ERC20, TRC20. This only applies to multi-chain currencies; no need for single-chain currencies.", "example": "", "type": "string", "schema": { @@ -6467,11 +6536,11 @@ }, "name": { "type": "string", - "description": "Currency name, will change after renaming" + "description": "Currency name; will change after renaming" }, "fullName": { "type": "string", - "description": "Full name of a currency, will change after renaming" + "description": "Full currency name; will change after renaming" }, "precision": { "type": "integer", @@ -6487,11 +6556,11 @@ }, "isMarginEnabled": { "type": "boolean", - "description": "Support margin or not" + "description": "Margin support or not" }, "isDebitEnabled": { "type": "boolean", - "description": "Support debit or not" + "description": "Debit support or not" }, "chains": { "type": "array", @@ -6500,7 +6569,7 @@ "properties": { "chainName": { "type": "string", - "description": "chain name of currency" + "description": "Chain name of currency" }, "withdrawalMinSize": { "type": "string", @@ -6512,7 +6581,7 @@ }, "withdrawFeeRate": { "type": "string", - "description": "withdraw fee rate" + "description": "Withdraw fee rate" }, "withdrawalMinFee": { "type": "string", @@ -6520,11 +6589,11 @@ }, "isWithdrawEnabled": { "type": "boolean", - "description": "Support withdrawal or not" + "description": "Withdrawal support or not" }, "isDepositEnabled": { "type": "boolean", - "description": "Support deposit or not" + "description": "Deposit support or not" }, "confirms": { "type": "integer", @@ -6552,11 +6621,11 @@ }, "needTag": { "type": "boolean", - "description": "whether memo/tag is needed" + "description": "Need for memo/tag or not" }, "chainId": { "type": "string", - "description": "chain id of currency" + "description": "Chain id of currency" } }, "required": [ @@ -6577,7 +6646,7 @@ "chainId" ] }, - "description": "chain list" + "description": "Chain list" } }, "required": [ @@ -6620,8 +6689,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to get the currency details of a specified currency\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getCurrency\",\"sdk-method-description\":\"Request via this endpoint to get the currency details of a specified currency\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nRequest the currency details of a specified currency via this endpoint.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getCurrency\",\"sdk-method-description\":\"Request the currency details of a specified currency via this endpoint.\",\"api-rate-limit-weight\":3}" } }, { @@ -6631,8 +6700,8 @@ "method": "get", "path": "/api/v3/currencies", "parameters": { - "path": [], "query": [], + "path": [], "cookie": [], "header": [] }, @@ -6659,11 +6728,11 @@ }, "name": { "type": "string", - "description": "Currency name, will change after renaming" + "description": "Currency name; will change after renaming" }, "fullName": { "type": "string", - "description": "Full name of a currency, will change after renaming" + "description": "Full currency name; will change after renaming" }, "precision": { "type": "integer", @@ -6679,11 +6748,11 @@ }, "isMarginEnabled": { "type": "boolean", - "description": "Support margin or not" + "description": "Margin support or not" }, "isDebitEnabled": { "type": "boolean", - "description": "Support debit or not" + "description": "Debit support or not" }, "chains": { "type": "array", @@ -6692,7 +6761,7 @@ "properties": { "chainName": { "type": "string", - "description": "chain name of currency" + "description": "Chain name of currency" }, "withdrawalMinSize": { "type": "string", @@ -6704,7 +6773,7 @@ }, "withdrawFeeRate": { "type": "string", - "description": "withdraw fee rate" + "description": "Withdraw fee rate" }, "withdrawalMinFee": { "type": "string", @@ -6712,11 +6781,11 @@ }, "isWithdrawEnabled": { "type": "boolean", - "description": "Support withdrawal or not" + "description": "Withdrawal support or not" }, "isDepositEnabled": { "type": "boolean", - "description": "Support deposit or not" + "description": "Deposit support or not" }, "confirms": { "type": "integer", @@ -6744,19 +6813,19 @@ }, "needTag": { "type": "boolean", - "description": "whether memo/tag is needed" + "description": "Need for memo/tag or not" }, "chainId": { "type": "string", - "description": "chain id of currency" + "description": "Chain id of currency" }, "depositFeeRate": { "type": "string", - "description": "deposit fee rate (some currencies have this param, the default is empty)" + "description": "Deposit fee rate (some currencies have this param; the default is empty)" }, "withdrawMaxFee": { "type": "string", - "description": "withdraw max fee(some currencies have this param, the default is empty)" + "description": "Withdraw max. fee (some currencies have this param; the default is empty)" }, "depositTierFee": { "type": "string" @@ -6780,7 +6849,7 @@ "chainId" ] }, - "description": "chain list" + "description": "Chain list" } }, "required": [ @@ -6824,8 +6893,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to get the currency list. Not all currencies currently can be used for trading.\n:::\n\n:::tip[Tips]\n**CURRENCY CODES**\n\nCurrency codes will conform to the ISO 4217 standard where possible. Currencies which have or had no representation in ISO 4217 may use a custom code.\n\n\n| Code | Description |\n| --- | --- |\n| BTC | Bitcoin |\n| ETH | Ethereum |\n| KCS | Kucoin Shares |\n\nFor a coin, the \"**currency**\" is a fixed value and works as the only recognized identity of the coin. As the \"**name**\", \"**fullnane**\" and \"**precision**\" of a coin are modifiable values, when the \"name\" of a coin is changed, you should use \"**currency**\" to get the coin.\n\nFor example: The \"**currency**\" of XRB is \"XRB\", if the \"**name**\" of XRB is changed into \"**Nano**\", you should use \"XRB\" (the currency of XRB) to search the coin.\n:::\n\n\n\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getAllCurrencies\",\"sdk-method-description\":\"Request via this endpoint to get the currency list.Not all currencies currently can be used for trading.\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nRequest a currency list via this endpoint. Not all currencies currently can be used for trading.\n:::\n\n:::tip[Tips]\n**CURRENCY CODES**\n\nCurrency codes will conform to the ISO 4217 standard where possible. Currencies which have or had no representation in ISO 4217 may use a custom code.\n\n\n| Code | Description |\n| --- | --- |\n| BTC | Bitcoin |\n| ETH | Ethereum |\n| KCS | Kucoin Shares |\n\nFor a coin, the \"**currency**\" is a fixed value and works as the only recognized identity of the coin. As the \"**name**\", \"**fullnane**\" and \"**precision**\" of a coin are modifiable values, when the \"name\" of a coin is changed, you should use \"**currency**\" to get the coin.\n\nFor example: The \"**currency**\" of XRB is \"XRB\"; if the \"**name**\" of XRB is changed into \"**Nano**\", you should use \"XRB\" (the currency of XRB) to search the coin.\n:::\n\n\n\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getAllCurrencies\",\"sdk-method-description\":\"Request a currency list via this endpoint. Not all currencies can currently be used for trading.\",\"api-rate-limit-weight\":3}" } }, { @@ -6835,6 +6904,7 @@ "method": "get", "path": "/api/v2/symbols/{symbol}", "parameters": { + "query": [], "path": [ { "id": "symbol#0", @@ -6845,10 +6915,10 @@ "type": "string", "schema": { "type": "string" - } + }, + "enable": true } ], - "query": [], "cookie": [], "header": [] }, @@ -6938,7 +7008,7 @@ }, "minFunds": { "type": "string", - "description": "the minimum trading amounts" + "description": "The minimum trading amounts" }, "isMarginEnabled": { "type": "boolean", @@ -6983,7 +7053,58 @@ "description": "The taker fee coefficient. The actual fee needs to be multiplied by this coefficient to get the final fee. Most currencies have a coefficient of 1. If set to 0, it means no fee" }, "st": { - "type": "boolean" + "type": "boolean", + "description": "Whether it is a [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol" + }, + "callauctionIsEnabled": { + "type": "boolean", + "description": "The [call auction](https://www.kucoin.com/support/40999744334105) status returns true/false" + }, + "callauctionPriceFloor": { + "type": "string", + "description": "The lowest price declared in the call auction", + "examples": [ + "0.00001" + ] + }, + "callauctionPriceCeiling": { + "type": "string", + "description": "The highest bid price in the call auction\n", + "examples": [ + "0.6" + ] + }, + "callauctionFirstStageStartTime": { + "type": "integer", + "description": "The first phase of the call auction starts at (Allow add orders, allow cancel orders)", + "format": "int64", + "examples": [ + 1740470400000 + ] + }, + "callauctionSecondStageStartTime": { + "type": "integer", + "description": "The second phase of the call auction starts at (Allow add orders, don't allow cancel orders)", + "format": "int64", + "examples": [ + 1740473400000 + ] + }, + "callauctionThirdStageStartTime": { + "type": "integer", + "description": "The third phase of the call auction starts at (Don't allow add orders, don't allow cancel orders)", + "format": "int64", + "examples": [ + 1740473700000 + ] + }, + "tradingStartTime": { + "type": "integer", + "description": "Official opening time (end time of the third phase of call auction)", + "format": "int64", + "examples": [ + 1740474000000 + ] } }, "required": [ @@ -7007,7 +7128,14 @@ "feeCategory", "makerFeeCoefficient", "takerFeeCoefficient", - "st" + "st", + "callauctionIsEnabled", + "callauctionPriceFloor", + "callauctionPriceCeiling", + "callauctionFirstStageStartTime", + "callauctionSecondStageStartTime", + "callauctionThirdStageStartTime", + "tradingStartTime" ] } }, @@ -7024,7 +7152,7 @@ "responseExamples": [ { "name": "Success", - "data": "{\"code\":\"200000\",\"data\":{\"symbol\":\"BTC-USDT\",\"name\":\"BTC-USDT\",\"baseCurrency\":\"BTC\",\"quoteCurrency\":\"USDT\",\"feeCurrency\":\"USDT\",\"market\":\"USDS\",\"baseMinSize\":\"0.00001\",\"quoteMinSize\":\"0.1\",\"baseMaxSize\":\"10000000000\",\"quoteMaxSize\":\"99999999\",\"baseIncrement\":\"0.00000001\",\"quoteIncrement\":\"0.000001\",\"priceIncrement\":\"0.1\",\"priceLimitRate\":\"0.1\",\"minFunds\":\"0.1\",\"isMarginEnabled\":true,\"enableTrading\":true,\"feeCategory\":1,\"makerFeeCoefficient\":\"1.00\",\"takerFeeCoefficient\":\"1.00\",\"st\":false}}", + "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"BTC-USDT\",\n \"name\": \"BTC-USDT\",\n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USDT\",\n \"feeCurrency\": \"USDT\",\n \"market\": \"USDS\",\n \"baseMinSize\": \"0.00001\",\n \"quoteMinSize\": \"0.1\",\n \"baseMaxSize\": \"10000000000\",\n \"quoteMaxSize\": \"99999999\",\n \"baseIncrement\": \"0.00000001\",\n \"quoteIncrement\": \"0.000001\",\n \"priceIncrement\": \"0.1\",\n \"priceLimitRate\": \"0.1\",\n \"minFunds\": \"0.1\",\n \"isMarginEnabled\": true,\n \"enableTrading\": true,\n \"feeCategory\": 1,\n \"makerFeeCoefficient\": \"1.00\",\n \"takerFeeCoefficient\": \"1.00\",\n \"st\": false,\n \"callauctionIsEnabled\": false,\n \"callauctionPriceFloor\": null,\n \"callauctionPriceCeiling\": null,\n \"callauctionFirstStageStartTime\": null,\n \"callauctionSecondStageStartTime\": null,\n \"callauctionThirdStageStartTime\": null,\n \"tradingStartTime\": null\n }\n}", "responseId": 10323, "ordering": 1 } @@ -7039,7 +7167,7 @@ "mediaType": "" }, "description": ":::info[Description]\nRequest via this endpoint to get detail currency pairs for trading. If you want to get the market information of the trading symbol, please use Get All Tickers.\n:::\n\n\n- The baseMinSize and baseMaxSize fields define the min and max order size.\n- The priceIncrement field specifies the min order price as well as the price increment.This also applies to quote currency.\n\nThe order price must be a positive integer multiple of this priceIncrement (i.e. if the increment is 0.01, the 0.001 and 0.021 order prices would be rejected).\n\npriceIncrement and quoteIncrement may be adjusted in the future. We will notify you by email and site notifications before adjustment.\n\n| Order Type | Follow the rules of minFunds |\n| ------ | ---------- |\n| Limit Buy\t | [Order Amount * Order Price] >= minFunds |\n| Limit Sell | [Order Amount * Order Price] >= minFunds |\n| Market Buy | Order Value >= minFunds |\n| Market Sell | [Order Amount * Last Price of Base Currency] >= minFunds |\n\nNote:\n- API market buy orders (by amount) valued at (Order Amount * Last Price of Base Currency) < minFunds will be rejected.\n- API market sell orders (by value) valued at < minFunds will be rejected.\n- Take profit and stop loss orders at market or limit prices will be rejected when triggered.", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getSymbol\",\"sdk-method-description\":\"Request via this endpoint to get detail currency pairs for trading. If you want to get the market information of the trading symbol, please use Get All Tickers.\",\"api-rate-limit\":4}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getSymbol\",\"sdk-method-description\":\"Request via this endpoint to get detail currency pairs for trading. If you want to get the market information of the trading symbol, please use Get All Tickers.\",\"api-rate-limit-weight\":4}" } }, { @@ -7090,7 +7218,7 @@ "properties": { "symbol": { "type": "string", - "description": "unique code of a symbol, it would not change after renaming", + "description": "Unique code of a symbol; it will not change after renaming", "examples": [ "BTC-USDT", "BCHSV-USDT" @@ -7098,7 +7226,7 @@ }, "name": { "type": "string", - "description": "Name of trading pairs, it would change after renaming", + "description": "Name of trading pairs, it will change after renaming", "examples": [ "BTC-USDT", "BSV-USDT" @@ -7106,11 +7234,11 @@ }, "baseCurrency": { "type": "string", - "description": "Base currency,e.g. BTC." + "description": "Base currency, e.g. BTC." }, "quoteCurrency": { "type": "string", - "description": "Quote currency,e.g. USDT." + "description": "Quote currency, e.g. USDT." }, "feeCurrency": { "type": "string", @@ -7127,7 +7255,7 @@ }, "baseMinSize": { "type": "string", - "description": "The minimum order quantity requried to place an order." + "description": "The minimum order quantity required to place an order." }, "quoteMinSize": { "type": "string", @@ -7151,15 +7279,15 @@ }, "priceIncrement": { "type": "string", - "description": "Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001.\n\nspecifies the min order price as well as the price increment.This also applies to quote currency." + "description": "Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001.\n\nSpecifies the min. order price as well as the price increment.This also applies to quote currency." }, "priceLimitRate": { "type": "string", - "description": "Threshold for price portection" + "description": "Threshold for price protection" }, "minFunds": { "type": "string", - "description": "the minimum trading amounts" + "description": "The minimum trading amounts" }, "isMarginEnabled": { "type": "boolean", @@ -7205,7 +7333,57 @@ }, "st": { "type": "boolean", - "description": "Whether it is an [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol" + "description": "Whether it is a [Special Treatment](https://www.kucoin.com/legal/special-treatment) symbol" + }, + "callauctionIsEnabled": { + "type": "boolean", + "description": "The [call auction](https://www.kucoin.com/support/40999744334105) status returns true/false" + }, + "callauctionPriceFloor": { + "type": "string", + "description": "The lowest price declared in the call auction", + "examples": [ + "0.00001" + ] + }, + "callauctionPriceCeiling": { + "type": "string", + "description": "The highest bid price in the call auction\n", + "examples": [ + "0.6" + ] + }, + "callauctionFirstStageStartTime": { + "type": "integer", + "description": "The first phase of the call auction starts at (Allow add orders, allow cancel orders)", + "format": "int64", + "examples": [ + 1740470400000 + ] + }, + "callauctionSecondStageStartTime": { + "type": "integer", + "description": "The second phase of the call auction starts at (Allow add orders, don't allow cancel orders)", + "format": "int64", + "examples": [ + 1740473400000 + ] + }, + "callauctionThirdStageStartTime": { + "type": "integer", + "description": "The third phase of the call auction starts at (Don't allow add orders, don't allow cancel orders)", + "format": "int64", + "examples": [ + 1740473700000 + ] + }, + "tradingStartTime": { + "type": "integer", + "description": "Official opening time (end time of the third phase of call auction)", + "format": "int64", + "examples": [ + 1740474000000 + ] } }, "required": [ @@ -7229,7 +7407,14 @@ "feeCategory", "makerFeeCoefficient", "takerFeeCoefficient", - "st" + "st", + "callauctionIsEnabled", + "callauctionPriceFloor", + "callauctionPriceCeiling", + "callauctionFirstStageStartTime", + "callauctionSecondStageStartTime", + "callauctionThirdStageStartTime", + "tradingStartTime" ] } } @@ -7247,7 +7432,7 @@ "responseExamples": [ { "name": "Success", - "data": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"BTC-USDT\",\n \"name\": \"BTC-USDT\",\n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USDT\",\n \"feeCurrency\": \"USDT\",\n \"market\": \"USDS\",\n \"baseMinSize\": \"0.00001\",\n \"quoteMinSize\": \"0.1\",\n \"baseMaxSize\": \"10000000000\",\n \"quoteMaxSize\": \"99999999\",\n \"baseIncrement\": \"0.00000001\",\n \"quoteIncrement\": \"0.000001\",\n \"priceIncrement\": \"0.1\",\n \"priceLimitRate\": \"0.1\",\n \"minFunds\": \"0.1\",\n \"isMarginEnabled\": true,\n \"enableTrading\": true,\n \"feeCategory\": 1,\n \"makerFeeCoefficient\": \"1.00\",\n \"takerFeeCoefficient\": \"1.00\",\n \"st\": false\n }\n ]\n}", + "data": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"BTC-USDT\",\n \"name\": \"BTC-USDT\",\n \"baseCurrency\": \"BTC\",\n \"quoteCurrency\": \"USDT\",\n \"feeCurrency\": \"USDT\",\n \"market\": \"USDS\",\n \"baseMinSize\": \"0.00001\",\n \"quoteMinSize\": \"0.1\",\n \"baseMaxSize\": \"10000000000\",\n \"quoteMaxSize\": \"99999999\",\n \"baseIncrement\": \"0.00000001\",\n \"quoteIncrement\": \"0.000001\",\n \"priceIncrement\": \"0.1\",\n \"priceLimitRate\": \"0.1\",\n \"minFunds\": \"0.1\",\n \"isMarginEnabled\": true,\n \"enableTrading\": true,\n \"feeCategory\": 1,\n \"makerFeeCoefficient\": \"1.00\",\n \"takerFeeCoefficient\": \"1.00\",\n \"st\": false,\n \"callauctionIsEnabled\": false,\n \"callauctionPriceFloor\": null,\n \"callauctionPriceCeiling\": null,\n \"callauctionFirstStageStartTime\": null,\n \"callauctionSecondStageStartTime\": null,\n \"callauctionThirdStageStartTime\": null,\n \"tradingStartTime\": null\n }\n ]\n}", "responseId": 10318, "ordering": 1 } @@ -7261,8 +7446,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to get a list of available currency pairs for trading. If you want to get the market information of the trading symbol, please use Get All Tickers.\n:::\n\n\n:::tip[Tips]\npriceIncrement and quoteIncrement may be adjusted in the future. We will notify you by email and site notifications before adjustment.\n:::\n\n| Order Type | Follow the rules of minFunds |\n| --- | --- |\n| Limit Buy | [Order Amount * Order Price] >= minFunds |\n| Limit Sell | [Order Amount * Order Price] >= minFunds |\n| Market Buy | Order Value >= minFunds |\n| Market Sell | [Order Amount * Last Price of Base Currency] >= minFunds |\n\nNote:\n\n- API market buy orders (by amount) valued at [Order Amount * Last Price of Base Currency] < minFunds will be rejected.\n- API market sell orders (by value) valued at < minFunds will be rejected.\n- Take profit and stop loss orders at market or limit prices will be rejected when triggered.\n\n\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getAllSymbols\",\"sdk-method-description\":\"Request via this endpoint to get a list of available currency pairs for trading. If you want to get the market information of the trading symbol, please use Get All Tickers.\",\"api-rate-limit\":4}" + "description": ":::info[Description]\nRequest a list of available currency pairs for trading via this endpoint. If you want to get the market information of the trading symbol, please use Get All Tickers.\n:::\n\n\n:::tip[Tips]\npriceIncrement and quoteIncrement may be adjusted in the future. We will notify you by email and site notifications before adjustments.\n:::\n\n| Order Type | Follow the rules of minFunds |\n| --- | --- |\n| Limit Buy | [Order Amount * Order Price] >= minFunds |\n| Limit Sell | [Order Amount * Order Price] >= minFunds |\n| Market Buy | Order Value >= minFunds |\n| Market Sell | [Order Amount * Last Price of Base Currency] >= minFunds |\n\nNote:\n\n- API market buy orders (by amount) valued at [Order Amount * Last Price of Base Currency] < minFunds will be rejected.\n- API market sell orders (by value) valued at < minFunds will be rejected.\n- Take profit and stop loss orders at market or limit prices will be rejected when triggered.\n\n\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getAllSymbols\",\"sdk-method-description\":\"Request a list of available currency pairs for trading via this endpoint. If you want to get the market information of the trading symbol, please use Get All Tickers.\",\"api-rate-limit-weight\":4}" } }, { @@ -7375,7 +7560,7 @@ "mediaType": "" }, "description": ":::info[Description]\nRequest via this endpoint to get Level 1 Market Data. The returned value includes the best bid price and size, the best ask price and size as well as the last traded price and the last traded size.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getTicker\",\"sdk-method-description\":\"Request via this endpoint to get Level 1 Market Data. The returned value includes the best bid price and size, the best ask price and size as well as the last traded price and the last traded size.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getTicker\",\"sdk-method-description\":\"Request via this endpoint to get Level 1 Market Data. The returned value includes the best bid price and size, the best ask price and size as well as the last traded price and the last traded size.\",\"api-rate-limit-weight\":2}" } }, { @@ -7385,8 +7570,8 @@ "method": "get", "path": "/api/v1/market/allTickers", "parameters": { - "path": [], "query": [], + "path": [], "cookie": [], "header": [] }, @@ -7421,7 +7606,7 @@ }, "symbolName": { "type": "string", - "description": "Name of trading pairs, it would change after renaming" + "description": "Name of trading pairs, it will change after renaming" }, "buy": { "type": "string", @@ -7490,12 +7675,12 @@ { "value": "1", "name": "1", - "description": "the taker fee coefficient is 1" + "description": "The taker fee coefficient is 1" }, { "value": "0", - "name": "0", - "description": "no fee" + "name": "", + "description": "No fee" } ] }, @@ -7510,12 +7695,12 @@ { "value": "1", "name": "1", - "description": "the maker fee coefficient is 1" + "description": "The maker fee coefficient is 1" }, { "value": "0", - "name": "0", - "description": "no fee" + "name": "", + "description": "No fee" } ] } @@ -7576,8 +7761,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nRequest market tickers for all the trading pairs in the market (including 24h volume), takes a snapshot every 2 seconds.\n\nOn the rare occasion that we will change the currency name, if you still want the changed symbol name, you can use the symbolName field instead of the symbol field via “Get Symbols List” endpoint.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getAllTickers\",\"sdk-method-description\":\"Request market tickers for all the trading pairs in the market (including 24h volume), takes a snapshot every 2 seconds. On the rare occasion that we will change the currency name, if you still want the changed symbol name, you can use the symbolName field instead of the symbol field via “Get all tickers” endpoint.\",\"api-rate-limit\":15}" + "description": ":::info[Description]\nRequest market tickers for all the trading pairs in the market (including 24h volume); takes a snapshot every 2 seconds.\n\nOn the rare occasion that we change the currency name, if you still want the changed symbol name, you can use the symbolName field instead of the symbol field via “Get Symbols List” endpoint.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getAllTickers\",\"sdk-method-description\":\"Request market tickers for all the trading pairs in the market (including 24h volume); takes a snapshot every 2 seconds. On the rare occasion that we change the currency name, if you still want the changed symbol name, you can use the symbolName field instead of the symbol field via “Get all tickers” endpoint.\",\"api-rate-limit-weight\":15}" } }, { @@ -7695,7 +7880,7 @@ "mediaType": "" }, "description": ":::info[Description]\nRequest via this endpoint to get the trade history of the specified symbol, the returned quantity is the last 100 transaction records.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getTradeHistory\",\"sdk-method-description\":\"Request via this endpoint to get the trade history of the specified symbol, the returned quantity is the last 100 transaction records.\",\"api-rate-limit\":3}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getTradeHistory\",\"sdk-method-description\":\"Request via this endpoint to get the trade history of the specified symbol, the returned quantity is the last 100 transaction records.\",\"api-rate-limit-weight\":3}" } }, { @@ -7899,7 +8084,7 @@ "mediaType": "" }, "description": ":::info[Description]\nGet the Kline of the symbol. Data are returned in grouped buckets based on requested type.\nFor each query, the system would return at most 1500 pieces of data. To obtain more data, please page the data by time.\n:::\n\n:::tip[Tips]\nKlines data may be incomplete. No data is published for intervals where there are no ticks.\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getKlines\",\"sdk-method-description\":\"Get the Kline of the symbol. Data are returned in grouped buckets based on requested type. For each query, the system would return at most 1500 pieces of data. To obtain more data, please page the data by time.\",\"api-rate-limit\":3}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getKlines\",\"sdk-method-description\":\"Get the Kline of the symbol. Data are returned in grouped buckets based on requested type. For each query, the system would return at most 1500 pieces of data. To obtain more data, please page the data by time.\",\"api-rate-limit-weight\":3}" } }, { @@ -8037,7 +8222,7 @@ "mediaType": "" }, "description": ":::info[Description]\nQuery for part orderbook depth data. (aggregated by price)\n\nYou are recommended to request via this endpoint as the system reponse would be faster and cosume less traffic.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getPartOrderBook\",\"sdk-method-description\":\"Query for part orderbook depth data. (aggregated by price) You are recommended to request via this endpoint as the system reponse would be faster and cosume less traffic.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getPartOrderBook\",\"sdk-method-description\":\"Query for part orderbook depth data. (aggregated by price) You are recommended to request via this endpoint as the system reponse would be faster and cosume less traffic.\",\"api-rate-limit-weight\":2}" } }, { @@ -8145,7 +8330,261 @@ "mediaType": "" }, "description": ":::info[Description]\nQuery for Full orderbook depth data. (aggregated by price)\n\nIt is generally used by professional traders because it uses more server resources and traffic, and we have strict access rate limit control.\n\nTo maintain up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getFullOrderBook\",\"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 up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook.\",\"api-rate-limit\":3}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getFullOrderBook\",\"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 up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook.\",\"api-rate-limit-weight\":3}" + } + }, + { + "name": "Get Call Auction Part OrderBook", + "api": { + "id": "3471564", + "method": "get", + "path": "/api/v1/market/orderbook/callauction/level2_{size}", + "parameters": { + "query": [ + { + "id": "AwnkwQxRMq", + "name": "symbol", + "required": true, + "description": "symbol", + "example": "BTC-USDT", + "type": "string", + "enable": true + } + ], + "path": [ + { + "id": "size#0", + "name": "size", + "required": true, + "description": "Get the depth layer, optional value: 20, 100", + "example": "20", + "type": "integer", + "schema": { + "type": "integer", + "enum": [ + 20, + 100 + ], + "format": "int32", + "x-api-enum": [ + { + "value": 20, + "name": "size", + "description": "size" + }, + { + "value": 100, + "name": "size", + "description": "size" + } + ] + }, + "enable": true + } + ], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "11851", + "code": 200, + "name": "OK", + "headers": [], + "jsonSchema": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "time": { + "type": "integer", + "description": "Timestamp (milliseconds)", + "format": "int64" + }, + "sequence": { + "type": "string", + "description": "Sequence number" + }, + "bids": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "Price, Size" + } + }, + "description": "bids, from high to low" + }, + "asks": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "Price, Size" + } + }, + "description": "asks, from low to high" + } + }, + "required": [ + "sequence", + "bids", + "asks", + "time" + ] + } + }, + "required": [ + "code", + "data" + ] + }, + "description": "", + "contentType": "json", + "mediaType": "" + } + ], + "responseExamples": [ + { + "name": "Success", + "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"time\": 1729176273859,\n \"sequence\": \"14610502970\",\n \"bids\": [\n [\n \"66976.4\",\n \"0.69109872\"\n ],\n [\n \"66976.3\",\n \"0.14377\"\n ]\n ],\n \"asks\": [\n [\n \"66976.5\",\n \"0.05408199\"\n ],\n [\n \"66976.8\",\n \"0.0005\"\n ]\n ]\n }\n}", + "responseId": 11851, + "ordering": 1 + } + ], + "requestBody": { + "type": "none", + "parameters": [], + "jsonSchema": { + "type": "object", + "properties": {} + }, + "mediaType": "" + }, + "description": ":::info[Description]\nQuery for [call auction](https://www.kucoin.com/support/40999744334105) part orderbook depth data (aggregated by price).\n\nIt is recommended that you submit requests via this endpoint as the system response will be faster and consume less traffic.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getCallAuctionPartOrderBook\",\"sdk-method-description\":\"Query for call auction 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.\",\"api-rate-limit-weight\":2}" + } + }, + { + "name": "Get Call Auction Info", + "api": { + "id": "3471565", + "method": "get", + "path": "/api/v1/market/callauctionData", + "parameters": { + "path": [], + "query": [ + { + "id": "AwnkwQxRMq", + "name": "symbol", + "required": true, + "description": "symbol", + "example": "BTC-USDT", + "type": "string" + } + ], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "11901", + "code": 200, + "name": "OK", + "headers": [], + "jsonSchema": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "symbol": { + "type": "string", + "description": "Symbol", + "examples": [ + "BTC-USDT" + ] + }, + "estimatedPrice": { + "type": "string", + "description": "Estimated price" + }, + "estimatedSize": { + "type": "string", + "description": "Estimated size" + }, + "sellOrderRangeLowPrice": { + "type": "string", + "description": "Sell ​​order minimum price" + }, + "sellOrderRangeHighPrice": { + "type": "string", + "description": "Sell ​​order maximum price" + }, + "buyOrderRangeLowPrice": { + "type": "string", + "description": "Buy order minimum price" + }, + "buyOrderRangeHighPrice": { + "type": "string", + "description": "Buy ​​order maximum price" + }, + "time": { + "type": "integer", + "format": "int64", + "description": "Timestamp (ms)" + } + }, + "required": [ + "symbol", + "estimatedPrice", + "estimatedSize", + "sellOrderRangeLowPrice", + "sellOrderRangeHighPrice", + "buyOrderRangeLowPrice", + "buyOrderRangeHighPrice", + "time" + ] + } + }, + "required": [ + "code", + "data" + ] + }, + "description": "", + "contentType": "json", + "mediaType": "" + } + ], + "responseExamples": [ + { + "name": "Success", + "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"BTC-USDT\",\n \"estimatedPrice\": \"0.17\",\n \"estimatedSize\": \"0.03715004\",\n \"sellOrderRangeLowPrice\": \"1.788\",\n \"sellOrderRangeHighPrice\": \"2.788\",\n \"buyOrderRangeLowPrice\": \"1.788\",\n \"buyOrderRangeHighPrice\": \"2.788\",\n \"time\": 1550653727731\n }\n}", + "responseId": 11901, + "ordering": 1 + } + ], + "requestBody": { + "type": "none", + "parameters": [], + "jsonSchema": { + "type": "object", + "properties": {} + }, + "mediaType": "" + }, + "description": ":::info[Description]\nGet [call auction](https://www.kucoin.com/support/40999744334105) data, This endpoint will return the following information for the specified symbol during the call auction phase: estimated transaction price, estimated transaction quantity, bid price range, and ask price range.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getCallAuctionInfo\",\"sdk-method-description\":\"Get call auction data. This interface will return the following information for the specified symbol during the call auction phase: estimated transaction price, estimated transaction quantity, bid price range, and ask price range.\",\"api-rate-limit-weight\":2}" } }, { @@ -8161,7 +8600,7 @@ "id": "awyky894vh", "name": "base", "required": false, - "description": "Ticker symbol of a base currency,eg.USD,EUR. Default is USD", + "description": "Ticker symbol of a base currency, e.g. USD, EUR. Default is USD", "example": "", "type": "string", "schema": { @@ -11816,8 +12255,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to get the fiat price of the currencies for the available trading pairs.\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getFiatPrice\",\"sdk-method-description\":\"Request via this endpoint to get the fiat price of the currencies for the available trading pairs.\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nRequest the fiat price of the currencies for the available trading pairs via this endpoint.\n:::\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getFiatPrice\",\"sdk-method-description\":\"Request the fiat price of the currencies for the available trading pairs via this endpoint.\",\"api-rate-limit-weight\":3}" } }, { @@ -11970,7 +12409,7 @@ "mediaType": "" }, "description": ":::info[Description]\nRequest via this endpoint to get the statistics of the specified ticker in the last 24 hours.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"get24hrStats\",\"sdk-method-description\":\"Request via this endpoint to get the statistics of the specified ticker in the last 24 hours.\",\"api-rate-limit\":15}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"get24hrStats\",\"sdk-method-description\":\"Request via this endpoint to get the statistics of the specified ticker in the last 24 hours.\",\"api-rate-limit-weight\":15}" } }, { @@ -11980,8 +12419,8 @@ "method": "get", "path": "/api/v1/markets", "parameters": { - "path": [], "query": [], + "path": [], "cookie": [], "header": [] }, @@ -12031,8 +12470,67 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to get the transaction currency for the entire trading market.\n:::\n\n:::tip[Tips]\nSC has been changed to USDS, but you can still use SC as a query parameter\n\nThe three markets of ETH, NEO and TRX are merged into the ALTS market. You can query the trading pairs of the ETH, NEO and TRX markets through the ALTS trading area.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getMarketList\",\"sdk-method-description\":\"Request via this endpoint to get the transaction currency for the entire trading market.\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nRequest via this endpoint the transaction currency for the entire trading market.\n:::\n\n:::tip[Tips]\nSC has been changed to USDS, but you can still use SC as a query parameter\n\nThe three markets of ETH, NEO and TRX are merged into the ALTS market. You can query the trading pairs of the ETH, NEO and TRX markets through the ALTS trading area.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getMarketList\",\"sdk-method-description\":\"Request via this endpoint the transaction currency for the entire trading market.\",\"api-rate-limit-weight\":3}" + } + }, + { + "name": "Get Client IP Address", + "api": { + "id": "3471123", + "method": "get", + "path": "/api/v1/my-ip", + "parameters": { + "path": [], + "query": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "11751", + "code": 200, + "name": "OK", + "headers": [], + "jsonSchema": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "data": { + "type": "string" + } + }, + "required": [ + "code", + "data" + ] + }, + "description": "", + "contentType": "json", + "mediaType": "" + } + ], + "responseExamples": [ + { + "name": "Success", + "data": "{\"code\":\"200000\",\"data\":\"20.***.***.128\"}", + "responseId": 11751, + "ordering": 1 + } + ], + "requestBody": { + "type": "none", + "parameters": [], + "jsonSchema": { + "type": "object", + "properties": {} + }, + "mediaType": "" + }, + "description": ":::info[Description]\nGet the client side IP address.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getClientIPAddress\",\"sdk-method-description\":\"Get the server time.\",\"api-rate-limit-weight\":0}" } }, { @@ -12042,8 +12540,8 @@ "method": "get", "path": "/api/v1/timestamp", "parameters": { - "path": [], "query": [], + "path": [], "cookie": [], "header": [] }, @@ -12062,7 +12560,7 @@ "data": { "type": "integer", "format": "int64", - "description": "ServerTime(millisecond)" + "description": "ServerTime (milliseconds)" } }, "required": [ @@ -12093,7 +12591,7 @@ "mediaType": "" }, "description": ":::info[Description]\nGet the server time.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getServerTime\",\"sdk-method-description\":\"Get the server time.\",\"api-rate-limit\":3}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getServerTime\",\"sdk-method-description\":\"Get the server time.\",\"api-rate-limit-weight\":3}" } }, { @@ -12103,8 +12601,8 @@ "method": "get", "path": "/api/v1/status", "parameters": { - "path": [], "query": [], + "path": [], "cookie": [], "header": [] }, @@ -12125,7 +12623,7 @@ "properties": { "status": { "type": "string", - "description": "Status of service: open:normal transaction, close:Stop Trading/Maintenance, cancelonly:can only cancel the order but not place order", + "description": "Status of service: open: normal transaction; close: Stop Trading/Maintenance; cancelonly: can only cancel the order but not place order", "enum": [ "open", "close", @@ -12187,8 +12685,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nGet the service status\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getServiceStatus\",\"sdk-method-description\":\"Get the service status\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nGet the service status.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getServiceStatus\",\"sdk-method-description\":\"Get the service status.\",\"api-rate-limit-weight\":3}" } } ] @@ -12428,12 +12926,35 @@ }, "cancelAfter": { "type": "integer", + "description": "Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1\n", "format": "int64", - "description": "Cancel after n seconds,the order timing strategy is GTT" + "default": -1, + "minimum": 0, + "exclusiveMinimum": 0, + "maximum": 2592000, + "exclusiveMaximum": 2592000 }, "funds": { "type": "string", - "description": "When **type** is market, select one out of two: size or funds" + "description": "When **type** is market, select one out of two: size or funds\n\nWhen placing a market order, the funds field refers to the funds for the priced asset (the asset name written latter) of the trading pair. The funds must be based on the quoteIncrement of the trading pair. The quoteIncrement represents the precision of the trading pair. The funds value for an order must be a multiple of quoteIncrement and must be between quoteMinSize and quoteMaxSize." + }, + "allowMaxTimeWindow": { + "type": "integer", + "description": "Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail.", + "format": "int64", + "examples": [ + 10, + 20, + 30 + ] + }, + "clientTimestamp": { + "type": "integer", + "description": "Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified.", + "format": "int64", + "examples": [ + 1740711735178 + ] } }, "required": [ @@ -12446,7 +12967,7 @@ "mediaType": "" }, "description": ":::info[Description]\nPlace order to the Spot 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.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type `limit` and `market` |\n| side | String | Yes | `buy` or `sell` |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| tags | String | No | Order tag, length cannot exceed `20` characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed `20` characters (ASCII) |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOrder\",\"sdk-method-description\":\"Place order to the Spot 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.\",\"api-rate-limit\":1}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOrder\",\"sdk-method-description\":\"Place order to the Spot 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.\",\"api-rate-limit-weight\":1}" } }, { @@ -12456,8 +12977,8 @@ "method": "post", "path": "/api/v1/hf/orders/sync", "parameters": { - "query": [], "path": [], + "query": [], "cookie": [], "header": [] }, @@ -12478,11 +12999,11 @@ "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." + "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." + "description": "The user self-defined order ID." }, "orderTime": { "type": "integer", @@ -12490,15 +13011,15 @@ }, "originSize": { "type": "string", - "description": "original order size" + "description": "Original order size" }, "dealSize": { "type": "string", - "description": "deal size" + "description": "Deal size" }, "remainSize": { "type": "string", - "description": "remain size" + "description": "Remain size" }, "canceledSize": { "type": "string", @@ -12506,7 +13027,7 @@ }, "status": { "type": "string", - "description": "Order Status. open:order is active; done:order has been completed", + "description": "Order Status. open: order is active; done: order has been completed", "enum": [ "open", "done" @@ -12568,14 +13089,14 @@ "properties": { "clientOid": { "type": "string", - "description": "Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.\n\nPlease remember the orderId created by the service provider, it used to check for updates in order status.", + "description": "Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.\n\nPlease remember the orderId created by the service provider, it used to check for updates in order status.", "examples": [ "5c52e11203aa677f33e493fb" ] }, "side": { "type": "string", - "description": "specify if the order is to 'buy' or 'sell'", + "description": "Specify if the order is to 'buy' or 'sell'.", "enum": [ "buy", "sell" @@ -12607,7 +13128,7 @@ }, "type": { "type": "string", - "description": "specify if the order is an 'limit' order or 'market' order. \n\nThe type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.\n\nWhen placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.\n\nUnlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged.", + "description": "Specify if the order is a 'limit' order or 'market' order. \n\nThe type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.\n\nWhen placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.\n\nUnlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged.", "enum": [ "limit", "market" @@ -12670,7 +13191,7 @@ }, "size": { "type": "string", - "description": "Specify quantity for order\n\nWhen **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.\n\nWhen **type** is market, select one out of two: size or funds" + "description": "Specify quantity for order.\n\nWhen **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.\n\nWhen **type** is market, select one out of two: size or funds" }, "timeInForce": { "type": "string", @@ -12730,12 +13251,35 @@ }, "cancelAfter": { "type": "integer", + "description": "Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1\n", "format": "int64", - "description": "Cancel after n seconds,the order timing strategy is GTT" + "default": -1, + "minimum": 0, + "exclusiveMinimum": 0, + "maximum": 2592000, + "exclusiveMaximum": 2592000 }, "funds": { "type": "string", "description": "When **type** is market, select one out of two: size or funds" + }, + "allowMaxTimeWindow": { + "type": "integer", + "description": "The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail.", + "format": "int64", + "examples": [ + 10, + 20, + 30 + ] + }, + "clientTimestamp": { + "type": "integer", + "description": "Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified.", + "format": "int64", + "examples": [ + 1740711735178 + ] } }, "required": [ @@ -12747,8 +13291,8 @@ "example": "//limit order\n{\n \"type\": \"limit\",\n \"symbol\": \"BTC-USDT\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"clientOid\": \"5c52e11203aa677f33e493f\",\n \"remark\": \"order remarks\"\n}\n\n//market order 1\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"size\": \"0.00001\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\",\n// }\n\n//market order 2\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"funds\": \"1\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\",\n// }\n", "mediaType": "" }, - "description": ":::info[Description]\nPlace order to the spot trading system\n\nThe difference between this interface and \"Add order\" is that this interface will synchronously return the order information after the order matching is completed.\n\nFor higher latency requirements, please select the \"Add order\" interface. If there is a requirement for returning data integrity, please select this interface\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type `limit` and `market` |\n| side | String | Yes | `buy` or `sell` |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| tags | String | No | Order tag, length cannot exceed `20` characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed `20` characters (ASCII) |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOrderSync\",\"sdk-method-description\":\"Place order to the spot trading system The difference between this interface and \\\"Add order\\\" is that this interface will synchronously return the order information after the order matching is completed. For higher latency requirements, please select the \\\"Add order\\\" interface. If there is a requirement for returning data integrity, please select this interface\",\"api-rate-limit\":1}" + "description": ":::info[Description]\nPlace order in the spot trading system\n\nThe difference between this interface and \"Add order\" is that this interface will synchronously return the order information after the order matching is completed.\n\nFor higher latency requirements, please select the \"Add order\" interface. If there is a requirement for returning data integrity, please select this interface.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order ID, unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type ‘limit’ and ‘market’ |\n| side | String | Yes | ‘buy’ or ‘sell’ |\n| stp | String | No | self trade prevention is divided into four strategies: ‘CN’, ‘CO’, ‘CB’, and ‘DC’ |\n| tags | String | No | Order tag, length cannot exceed ‘20’ characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed ‘20’ characters (ASCII) |\n\n**Additional Request Parameters Required by ‘limit’ Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy ‘GTC’, ‘GTT’, ‘IOC’, ‘FOK’ (the default is ‘GTC’) |\n| cancelAfter | long | No | Cancel after ‘n’ seconds, the order timing strategy is ‘GTT’ |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is ‘IOC’ or ‘FOK’ |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by ‘market’ orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n| funds | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or canceled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled (already canceled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly canceled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: If the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: This feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOrderSync\",\"sdk-method-description\":\"Place order in the spot trading system. The difference between this interface and \\\"Add order\\\" is that this interface will synchronously return the order information after the order matching is completed. For higher latency requirements, please select the \\\"Add order\\\" interface. If there is a requirement for returning data integrity, please select this interface.\",\"api-rate-limit-weight\":1}" } }, { @@ -12981,12 +13525,35 @@ }, "cancelAfter": { "type": "integer", + "description": "Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1\n", "format": "int64", - "description": "Cancel after n seconds,the order timing strategy is GTT" + "default": -1, + "minimum": 0, + "exclusiveMinimum": 0, + "maximum": 2592000, + "exclusiveMaximum": 2592000 }, "funds": { "type": "string", "description": "When **type** is market, select one out of two: size or funds" + }, + "allowMaxTimeWindow": { + "type": "integer", + "description": "Order failed after timeout of specified milliseconds, If clientTimestamp + allowMaxTimeWindow < the server reaches time, this order will fail.", + "format": "int64", + "examples": [ + 10, + 20, + 30 + ] + }, + "clientTimestamp": { + "type": "integer", + "description": "Equal to KC-API-TIMESTAMP, Need to be defined if iceberg is specified.", + "format": "int64", + "examples": [ + 1740711735178 + ] } }, "required": [ @@ -12999,7 +13566,7 @@ "mediaType": "" }, "description": ":::info[Description]\nOrder test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type `limit` and `market` |\n| side | String | Yes | `buy` or `sell` |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| tags | String | No | Order tag, length cannot exceed `20` characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed `20` characters (ASCII) |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOrderTest\",\"sdk-method-description\":\"Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\",\"api-rate-limit\":1}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOrderTest\",\"sdk-method-description\":\"Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\",\"api-rate-limit-weight\":1}" } }, { @@ -13009,8 +13576,8 @@ "method": "post", "path": "/api/v1/hf/orders/multi", "parameters": { - "query": [], "path": [], + "query": [], "cookie": [], "header": [] }, @@ -13033,11 +13600,11 @@ "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." + "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." + "description": "The user self-defined order ID." }, "success": { "type": "boolean", @@ -13045,7 +13612,7 @@ }, "failMsg": { "type": "string", - "description": "error message" + "description": "Error message" } }, "required": [ @@ -13085,7 +13652,7 @@ "properties": { "clientOid": { "type": "string", - "description": "Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.\n" + "description": "Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.\n" }, "symbol": { "type": "string", @@ -13098,7 +13665,7 @@ }, "type": { "type": "string", - "description": "Specify if the order is an 'limit' order or 'market' order. ", + "description": "Specify if the order is a 'limit' order or 'market' order. ", "enum": [ "limit" ], @@ -13145,7 +13712,7 @@ }, "side": { "type": "string", - "description": "Specify if the order is to 'buy' or 'sell'", + "description": "Specify if the order is to 'buy' or 'sell'.", "enum": [ "buy", "sell" @@ -13169,7 +13736,7 @@ }, "size": { "type": "string", - "description": "Specify quantity for order\n\nWhen **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.\n\nWhen **type** is market, select one out of two: size or funds" + "description": "Specify quantity for order.\n\nWhen **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.\n\nWhen **type** is market, select one out of two: size or funds" }, "stp": { "type": "string", @@ -13205,8 +13772,13 @@ }, "cancelAfter": { "type": "integer", - "description": "Cancel after n seconds,the order timing strategy is GTT", - "format": "int64" + "description": "Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1\n", + "format": "int64", + "default": -1, + "minimum": 0, + "exclusiveMinimum": 0, + "maximum": 2592000, + "exclusiveMaximum": 2592000 }, "postOnly": { "type": "boolean", @@ -13238,6 +13810,24 @@ "funds": { "type": "string", "description": "When **type** is market, select one out of two: size or funds" + }, + "clientTimestamp": { + "type": "integer", + "description": "Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified.", + "format": "int64", + "examples": [ + 1740711735178 + ] + }, + "allowMaxTimeWindow": { + "type": "integer", + "description": "The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail.", + "format": "int64", + "examples": [ + 10, + 20, + 30 + ] } }, "required": [ @@ -13257,8 +13847,8 @@ "example": "{\n \"orderList\": [\n {\n \"clientOid\": \"client order id 12\",\n \"symbol\": \"BTC-USDT\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"30000\",\n \"size\": \"0.00001\"\n },\n {\n \"clientOid\": \"client order id 13\",\n \"symbol\": \"ETH-USDT\",\n \"type\": \"limit\",\n \"side\": \"sell\",\n \"price\": \"2000\",\n \"size\": \"0.00001\"\n }\n ]\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint supports sequential batch order placement from a single endpoint. A maximum of 20 orders can be placed simultaneously.\n:::\n\n\n\n:::tip[Tips]\nThis endpoint only supports order placement requests. To obtain the results of the order placement, you will need to check the order status or subscribe to websocket to obtain information about he order.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type `limit` and `market` |\n| side | String | Yes | `buy` or `sell` |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| tags | String | No | Order tag, length cannot exceed `20` characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed `20` characters (ASCII) |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"batchAddOrders\",\"sdk-method-description\":\"This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5orders can be placed simultaneously. The order types must be limit orders of the same trading pair\",\"api-rate-limit\":1}" + "description": ":::info[Description]\nThis endpoint supports sequential batch order placement from a single endpoint. A maximum of 20 orders can be placed simultaneously.\n:::\n\n\n\n:::tip[Tips]\nThis endpoint only supports order placement requests. To obtain the results of the order placement, you will need to check the order status or subscribe to Websocket to obtain information about the order.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order ID, unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type ‘limit’ and ‘market’ |\n| side | String | Yes | ‘buy’ or ‘sell’ |\n| stp | String | No | self trade prevention is divided into four strategies: ‘CN’, ‘CO’, ‘CB’, and ‘DC’ |\n| tags | String | No | Order tag, length cannot exceed ‘20’ characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed ‘20’ characters (ASCII) |\n\n**Additional Request Parameters Required by ‘limit’ Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy ‘GTC’, ‘GTT’, ‘IOC’, ‘FOK’ (the default is ‘GTC’) |\n| cancelAfter | long | No | Cancel after ‘n’ seconds, the order timing strategy is ‘GTT’ |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is ‘IOC’ or ‘FOK’ |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by ‘market’ orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n| funds | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or canceled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled (already canceled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly canceled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: If the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: This feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"batchAddOrders\",\"sdk-method-description\":\"This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5 orders can be placed simultaneously. The order types must be limit orders of the same trading pair\",\"api-rate-limit-weight\":1}" } }, { @@ -13268,8 +13858,8 @@ "method": "post", "path": "/api/v1/hf/orders/multi/sync", "parameters": { - "query": [], "path": [], + "query": [], "cookie": [], "header": [] }, @@ -13292,11 +13882,11 @@ "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." + "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." + "description": "The user self-defined order ID." }, "orderTime": { "type": "integer", @@ -13304,15 +13894,15 @@ }, "originSize": { "type": "string", - "description": "original order size" + "description": "Original order size" }, "dealSize": { "type": "string", - "description": "deal size" + "description": "Deal size" }, "remainSize": { "type": "string", - "description": "remain size" + "description": "Remain size" }, "canceledSize": { "type": "string", @@ -13320,7 +13910,7 @@ }, "status": { "type": "string", - "description": "Order Status. open:order is active; done:order has been completed", + "description": "Order Status. open: order is active; done: order has been completed", "enum": [ "open", "done" @@ -13348,7 +13938,7 @@ }, "failMsg": { "type": "string", - "description": "error message" + "description": "Error message" } }, "required": [ @@ -13388,7 +13978,7 @@ "properties": { "clientOid": { "type": "string", - "description": "Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.\n" + "description": "Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.\n" }, "symbol": { "type": "string", @@ -13401,7 +13991,7 @@ }, "type": { "type": "string", - "description": "Specify if the order is an 'limit' order or 'market' order. ", + "description": "Specify if the order is a 'limit' order or 'market' order. ", "enum": [ "limit" ], @@ -13448,7 +14038,7 @@ }, "side": { "type": "string", - "description": "Specify if the order is to 'buy' or 'sell'", + "description": "Specify if the order is to 'buy' or 'sell'.", "enum": [ "buy", "sell" @@ -13472,7 +14062,7 @@ }, "size": { "type": "string", - "description": "Specify quantity for order\n\nWhen **type** is limit, select one out of two: size or funds, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.\n\nWhen **type** is market, select one out of two: size or funds" + "description": "Specify quantity for order.\n\nWhen **type** is limited, select one out of two: size or funds. Size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.\n\nWhen **type** is market, select one out of two: size or funds" }, "stp": { "type": "string", @@ -13508,8 +14098,13 @@ }, "cancelAfter": { "type": "integer", - "description": "Cancel after n seconds,the order timing strategy is GTT", - "format": "int64" + "description": "Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1\n", + "format": "int64", + "default": -1, + "minimum": 0, + "exclusiveMinimum": 0, + "maximum": 2592000, + "exclusiveMaximum": 2592000 }, "postOnly": { "type": "boolean", @@ -13541,6 +14136,24 @@ "funds": { "type": "string", "description": "When **type** is market, select one out of two: size or funds" + }, + "allowMaxTimeWindow": { + "type": "integer", + "description": "The order will fail if it times out after the specified duration in milliseconds. Specifically, if clientTimestamp + allowMaxTimeWindow (in milliseconds) is less than the time the server receives the message, the order will fail.", + "format": "int64", + "examples": [ + 10, + 20, + 30 + ] + }, + "clientTimestamp": { + "type": "integer", + "description": "Equal to KC-API-TIMESTAMP. Needs to be defined if iceberg is specified.", + "format": "int64", + "examples": [ + 1740711735178 + ] } }, "required": [ @@ -13560,8 +14173,8 @@ "example": "{\n \"orderList\": [\n {\n \"clientOid\": \"client order id 13\",\n \"symbol\": \"BTC-USDT\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"30000\",\n \"size\": \"0.00001\"\n },\n {\n \"clientOid\": \"client order id 14\",\n \"symbol\": \"ETH-USDT\",\n \"type\": \"limit\",\n \"side\": \"sell\",\n \"price\": \"2000\",\n \"size\": \"0.00001\"\n }\n ]\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint supports sequential batch order placement from a single endpoint. A maximum of 20 orders can be placed simultaneously.\n\nThe difference between this interface and \"Batch Add Orders\" is that this interface will synchronously return the order information after the order matching is completed.\n\nFor higher latency requirements, please select the \"Batch Add Orders\" interface. If there is a requirement for returning data integrity, please select this interface\n:::\n\n\n\n:::tip[Tips]\nThis endpoint only supports order placement requests. To obtain the results of the order placement, you will need to check the order status or subscribe to websocket to obtain information about he order.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type `limit` and `market` |\n| side | String | Yes | `buy` or `sell` |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| tags | String | No | Order tag, length cannot exceed `20` characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed `20` characters (ASCII) |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"batchAddOrdersSync\",\"sdk-method-description\":\"This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5orders can be placed simultaneously. The order types must be limit orders of the same trading pair\",\"api-rate-limit\":1}" + "description": ":::info[Description]\nThis endpoint supports sequential batch order placement from a single endpoint. A maximum of 20 orders can be placed simultaneously.\n\nThe difference between this interface and \"Batch Add Orders\" is that this interface will synchronously return the order information after the order matching is completed.\n\nFor higher latency requirements, please select the \"Batch Add Orders\" interface. If there is a requirement for returning data integrity, please select this interface.\n:::\n\n\n\n:::tip[Tips]\nThis endpoint only supports order placement requests. To obtain the results of the order placement, you will need to check the order status or subscribe to Websocket to obtain information about the order.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | No | Client Order ID, unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| type | String | Yes | Order type ‘limit’ and ‘market’ |\n| side | String | Yes | ‘buy’ or ‘sell’ |\n| stp | String | No | self trade prevention is divided into four strategies: ‘CN’, ‘CO’, ‘CB’, and ‘DC’ |\n| tags | String | No | Order tag, length cannot exceed ‘20’ characters (ASCII) |\n| remark | String | No | Order placement remarks, length cannot exceed ‘20’ characters (ASCII) |\n\n**Additional Request Parameters Required by ‘limit’ Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy ‘GTC’, ‘GTT’, ‘IOC’, ‘FOK’ (the default is ‘GTC’) |\n| cancelAfter | long | No | Cancel after ‘n’ seconds, the order timing strategy is ‘GTT’ |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is ‘IOC’ or ‘FOK’ |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by ‘market’ orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n| funds | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or canceled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled (already canceled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly canceled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: If the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: This feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"batchAddOrdersSync\",\"sdk-method-description\":\"This endpoint supports sequential batch order placement from a single endpoint. A maximum of 5 orders can be placed simultaneously. The order types must be limit orders of the same trading pair\",\"api-rate-limit-weight\":1}" } }, { @@ -13619,7 +14232,7 @@ "properties": { "orderId": { "type": "string", - "description": "order id" + "description": "Order id" } }, "required": [ @@ -13655,8 +14268,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint can be used to cancel a spot order by orderId.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderByOrderId\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\",\"api-rate-limit\":1}" + "description": ":::info[Description]\nThis endpoint can be used to cancel a spot order by orderId.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderByOrderId\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket.\",\"api-rate-limit-weight\":1}" } }, { @@ -13666,6 +14279,25 @@ "method": "delete", "path": "/api/v1/hf/orders/sync/{orderId}", "parameters": { + "query": [ + { + "id": "KXIxHhD4qw", + "name": "symbol", + "required": true, + "description": "symbol", + "example": "BTC-USDT", + "type": "string", + "schema": { + "type": "string", + "examples": [ + "BTC-USDT", + "ETH-USDT", + "KCS-USDT" + ] + }, + "enable": true + } + ], "path": [ { "id": "orderId#0", @@ -13673,142 +14305,125 @@ "required": true, "description": "The unique order id generated by the trading system", "example": "671128ee365ccb0007534d45", - "type": "string" - } - ], - "query": [ - { - "id": "KXIxHhD4qw", - "name": "symbol", - "required": true, - "description": "symbol", - "example": "BTC-USDT", - "type": "string", - "schema": { - "type": "string", - "examples": [ - "BTC-USDT", - "ETH-USDT", - "KCS-USDT" - ] - } - } - ], - "cookie": [], - "header": [] - }, - "responses": [ - { - "id": "10349", - "code": 200, - "name": "OK", - "headers": [], - "jsonSchema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "data": { - "type": "object", - "properties": { - "orderId": { - "type": "string", - "description": "order id" - }, - "originSize": { - "type": "string", - "description": "original order size" - }, - "dealSize": { - "type": "string", - "description": "deal size" - }, - "remainSize": { - "type": "string", - "description": "remain size" - }, - "canceledSize": { - "type": "string", - "description": "Cumulative canceled size" - }, - "status": { - "type": "string", - "description": "Order Status. open:order is active; done:order has been completed", - "enum": [ - "open", - "done" - ], - "x-api-enum": [ - { - "value": "open", - "name": "", - "description": "" - }, - { - "value": "done", - "name": "", - "description": "" - } - ] - } - }, - "required": [ - "orderId", - "dealSize", - "remainSize", - "canceledSize", - "status", - "originSize" - ] - } - }, - "required": [ - "code", - "data" - ] - }, - "description": "", - "contentType": "json", - "mediaType": "" - } - ], - "responseExamples": [ - { - "name": "Success", - "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"orderId\": \"671128ee365ccb0007534d45\",\n \"originSize\": \"0.00001\",\n \"dealSize\": \"0\",\n \"remainSize\": \"0\",\n \"canceledSize\": \"0.00001\",\n \"status\": \"done\"\n }\n}", - "responseId": 10349, - "ordering": 1 - } - ], - "requestBody": { - "type": "none", - "parameters": [], - "jsonSchema": { - "type": "object", - "properties": {} - }, - "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", - "mediaType": "" - }, - "description": ":::info[Description]\nThis endpoint can be used to cancel a spot order by orderId.\n\nThe difference between this interface and \"Cancel Order By OrderId\" is that this interface will synchronously return the order information after the order canceling is completed.\n\nFor higher latency requirements, please select the \"Cancel Order By OrderId\" interface. If there is a requirement for returning data integrity, please select this interface\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderByOrderIdSync\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot order by orderId.\",\"api-rate-limit\":1}" - } - }, - { - "name": "Cancel Order By ClientOid", - "api": { - "id": "3470184", - "method": "delete", - "path": "/api/v1/hf/orders/client-order/{clientOid}", - "parameters": { - "path": [ - { - "id": "clientOid#0", - "name": "clientOid", - "required": true, - "description": "Client Order Id,unique identifier created by the user", - "example": "5c52e11203aa677f33e493fb", + "type": "string", + "enable": true + } + ], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "10349", + "code": 200, + "name": "OK", + "headers": [], + "jsonSchema": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "orderId": { + "type": "string", + "description": "order id" + }, + "originSize": { + "type": "string", + "description": "original order size" + }, + "dealSize": { + "type": "string", + "description": "deal size" + }, + "remainSize": { + "type": "string", + "description": "remain size" + }, + "canceledSize": { + "type": "string", + "description": "Cumulative canceled size" + }, + "status": { + "type": "string", + "description": "Order Status. open:order is active; done:order has been completed", + "enum": [ + "open", + "done" + ], + "x-api-enum": [ + { + "value": "open", + "name": "open", + "description": "order is active" + }, + { + "value": "done", + "name": "done", + "description": "order has been completed" + } + ] + } + }, + "required": [ + "orderId", + "dealSize", + "remainSize", + "canceledSize", + "status", + "originSize" + ] + } + }, + "required": [ + "code", + "data" + ] + }, + "description": "", + "contentType": "json", + "mediaType": "" + } + ], + "responseExamples": [ + { + "name": "Success", + "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"orderId\": \"671128ee365ccb0007534d45\",\n \"originSize\": \"0.00001\",\n \"dealSize\": \"0\",\n \"remainSize\": \"0\",\n \"canceledSize\": \"0.00001\",\n \"status\": \"done\"\n }\n}", + "responseId": 10349, + "ordering": 1 + } + ], + "requestBody": { + "type": "none", + "parameters": [], + "jsonSchema": { + "type": "object", + "properties": {} + }, + "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", + "mediaType": "" + }, + "description": ":::info[Description]\nThis endpoint can be used to cancel a spot order by orderId.\n\nThe difference between this interface and \"Cancel Order By OrderId\" is that this interface will synchronously return the order information after the order canceling is completed.\n\nFor higher latency requirements, please select the \"Cancel Order By OrderId\" interface. If there is a requirement for returning data integrity, please select this interface\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderByOrderIdSync\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot order by orderId.\",\"api-rate-limit-weight\":1}" + } + }, + { + "name": "Cancel Order By ClientOid", + "api": { + "id": "3470184", + "method": "delete", + "path": "/api/v1/hf/orders/client-order/{clientOid}", + "parameters": { + "path": [ + { + "id": "clientOid#0", + "name": "clientOid", + "required": true, + "description": "Client Order Id,unique identifier created by the user", + "example": "5c52e11203aa677f33e493fb", "type": "string" } ], @@ -13887,7 +14502,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can be used to cancel a spot order by clientOid.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderByClientOid\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\",\"api-rate-limit\":1}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderByClientOid\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\",\"api-rate-limit-weight\":1}" } }, { @@ -13897,16 +14512,6 @@ "method": "delete", "path": "/api/v1/hf/orders/sync/client-order/{clientOid}", "parameters": { - "path": [ - { - "id": "clientOid#0", - "name": "clientOid", - "required": true, - "description": "Client Order Id,unique identifier created by the user", - "example": "5c52e11203aa677f33e493fb", - "type": "string" - } - ], "query": [ { "id": "KXIxHhD4qw", @@ -13922,7 +14527,19 @@ "ETH-USDT", "KCS-USDT" ] - } + }, + "enable": true + } + ], + "path": [ + { + "id": "clientOid#0", + "name": "clientOid", + "required": true, + "description": "Client Order Id,unique identifier created by the user", + "example": "5c52e11203aa677f33e493fb", + "type": "string", + "enable": true } ], "cookie": [], @@ -13973,13 +14590,13 @@ "x-api-enum": [ { "value": "open", - "name": "", - "description": "" + "name": "open", + "description": "order is active" }, { "value": "done", - "name": "", - "description": "" + "name": "done", + "description": "order has been completed" } ] } @@ -14023,7 +14640,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can be used to cancel a spot order by clientOid.\n\nThe difference between this interface and \"Cancel Order By ClientOid\" is that this interface will synchronously return the order information after the order canceling is completed.\n\nFor higher latency requirements, please select the \"Cancel Order By ClientOid\" interface. If there is a requirement for returning data integrity, please select this interface\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderByClientOidSync\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot order by orderId.\",\"api-rate-limit\":1}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderByClientOidSync\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot order by orderId.\",\"api-rate-limit-weight\":1}" } }, { @@ -14131,7 +14748,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis interface can cancel the specified quantity of the order according to the orderId.\nThe order execution order is: price first, time first, this interface will not change the queue order\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelPartialOrder\",\"sdk-method-description\":\"This interface can cancel the specified quantity of the order according to the orderId. The order execution order is: price first, time first, this interface will not change the queue order\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelPartialOrder\",\"sdk-method-description\":\"This interface can cancel the specified quantity of the order according to the orderId. The order execution order is: price first, time first, this interface will not change the queue order\",\"api-rate-limit-weight\":2}" } }, { @@ -14208,7 +14825,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can cancel all spot orders for specific symbol.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelAllOrdersBySymbol\",\"sdk-method-description\":\"This endpoint can cancel all spot orders for specific symbol. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelAllOrdersBySymbol\",\"sdk-method-description\":\"This endpoint can cancel all spot orders for specific symbol. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\",\"api-rate-limit-weight\":2}" } }, { @@ -14303,7 +14920,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can cancel all spot orders for all symbol.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelAllOrders\",\"sdk-method-description\":\"This endpoint can cancel all spot orders for all symbol. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\",\"api-rate-limit\":30}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelAllOrders\",\"sdk-method-description\":\"This endpoint can cancel all spot orders for all symbol. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\",\"api-rate-limit-weight\":30}" } }, { @@ -14335,11 +14952,11 @@ "properties": { "newOrderId": { "type": "string", - "description": "The new order id" + "description": "The new order ID" }, "clientOid": { "type": "string", - "description": "The original client order id" + "description": "The original client order ID" } }, "required": [ @@ -14374,7 +14991,7 @@ "properties": { "clientOid": { "type": "string", - "description": "The old client order id,orderId and clientOid must choose one", + "description": "One must be chose out of the old client order ID, orderId and clientOid", "examples": [ "5c52e11203aa677f33e493fb" ] @@ -14390,15 +15007,15 @@ }, "orderId": { "type": "string", - "description": "The old order id, orderId and clientOid must choose one" + "description": "One must be chosen out of the old order id, orderId and clientOid" }, "newPrice": { "type": "string", - "description": "The modified price of the new order, newPrice and newSize must choose one" + "description": "One must be chosen out of the modified price of the new order, newPrice and newSize" }, "newSize": { "type": "string", - "description": "The modified size of the new order, newPrice and newSize must choose one" + "description": "One must be chosen out of the modified size of the new order, newPrice and newSize" } }, "required": [ @@ -14408,8 +15025,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis interface can modify the price and quantity of the order according to orderId or clientOid.\n\nThe implementation of this interface is: cancel the order and place a new order on the same trading pair, and return the modification result to the client synchronously\n\nWhen the quantity of the new order updated by the user is less than the filled quantity of this order, the order will be considered as completed, and the order will be cancelled, and no new order will be placed\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"modifyOrder\",\"sdk-method-description\":\"This interface can modify the price and quantity of the order according to orderId or clientOid. The implementation of this interface is: cancel the order and place a new order on the same trading pair, and return the modification result to the client synchronously When the quantity of the new order updated by the user is less than the filled quantity of this order, the order will be considered as completed, and the order will be cancelled, and no new order will be placed\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nThis interface can modify the price and quantity of the order according to orderId or clientOid.\n\nThe implementation of this interface is: Cancel the order and place a new order on the same trading pair, and return the modification result to the client synchronously.\n\nWhen the quantity of the new order updated by the user is less than the filled quantity of this order, the order will be considered as completed, and the order will be canceled, and no new order will be placed.\n:::\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"modifyOrder\",\"sdk-method-description\":\"This interface can modify the price and quantity of the order according to orderId or clientOid. The implementation of this interface is: Cancel the order and place a new order on the same trading pair, and return the modification result to the client synchronously. When the quantity of the new order updated by the user is less than the filled quantity of this order, the order will be considered as completed, and the order will be canceled, and no new order will be placed.\",\"api-rate-limit-weight\":3}" } }, { @@ -14633,7 +15250,8 @@ }, "cancelAfter": { "type": "integer", - "description": "A GTT timeInForce that expires in n seconds" + "description": "A GTT timeInForce that expires in n seconds", + "format": "int64" }, "channel": { "type": "string" @@ -14759,7 +15377,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can be used to obtain information for a single Spot order using the order id.\n\nAfter the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 _ 24 hours (ie: from the current time to 3 _ 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOrderByOrderId\",\"sdk-method-description\":\"This endpoint can be used to obtain information for a single Spot order using the order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOrderByOrderId\",\"sdk-method-description\":\"This endpoint can be used to obtain information for a single Spot order using the order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit-weight\":2}" } }, { @@ -14983,7 +15601,8 @@ }, "cancelAfter": { "type": "integer", - "description": "A GTT timeInForce that expires in n seconds" + "description": "A GTT timeInForce that expires in n seconds", + "format": "int64" }, "channel": { "type": "string" @@ -15109,7 +15728,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can be used to obtain information for a single Spot order using the client order id.\n\nAfter the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 _ 24 hours (ie: from the current time to 3 _ 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOrderByClientOid\",\"sdk-method-description\":\"This endpoint can be used to obtain information for a single Spot order using the client order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOrderByClientOid\",\"sdk-method-description\":\"This endpoint can be used to obtain information for a single Spot order using the client order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit-weight\":2}" } }, { @@ -15181,7 +15800,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis interface can query all spot symbol that has active orders\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getSymbolsWithOpenOrder\",\"sdk-method-description\":\"This interface can query all spot symbol that has active orders\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getSymbolsWithOpenOrder\",\"sdk-method-description\":\"This interface can query all spot symbol that has active orders\",\"api-rate-limit-weight\":2}" } }, { @@ -15397,7 +16016,8 @@ }, "cancelAfter": { "type": "integer", - "description": "A GTT timeInForce that expires in n seconds" + "description": "A GTT timeInForce that expires in n seconds", + "format": "int64" }, "channel": { "type": "string" @@ -15524,22 +16144,22 @@ "mediaType": "" }, "description": ":::info[Description]\nThis interface is to obtain all Spot active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order.\n\nAfter the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nFor high-frequency trading users, we recommend locally caching, maintaining your own order records, and using market data streams to update your order information in real time.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOpenOrders\",\"sdk-method-description\":\"This interface is to obtain all Spot active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOpenOrders\",\"sdk-method-description\":\"This interface is to obtain all Spot active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit-weight\":2}" } }, { - "name": "Get Closed Orders", + "name": "Get Open Orders By Page", "api": { - "id": "3470179", + "id": "3471591", "method": "get", - "path": "/api/v1/hf/orders/done", + "path": "/api/v1/hf/orders/active/page", "parameters": { "query": [ { "id": "M9bgPS6vOj", "name": "symbol", "required": true, - "description": "symbol", + "description": "Symbol", "example": "BTC-USDT", "type": "string", "schema": { @@ -15553,112 +16173,31 @@ "enable": true }, { - "id": "sTtMCE9Jhf", - "name": "side", - "required": false, - "description": "specify if the order is to 'buy' or 'sell'", - "type": "string", - "schema": { - "type": "string", - "enum": [ - "buy", - "sell" - ], - "x-api-enum": [ - { - "value": "buy", - "name": "", - "description": "" - }, - { - "value": "sell", - "name": "", - "description": "" - } - ] - }, - "enable": true - }, - { - "id": "QaBSxyasEm", - "name": "type", - "required": false, - "description": "specify if the order is an 'limit' order or 'market' order. ", - "type": "string", - "schema": { - "type": "string", - "enum": [ - "limit", - "market" - ], - "x-api-enum": [ - { - "value": "limit", - "name": "", - "description": "" - }, - { - "value": "market", - "name": "", - "description": "" - } - ] - }, - "enable": true - }, - { - "id": "kkvuIGVxs6", - "name": "lastId", "required": false, - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page.", - "example": "254062248624417", + "description": "Current page", "type": "integer", + "id": "ZXaWGmMvCm", + "enable": true, + "name": "pageNum", "schema": { "type": "integer", - "format": "int64" - }, - "enable": true + "minimum": 1, + "default": 1 + } }, { - "id": "heQ8W6yKwm", - "name": "limit", "required": false, - "description": "Default20,Max100", - "example": "20", + "description": "Size per page", "type": "integer", + "id": "zIuzBpYWfr", + "enable": true, + "name": "pageSize", "schema": { "type": "integer", "default": 20, "minimum": 1, - "maximum": 100 - }, - "enable": true - }, - { - "id": "Djtx6oC9gm", - "name": "startAt", - "required": false, - "description": "Start time (milisecond)", - "example": "1728663338000", - "type": "integer", - "schema": { - "type": "integer", - "format": "int64" - }, - "enable": true - }, - { - "id": "K9IMpKw8u2", - "name": "endAt", - "required": false, - "description": "End time (milisecond)", - "example": "1728692138000", - "type": "integer", - "schema": { - "type": "integer", - "format": "int64" - }, - "enable": true + "maximum": 50 + } } ], "path": [], @@ -15667,7 +16206,7 @@ }, "responses": [ { - "id": "10343", + "id": "11902", "code": 200, "name": "OK", "headers": [], @@ -15680,10 +16219,494 @@ "data": { "type": "object", "properties": { - "lastId": { - "type": "integer", - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page.", - "format": "int64" + "currentPage": { + "type": "integer" + }, + "pageSize": { + "type": "integer" + }, + "totalNum": { + "type": "integer" + }, + "totalPage": { + "type": "integer" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique order id generated by the trading system" + }, + "symbol": { + "type": "string", + "description": "symbol", + "examples": [ + "BTC-USDT", + "ETH-USDT", + "KCS-USDT" + ] + }, + "opType": { + "type": "string" + }, + "type": { + "type": "string", + "description": "Specify if the order is an 'limit' order or 'market' order. ", + "enum": [ + "limit", + "market" + ], + "x-api-enum": [ + { + "value": "limit", + "name": "", + "description": "" + }, + { + "value": "market", + "name": "", + "description": "" + } + ] + }, + "side": { + "type": "string", + "description": "Buy or sell", + "enum": [ + "buy", + "sell" + ], + "x-api-enum": [ + { + "value": "buy", + "name": "", + "description": "" + }, + { + "value": "sell", + "name": "", + "description": "" + } + ] + }, + "price": { + "type": "string", + "description": "Order price" + }, + "size": { + "type": "string", + "description": "Order size" + }, + "funds": { + "type": "string", + "description": "Order Funds" + }, + "dealSize": { + "type": "string", + "description": "Number of filled transactions" + }, + "dealFunds": { + "type": "string", + "description": "Funds of filled transactions" + }, + "fee": { + "type": "string", + "description": "[Handling fees](apidog://link/pages/5327739)" + }, + "feeCurrency": { + "type": "string", + "description": "currency used to calculate trading fee" + }, + "stp": { + "type": "string", + "description": "[Self Trade Prevention](apidog://link/pages/5176570)", + "enum": [ + "DC", + "CO", + "CN", + "CB" + ], + "x-api-enum": [ + { + "value": "DC", + "name": "", + "description": "" + }, + { + "value": "CO", + "name": "", + "description": "" + }, + { + "value": "CN", + "name": "", + "description": "" + }, + { + "value": "CB", + "name": "", + "description": "" + } + ] + }, + "timeInForce": { + "type": "string", + "description": "Time in force", + "enum": [ + "GTC", + "GTT", + "IOC", + "FOK" + ], + "x-api-enum": [ + { + "value": "GTC", + "name": "", + "description": "" + }, + { + "value": "GTT", + "name": "", + "description": "" + }, + { + "value": "IOC", + "name": "", + "description": "" + }, + { + "value": "FOK", + "name": "", + "description": "" + } + ] + }, + "postOnly": { + "type": "boolean", + "description": "Whether its a postOnly order." + }, + "hidden": { + "type": "boolean", + "description": "Whether its a hidden order." + }, + "iceberg": { + "type": "boolean", + "description": "Whether its a iceberg order." + }, + "visibleSize": { + "type": "string", + "description": "Visible size of iceberg order in order book." + }, + "cancelAfter": { + "type": "integer", + "description": "A GTT timeInForce that expires in n seconds", + "format": "int64" + }, + "channel": { + "type": "string" + }, + "clientOid": { + "type": "string", + "description": "Client Order Id,unique identifier created by the user" + }, + "remark": { + "type": "string", + "description": "Order placement remarks" + }, + "tags": { + "type": "string", + "description": "Order tag" + }, + "cancelExist": { + "type": "boolean", + "description": "Whether there is a cancellation record for the order." + }, + "createdAt": { + "type": "integer", + "format": "int64" + }, + "lastUpdatedAt": { + "type": "integer", + "format": "int64" + }, + "tradeType": { + "type": "string", + "description": "Trade type, redundancy param" + }, + "inOrderBook": { + "type": "boolean", + "description": "Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook" + }, + "cancelledSize": { + "type": "string", + "description": "Number of canceled transactions" + }, + "cancelledFunds": { + "type": "string", + "description": "Funds of canceled transactions" + }, + "remainSize": { + "type": "string", + "description": "Number of remain transactions" + }, + "remainFunds": { + "type": "string", + "description": "Funds of remain transactions" + }, + "tax": { + "type": "string", + "description": "Users in some regions need query this field" + }, + "active": { + "type": "boolean", + "description": "Order status: true-The status of the order isactive; false-The status of the order is done" + } + }, + "required": [ + "id", + "symbol", + "opType", + "type", + "side", + "price", + "size", + "funds", + "dealSize", + "dealFunds", + "fee", + "feeCurrency", + "timeInForce", + "postOnly", + "hidden", + "iceberg", + "visibleSize", + "cancelAfter", + "channel", + "clientOid", + "cancelExist", + "tradeType", + "inOrderBook", + "cancelledSize", + "cancelledFunds", + "remainSize", + "remainFunds", + "active", + "createdAt", + "lastUpdatedAt", + "tax" + ] + } + } + }, + "required": [ + "currentPage", + "pageSize", + "totalNum", + "totalPage", + "items" + ] + } + }, + "required": [ + "code", + "data" + ] + }, + "description": "", + "contentType": "json", + "mediaType": "" + } + ], + "responseExamples": [ + { + "name": "Success", + "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 20,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"id\": \"67c1437ea5226600071cc080\",\n \"symbol\": \"BTC-USDT\",\n \"opType\": \"DEAL\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"funds\": \"0.5\",\n \"dealSize\": \"0\",\n \"dealFunds\": \"0\",\n \"fee\": \"0\",\n \"feeCurrency\": \"USDT\",\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": \"0\",\n \"cancelAfter\": 0,\n \"channel\": \"API\",\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"remark\": \"order remarks\",\n \"tags\": null,\n \"cancelExist\": false,\n \"createdAt\": 1740718974367,\n \"lastUpdatedAt\": 1741867658590,\n \"tradeType\": \"TRADE\",\n \"inOrderBook\": true,\n \"cancelledSize\": \"0\",\n \"cancelledFunds\": \"0\",\n \"remainSize\": \"0.00001\",\n \"remainFunds\": \"0.5\",\n \"tax\": \"0\",\n \"active\": true\n }\n ]\n }\n}", + "responseId": 11902, + "ordering": 1 + } + ], + "requestBody": { + "type": "none", + "parameters": [], + "jsonSchema": { + "type": "object", + "properties": {} + }, + "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", + "mediaType": "" + }, + "description": ":::info[Description]\nThis interface is to obtain Spot active order (uncompleted order) lists by page. The returned data is sorted in descending order according to the create time of the order.\n\nAfter the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nFor high-frequency trading users, we recommend locally caching, maintaining your own order records, and using market data streams to update your order information in real time.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOpenOrdersByPage\",\"sdk-method-description\":\"This interface is to obtain Spot active order (uncompleted order) lists by page. The returned data is sorted in descending order according to the create time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit-weight\":2}" + } + }, + { + "name": "Get Closed Orders", + "api": { + "id": "3470179", + "method": "get", + "path": "/api/v1/hf/orders/done", + "parameters": { + "query": [ + { + "id": "M9bgPS6vOj", + "name": "symbol", + "required": true, + "description": "symbol", + "example": "BTC-USDT", + "type": "string", + "schema": { + "type": "string", + "examples": [ + "BTC-USDT", + "ETH-USDT", + "KCS-USDT" + ] + }, + "enable": true + }, + { + "id": "sTtMCE9Jhf", + "name": "side", + "required": false, + "description": "specify if the order is to 'buy' or 'sell'", + "type": "string", + "schema": { + "type": "string", + "enum": [ + "buy", + "sell" + ], + "x-api-enum": [ + { + "value": "buy", + "name": "", + "description": "" + }, + { + "value": "sell", + "name": "", + "description": "" + } + ] + }, + "enable": true + }, + { + "id": "QaBSxyasEm", + "name": "type", + "required": false, + "description": "specify if the order is an 'limit' order or 'market' order. ", + "type": "string", + "schema": { + "type": "string", + "enum": [ + "limit", + "market" + ], + "x-api-enum": [ + { + "value": "limit", + "name": "", + "description": "" + }, + { + "value": "market", + "name": "", + "description": "" + } + ] + }, + "enable": true + }, + { + "id": "kkvuIGVxs6", + "name": "lastId", + "required": false, + "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page.", + "example": "254062248624417", + "type": "integer", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0, + "exclusiveMinimum": 0 + }, + "enable": true + }, + { + "id": "heQ8W6yKwm", + "name": "limit", + "required": false, + "description": "Default20,Max100", + "example": "20", + "type": "integer", + "schema": { + "type": "integer", + "default": 20, + "minimum": 1, + "maximum": 100 + }, + "enable": true + }, + { + "id": "Djtx6oC9gm", + "name": "startAt", + "required": false, + "description": "Start time (milisecond)", + "example": "1728663338000", + "type": "integer", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1000000000000, + "maximum": 9999999999999, + "exclusiveMinimum": 1000000000000, + "exclusiveMaximum": 9999999999999 + }, + "enable": true + }, + { + "id": "K9IMpKw8u2", + "name": "endAt", + "required": false, + "description": "End time (milisecond)", + "example": "1728692138000", + "type": "integer", + "schema": { + "type": "integer", + "format": "int64" + }, + "enable": true + } + ], + "path": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "10343", + "code": 200, + "name": "OK", + "headers": [], + "jsonSchema": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "lastId": { + "type": "integer", + "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page.", + "format": "int64", + "minimum": 0, + "exclusiveMinimum": 0 }, "items": { "type": "array", @@ -15989,7 +17012,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis interface is to obtain all Spot Closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order.\n\nAfter the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 _ 24 hours (ie: from the current time to 3 _ 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getClosedOrders\",\"sdk-method-description\":\"This interface is to obtain all Spot closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getClosedOrders\",\"sdk-method-description\":\"This interface is to obtain all Spot closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit-weight\":2}" } }, { @@ -16023,7 +17046,12 @@ "required": false, "description": "The unique order id generated by the trading system\n(If orderId is specified,please ignore the other query parameters)", "type": "string", - "enable": true + "enable": true, + "schema": { + "type": "string", + "maxLength": 24, + "minLength": 24 + } }, { "id": "sTtMCE9Jhf", @@ -16088,7 +17116,9 @@ "type": "integer", "schema": { "type": "integer", - "format": "int64" + "format": "int64", + "minimum": 0, + "exclusiveMinimum": 0 }, "enable": true }, @@ -16116,7 +17146,11 @@ "type": "integer", "schema": { "type": "integer", - "format": "int64" + "format": "int64", + "minimum": 1000000000000, + "maximum": 9999999999999, + "exclusiveMinimum": 1000000000000, + "exclusiveMaximum": 9999999999999 }, "enable": true }, @@ -16129,7 +17163,11 @@ "type": "integer", "schema": { "type": "integer", - "format": "int64" + "format": "int64", + "maximum": 9999999999999, + "exclusiveMaximum": 9999999999999, + "minimum": 1000000000000, + "exclusiveMinimum": 1000000000000 }, "enable": true } @@ -16358,7 +17396,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can be used to obtain a list of the latest Spot transaction details. \nThe returned data is sorted in descending order according to the latest update time of the order.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 _ 24 hours (ie: from the current time to 3 _ 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getTradeHistory\",\"sdk-method-description\":\"This endpoint can be used to obtain a list of the latest Spot transaction details. The returned data is sorted in descending order according to the latest update time of the order.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getTradeHistory\",\"sdk-method-description\":\"This endpoint can be used to obtain a list of the latest Spot transaction details. The returned data is sorted in descending order according to the latest update time of the order.\",\"api-rate-limit-weight\":2}" } }, { @@ -16368,8 +17406,8 @@ "method": "get", "path": "/api/v1/hf/orders/dead-cancel-all/query", "parameters": { - "path": [], "query": [], + "path": [], "cookie": [], "header": [] }, @@ -16390,19 +17428,21 @@ "properties": { "timeout": { "type": "integer", - "description": "Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400" + "description": "Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400" }, "symbols": { "type": "string", - "description": "List of trading pairs. Separated by commas, empty means all trading pairs" + "description": "List of trading pairs. Separated by commas; empty means all trading pairs" }, "currentTime": { "type": "integer", - "description": "System current time (in seconds)" + "description": "System current time (in seconds)", + "format": "int64" }, "triggerTime": { "type": "integer", - "description": "Trigger cancellation time (in seconds)" + "description": "Trigger cancellation time (in seconds)", + "format": "int64" } }, "description": "If the data is empty, it means that DCP is not set.", @@ -16437,8 +17477,8 @@ "example": "{\n \"timeout\": 5,\n \"symbols\": \"BTC-USDT,ETH-USDT\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nGet Disconnection Protect(Deadman Swich)Through this interface, you can query the settings of automatic order cancellation\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getDCP\",\"sdk-method-description\":\"Get Disconnection Protect(Deadman Swich)Through this interface, you can query the settings of automatic order cancellation\",\"api-rate-limit\":2}" + "description": ":::info[Description]\nGet Disconnection Protect (Deadman Switch). Through this interface, you can query the settings of automatic order cancellation.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getDCP\",\"sdk-method-description\":\"Get Disconnection Protect (Deadman Switch). Through this interface, you can query the settings of automatic order cancellation.\",\"api-rate-limit-weight\":2}" } }, { @@ -16470,11 +17510,13 @@ "properties": { "currentTime": { "type": "integer", - "description": "System current time (in seconds)" + "description": "System current time (in seconds)", + "format": "int64" }, "triggerTime": { "type": "integer", - "description": "Trigger cancellation time (in seconds)" + "description": "Trigger cancellation time (in seconds)", + "format": "int64" } }, "required": [ @@ -16510,7 +17552,7 @@ "properties": { "timeout": { "type": "integer", - "description": "Auto cancel order trigger setting time, the unit is second. range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten." + "description": "Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten." }, "symbols": { "type": "string", @@ -16527,8 +17569,8 @@ "example": "{\n \"timeout\": 5,\n \"symbols\": \"BTC-USDT,ETH-USDT\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nSet Disconnection Protect(Deadman Swich)Through this interface, Call this interface to automatically cancel all orders of the set trading pair after the specified time. If this interface is not called again for renewal or cancellation before the set time, the system will help the user to cancel the order of the corresponding trading pair. Otherwise it will not.\n:::\n\n:::tip[Tips]\nThe order cancellation delay is between 0 and 10 seconds, and the order will not be canceled in real time. When the system cancels the order, if the transaction pair status is no longer operable to cancel the order, it will not cancel the order\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"setDCP\",\"sdk-method-description\":\"Set Disconnection Protect(Deadman Swich)Through this interface, Call this interface to automatically cancel all orders of the set trading pair after the specified time. If this interface is not called again for renewal or cancellation before the set time, the system will help the user to cancel the order of the corresponding trading pair. Otherwise it will not.\",\"api-rate-limit\":2}" + "description": ":::info[Description]\nSet Disconnection Protect (Deadman Switch). Through this interface, call this interface to automatically cancel all orders of the set trading pair after the specified time. If this interface is not called again for renewal or cancellation before the set time, the system will help the user to cancel the order of the corresponding trading pair. Otherwise it will not.\n:::\n\n:::tip[Tips]\nThe order cancellation delay is between 0 and 10 seconds, and the order will not be canceled in real time. When the system cancels the order, if the transaction pair status is no longer operable to cancel the order, it will not cancel the order\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"setDCP\",\"sdk-method-description\":\"Set Disconnection Protect (Deadman Switch). Through this interface, call this interface to automatically cancel all orders of the set trading pair after the specified time. If this interface is not called again for renewal or cancellation before the set time, the system will help the user to cancel the order of the corresponding trading pair. Otherwise it will not.\",\"api-rate-limit-weight\":2}" } }, { @@ -16561,15 +17603,10 @@ "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" + "orderId" ] } }, @@ -16586,7 +17623,7 @@ "responseExamples": [ { "name": "Success", - "data": "{\"code\":\"200000\",\"data\":{\"orderId\":\"670fd33bf9406e0007ab3945\",\"clientOid\":\"5c52e11203aa677f33e493fb\"}}", + "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"orderId\": \"670fd33bf9406e0007ab3945\"\n }\n}", "responseId": 10651, "ordering": 1 } @@ -16757,8 +17794,13 @@ }, "cancelAfter": { "type": "integer", - "description": "Cancel after n seconds,the order timing strategy is GTT when **type** is limit.", - "format": "int64" + "description": "Cancel after n seconds, the order timing strategy is GTT, -1 means it will not be cancelled automatically, the default value is -1\n", + "format": "int64", + "default": -1, + "minimum": 0, + "exclusiveMinimum": 0, + "maximum": 2592000, + "exclusiveMaximum": 2592000 }, "funds": { "type": "string", @@ -16780,11 +17822,11 @@ "stopPrice" ] }, - "example": "//limit order\n{\n \"type\": \"limit\",\n \"symbol\": \"BTC-USDT\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"remark\": \"order remarks\"\n}\n\n//market order 1\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"size\": \"0.00001\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n\n//market order 2\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"funds\": \"1\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n", + "example": "//limit order\n{\n \"type\": \"limit\",\n \"symbol\": \"BTC-USDT\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"stopPrice\": \"50000\",\n \"size\": \"0.00001\",\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"remark\": \"order remarks\"\n}\n\n//market order 1\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"size\": \"0.00001\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n\n//market order 2\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"funds\": \"1\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n", "mediaType": "" }, "description": ":::info[Description]\nPlace stop order to the Spot trading system. The maximum untriggered stop orders for a single trading pair in one account is 20.\n:::\n\n", - "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addStopOrder\",\"sdk-method-description\":\"Place stop order to the Spot 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.\",\"api-rate-limit\":1}" + "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addStopOrder\",\"sdk-method-description\":\"Place stop order to the Spot 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.\",\"api-rate-limit-weight\":1}" } }, { @@ -16885,7 +17927,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint can be used to cancel a spot order by clientOid.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\n:::", - "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelStopOrderByClientOid\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot stop order by clientOid. \",\"api-rate-limit\":5}" + "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelStopOrderByClientOid\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot stop order by clientOid. \",\"api-rate-limit-weight\":5}" } }, { @@ -16895,7 +17937,6 @@ "method": "delete", "path": "/api/v1/stop-order/{orderId}", "parameters": { - "query": [], "path": [ { "id": "orderId#0", @@ -16903,10 +17944,10 @@ "required": true, "description": "The unique order id generated by the trading system", "example": "671124f9365ccb00073debd4", - "type": "string", - "enable": true + "type": "string" } ], + "query": [], "cookie": [], "header": [] }, @@ -16930,7 +17971,7 @@ "items": { "type": "string" }, - "description": "order id array" + "description": "order ID array" } }, "required": [ @@ -16966,8 +18007,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to cancel a single stop order previously placed.\n\nYou will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the websocket pushes.\n:::", - "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelStopOrderByOrderId\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot stop order by orderId. \",\"api-rate-limit\":3}" + "description": ":::info[Description]\nRequest via this endpoint the cancellation of a single stop order previously placed.\n\nYou will receive canceledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the Websocket pushes.\n:::", + "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelStopOrderByOrderId\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot stop order by orderId. \",\"api-rate-limit-weight\":3}" } }, { @@ -16988,7 +18029,7 @@ }, { "required": false, - "description": "The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE", + "description": "The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin).", "type": "string", "id": "WL2a8vOzaG", "enable": true, @@ -17064,7 +18105,7 @@ "mediaType": "" }, "description": ":::info[Description]\nRequest via this interface to cancel a batch of stop orders.\n\nThe count of orderId in the parameter now is not limited.\n\nAn example is:\n ```/api/v1/stop-order/cancel?symbol=ETH-BTC&tradeType=TRADE&orderIds=5bd6e9286d99522a52e458de,5bd6e9286d99522a52e458df```\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"batchCancelStopOrder\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot stop orders by batch.\",\"api-rate-limit\":3}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"batchCancelStopOrder\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot stop orders by batch.\",\"api-rate-limit-weight\":3}" } }, { @@ -17074,7 +18115,126 @@ "method": "get", "path": "/api/v1/stop-order", "parameters": { - "query": [], + "query": [ + { + "required": false, + "description": "Only list orders for a specific symbol", + "type": "string", + "id": "W6Bi86Rm6P", + "enable": true, + "name": "symbol" + }, + { + "required": false, + "description": "buy or sell", + "type": "string", + "id": "ekEMQ8NSZ2", + "enable": true, + "name": "side" + }, + { + "required": false, + "description": "limit, market", + "type": "string", + "id": "ZF6PJFgbt2", + "enable": true, + "name": "type", + "schema": { + "type": "string", + "enum": [ + "limit", + "market" + ], + "x-api-enum": [ + { + "value": "limit", + "name": "limit", + "description": "limit order" + }, + { + "value": "market", + "name": "market", + "description": "market order" + } + ] + } + }, + { + "required": false, + "description": "The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE", + "type": "string", + "id": "YRGK62kb6v", + "enable": true, + "name": "tradeType" + }, + { + "required": false, + "description": "Start time (milisecond)", + "type": "integer", + "id": "QdqyNOkHn0", + "enable": true, + "name": "startAt", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "required": false, + "description": "End time (milisecond)", + "type": "integer", + "id": "q7wtuVo2tz", + "enable": true, + "name": "endAt", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "required": false, + "description": "Current page\n", + "type": "integer", + "id": "1buH72SI1q", + "enable": true, + "name": "currentPage", + "schema": { + "type": "integer", + "default": 1, + "minimum": 1 + } + }, + { + "required": false, + "description": "Comma seperated order ID list", + "type": "string", + "id": "qZ5VGIVBEF", + "enable": true, + "name": "orderIds" + }, + { + "required": false, + "description": "Page size", + "type": "integer", + "id": "KXUUzMCgWC", + "enable": true, + "name": "pageSize", + "schema": { + "type": "integer", + "default": 50, + "minimum": 10, + "maximum": 500 + } + }, + { + "required": false, + "description": "Order type: stop: stop loss order, oco: oco order", + "type": "string", + "id": "Wx4hROA55E", + "enable": true, + "name": "stop" + } + ], "path": [], "cookie": [], "header": [] @@ -17132,7 +18292,23 @@ }, "type": { "type": "string", - "description": "Order type,limit, market, limit_stop or market_stop" + "description": "Order type", + "enum": [ + "limit", + "market" + ], + "x-api-enum": [ + { + "value": "limit", + "name": "limit", + "description": "Limit order" + }, + { + "value": "market", + "name": "market", + "description": "Market order" + } + ] }, "side": { "type": "string", @@ -17239,15 +18415,63 @@ "stopPrice": { "type": "string", "description": "stop price" + }, + "relatedNo": { + "type": "string" + }, + "limitPrice": { + "type": "string" + }, + "pop": { + "type": "string" + }, + "activateCondition": { + "type": "string" } - } + }, + "required": [ + "id", + "symbol", + "userId", + "status", + "type", + "side", + "price", + "size", + "timeInForce", + "cancelAfter", + "postOnly", + "hidden", + "iceberg", + "channel", + "clientOid", + "remark", + "orderTime", + "domainId", + "tradeSource", + "tradeType", + "feeCurrency", + "takerFeeRate", + "makerFeeRate", + "createdAt", + "stop", + "stopPrice" + ] }, "description": "the list of stop orders" } - } + }, + "required": [ + "currentPage", + "pageSize", + "totalNum", + "totalPage", + "items" + ] } }, "required": [ + "code", "data" ] }, @@ -17259,130 +18483,23 @@ "responseExamples": [ { "name": "Success", - "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 50,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"id\": \"vs8hoo8kqjnklv4m0038lrfq\",\n \"symbol\": \"KCS-USDT\",\n \"userId\": \"60fe4956c43cbc0006562c2c\",\n \"status\": \"NEW\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"0.01000000000000000000\",\n \"size\": \"0.01000000000000000000\",\n \"funds\": null,\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"cancelAfter\": -1,\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": null,\n \"channel\": \"API\",\n \"clientOid\": \"404814a0fb4311eb9098acde48001122\",\n \"remark\": null,\n \"tags\": null,\n \"orderTime\": 1628755183702150100,\n \"domainId\": \"kucoin\",\n \"tradeSource\": \"USER\",\n \"tradeType\": \"TRADE\",\n \"feeCurrency\": \"USDT\",\n \"takerFeeRate\": \"0.00200000000000000000\",\n \"makerFeeRate\": \"0.00200000000000000000\",\n \"createdAt\": 1628755183704,\n \"stop\": \"loss\",\n \"stopTriggerTime\": null,\n \"stopPrice\": \"10.00000000000000000000\"\n }\n ]\n }\n}", + "data": "{\r\n \"code\": \"200000\",\r\n \"data\": {\r\n \"currentPage\": 1,\r\n \"pageSize\": 50,\r\n \"totalNum\": 2,\r\n \"totalPage\": 1,\r\n \"items\": [\r\n {\r\n \"id\": \"vs93gptvr9t2fsql003l8k5p\",\r\n \"symbol\": \"BTC-USDT\",\r\n \"userId\": \"633559791e1cbc0001f319bc\",\r\n \"status\": \"NEW\",\r\n \"type\": \"limit\",\r\n \"side\": \"buy\",\r\n \"price\": \"50000.00000000000000000000\",\r\n \"size\": \"0.00001000000000000000\",\r\n \"funds\": null,\r\n \"stp\": null,\r\n \"timeInForce\": \"GTC\",\r\n \"cancelAfter\": -1,\r\n \"postOnly\": false,\r\n \"hidden\": false,\r\n \"iceberg\": false,\r\n \"visibleSize\": null,\r\n \"channel\": \"API\",\r\n \"clientOid\": \"5c52e11203aa677f222233e493fb\",\r\n \"remark\": \"order remarks\",\r\n \"tags\": null,\r\n \"relatedNo\": null,\r\n \"orderTime\": 1740626554883000024,\r\n \"domainId\": \"kucoin\",\r\n \"tradeSource\": \"USER\",\r\n \"tradeType\": \"TRADE\",\r\n \"feeCurrency\": \"USDT\",\r\n \"takerFeeRate\": \"0.00100000000000000000\",\r\n \"makerFeeRate\": \"0.00100000000000000000\",\r\n \"createdAt\": 1740626554884,\r\n \"stop\": \"loss\",\r\n \"stopTriggerTime\": null,\r\n \"stopPrice\": \"60000.00000000000000000000\",\r\n \"limitPrice\": null,\r\n \"pop\": null,\r\n \"activateCondition\": null\r\n }\r\n ]\r\n }\r\n}", "responseId": 10568, "ordering": 1 } ], "requestBody": { - "type": "application/json", + "type": "none", "parameters": [], "jsonSchema": { "type": "object", - "properties": { - "symbol": { - "type": "string", - "description": "Only list orders for a specific symbol" - }, - "side": { - "type": "string", - "enum": [ - "buy", - "sell" - ], - "description": "buy or sell", - "x-api-enum": [ - { - "value": "buy", - "name": "buy", - "description": "" - }, - { - "value": "sell", - "name": "sell", - "description": "" - } - ] - }, - "type": { - "type": "string", - "description": "limit, market, limit_stop or market_stop", - "enum": [ - "limit", - "market", - "limit_stop", - "market_stop" - ], - "x-api-enum": [ - { - "value": "limit", - "name": "limit", - "description": "" - }, - { - "value": "market", - "name": "market", - "description": "" - }, - { - "value": "limit_stop", - "name": "limit_stop", - "description": "" - }, - { - "value": "market_stop", - "name": "market_stop", - "description": "" - } - ] - }, - "tradeType": { - "type": "string", - "description": "The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin). Default is TRADE", - "enum": [ - "TRADE", - "MARGIN_TRADE", - "MARGIN_ISOLATED_TRADE" - ], - "x-api-enum": [ - { - "value": "TRADE", - "name": "TRADE", - "description": "" - }, - { - "value": "MARGIN_TRADE", - "name": "MARGIN_TRADE", - "description": "" - }, - { - "value": "MARGIN_ISOLATED_TRADE", - "name": "MARGIN_ISOLATED_TRADE", - "description": "" - } - ] - }, - "startAt": { - "type": "number", - "description": "Start time (milisecond)" - }, - "endAt": { - "type": "number", - "description": "End time (milisecond)" - }, - "currentPage": { - "type": "integer", - "description": "current page" - }, - "orderIds": { - "type": "string", - "description": "comma seperated order ID list" - }, - "pageSize": { - "type": "integer", - "description": "page size" - }, - "stop": { - "type": "string", - "description": "Order type: stop: stop loss order, oco: oco order" - } - } + "properties": {} }, - "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", + "example": "", "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to get your current untriggered stop order list. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n\n:::\n\n\n:::tip[Example]\n```json\n{\n \"currentPage\": 1,\n \"pageSize\": 50,\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"items\": [\n {\n \"id\": \"vs8hoo8kqjnklv4m0038lrfq\",\n \"symbol\": \"KCS-USDT\",\n \"userId\": \"60fe4956c43cbc0006562c2c\",\n \"status\": \"NEW\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"0.01000000000000000000\",\n \"size\": \"0.01000000000000000000\",\n \"funds\": null,\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"cancelAfter\": -1,\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": null,\n \"channel\": \"API\",\n \"clientOid\": \"404814a0fb4311eb9098acde48001122\",\n \"remark\": null,\n \"tags\": null,\n \"orderTime\": 1628755183702150167,\n \"domainId\": \"kucoin\",\n \"tradeSource\": \"USER\",\n \"tradeType\": \"TRADE\",\n \"feeCurrency\": \"USDT\",\n \"takerFeeRate\": \"0.00200000000000000000\",\n \"makerFeeRate\": \"0.00200000000000000000\",\n \"createdAt\": 1628755183704,\n \"stop\": \"loss\",\n \"stopTriggerTime\": null,\n \"stopPrice\": \"10.00000000000000000000\"\n }\n ]\n}\n```\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getStopOrdersList\",\"sdk-method-description\":\"This interface is to obtain all Spot active stop order lists\",\"api-rate-limit\":8}" + "description": ":::info[Description]\nRequest via this endpoint to get your current untriggered stop order list. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n\n:::\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getStopOrdersList\",\"sdk-method-description\":\"This interface is to obtain all Spot active stop order lists\",\"api-rate-limit-weight\":8}" } }, { @@ -17436,7 +18553,23 @@ }, "type": { "type": "string", - "description": "Order type,limit, market, limit_stop or market_stop" + "description": "Order type", + "enum": [ + "limit", + "market" + ], + "x-api-enum": [ + { + "value": "limit", + "name": "limit", + "description": "Limit order" + }, + { + "value": "market", + "name": "market", + "description": "Market order" + } + ] }, "side": { "type": "string", @@ -17688,8 +18821,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nRequest via this interface to get a stop order information via the order ID.\n\n:::\n\n\n:::tip[Example]\n```json\n{\n \"id\": \"vs8hoo8q2ceshiue003b67c0\",\n \"symbol\": \"KCS-USDT\",\n \"userId\": \"60fe4956c43cbc0006562c2c\",\n \"status\": \"NEW\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"0.01000000000000000000\",\n \"size\": \"0.01000000000000000000\",\n \"funds\": null,\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"cancelAfter\": -1,\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": null,\n \"channel\": \"API\",\n \"clientOid\": \"40e0eb9efe6311eb8e58acde48001122\",\n \"remark\": null,\n \"tags\": null,\n \"orderTime\": 1629098781127530345,\n \"domainId\": \"kucoin\",\n \"tradeSource\": \"USER\",\n \"tradeType\": \"TRADE\",\n \"feeCurrency\": \"USDT\",\n \"takerFeeRate\": \"0.00200000000000000000\",\n \"makerFeeRate\": \"0.00200000000000000000\",\n \"createdAt\": 1629098781128,\n \"stop\": \"loss\",\n \"stopTriggerTime\": null,\n \"stopPrice\": \"10.00000000000000000000\"\n}\n```\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getStopOrderByOrderId\",\"sdk-method-description\":\"This interface is to obtain Spot stop order details by orderId\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nRequest via this interface to get a stop order information via the order ID.\n\n:::\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getStopOrderByOrderId\",\"sdk-method-description\":\"This interface is to obtain Spot stop order details by orderId\",\"api-rate-limit-weight\":3}" } }, { @@ -17757,7 +18890,23 @@ }, "type": { "type": "string", - "description": "Order type,limit, market, limit_stop or market_stop" + "description": "Order type", + "enum": [ + "limit", + "market" + ], + "x-api-enum": [ + { + "value": "limit", + "name": "limit", + "description": "Limit order" + }, + { + "value": "market", + "name": "market", + "description": "Market order" + } + ] }, "side": { "type": "string", @@ -18008,8 +19157,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nRequest via this interface to get a stop order information via the clientOid.\n\n:::\n\n\n:::tip[Example]\n```json\n{\n \"id\": \"vs8hoo8q2ceshiue003b67c0\",\n \"symbol\": \"KCS-USDT\",\n \"userId\": \"60fe4956c43cbc0006562c2c\",\n \"status\": \"NEW\",\n \"type\": \"limit\",\n \"side\": \"buy\",\n \"price\": \"0.01000000000000000000\",\n \"size\": \"0.01000000000000000000\",\n \"funds\": null,\n \"stp\": null,\n \"timeInForce\": \"GTC\",\n \"cancelAfter\": -1,\n \"postOnly\": false,\n \"hidden\": false,\n \"iceberg\": false,\n \"visibleSize\": null,\n \"channel\": \"API\",\n \"clientOid\": \"40e0eb9efe6311eb8e58acde48001122\",\n \"remark\": null,\n \"tags\": null,\n \"orderTime\": 1629098781127530345,\n \"domainId\": \"kucoin\",\n \"tradeSource\": \"USER\",\n \"tradeType\": \"TRADE\",\n \"feeCurrency\": \"USDT\",\n \"takerFeeRate\": \"0.00200000000000000000\",\n \"makerFeeRate\": \"0.00200000000000000000\",\n \"createdAt\": 1629098781128,\n \"stop\": \"loss\",\n \"stopTriggerTime\": null,\n \"stopPrice\": \"10.00000000000000000000\"\n}\n```\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getStopOrderByClientOid\",\"sdk-method-description\":\"This interface is to obtain Spot stop order details by orderId\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nRequest via this interface to get a stop order information via the clientOid.\n\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getStopOrderByClientOid\",\"sdk-method-description\":\"This interface is to obtain Spot stop order details by orderId\",\"api-rate-limit-weight\":3}" } }, { @@ -18161,7 +19310,7 @@ "mediaType": "" }, "description": ":::info[Description]\nPlace OCO order to the Spot trading system\n:::\n\n:::tip[Tips]\nThe maximum untriggered stop orders for a single trading pair in one account is 20.\n:::\n", - "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOcoOrder\",\"sdk-method-description\":\"Place OCO order to the Spot trading system\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOcoOrder\",\"sdk-method-description\":\"Place OCO order to the Spot trading system\",\"api-rate-limit-weight\":2}" } }, { @@ -18171,7 +19320,6 @@ "method": "delete", "path": "/api/v3/oco/order/{orderId}", "parameters": { - "query": [], "path": [ { "id": "orderId#0", @@ -18179,10 +19327,10 @@ "required": true, "description": "The unique order id generated by the trading system", "example": "674c316e688dea0007c7b986", - "type": "string", - "enable": true + "type": "string" } ], + "query": [], "cookie": [], "header": [] }, @@ -18242,8 +19390,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to cancel a single oco order previously placed.\n\nYou will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes.\n:::", - "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOcoOrderByOrderId\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nRequest via this endpoint the cancellation of a single OCO order previously placed.\n\nYou will receive canceledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes.\n:::", + "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOcoOrderByOrderId\",\"sdk-method-description\":\"This endpoint can be used to cancel a spot order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket.\",\"api-rate-limit-weight\":3}" } }, { @@ -18325,7 +19473,7 @@ "mediaType": "" }, "description": ":::info[Description]\nRequest via this interface to cancel a stop order via the clientOid.\n\nYou will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes.\n:::", - "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOcoOrderByClientOid\",\"sdk-method-description\":\"Request via this interface to cancel a stop order via the clientOid. You will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes.\",\"api-rate-limit\":3}" + "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOcoOrderByClientOid\",\"sdk-method-description\":\"Request via this interface to cancel a stop order via the clientOid. You will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes.\",\"api-rate-limit-weight\":3}" } }, { @@ -18335,27 +19483,25 @@ "method": "delete", "path": "/api/v3/oco/orders", "parameters": { + "path": [], "query": [ { - "required": false, - "description": "Specify the order id, there can be multiple orders, separated by commas. If not passed, all oco orders will be canceled by default.", - "type": "string", "id": "k4wDZR9oG9", - "enable": true, "name": "orderIds", - "example": "674c388172cf2800072ee746,674c38bdfd8300000795167e" + "required": false, + "description": "Specify the order ID; there can be multiple orders, separated by commas. If not passed, all OCO orders will be canceled by default.", + "example": "674c388172cf2800072ee746,674c38bdfd8300000795167e", + "type": "string" }, { - "required": false, - "description": "trading pair. If not passed, the oco orders of all symbols will be canceled by default.", - "type": "string", "id": "VGVVOaGkpz", - "enable": true, "name": "symbol", - "example": "BTC-USDT" + "required": false, + "description": "Trading pair. If not passed, the OCO orders of all symbols will be canceled by default.", + "example": "BTC-USDT", + "type": "string" } ], - "path": [], "cookie": [], "header": [] }, @@ -18415,8 +19561,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis interface can batch cancel OCO orders through orderIds.\n\nYou will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes.\n:::", - "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"batchCancelOcoOrders\",\"sdk-method-description\":\"This interface can batch cancel OCO orders through orderIds. You will receive cancelledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes.\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nThis interface can batch cancel OCO orders through orderIds.\n\nYou will receive canceledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes.\n:::", + "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Spot\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"batchCancelOcoOrders\",\"sdk-method-description\":\"This interface can batch cancel OCO orders through orderIds. You will receive canceledOrderIds field once the system has received the cancellation request. The cancellation request will be processed by the matching engine in sequence. To know if the request is processed (successfully or not), you may check the order status or the update message from the pushes.\",\"api-rate-limit-weight\":3}" } }, { @@ -18426,18 +19572,17 @@ "method": "get", "path": "/api/v3/oco/order/{orderId}", "parameters": { - "query": [], "path": [ { "id": "orderId#0", "name": "orderId", "required": true, "description": "The unique order id generated by the trading system", - "type": "string", - "enable": true, - "example": "674c3b6e688dea0007c7bab2" + "example": "674c3b6e688dea0007c7bab2", + "type": "string" } ], + "query": [], "cookie": [], "header": [] }, @@ -18462,11 +19607,11 @@ }, "clientOid": { "type": "string", - "description": "Client Order Id" + "description": "Client Order ID" }, "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." + "description": "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order." }, "orderTime": { "type": "integer", @@ -18475,7 +19620,7 @@ }, "status": { "type": "string", - "description": "Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELLED: Cancelled", + "description": "Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELED: Canceled", "enum": [ "NEW", "DONE", @@ -18500,8 +19645,8 @@ }, { "value": "CANCELLED", - "name": "CANCELLED", - "description": "Cancelled" + "name": "CANCELED", + "description": "Canceled" } ] } @@ -18543,8 +19688,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nRequest via this interface to get a oco order information via the order ID.\n:::", - "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOcoOrderByOrderId\",\"sdk-method-description\":\"Request via this interface to get a oco order information via the order ID.\",\"api-rate-limit\":2}" + "description": ":::info[Description]\nRequest via this interface an OCO order information via the order ID.\n:::", + "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOcoOrderByOrderId\",\"sdk-method-description\":\"Request via this interface an OCO order information via the order ID.\",\"api-rate-limit-weight\":2}" } }, { @@ -18644,7 +19789,7 @@ "mediaType": "" }, "description": ":::info[Description]\nRequest via this interface to get a oco order information via the client order ID.\n:::", - "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOcoOrderByClientOid\",\"sdk-method-description\":\"Request via this interface to get a oco order information via the client order ID.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOcoOrderByClientOid\",\"sdk-method-description\":\"Request via this interface to get a oco order information via the client order ID.\",\"api-rate-limit-weight\":2}" } }, { @@ -18783,7 +19928,7 @@ "mediaType": "" }, "description": ":::info[Description]\nRequest via this interface to get a oco order detail via the order ID.\n:::", - "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOcoOrderDetailByOrderId\",\"sdk-method-description\":\"Request via this interface to get a oco order detail via the order ID.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOcoOrderDetailByOrderId\",\"sdk-method-description\":\"Request via this interface to get a oco order detail via the order ID.\",\"api-rate-limit-weight\":2}" } }, { @@ -18793,14 +19938,14 @@ "method": "get", "path": "/api/v3/oco/orders", "parameters": { + "path": [], "query": [ { + "id": "k5kTqKOh1U", + "name": "symbol", "required": false, "description": "symbol", "type": "string", - "id": "k5kTqKOh1U", - "enable": true, - "name": "symbol", "schema": { "type": "string", "examples": [ @@ -18811,44 +19956,40 @@ } }, { + "id": "3gEHqfvq1R", + "name": "startAt", "required": false, "description": "Start time (milliseconds)", "type": "integer", - "id": "3gEHqfvq1R", - "enable": true, - "name": "startAt", "schema": { "type": "integer", "format": "int64" } }, { + "id": "qfsVt7qQe8", + "name": "endAt", "required": false, "description": "End time (milliseconds)", "type": "integer", - "id": "qfsVt7qQe8", - "enable": true, - "name": "endAt", "schema": { "type": "integer", "format": "int64" } }, { + "id": "ZFIKYx3RJH", + "name": "orderIds", "required": false, "description": "Specify orderId collection, up to 500 orders\n", - "type": "string", - "id": "ZFIKYx3RJH", - "enable": true, - "name": "orderIds" + "type": "string" }, { + "id": "FJH8SIb2XY", + "name": "pageSize", "required": false, "description": "Size per page, minimum value 10, maximum value 500", "type": "integer", - "id": "FJH8SIb2XY", - "enable": true, - "name": "pageSize", "schema": { "type": "integer", "minimum": 10, @@ -18857,19 +19998,17 @@ } }, { + "id": "sSsAg6Hbjc", + "name": "currentPage", "required": false, "description": "Page number, minimum value 1\n", "type": "integer", - "id": "sSsAg6Hbjc", - "enable": true, - "name": "currentPage", "schema": { "type": "integer", "default": 1 } } ], - "path": [], "cookie": [], "header": [] }, @@ -18907,7 +20046,7 @@ "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." + "description": "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order." }, "symbol": { "type": "string", @@ -18915,7 +20054,7 @@ }, "clientOid": { "type": "string", - "description": "Client Order Id" + "description": "Client Order ID" }, "orderTime": { "type": "integer", @@ -18924,7 +20063,7 @@ }, "status": { "type": "string", - "description": "Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELLED: Cancelled", + "description": "Order status: NEW: New, DONE: Completed, TRIGGERED: Triggered, CANCELED: Canceled", "enum": [ "NEW", "DONE", @@ -18949,8 +20088,8 @@ }, { "value": "CANCELLED", - "name": "CANCELLED", - "description": "Cancelled" + "name": "CANCELED", + "description": "Canceled" } ] } @@ -19002,8 +20141,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to get your current OCO order list. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::", - "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOcoOrderList\",\"sdk-method-description\":\"Request via this endpoint to get your current OCO order list. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\",\"api-rate-limit\":2}" + "description": ":::info[Description]\nRequest your current OCO order list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\n:::", + "customApiFields": "{\"abandon\":\"abandon\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Spot\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOcoOrderList\",\"sdk-method-description\":\"Request your current OCO order list via this endpoint. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page.\",\"api-rate-limit-weight\":2}" } } ] @@ -19027,6 +20166,7 @@ "method": "get", "path": "/api/v3/margin/symbols", "parameters": { + "path": [], "query": [ { "id": "Hf2SMe6sum", @@ -19041,11 +20181,9 @@ "ETH-USDT", "KCS-USDT" ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -19079,11 +20217,11 @@ }, "name": { "type": "string", - "description": "symbol name" + "description": "Symbol name" }, "enableTrading": { "type": "boolean", - "description": "Whether trading is enabled: true for enabled, false for disabled" + "description": "Whether trading is enabled: True for enabled; false for disabled" }, "market": { "type": "string", @@ -19091,11 +20229,11 @@ }, "baseCurrency": { "type": "string", - "description": "Base currency,e.g. BTC." + "description": "Base currency, e.g. BTC." }, "quoteCurrency": { "type": "string", - "description": "Quote currency,e.g. USDT." + "description": "Quote currency, e.g. USDT." }, "baseIncrement": { "type": "string", @@ -19103,7 +20241,7 @@ }, "baseMinSize": { "type": "string", - "description": "The minimum order quantity requried to place an order." + "description": "The minimum order quantity required to place an order." }, "quoteIncrement": { "type": "string", @@ -19123,7 +20261,7 @@ }, "priceIncrement": { "type": "string", - "description": "Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001.\n\nspecifies the min order price as well as the price increment.This also applies to quote currency." + "description": "Price increment: The price of an order must be a positive integer multiple of this increment. For example, for the ETH-USDT trading pair, if the priceIncrement is 0.01, the order price can be 3000.01 but not 3000.001.\n\nSpecifies the min. order price as well as the price increment.This also applies to quote currency." }, "feeCurrency": { "type": "string", @@ -19131,11 +20269,11 @@ }, "priceLimitRate": { "type": "string", - "description": "Threshold for price portection" + "description": "Threshold for price protection" }, "minFunds": { "type": "string", - "description": "the minimum trading amounts" + "description": "The minimum trading amounts" } }, "required": [ @@ -19194,94 +20332,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint allows querying the configuration of cross margin symbol.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getCrossMarginSymbols\",\"sdk-method-description\":\"This endpoint allows querying the configuration of cross margin symbol.\",\"api-rate-limit\":3}" - } - }, - { - "name": "Get Margin Config", - "api": { - "id": "3470190", - "method": "get", - "path": "/api/v1/margin/config", - "parameters": { - "path": [], - "query": [], - "cookie": [], - "header": [] - }, - "responses": [ - { - "id": "10354", - "code": 200, - "name": "OK", - "headers": [], - "jsonSchema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "data": { - "type": "object", - "properties": { - "currencyList": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Available currencies for margin trade" - }, - "maxLeverage": { - "type": "integer", - "description": "Max leverage available" - }, - "warningDebtRatio": { - "type": "string", - "description": "The warning debt ratio of the forced liquidation" - }, - "liqDebtRatio": { - "type": "string", - "description": "The debt ratio of the forced liquidation" - } - }, - "required": [ - "currencyList", - "maxLeverage", - "warningDebtRatio", - "liqDebtRatio" - ] - } - }, - "required": [ - "code", - "data" - ] - }, - "description": "", - "contentType": "json", - "mediaType": "" - } - ], - "responseExamples": [ - { - "name": "Success", - "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"maxLeverage\": 5,\n \"warningDebtRatio\": \"0.95\",\n \"liqDebtRatio\": \"0.97\",\n \"currencyList\": [\n \"VRA\",\n \"APT\",\n \"IOTX\",\n \"SHIB\",\n \"KDA\",\n \"BCHSV\",\n \"NEAR\",\n \"CLV\",\n \"AUDIO\",\n \"AIOZ\",\n \"FLOW\",\n \"WLD\",\n \"COMP\",\n \"MEME\",\n \"SLP\",\n \"STX\",\n \"ZRO\",\n \"QI\",\n \"PYTH\",\n \"RUNE\",\n \"DGB\",\n \"IOST\",\n \"SUI\",\n \"BCH\",\n \"CAKE\",\n \"DOT\",\n \"OMG\",\n \"POL\",\n \"GMT\",\n \"1INCH\",\n \"RSR\",\n \"NKN\",\n \"BTC\",\n \"AR\",\n \"ARB\",\n \"TON\",\n \"LISTA\",\n \"AVAX\",\n \"SEI\",\n \"FTM\",\n \"ERN\",\n \"BB\",\n \"BTT\",\n \"JTO\",\n \"ONE\",\n \"RLC\",\n \"ANKR\",\n \"SUSHI\",\n \"CATI\",\n \"ALGO\",\n \"PEPE2\",\n \"ATOM\",\n \"LPT\",\n \"BIGTIME\",\n \"CFX\",\n \"DYM\",\n \"VELO\",\n \"XPR\",\n \"SNX\",\n \"JUP\",\n \"MANA\",\n \"API3\",\n \"PYR\",\n \"ROSE\",\n \"GLMR\",\n \"SATS\",\n \"TIA\",\n \"GALAX\",\n \"SOL\",\n \"DAO\",\n \"FET\",\n \"ETC\",\n \"MKR\",\n \"WOO\",\n \"DODO\",\n \"OGN\",\n \"BNB\",\n \"ICP\",\n \"BLUR\",\n \"ETH\",\n \"ZEC\",\n \"NEO\",\n \"CELO\",\n \"REN\",\n \"MANTA\",\n \"LRC\",\n \"STRK\",\n \"ADA\",\n \"STORJ\",\n \"REQ\",\n \"TAO\",\n \"VET\",\n \"FITFI\",\n \"USDT\",\n \"DOGE\",\n \"HBAR\",\n \"SXP\",\n \"NEIROCTO\",\n \"CHR\",\n \"ORDI\",\n \"DASH\",\n \"PEPE\",\n \"ONDO\",\n \"ILV\",\n \"WAVES\",\n \"CHZ\",\n \"DOGS\",\n \"XRP\",\n \"CTSI\",\n \"JASMY\",\n \"FLOKI\",\n \"TRX\",\n \"KAVA\",\n \"SAND\",\n \"C98\",\n \"UMA\",\n \"NOT\",\n \"IMX\",\n \"WIF\",\n \"ENA\",\n \"EGLD\",\n \"BOME\",\n \"LTC\",\n \"USDC\",\n \"METIS\",\n \"WIN\",\n \"THETA\",\n \"FXS\",\n \"ENJ\",\n \"CRO\",\n \"AEVO\",\n \"INJ\",\n \"LTO\",\n \"CRV\",\n \"GRT\",\n \"DYDX\",\n \"FLUX\",\n \"ENS\",\n \"WAX\",\n \"MASK\",\n \"POND\",\n \"UNI\",\n \"AAVE\",\n \"LINA\",\n \"TLM\",\n \"BONK\",\n \"QNT\",\n \"LDO\",\n \"ALICE\",\n \"XLM\",\n \"LINK\",\n \"CKB\",\n \"LUNC\",\n \"YFI\",\n \"ETHW\",\n \"XTZ\",\n \"LUNA\",\n \"OP\",\n \"SUPER\",\n \"EIGEN\",\n \"KSM\",\n \"ELON\",\n \"EOS\",\n \"FIL\",\n \"ZETA\",\n \"SKL\",\n \"BAT\",\n \"APE\",\n \"HMSTR\",\n \"YGG\",\n \"MOVR\",\n \"PEOPLE\",\n \"KCS\",\n \"AXS\",\n \"ARPA\",\n \"ZIL\"\n ]\n }\n}", - "responseId": 10354, - "ordering": 1 - } - ], - "requestBody": { - "type": "none", - "parameters": [], - "jsonSchema": { - "type": "object", - "properties": {} - }, - "example": "{\n \"currency\": \"USDT\",\n \"size\": 10,\n \"timeInForce\": \"FOK\",\n \"isIsolated\": false,\n \"isHf\": false\n}", - "mediaType": "" - }, - "description": ":::info[Description]\nRequest via this endpoint to get the configure info of the cross margin.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getMarginConfig\",\"sdk-method-description\":\"Request via this endpoint to get the configure info of the cross margin.\",\"api-rate-limit\":25}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getCrossMarginSymbols\",\"sdk-method-description\":\"This endpoint allows querying the configuration of cross margin symbol.\",\"api-rate-limit-weight\":3}" } }, { @@ -19291,21 +20342,20 @@ "method": "get", "path": "/api/v3/etf/info", "parameters": { + "path": [], "query": [ { "id": "Hf2SMe6sum", "name": "currency", "required": false, - "description": "ETF Currency, if empty query all currencies\n", + "description": "ETF Currency: If empty, query all currencies\n", "example": "BTCUP", "type": "string", "schema": { "type": "string" - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -19390,91 +20440,8 @@ "example": "{\n \"currency\": \"USDT\",\n \"size\": 10,\n \"timeInForce\": \"FOK\",\n \"isIsolated\": false,\n \"isHf\": false\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis interface returns leveraged token information\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getETFInfo\",\"sdk-method-description\":\"This interface returns leveraged token information\",\"api-rate-limit\":3}" - } - }, - { - "name": "Get Mark Price List", - "api": { - "id": "3470192", - "method": "get", - "path": "/api/v3/mark-price/all-symbols", - "parameters": { - "query": [], - "path": [], - "cookie": [], - "header": [] - }, - "responses": [ - { - "id": "10356", - "code": 200, - "name": "OK", - "headers": [], - "jsonSchema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "symbol": { - "type": "string", - "description": "symbol" - }, - "timePoint": { - "type": "integer", - "description": "Timestamp (milliseconds)", - "format": "int64" - }, - "value": { - "type": "number", - "description": "Mark price" - } - }, - "required": [ - "symbol", - "timePoint", - "value" - ] - } - } - }, - "required": [ - "code", - "data" - ] - }, - "description": "", - "contentType": "json", - "mediaType": "" - } - ], - "responseExamples": [ - { - "name": "Success", - "data": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"USDT-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.504E-5\n },\n {\n \"symbol\": \"USDC-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.5049024E-5\n }\n ]\n}", - "responseId": 10356, - "ordering": 1 - } - ], - "requestBody": { - "type": "none", - "parameters": [], - "jsonSchema": { - "type": "object", - "properties": {} - }, - "example": "{\n \"currency\": \"USDT\",\n \"size\": 10,\n \"timeInForce\": \"FOK\",\n \"isIsolated\": false,\n \"isHf\": false\n}", - "mediaType": "" - }, - "description": ":::info[Description]\nThis endpoint returns the current Mark price for all margin trading pairs.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getMarkPriceList\",\"sdk-method-description\":\"This endpoint returns the current Mark price for all margin trading pairs.\",\"api-rate-limit\":10}" + "description": ":::info[Description]\nThis interface returns leveraged token information.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getETFInfo\",\"sdk-method-description\":\"This interface returns leveraged token information.\",\"api-rate-limit-weight\":3}" } }, { @@ -19484,7 +20451,6 @@ "method": "get", "path": "/api/v1/mark-price/{symbol}/current", "parameters": { - "query": [], "path": [ { "id": "symbol#0", @@ -19492,10 +20458,10 @@ "required": true, "description": "symbol", "example": "USDT-BTC", - "type": "string", - "enable": true + "type": "string" } ], + "query": [], "cookie": [], "header": [] }, @@ -19564,7 +20530,177 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint returns the current Mark price for specified margin trading pairs.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getMarkPriceDetail\",\"sdk-method-description\":\"This endpoint returns the current Mark price for specified margin trading pairs.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getMarkPriceDetail\",\"sdk-method-description\":\"This endpoint returns the current Mark price for specified margin trading pairs.\",\"api-rate-limit-weight\":2}" + } + }, + { + "name": "Get Margin Config", + "api": { + "id": "3470190", + "method": "get", + "path": "/api/v1/margin/config", + "parameters": { + "query": [], + "path": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "10354", + "code": 200, + "name": "OK", + "headers": [], + "jsonSchema": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "currencyList": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Available currencies for margin trade" + }, + "maxLeverage": { + "type": "integer", + "description": "Max. leverage available" + }, + "warningDebtRatio": { + "type": "string", + "description": "The warning debt ratio of the forced liquidation" + }, + "liqDebtRatio": { + "type": "string", + "description": "The debt ratio of the forced liquidation" + } + }, + "required": [ + "currencyList", + "maxLeverage", + "warningDebtRatio", + "liqDebtRatio" + ] + } + }, + "required": [ + "code", + "data" + ] + }, + "description": "", + "contentType": "json", + "mediaType": "" + } + ], + "responseExamples": [ + { + "name": "Success", + "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"maxLeverage\": 5,\n \"warningDebtRatio\": \"0.95\",\n \"liqDebtRatio\": \"0.97\",\n \"currencyList\": [\n \"VRA\",\n \"APT\",\n \"IOTX\",\n \"SHIB\",\n \"KDA\",\n \"BCHSV\",\n \"NEAR\",\n \"CLV\",\n \"AUDIO\",\n \"AIOZ\",\n \"FLOW\",\n \"WLD\",\n \"COMP\",\n \"MEME\",\n \"SLP\",\n \"STX\",\n \"ZRO\",\n \"QI\",\n \"PYTH\",\n \"RUNE\",\n \"DGB\",\n \"IOST\",\n \"SUI\",\n \"BCH\",\n \"CAKE\",\n \"DOT\",\n \"OMG\",\n \"POL\",\n \"GMT\",\n \"1INCH\",\n \"RSR\",\n \"NKN\",\n \"BTC\",\n \"AR\",\n \"ARB\",\n \"TON\",\n \"LISTA\",\n \"AVAX\",\n \"SEI\",\n \"FTM\",\n \"ERN\",\n \"BB\",\n \"BTT\",\n \"JTO\",\n \"ONE\",\n \"RLC\",\n \"ANKR\",\n \"SUSHI\",\n \"CATI\",\n \"ALGO\",\n \"PEPE2\",\n \"ATOM\",\n \"LPT\",\n \"BIGTIME\",\n \"CFX\",\n \"DYM\",\n \"VELO\",\n \"XPR\",\n \"SNX\",\n \"JUP\",\n \"MANA\",\n \"API3\",\n \"PYR\",\n \"ROSE\",\n \"GLMR\",\n \"SATS\",\n \"TIA\",\n \"GALAX\",\n \"SOL\",\n \"DAO\",\n \"FET\",\n \"ETC\",\n \"MKR\",\n \"WOO\",\n \"DODO\",\n \"OGN\",\n \"BNB\",\n \"ICP\",\n \"BLUR\",\n \"ETH\",\n \"ZEC\",\n \"NEO\",\n \"CELO\",\n \"REN\",\n \"MANTA\",\n \"LRC\",\n \"STRK\",\n \"ADA\",\n \"STORJ\",\n \"REQ\",\n \"TAO\",\n \"VET\",\n \"FITFI\",\n \"USDT\",\n \"DOGE\",\n \"HBAR\",\n \"SXP\",\n \"NEIROCTO\",\n \"CHR\",\n \"ORDI\",\n \"DASH\",\n \"PEPE\",\n \"ONDO\",\n \"ILV\",\n \"WAVES\",\n \"CHZ\",\n \"DOGS\",\n \"XRP\",\n \"CTSI\",\n \"JASMY\",\n \"FLOKI\",\n \"TRX\",\n \"KAVA\",\n \"SAND\",\n \"C98\",\n \"UMA\",\n \"NOT\",\n \"IMX\",\n \"WIF\",\n \"ENA\",\n \"EGLD\",\n \"BOME\",\n \"LTC\",\n \"USDC\",\n \"METIS\",\n \"WIN\",\n \"THETA\",\n \"FXS\",\n \"ENJ\",\n \"CRO\",\n \"AEVO\",\n \"INJ\",\n \"LTO\",\n \"CRV\",\n \"GRT\",\n \"DYDX\",\n \"FLUX\",\n \"ENS\",\n \"WAX\",\n \"MASK\",\n \"POND\",\n \"UNI\",\n \"AAVE\",\n \"LINA\",\n \"TLM\",\n \"BONK\",\n \"QNT\",\n \"LDO\",\n \"ALICE\",\n \"XLM\",\n \"LINK\",\n \"CKB\",\n \"LUNC\",\n \"YFI\",\n \"ETHW\",\n \"XTZ\",\n \"LUNA\",\n \"OP\",\n \"SUPER\",\n \"EIGEN\",\n \"KSM\",\n \"ELON\",\n \"EOS\",\n \"FIL\",\n \"ZETA\",\n \"SKL\",\n \"BAT\",\n \"APE\",\n \"HMSTR\",\n \"YGG\",\n \"MOVR\",\n \"PEOPLE\",\n \"KCS\",\n \"AXS\",\n \"ARPA\",\n \"ZIL\"\n ]\n }\n}", + "responseId": 10354, + "ordering": 1 + } + ], + "requestBody": { + "type": "none", + "parameters": [], + "jsonSchema": { + "type": "object", + "properties": {} + }, + "example": "{\n \"currency\": \"USDT\",\n \"size\": 10,\n \"timeInForce\": \"FOK\",\n \"isIsolated\": false,\n \"isHf\": false\n}", + "mediaType": "" + }, + "description": ":::info[Description]\nRequest the configure info of the cross margin via this endpoint.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getMarginConfig\",\"sdk-method-description\":\"Request the configure info of the cross margin via this endpoint.\",\"api-rate-limit-weight\":25}" + } + }, + { + "name": "Get Mark Price List", + "api": { + "id": "3470192", + "method": "get", + "path": "/api/v3/mark-price/all-symbols", + "parameters": { + "query": [], + "path": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "10356", + "code": 200, + "name": "OK", + "headers": [], + "jsonSchema": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "symbol": { + "type": "string", + "description": "symbol" + }, + "timePoint": { + "type": "integer", + "description": "Timestamp (milliseconds)", + "format": "int64" + }, + "value": { + "type": "number", + "description": "Mark price" + } + }, + "required": [ + "symbol", + "timePoint", + "value" + ] + } + } + }, + "required": [ + "code", + "data" + ] + }, + "description": "", + "contentType": "json", + "mediaType": "" + } + ], + "responseExamples": [ + { + "name": "Success", + "data": "{\n \"code\": \"200000\",\n \"data\": [\n {\n \"symbol\": \"USDT-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.504E-5\n },\n {\n \"symbol\": \"USDC-BTC\",\n \"timePoint\": 1729676522000,\n \"value\": 1.5049024E-5\n }\n ]\n}", + "responseId": 10356, + "ordering": 1 + } + ], + "requestBody": { + "type": "none", + "parameters": [], + "jsonSchema": { + "type": "object", + "properties": {} + }, + "example": "{\n \"currency\": \"USDT\",\n \"size\": 10,\n \"timeInForce\": \"FOK\",\n \"isIsolated\": false,\n \"isHf\": false\n}", + "mediaType": "" + }, + "description": ":::info[Description]\nThis endpoint returns the current Mark price for all margin trading pairs.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getMarkPriceList\",\"sdk-method-description\":\"This endpoint returns the current Mark price for all margin trading pairs.\",\"api-rate-limit-weight\":10}" } }, { @@ -19602,19 +20738,19 @@ }, "symbolName": { "type": "string", - "description": "symbol name" + "description": "Symbol name" }, "baseCurrency": { "type": "string", - "description": "Base currency,e.g. BTC." + "description": "Base currency, e.g. BTC." }, "quoteCurrency": { "type": "string", - "description": "Quote currency,e.g. USDT." + "description": "Quote currency, e.g. USDT." }, "maxLeverage": { "type": "integer", - "description": "Max leverage of this symbol" + "description": "Max. leverage of this symbol" }, "flDebtRatio": { "type": "string" @@ -19692,7 +20828,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint allows querying the configuration of isolated margin symbol.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getIsolatedMarginSymbols\",\"sdk-method-description\":\"This endpoint allows querying the configuration of isolated margin symbol.\",\"api-rate-limit\":3}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getIsolatedMarginSymbols\",\"sdk-method-description\":\"This endpoint allows querying the configuration of isolated margin symbol.\",\"api-rate-limit-weight\":3}" } } ] @@ -19731,11 +20867,11 @@ "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." + "description": "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order." }, "loanApplyId": { "type": "string", - "description": "Borrow order id. The field is returned only after placing the order under the mode of Auto-Borrow." + "description": "Borrow order ID. The field is returned only after placing the order under the mode of Auto-Borrow." }, "borrowSize": { "type": "string", @@ -19743,7 +20879,7 @@ }, "clientOid": { "type": "string", - "description": "The user self-defined order id." + "description": "The user self-defined order ID." } }, "required": [ @@ -19780,14 +20916,14 @@ "properties": { "clientOid": { "type": "string", - "description": "Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.\n\nPlease remember the orderId created by the service provider, it used to check for updates in order status.", + "description": "Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.\n\nPlease remember the orderId created by the service provider, it used to check for updates in order status.", "examples": [ "5c52e11203aa677f33e493fb" ] }, "side": { "type": "string", - "description": "specify if the order is to 'buy' or 'sell'", + "description": "Specify if the order is to 'buy' or 'sell'.", "enum": [ "buy", "sell" @@ -19819,7 +20955,7 @@ }, "type": { "type": "string", - "description": "specify if the order is an 'limit' order or 'market' order. \n\nThe type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.\n\nWhen placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.\n\nUnlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged.", + "description": "Specify if the order is a 'limit' order or 'market' order. \n\nThe type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.\n\nWhen placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.\n\nUnlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged.", "enum": [ "limit", "market" @@ -19876,7 +21012,7 @@ }, "size": { "type": "string", - "description": "Specify quantity for order\n\nWhen **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.\n\nWhen **type** is market, select one out of two: size or funds" + "description": "Specify quantity for order.\n\nWhen **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.\n\nWhen **type** is market, select one out of two: size or funds" }, "timeInForce": { "type": "string", @@ -19933,7 +21069,7 @@ "cancelAfter": { "type": "integer", "format": "int64", - "description": "Cancel after n seconds,the order timing strategy is GTT" + "description": "Cancel after n seconds, the order timing strategy is GTT" }, "funds": { "type": "string", @@ -19941,7 +21077,7 @@ }, "isIsolated": { "type": "boolean", - "description": "true - isolated margin ,false - cross margin. defult as false", + "description": "True - isolated margin; false - cross margin. Default is false", "default": false }, "autoBorrow": { @@ -19951,7 +21087,7 @@ }, "autoRepay": { "type": "boolean", - "description": "AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount.", + "description": "AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount.", "default": false } }, @@ -19964,8 +21100,8 @@ "example": "//limit order\n{\n \"type\": \"limit\",\n \"symbol\": \"BTC-USDT\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"remark\": \"order remarks\"\n}\n\n//market order 1\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"size\": \"0.00001\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n\n//market order 2\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"funds\": \"1\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n", "mediaType": "" }, - "description": ":::info[Description]\nPlace order to the Cross-margin or Isolated-margin 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.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | Yes | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| side | String | Yes | `buy` or `sell` |\n| type | String | No | Order type `limit` and `market`, defult is limit |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| isIsolated | boolean | No | true - isolated margin ,false - cross margin. defult as false |\n| autoBorrow | boolean | No | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | No | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOrder\",\"sdk-method-description\":\"Place order to the Cross-margin or Isolated-margin 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.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nPlace order in the Cross-margin or Isolated-margin 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.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | Yes | Client Order ID, unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| side | String | Yes | ‘buy’ or ‘sell’ |\n| type | String | No | Order type ‘limit’ and ‘market’, default is limit |\n| stp | String | No | self trade prevention is divided into four strategies: ‘CN’, ‘CO’, ‘CB’, and ‘DC’ |\n| isIsolated | boolean | No | true - isolated margin, false - cross margin. Default is false |\n| autoBorrow | boolean | No | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | No | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n**Additional Request Parameters Required by ‘limit’ Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy ‘GTC’, ‘GTT’, ‘IOC’, ‘FOK’ (the default is ‘GTC’) |\n| cancelAfter | long | No | Cancel after ‘n’ seconds, the order timing strategy is ‘GTT’ |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is ‘IOC’ or ‘FOK’ |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by ‘market’ orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n| funds | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or canceled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled (already canceled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly canceled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: If the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: This feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOrder\",\"sdk-method-description\":\"Place order in the Cross-margin or Isolated-margin 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.\",\"api-rate-limit-weight\":5}" } }, { @@ -19997,7 +21133,7 @@ "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." + "description": "The unique order ID generated by the trading system, which can be used later for further actions such as canceling the order." }, "loanApplyId": { "type": "string", @@ -20009,7 +21145,7 @@ }, "clientOid": { "type": "string", - "description": "The user self-defined order id." + "description": "The user self-defined order ID." } }, "required": [ @@ -20046,14 +21182,14 @@ "properties": { "clientOid": { "type": "string", - "description": "Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.\n\nPlease remember the orderId created by the service provider, it used to check for updates in order status.", + "description": "Client Order ID: The ClientOid field is a unique ID created by the user (we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters.\n\nPlease remember the orderId created by the service provider, it used to check for updates in order status.", "examples": [ "5c52e11203aa677f33e493fb" ] }, "side": { "type": "string", - "description": "specify if the order is to 'buy' or 'sell'", + "description": "Specify if the order is to 'buy' or 'sell'.", "enum": [ "buy", "sell" @@ -20085,7 +21221,7 @@ }, "type": { "type": "string", - "description": "specify if the order is an 'limit' order or 'market' order. \n\nThe type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.\n\nWhen placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.\n\nUnlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price, you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged.", + "description": "Specify if the order is a 'limit' order or 'market' order. \n\nThe type of order you specify when you place your order determines whether or not you need to request other parameters and also affects the execution of the matching engine.\n\nWhen placing a limit order, you must specify a price and size. The system will try to match the order according to market price or a price better than market price. If the order cannot be immediately matched, it will stay in the order book until it is matched or the user cancels.\n\nUnlike limit orders, the price for market orders fluctuates with market prices. When placing a market order, you do not need to specify a price; you only need to specify a quantity. Market orders are filled immediately and will not enter the order book. All market orders are takers and a taker fee will be charged.", "enum": [ "limit", "market" @@ -20142,7 +21278,7 @@ }, "size": { "type": "string", - "description": "Specify quantity for order\n\nWhen **type** is limit, size refers to the amount of trading targets (the asset name written in front) for the trading pair. Teh Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.\n\nWhen **type** is market, select one out of two: size or funds" + "description": "Specify quantity for order.\n\nWhen **type** is limited, size refers to the amount of trading targets (the asset name written in front) for the trading pair. The Size must be based on the baseIncrement of the trading pair. The baseIncrement represents the precision for the trading pair. The size of an order must be a positive-integer multiple of baseIncrement and must be between baseMinSize and baseMaxSize.\n\nWhen **type** is market, select one out of two: size or funds" }, "timeInForce": { "type": "string", @@ -20199,7 +21335,7 @@ "cancelAfter": { "type": "integer", "format": "int64", - "description": "Cancel after n seconds,the order timing strategy is GTT" + "description": "Cancel after n seconds, the order timing strategy is GTT" }, "funds": { "type": "string", @@ -20207,7 +21343,7 @@ }, "isIsolated": { "type": "boolean", - "description": "true - isolated margin ,false - cross margin. defult as false", + "description": "True - isolated margin; false - cross margin. Default is false", "default": false }, "autoBorrow": { @@ -20217,7 +21353,7 @@ }, "autoRepay": { "type": "boolean", - "description": "AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount.", + "description": "AutoPay allows the return of borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount.", "default": false } }, @@ -20230,8 +21366,8 @@ "example": "//limit order\n{\n \"type\": \"limit\",\n \"symbol\": \"BTC-USDT\",\n \"side\": \"buy\",\n \"price\": \"50000\",\n \"size\": \"0.00001\",\n \"clientOid\": \"5c52e11203aa677f33e493fb\",\n \"remark\": \"order remarks\"\n}\n\n//market order 1\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"size\": \"0.00001\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n\n//market order 2\n// {\n// \"type\": \"market\",\n// \"symbol\": \"BTC-USDT\",\n// \"side\": \"buy\",\n// \"funds\": \"1\",\n// \"clientOid\": \"5c52e11203aa677f33e493fc\",\n// \"remark\": \"order remarks\"\n// }\n", "mediaType": "" }, - "description": ":::info[Description]\nOrder test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | Yes | Client Order Id,unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| side | String | Yes | `buy` or `sell` |\n| type | String | No | Order type `limit` and `market`, defult is limit |\n| stp | String | No | self trade prevention is divided into four strategies: `CN`, `CO`, `CB` , and `DC` |\n| isIsolated | boolean | No | true - isolated margin ,false - cross margin. defult as false |\n| autoBorrow | boolean | No | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | No | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n**Additional Request Parameters Required by `limit` Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy `GTC`, `GTT`, `IOC`, `FOK` (The default is `GTC`) |\n| cancelAfter | long | No | Cancel after `n` seconds,the order timing strategy is `GTT` |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is `IOC` or `FOK` |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by `market` orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: `size` or `funds`) |\n| funds | String | No | (Select one out of two: `size` or `funds`) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or cancelled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled(already cancelled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly cancelled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: if the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: this feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOrderTest\",\"sdk-method-description\":\" Order test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nOrder test endpoint: This endpoint’s request and return parameters are identical to the order endpoint, and can be used to verify whether the signature is correct, among other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\n:::\n\n:::tip[Tips]\nPlease note that once your order enters the order book, the system will freeze the handling fees for the order ahead of time.\n\nBefore placing orders, please be sure to fully understand the meaning of the parameters for each trading pair.\n:::\n\n:::tip[Tips]\nThe maximum number of active orders per account is 2000, with a maximum of 200 active orders per trading pair.\n:::\n\n\n**Public order placement request parameters**\n\n| Param | Type | Mandatory | Description |\n| --------- | ------ | --------- | ----------- |\n| clientOid | String | Yes | Client Order ID, unique identifier created by the user, the use of UUID is recommended |\n| symbol | String | Yes | symbol |\n| side | String | Yes | ‘buy’ or ‘sell’ |\n| type | String | No | Order type ‘limit’ and ‘market’, default is limit |\n| stp | String | No | self trade prevention is divided into four strategies: ‘CN’, ‘CO’, ‘CB’, and ‘DC’ |\n| isIsolated | boolean | No | true - isolated margin, false - cross margin. Default is false |\n| autoBorrow | boolean | No | When Margin Account has inefficient balance, our system autoborrows inefficient assets and opens positions according to the lowest market interest rate. |\n| autoRepay | boolean | No | AutoPay allows returning borrowed assets when you close a position. Our system automatically triggers the repayment and the maximum repayment amount equals to the filled-order amount. |\n\n**Additional Request Parameters Required by ‘limit’ Orders**\n\n| Param | Type | Mandatory | Description |\n| ----------- | ------- | --------- | ----------- |\n| price | String | Yes | Specify price for currency |\n| size | String | Yes | Specify quantity for currency |\n| timeInForce | String | No | Order timing strategy ‘GTC’, ‘GTT’, ‘IOC’, ‘FOK’ (the default is ‘GTC’) |\n| cancelAfter | long | No | Cancel after ‘n’ seconds, the order timing strategy is ‘GTT’ |\n| postOnly | boolean | No | passive order labels, this is disabled when the order timing strategy is ‘IOC’ or ‘FOK’ |\n| hidden | boolean | No | Hidden or not (not shown in order book) |\n| iceberg | boolean | No | Whether or not only visible portions of orders are shown in iceberg orders |\n| visibleSize | String | No | Maximum visible quantity in iceberg orders |\n\n**Additional request parameters required by ‘market’ orders**\n\n| Param | Type | Mandatory | Description |\n| ----- | ------ | --------- | ------------------------------------------ |\n| size | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n| funds | String | No | (Select one out of two: ‘size’ or ‘funds’) |\n\n\n**Hold**\n\nFor limit price purchase orders, we will hold the amount of funds (price * size) required for your purchase order. Similarly, for limit price sell orders, we will also hold you sell order assets. When the transaction is executed, the service fees will be calculated. If you cancel a portion of a filled or unfilled order, then the remaining funds or amounts will be released and returned to your account. For market price buy/sell orders that require specific funds, we will hold the required funds in from your account. If only the size is specified, we may freeze (usually for a very short amount of time) all of the funds in your account prior to the order being filled or canceled.\n\n\n**Order Lifecycle**\n\nWhen an order placement request is successful (the matching engine receives the order) or denied (due to there being insufficient funds or illegal parameter values, etc.), the system will respond to the HTTP request. When an order is successfully placed, the order ID is returned. The order will be matched, which could result in it being fully or partially filled. When an order is fully or partially filled, the remaining portions of the order will be in an active state awaiting to be matched (this does not include IOC orders). Orders that are fully or partially filled (already canceled) will be put into the “done” state.\n\nUsers that have subscribed to the Market Data Channel can use the order ID (orderId) and client ID (clientOid) to identify messages.\n\n**Price Protection Mechanisms**\n\nPrice protection mechanisms ae enabled for order placements. Rules are detailed below:\n\n- If the spot trading market order/limit order placed by the user can be directly matched with an order in the current order book, the system will judge whether deviation between the price corresponding to the transaction depth and the spread exceeds the threshold value (the threshold value can be obtained using the symbol API endpoint);\n\n- If it is exceeded, for limit orders, the order will be directly canceled;\n\n- If it is a market order, then the system will partially execute the order. The execution limit will be the order size within the price range corresponding to the threshold value. The remaining orders will not be filled.\n\nFor example: If the threshold value is 10%, when a user places a market price purchase order in the KCS/USDT trading market for 10,000 USDT (the selling price is currently 1.20000), the system will determine that after the order is completely filled, the final price will be 1.40000. (1.40000-1.20000)/1.20000=16.7%>10%. The threshold value is 1.32000. The user’s market price purchase order will be filled only to a maximum of 1.32000. The remaining order portions will not be matched with orders in the order book. Note: This feature may not be able to determine depth with complete accuracy. If your order is not completely filled, it may be because the portion exceeding the threshold value was not filled.\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOrderTest\",\"sdk-method-description\":\" Order test endpoint: This endpoint’s request and return parameters are identical to the order endpoint, and can be used to verify whether the signature is correct, among other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\",\"api-rate-limit-weight\":5}" } }, { @@ -20289,7 +21425,7 @@ "properties": { "orderId": { "type": "string", - "description": "order id" + "description": "Order id" } }, "required": [ @@ -20325,8 +21461,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint can be used to cancel a margin order by orderId.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderByOrderId\",\"sdk-method-description\":\"This endpoint can be used to cancel a margin order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nThis endpoint can be used to cancel a margin order by orderId.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderByOrderId\",\"sdk-method-description\":\"This endpoint can be used to cancel a margin order by orderId. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket.\",\"api-rate-limit-weight\":5}" } }, { @@ -20341,7 +21477,7 @@ "id": "clientOid#0", "name": "clientOid", "required": true, - "description": "Client Order Id,unique identifier created by the user", + "description": "Client Order Id, unique identifier created by the user", "example": "5c52e11203aa677f33e1493fb", "type": "string" } @@ -20384,7 +21520,7 @@ "properties": { "clientOid": { "type": "string", - "description": "Client Order Id,unique identifier created by the user" + "description": "Client Order Id, unique identifier created by the user" } }, "required": [ @@ -20420,8 +21556,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint can be used to cancel a margin order by clientOid.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderByClientOid\",\"sdk-method-description\":\"This endpoint can be used to cancel a margin order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nThis endpoint can be used to cancel a margin order by clientOid.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderByClientOid\",\"sdk-method-description\":\"This endpoint can be used to cancel a margin order by clientOid. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket.\",\"api-rate-limit-weight\":5}" } }, { @@ -20524,8 +21660,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis interface can cancel all open Margin orders by symbol\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelAllOrdersBySymbol\",\"sdk-method-description\":\"This interface can cancel all open Margin orders by symbol This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to websocket.\",\"api-rate-limit\":10}" + "description": ":::info[Description]\nThis interface can cancel all open Margin orders by symbol.\nThis endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelAllOrdersBySymbol\",\"sdk-method-description\":\"This interface can cancel all open Margin orders by symbol. This endpoint only sends cancellation requests. The results of the requests must be obtained by checking the order status or subscribing to Websocket.\",\"api-rate-limit-weight\":10}" } }, { @@ -20629,8 +21765,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis interface can query all Margin symbol that has active orders\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getSymbolsWithOpenOrder\",\"sdk-method-description\":\"This interface can query all Margin symbol that has active orders\",\"api-rate-limit\":2}" + "description": ":::info[Description]\nThis interface can query all Margin symbols that have active orders.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getSymbolsWithOpenOrder\",\"sdk-method-description\":\"This interface can query all Margin symbols that have active orders.\"}" } }, { @@ -20640,6 +21776,7 @@ "method": "get", "path": "/api/v3/hf/margin/orders/active", "parameters": { + "path": [], "query": [ { "id": "M9bgPS6vOj", @@ -20655,8 +21792,7 @@ "ETH-USDT", "KCS-USDT" ] - }, - "enable": true + } }, { "id": "r1Dab5EJcW", @@ -20683,11 +21819,9 @@ "description": "" } ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -20726,7 +21860,7 @@ }, "type": { "type": "string", - "description": "Specify if the order is an 'limit' order or 'market' order. ", + "description": "Specify if the order is a 'limit' order or 'market' order. ", "enum": [ "limit", "market" @@ -20766,11 +21900,11 @@ }, "price": { "type": "string", - "description": "Order price" + "description": "Order Price" }, "size": { "type": "string", - "description": "Order size" + "description": "Order Size" }, "funds": { "type": "string", @@ -20786,11 +21920,11 @@ }, "fee": { "type": "string", - "description": "trading fee" + "description": "Trading fee" }, "feeCurrency": { "type": "string", - "description": "currency used to calculate trading fee" + "description": "Currency used to calculate trading fee" }, "stp": { "type": "string", @@ -20867,15 +22001,15 @@ }, "postOnly": { "type": "boolean", - "description": "Whether its a postOnly order." + "description": "Whether it’s a postOnly order." }, "hidden": { "type": "boolean", - "description": "Whether its a hidden order." + "description": "Whether it’s a hidden order." }, "iceberg": { "type": "boolean", - "description": "Whether its a iceberg order." + "description": "Whether it’s a iceberg order." }, "visibleSize": { "type": "string", @@ -20890,7 +22024,7 @@ }, "clientOid": { "type": "string", - "description": "Client Order Id,unique identifier created by the user" + "description": "Client Order Id, unique identifier created by the user" }, "remark": { "type": "string", @@ -20918,7 +22052,7 @@ }, "inOrderBook": { "type": "boolean", - "description": "Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook" + "description": "Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook" }, "cancelledSize": { "type": "string", @@ -20938,11 +22072,11 @@ }, "tax": { "type": "string", - "description": "Users in some regions need query this field" + "description": "Users in some regions have this field" }, "active": { "type": "boolean", - "description": "Order status: true-The status of the order isactive; false-The status of the order is done" + "description": "Order status: true-The status of the order is active; false-The status of the order is done" } }, "required": [ @@ -20975,10 +22109,10 @@ "cancelledFunds", "remainSize", "remainFunds", - "tax", "active", "createdAt", - "lastUpdatedAt" + "lastUpdatedAt", + "tax" ] } } @@ -21011,8 +22145,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis interface is to obtain all Margin active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order.\n\nAfter the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nFor high-frequency trading users, we recommend locally caching, maintaining your own order records, and using market data streams to update your order information in real time.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOpenOrders\",\"sdk-method-description\":\"This interface is to obtain all Margin active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit\":4}" + "description": ":::info[Description]\nThis interface is to obtain all Margin active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order.\n\nAfter the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nFor high-frequency trading users, we recommend caching locally, maintaining your own order records, and using market data streams to update your order information in real time.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOpenOrders\",\"sdk-method-description\":\"This interface is to obtain all Margin active order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit-weight\":4}" } }, { @@ -21022,6 +22156,7 @@ "method": "get", "path": "/api/v3/hf/margin/orders/done", "parameters": { + "path": [], "query": [ { "id": "M9bgPS6vOj", @@ -21037,8 +22172,7 @@ "ETH-USDT", "KCS-USDT" ] - }, - "enable": true + } }, { "id": "Cs1ItDm2bR", @@ -21065,14 +22199,13 @@ "description": "" } ] - }, - "enable": true + } }, { "id": "sTtMCE9Jhf", "name": "side", "required": false, - "description": "specify if the order is to 'buy' or 'sell'", + "description": "Specify if the order is to 'buy' or 'sell'.", "type": "string", "schema": { "type": "string", @@ -21092,14 +22225,13 @@ "description": "" } ] - }, - "enable": true + } }, { "id": "QaBSxyasEm", "name": "type", "required": false, - "description": "specify if the order is an 'limit' order or 'market' order. ", + "description": "Specify if the order is a 'limit' order or 'market' order. ", "type": "string", "schema": { "type": "string", @@ -21119,27 +22251,25 @@ "description": "" } ] - }, - "enable": true + } }, { "id": "kkvuIGVxs6", "name": "lastId", "required": false, - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page.", + "description": "The ID of the last set of data from the previous data batch. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page.", "example": "254062248624417", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "heQ8W6yKwm", "name": "limit", "required": false, - "description": "Default20,Max100", + "description": "Default20, Max100", "example": "20", "type": "integer", "schema": { @@ -21147,37 +22277,33 @@ "default": 20, "minimum": 1, "maximum": 100 - }, - "enable": true + } }, { "id": "Djtx6oC9gm", "name": "startAt", "required": false, - "description": "Start time (milisecond)", + "description": "Start time (milliseconds)", "example": "1728663338000", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "K9IMpKw8u2", "name": "endAt", "required": false, - "description": "End time (milisecond)", + "description": "End time (milliseconds)", "example": "1728692138000", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -21198,7 +22324,7 @@ "properties": { "lastId": { "type": "integer", - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page.", + "description": "The ID of the last set of data from the previous data batch. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page.", "format": "int64" }, "items": { @@ -21224,7 +22350,7 @@ }, "type": { "type": "string", - "description": "Specify if the order is an 'limit' order or 'market' order. ", + "description": "Specify if the order is a 'limit' order or 'market' order. ", "enum": [ "limit", "market" @@ -21248,11 +22374,11 @@ }, "price": { "type": "string", - "description": "Order price" + "description": "Order Price" }, "size": { "type": "string", - "description": "Order size" + "description": "Order Size" }, "funds": { "type": "string", @@ -21272,7 +22398,7 @@ }, "feeCurrency": { "type": "string", - "description": "currency used to calculate trading fee" + "description": "Currency used to calculate trading fee" }, "stp": { "type": "string", @@ -21349,15 +22475,15 @@ }, "postOnly": { "type": "boolean", - "description": "Whether its a postOnly order." + "description": "Whether it’s a postOnly order." }, "hidden": { "type": "boolean", - "description": "Whether its a hidden order." + "description": "Whether it’s a hidden order." }, "iceberg": { "type": "boolean", - "description": "Whether its a iceberg order." + "description": "Whether it’s a iceberg order." }, "visibleSize": { "type": "string", @@ -21372,7 +22498,7 @@ }, "clientOid": { "type": "string", - "description": "Client Order Id,unique identifier created by the user" + "description": "Client Order Id, unique identifier created by the user" }, "remark": { "type": "string", @@ -21400,7 +22526,7 @@ }, "inOrderBook": { "type": "boolean", - "description": "Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook" + "description": "Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook" }, "cancelledSize": { "type": "string", @@ -21420,11 +22546,11 @@ }, "tax": { "type": "string", - "description": "Users in some regions need query this field" + "description": "Users in some regions have this field" }, "active": { "type": "boolean", - "description": "Order status: true-The status of the order isactive; false-The status of the order is done" + "description": "Order status: true-The status of the order is active; false-The status of the order is done" } }, "required": [ @@ -21499,8 +22625,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis interface is to obtain all Margin Closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order.\n\nAfter the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 _ 24 hours (ie: from the current time to 3 _ 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getClosedOrders\",\"sdk-method-description\":\"This interface is to obtain all Margin closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit\":10}" + "description": ":::info[Description]\nThis interface is to obtain all Margin Closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order.\n\nAfter the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 * 24 hours (i.e.: from the current time to 3 * 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getClosedOrders\",\"sdk-method-description\":\"This interface is to obtain all Margin closed order lists, and the return value of the active order interface is the paged data of all uncompleted order lists. The returned data is sorted in descending order according to the latest update time of the order. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit-weight\":10}" } }, { @@ -21510,6 +22636,7 @@ "method": "get", "path": "/api/v3/hf/margin/fills", "parameters": { + "path": [], "query": [ { "id": "M9bgPS6vOj", @@ -21525,8 +22652,7 @@ "ETH-USDT", "KCS-USDT" ] - }, - "enable": true + } }, { "id": "EfWDHYz4tE", @@ -21553,22 +22679,20 @@ "description": "" } ] - }, - "enable": true + } }, { "id": "Bc6ZDrZFdp", "name": "orderId", "required": false, - "description": "The unique order id generated by the trading system\n(If orderId is specified,please ignore the other query parameters)", - "type": "string", - "enable": true + "description": "The unique order id generated by the trading system\n(If orderId is specified, please ignore the other query parameters)", + "type": "string" }, { "id": "sTtMCE9Jhf", "name": "side", "required": false, - "description": "specify if the order is to 'buy' or 'sell'", + "description": "Specify if the order is to 'buy' or 'sell'.", "type": "string", "schema": { "type": "string", @@ -21588,14 +22712,13 @@ "description": "" } ] - }, - "enable": true + } }, { "id": "QaBSxyasEm", "name": "type", "required": false, - "description": "specify if the order is an 'limit' order or 'market' order. ", + "description": "Specify if the order is a 'limit' order or 'market' order. ", "type": "string", "schema": { "type": "string", @@ -21615,65 +22738,59 @@ "description": "" } ] - }, - "enable": true + } }, { "id": "kkvuIGVxs6", "name": "lastId", "required": false, - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page.", + "description": "The ID of the last set of data from the previous data batch. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page.", "example": "254062248624417", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "heQ8W6yKwm", "name": "limit", "required": false, - "description": "Default100,Max200", + "description": "Default20, Max100", "example": "100", "type": "integer", "schema": { "type": "integer", "default": 20, "minimum": 1, - "maximum": 200 - }, - "enable": true + "maximum": 100 + } }, { "id": "Djtx6oC9gm", "name": "startAt", "required": false, - "description": "Start time (milisecond)", + "description": "Start time (milliseconds)", "example": "1728663338000", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "K9IMpKw8u2", "name": "endAt", "required": false, - "description": "End time (milisecond)", + "description": "End time (milliseconds)", "example": "1728692138000", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -21699,7 +22816,7 @@ "properties": { "id": { "type": "integer", - "description": "Id of transaction detail", + "description": "ID of transaction detail", "format": "int64" }, "symbol": { @@ -21713,7 +22830,7 @@ }, "tradeId": { "type": "integer", - "description": "Trade Id, symbol latitude increment", + "description": "Trade ID, symbol latitude increment", "format": "int64" }, "orderId": { @@ -21722,7 +22839,7 @@ }, "counterOrderId": { "type": "string", - "description": "Counterparty order Id" + "description": "Counterparty order ID" }, "side": { "type": "string", @@ -21769,11 +22886,11 @@ }, "price": { "type": "string", - "description": "Order price" + "description": "Order Price" }, "size": { "type": "string", - "description": "Order size" + "description": "Order Size" }, "funds": { "type": "string", @@ -21789,7 +22906,7 @@ }, "feeCurrency": { "type": "string", - "description": "currency used to calculate trading fee" + "description": "Currency used to calculate trading fee" }, "stop": { "type": "string", @@ -21801,15 +22918,15 @@ }, "tax": { "type": "string", - "description": "Users in some regions need query this field" + "description": "Users in some regions have this field" }, "taxRate": { "type": "string", - "description": "Tax Rate, Users in some regions need query this field" + "description": "Tax Rate: Users in some regions must query this field" }, "type": { "type": "string", - "description": "Specify if the order is an 'limit' order or 'market' order. ", + "description": "Specify if the order is a 'limit' order or 'market' order. ", "enum": [ "limit", "market" @@ -21858,7 +22975,7 @@ }, "lastId": { "type": "integer", - "description": "The id of the last set of data from the previous batch of data. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId,which can be used as a query parameter to look up new data from the next page.", + "description": "The ID of the last set of data from the previous data batch. By default, the latest information is given.\nlastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page.", "format": "int64" } }, @@ -21896,8 +23013,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint can be used to obtain a list of the latest Margin transaction details. \nThe returned data is sorted in descending order according to the latest update time of the order.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 _ 24 hours (ie: from the current time to 3 _ 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getTradeHistory\",\"sdk-method-description\":\"This endpoint can be used to obtain a list of the latest Margin transaction details. The returned data is sorted in descending order according to the latest update time of the order.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nThis endpoint can be used to obtain a list of the latest Margin transaction details. \nThe returned data is sorted in descending order according to the latest update time of the order.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 * 24 hours (i.e.: from the current time to 3 * 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getTradeHistory\",\"sdk-method-description\":\"This endpoint can be used to obtain a list of the latest Margin transaction details. The returned data is sorted in descending order according to the latest update time of the order.\",\"api-rate-limit-weight\":5}" } }, { @@ -21907,6 +23024,16 @@ "method": "get", "path": "/api/v3/hf/margin/orders/{orderId}", "parameters": { + "path": [ + { + "id": "orderId#0", + "name": "orderId", + "required": true, + "description": "The unique order id generated by the trading system", + "example": "671667306afcdb000723107f", + "type": "string" + } + ], "query": [ { "id": "M9bgPS6vOj", @@ -21922,19 +23049,7 @@ "ETH-USDT", "KCS-USDT" ] - }, - "enable": true - } - ], - "path": [ - { - "id": "orderId#0", - "name": "orderId", - "required": true, - "description": "The unique order id generated by the trading system", - "example": "671667306afcdb000723107f", - "type": "string", - "enable": true + } } ], "cookie": [], @@ -21973,7 +23088,7 @@ }, "type": { "type": "string", - "description": "Specify if the order is an 'limit' order or 'market' order. ", + "description": "Specify if the order is a 'limit' order or 'market' order. ", "enum": [ "limit", "market" @@ -22013,11 +23128,11 @@ }, "price": { "type": "string", - "description": "Order price" + "description": "Order Price" }, "size": { "type": "string", - "description": "Order size" + "description": "Order Size" }, "funds": { "type": "string", @@ -22037,7 +23152,7 @@ }, "feeCurrency": { "type": "string", - "description": "currency used to calculate trading fee" + "description": "Currency used to calculate trading fee" }, "stp": { "type": "string", @@ -22114,15 +23229,15 @@ }, "postOnly": { "type": "boolean", - "description": "Whether its a postOnly order." + "description": "Whether it’s a postOnly order." }, "hidden": { "type": "boolean", - "description": "Whether its a hidden order." + "description": "Whether it’s a hidden order." }, "iceberg": { "type": "boolean", - "description": "Whether its a iceberg order." + "description": "Whether it’s a iceberg order." }, "visibleSize": { "type": "string", @@ -22137,7 +23252,7 @@ }, "clientOid": { "type": "string", - "description": "Client Order Id,unique identifier created by the user" + "description": "Client Order Id, unique identifier created by the user" }, "remark": { "type": "string", @@ -22165,7 +23280,7 @@ }, "inOrderBook": { "type": "boolean", - "description": "Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook" + "description": "Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook" }, "cancelledSize": { "type": "string", @@ -22185,11 +23300,11 @@ }, "tax": { "type": "string", - "description": "Users in some regions need query this field" + "description": "Users in some regions have this field" }, "active": { "type": "boolean", - "description": "Order status: true-The status of the order isactive; false-The status of the order is done" + "description": "Order status: true-The status of the order is active; false-The status of the order is done" } }, "required": [ @@ -22258,8 +23373,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint can be used to obtain information for a single Margin order using the order id.\n\nAfter the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 _ 24 hours (ie: from the current time to 3 _ 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOrderByOrderId\",\"sdk-method-description\":\"This endpoint can be used to obtain information for a single Margin order using the order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nThis endpoint can be used to obtain information for a single Margin order using the order ID.\n\nAfter the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 * 24 hours (i.e.: from the current time to 3 * 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOrderByOrderId\",\"sdk-method-description\":\"This endpoint can be used to obtain information for a single Margin order using the order ID. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit-weight\":5}" } }, { @@ -22269,6 +23384,16 @@ "method": "get", "path": "/api/v3/hf/margin/orders/client-order/{clientOid}", "parameters": { + "path": [ + { + "id": "clientOid#0", + "name": "clientOid", + "required": true, + "description": "Client Order Id, unique identifier created by the user", + "example": "5c52e11203aa677f33e493fb", + "type": "string" + } + ], "query": [ { "id": "M9bgPS6vOj", @@ -22284,19 +23409,7 @@ "ETH-USDT", "KCS-USDT" ] - }, - "enable": true - } - ], - "path": [ - { - "id": "clientOid#0", - "name": "clientOid", - "required": true, - "description": "Client Order Id,unique identifier created by the user", - "example": "5c52e11203aa677f33e493fb", - "type": "string", - "enable": true + } } ], "cookie": [], @@ -22335,7 +23448,7 @@ }, "type": { "type": "string", - "description": "Specify if the order is an 'limit' order or 'market' order. ", + "description": "Specify if the order is a 'limit' order or 'market' order. ", "enum": [ "limit", "market" @@ -22375,11 +23488,11 @@ }, "price": { "type": "string", - "description": "Order price" + "description": "Order Price" }, "size": { "type": "string", - "description": "Order size" + "description": "Order Size" }, "funds": { "type": "string", @@ -22399,7 +23512,7 @@ }, "feeCurrency": { "type": "string", - "description": "currency used to calculate trading fee" + "description": "Currency used to calculate trading fee" }, "stp": { "type": "string", @@ -22476,15 +23589,15 @@ }, "postOnly": { "type": "boolean", - "description": "Whether its a postOnly order." + "description": "Whether it’s a postOnly order." }, "hidden": { "type": "boolean", - "description": "Whether its a hidden order." + "description": "Whether it’s a hidden order." }, "iceberg": { "type": "boolean", - "description": "Whether its a iceberg order." + "description": "Whether it’s a iceberg order." }, "visibleSize": { "type": "string", @@ -22499,7 +23612,7 @@ }, "clientOid": { "type": "string", - "description": "Client Order Id,unique identifier created by the user" + "description": "Client Order Id, unique identifier created by the user" }, "remark": { "type": "string", @@ -22527,7 +23640,7 @@ }, "inOrderBook": { "type": "boolean", - "description": "Whether to enter the orderbook: true: enter the orderbook; false: not enter the orderbook" + "description": "Whether to enter the orderbook: True: enter the orderbook; False: do not enter the orderbook" }, "cancelledSize": { "type": "string", @@ -22547,11 +23660,11 @@ }, "tax": { "type": "string", - "description": "Users in some regions need query this field" + "description": "Users in some regions have this field" }, "active": { "type": "boolean", - "description": "Order status: true-The status of the order isactive; false-The status of the order is done" + "description": "Order status: true-The status of the order is active; false-The status of the order is done" } }, "required": [ @@ -22619,8 +23732,8 @@ "example": "{\n \"symbol\": \"BTC-USDT\",\n \"orderId\": \"670fd33bf9406e0007ab3945\",\n \"newPrice\": \"30000\",\n \"newSize\": \"0.0001\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint can be used to obtain information for a single Margin order using the client order id.\n\nAfter the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 _ 24 hours (ie: from the current time to 3 _ 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOrderByClientOid\",\"sdk-method-description\":\"This endpoint can be used to obtain information for a single Margin order using the client order id. After the user successfully places an order, the order is in Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nThis endpoint can be used to obtain information for a single Margin order using the client order ID.\n\nAfter the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\n:::\n\n:::tip[Tips]\nIf the order is not an active order, you can only get data within the time range of 3 * 24 hours (i.e.: from the current time to 3 * 24 hours ago). If the time range is exceeded, the system will query the data within the time range of 3 * 24 hours by default.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOrderByClientOid\",\"sdk-method-description\":\"This endpoint can be used to obtain information for a single Margin order using the client order ID. After the user successfully places an order, the order is in the Active state, and the user can use inOrderBook to determine whether the order has entered the order. Canceled or fully filled orders are marked as completed Done status.\",\"api-rate-limit-weight\":5}" } } ] @@ -22637,8 +23750,8 @@ "method": "post", "path": "/api/v3/margin/borrow", "parameters": { - "path": [], "query": [], + "path": [], "cookie": [], "header": [] }, @@ -22659,7 +23772,7 @@ "properties": { "orderNo": { "type": "string", - "description": "Borrow Order Id" + "description": "Borrow Order ID" }, "actualSize": { "type": "string", @@ -22759,7 +23872,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis API endpoint is used to initiate an application for cross or isolated margin borrowing.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Debit\",\"sdk-method-name\":\"borrow\",\"sdk-method-description\":\"This API endpoint is used to initiate an application for cross or isolated margin borrowing.\",\"api-rate-limit\":15}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Debit\",\"sdk-method-name\":\"borrow\",\"sdk-method-description\":\"This API endpoint is used to initiate an application for cross or isolated margin borrowing.\",\"api-rate-limit-weight\":15}" } }, { @@ -22769,6 +23882,7 @@ "method": "get", "path": "/api/v3/margin/borrow", "parameters": { + "path": [], "query": [ { "id": "l1uItcOfv7", @@ -22783,8 +23897,7 @@ "ETH", "KCS" ] - }, - "enable": true + } }, { "id": "lCxhmfYmda", @@ -22795,8 +23908,7 @@ "schema": { "type": "boolean", "default": false - }, - "enable": true + } }, { "id": "Hf2SMe6sum", @@ -22811,16 +23923,14 @@ "ETH-USDT", "KCS-USDT" ] - }, - "enable": true + } }, { "id": "XPBAwDPLVp", "name": "orderNo", "required": false, - "description": "Borrow Order Id", - "type": "string", - "enable": true + "description": "Borrow Order ID", + "type": "string" }, { "id": "QRmugWIYaV", @@ -22831,8 +23941,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "tazcgZu4fO", @@ -22843,8 +23952,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "5Qujaipp56", @@ -22855,8 +23963,7 @@ "schema": { "type": "integer", "default": 1 - }, - "enable": true + } }, { "id": "Y6qsnERJk1", @@ -22869,11 +23976,9 @@ "default": 50, "minimum": 10, "maximum": 500 - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -22910,7 +24015,7 @@ }, "totalPage": { "type": "integer", - "description": "total page" + "description": "total pages" }, "items": { "type": "array", @@ -22919,7 +24024,7 @@ "properties": { "orderNo": { "type": "string", - "description": "Borrow Order Id" + "description": "Borrow Order ID" }, "symbol": { "type": "string", @@ -22970,7 +24075,7 @@ }, "createdTime": { "type": "integer", - "description": "borrow time", + "description": "Borrow time", "format": "int64" } }, @@ -23024,8 +24129,8 @@ "example": "{\n \"currency\": \"USDT\",\n \"size\": 10,\n \"timeInForce\": \"FOK\",\n \"isIsolated\": false,\n \"isHf\": false\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis API endpoint is used to get the borrowing orders for cross and isolated margin accounts\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Debit\",\"sdk-method-name\":\"getBorrowHistory\",\"sdk-method-description\":\"This API endpoint is used to get the borrowing orders for cross and isolated margin accounts\",\"api-rate-limit\":15}" + "description": ":::info[Description]\nThis API endpoint is used to get the borrowing orders for cross and isolated margin accounts.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Debit\",\"sdk-method-name\":\"getBorrowHistory\",\"sdk-method-description\":\"This API endpoint is used to get the borrowing orders for cross and isolated margin accounts.\",\"api-rate-limit-weight\":15}" } }, { @@ -23061,7 +24166,7 @@ }, "orderNo": { "type": "string", - "description": "Repay Order Id" + "description": "Repay order ID" }, "actualSize": { "type": "string", @@ -23141,7 +24246,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis API endpoint is used to initiate an application for cross or isolated margin repayment.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Debit\",\"sdk-method-name\":\"repay\",\"sdk-method-description\":\"This API endpoint is used to initiate an application for cross or isolated margin repayment.\",\"api-rate-limit\":10}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Debit\",\"sdk-method-name\":\"repay\",\"sdk-method-description\":\"This API endpoint is used to initiate an application for cross or isolated margin repayment.\",\"api-rate-limit-weight\":10}" } }, { @@ -23151,6 +24256,7 @@ "method": "get", "path": "/api/v3/margin/repay", "parameters": { + "path": [], "query": [ { "id": "l1uItcOfv7", @@ -23165,8 +24271,7 @@ "ETH", "KCS" ] - }, - "enable": true + } }, { "id": "lCxhmfYmda", @@ -23177,8 +24282,7 @@ "schema": { "type": "boolean", "default": false - }, - "enable": true + } }, { "id": "Hf2SMe6sum", @@ -23193,16 +24297,14 @@ "ETH-USDT", "KCS-USDT" ] - }, - "enable": true + } }, { "id": "XPBAwDPLVp", "name": "orderNo", "required": false, - "description": "Repay Order Id", - "type": "string", - "enable": true + "description": "Repay order ID", + "type": "string" }, { "id": "QRmugWIYaV", @@ -23213,8 +24315,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "tazcgZu4fO", @@ -23225,8 +24326,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "5Qujaipp56", @@ -23237,8 +24337,7 @@ "schema": { "type": "integer", "default": 1 - }, - "enable": true + } }, { "id": "Y6qsnERJk1", @@ -23251,11 +24350,9 @@ "default": 50, "minimum": 10, "maximum": 500 - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -23292,7 +24389,7 @@ }, "totalPage": { "type": "integer", - "description": "total page" + "description": "total pages" }, "items": { "type": "array", @@ -23301,7 +24398,7 @@ "properties": { "orderNo": { "type": "string", - "description": "Repay Order Id" + "description": "Repay order ID" }, "symbol": { "type": "string", @@ -23406,17 +24503,18 @@ "example": "{\n \"currency\": \"USDT\",\n \"size\": 10,\n \"timeInForce\": \"FOK\",\n \"isIsolated\": false,\n \"isHf\": false\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis API endpoint is used to get the repayment orders for cross and isolated margin accounts\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Debit\",\"sdk-method-name\":\"getRepayHistory\",\"sdk-method-description\":\"This API endpoint is used to get the borrowing orders for cross and isolated margin accounts\",\"api-rate-limit\":15}" + "description": ":::info[Description]\nThis API endpoint is used to get the repayment orders for cross and isolated margin accounts.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Debit\",\"sdk-method-name\":\"getRepayHistory\",\"sdk-method-description\":\"This API endpoint is used to get the borrowing orders for cross and isolated margin accounts.\",\"api-rate-limit-weight\":15}" } }, { - "name": "Get Interest History", + "name": "Get Interest History.", "api": { "id": "3470209", "method": "get", "path": "/api/v3/margin/interest", "parameters": { + "path": [], "query": [ { "id": "l1uItcOfv7", @@ -23431,8 +24529,7 @@ "ETH", "KCS" ] - }, - "enable": true + } }, { "id": "lCxhmfYmda", @@ -23443,8 +24540,7 @@ "schema": { "type": "boolean", "default": false - }, - "enable": true + } }, { "id": "Hf2SMe6sum", @@ -23459,8 +24555,7 @@ "ETH-USDT", "KCS-USDT" ] - }, - "enable": true + } }, { "id": "QRmugWIYaV", @@ -23471,8 +24566,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "tazcgZu4fO", @@ -23483,8 +24577,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "5Qujaipp56", @@ -23495,8 +24588,7 @@ "schema": { "type": "integer", "default": 1 - }, - "enable": true + } }, { "id": "Y6qsnERJk1", @@ -23509,11 +24601,9 @@ "default": 50, "minimum": 10, "maximum": 500 - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -23550,7 +24640,7 @@ }, "totalPage": { "type": "integer", - "description": "total page" + "description": "total pages" }, "items": { "type": "array", @@ -23622,8 +24712,8 @@ "example": "{\n \"currency\": \"USDT\",\n \"size\": 10,\n \"timeInForce\": \"FOK\",\n \"isIsolated\": false,\n \"isHf\": false\n}", "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to get the interest records of the cross/isolated margin lending.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Debit\",\"sdk-method-name\":\"getInterestHistory\",\"sdk-method-description\":\"Request via this endpoint to get the interest records of the cross/isolated margin lending.\",\"api-rate-limit\":20}" + "description": ":::info[Description]\nRequest the interest records of the cross/isolated margin lending via this endpoint.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Debit\",\"sdk-method-name\":\"getInterestHistory\",\"sdk-method-description\":\"Request the interest records of the cross/isolated margin lending via this endpoint.\",\"api-rate-limit-weight\":20}" } }, { @@ -23705,7 +24795,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis endpoint allows modifying the leverage multiplier for cross margin or isolated margin.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Debit\",\"sdk-method-name\":\"modifyLeverage\",\"sdk-method-description\":\"This endpoint allows modifying the leverage multiplier for cross margin or isolated margin.\",\"api-rate-limit\":5}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Debit\",\"sdk-method-name\":\"modifyLeverage\",\"sdk-method-description\":\"This endpoint allows modifying the leverage multiplier for cross margin or isolated margin.\",\"api-rate-limit-weight\":8}" } } ] @@ -23803,7 +24893,7 @@ }, "autoPurchaseEnable": { "type": "boolean", - "description": "Whether to allow automatic purchase: true: on, false: off" + "description": "Whether to allow automatic purchase: True: on; false: off" } } } @@ -23838,7 +24928,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis API endpoint is used to get the information about the currencies available for lending.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Credit\",\"sdk-method-name\":\"getLoanMarket\",\"sdk-method-description\":\"This API endpoint is used to get the information about the currencies available for lending.\",\"api-rate-limit\":10}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Credit\",\"sdk-method-name\":\"getLoanMarket\",\"sdk-method-description\":\"This API endpoint is used to get the information about the currencies available for lending.\",\"api-rate-limit-weight\":10}" } }, { @@ -23848,6 +24938,7 @@ "method": "get", "path": "/api/v3/project/marketInterestRate", "parameters": { + "path": [], "query": [ { "id": "l1uItcOfv7", @@ -23863,11 +24954,9 @@ "ETH", "KCS" ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -23933,7 +25022,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis API endpoint is used to get the interest rates of the margin lending market over the past 7 days.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Credit\",\"sdk-method-name\":\"getLoanMarketInterestRate\",\"sdk-method-description\":\"This API endpoint is used to get the interest rates of the margin lending market over the past 7 days.\",\"api-rate-limit\":5}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Credit\",\"sdk-method-name\":\"getLoanMarketInterestRate\",\"sdk-method-description\":\"This API endpoint is used to get the interest rates of the margin lending market over the past 7 days.\",\"api-rate-limit-weight\":5}" } }, { @@ -23943,8 +25032,8 @@ "method": "post", "path": "/api/v3/purchase", "parameters": { - "path": [], "query": [], + "path": [], "cookie": [], "header": [] }, @@ -23965,7 +25054,7 @@ "properties": { "orderNo": { "type": "string", - "description": "Purchase order id" + "description": "Purchase order ID" } }, "required": [ @@ -24008,11 +25097,11 @@ }, "size": { "type": "string", - "description": "purchase amount" + "description": "Purchase amount" }, "interestRate": { "type": "string", - "description": "purchase interest rate" + "description": "Purchase interest rate" } }, "required": [ @@ -24024,8 +25113,8 @@ "example": "{\n \"currency\": \"BTC\",\n \"size\": \"0.001\",\n \"interestRate\": \"0.1\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nInvest credit in the market and earn interest,Please ensure that the funds are in the main(funding) account\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Credit\",\"sdk-method-name\":\"purchase\",\"sdk-method-description\":\"Invest credit in the market and earn interest\",\"api-rate-limit\":15}" + "description": ":::info[Description]\nInvest credit in the market and earn interest. Please ensure that the funds are in the main (funding) account.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Credit\",\"sdk-method-name\":\"purchase\",\"sdk-method-description\":\"Invest credit in the market and earn interest\",\"api-rate-limit-weight\":15}" } }, { @@ -24095,7 +25184,7 @@ }, "purchaseOrderNo": { "type": "string", - "description": "Purchase order id" + "description": "Purchase order ID" } }, "required": [ @@ -24107,8 +25196,8 @@ "example": "{\n \"currency\": \"BTC\",\n \"purchaseOrderNo\": \"671bafa804c26d000773c533\",\n \"interestRate\": \"0.09\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis API endpoint is used to update the interest rates of subscription orders, which will take effect at the beginning of the next hour.,Please ensure that the funds are in the main(funding) account\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Credit\",\"sdk-method-name\":\"modifyPurchase\",\"sdk-method-description\":\"This API endpoint is used to update the interest rates of subscription orders, which will take effect at the beginning of the next hour.,Please ensure that the funds are in the main(funding) account\",\"api-rate-limit\":10}" + "description": ":::info[Description]\nThis API endpoint is used to update the interest rates of subscription orders, which will take effect at the beginning of the next hour. Please ensure that the funds are in the main (funding) account.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Credit\",\"sdk-method-name\":\"modifyPurchase\",\"sdk-method-description\":\"This API endpoint is used to update the interest rates of subscription orders, which will take effect at the beginning of the next hour. Please ensure that the funds are in the main (funding) account.\",\"api-rate-limit-weight\":10}" } }, { @@ -24118,23 +25207,8 @@ "method": "get", "path": "/api/v3/purchase/orders", "parameters": { + "path": [], "query": [ - { - "id": "l1uItcOfv7", - "name": "currency", - "required": true, - "description": "currency", - "type": "string", - "schema": { - "type": "string", - "examples": [ - "BTC", - "ETH", - "KCS" - ] - }, - "enable": true - }, { "id": "7dLjr4E9vr", "name": "status", @@ -24150,25 +25224,38 @@ "x-api-enum": [ { "value": "DONE", - "name": "", - "description": "" + "name": "DONE", + "description": "completed" }, { "value": "PENDING", - "name": "", - "description": "" + "name": "PENDING", + "description": "settling" } ] - }, - "enable": true + } + }, + { + "id": "l1uItcOfv7", + "name": "currency", + "required": false, + "description": "Currency", + "type": "string", + "schema": { + "type": "string", + "examples": [ + "BTC", + "ETH", + "KCS" + ] + } }, { "id": "NmPcuh0JUA", "name": "purchaseOrderNo", "required": false, - "description": "", - "type": "string", - "enable": true + "description": "Purchase order ID", + "type": "string" }, { "id": "ocAreXZaqO", @@ -24179,25 +25266,22 @@ "schema": { "type": "integer", "default": 1 - }, - "enable": true + } }, { "id": "tnMkpHjno4", "name": "pageSize", "required": false, - "description": "Page size; 1<=pageSize<=100; default is 50", + "description": "Page size; 1<=pageSize<=50; default is 50", "type": "integer", "schema": { "type": "integer", "default": 50, "minimum": 1, - "maximum": 100 - }, - "enable": true + "maximum": 50 + } } ], - "path": [], "cookie": [], "header": [] }, @@ -24230,7 +25314,7 @@ }, "totalPage": { "type": "integer", - "description": "Total Page" + "description": "Total Pages" }, "items": { "type": "array", @@ -24248,7 +25332,7 @@ }, "purchaseOrderNo": { "type": "string", - "description": "Purchase order id" + "description": "Purchase order ID" }, "purchaseSize": { "type": "string", @@ -24342,8 +25426,8 @@ "example": "{\n \"currency\": \"USDT\",\n \"size\": 10,\n \"timeInForce\": \"FOK\",\n \"isIsolated\": false,\n \"isHf\": false\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis API endpoint provides pagination query for the purchase orders.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Credit\",\"sdk-method-name\":\"getPurchaseOrders\",\"sdk-method-description\":\"This API endpoint provides pagination query for the purchase orders.\",\"api-rate-limit\":10}" + "description": ":::info[Description]\nThis API endpoint provides a pagination query for the purchase orders.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Credit\",\"sdk-method-name\":\"getPurchaseOrders\",\"sdk-method-description\":\"This API endpoint provides a pagination query for the purchase orders.\",\"api-rate-limit-weight\":10}" } }, { @@ -24353,8 +25437,8 @@ "method": "post", "path": "/api/v3/redeem", "parameters": { - "path": [], "query": [], + "path": [], "cookie": [], "header": [] }, @@ -24375,7 +25459,7 @@ "properties": { "orderNo": { "type": "string", - "description": "Redeem order id" + "description": "Redeem order ID" } }, "required": [ @@ -24422,7 +25506,7 @@ }, "purchaseOrderNo": { "type": "string", - "description": "Purchase order id" + "description": "Purchase order ID" } }, "required": [ @@ -24434,8 +25518,8 @@ "example": "{\n \"currency\": \"BTC\",\n \"size\": \"0.001\",\n \"purchaseOrderNo\": \"671bafa804c26d000773c533\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nRedeem your loan order\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Credit\",\"sdk-method-name\":\"redeem\",\"sdk-method-description\":\"Redeem your loan order\",\"api-rate-limit\":15}" + "description": ":::info[Description]\nRedeem your loan order.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Margin\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Credit\",\"sdk-method-name\":\"redeem\",\"sdk-method-description\":\"Redeem your loan order.\",\"api-rate-limit-weight\":15}" } }, { @@ -24447,26 +25531,12 @@ "parameters": { "path": [], "query": [ - { - "id": "l1uItcOfv7", - "name": "currency", - "required": true, - "description": "currency", - "type": "string", - "schema": { - "type": "string", - "examples": [ - "BTC", - "ETH", - "KCS" - ] - } - }, { "id": "7dLjr4E9vr", "name": "status", "required": true, "description": "DONE-completed; PENDING-settling", + "example": "DONE", "type": "string", "schema": { "type": "string", @@ -24477,22 +25547,37 @@ "x-api-enum": [ { "value": "DONE", - "name": "", - "description": "" + "name": "DONE", + "description": "completed" }, { "value": "PENDING", - "name": "", - "description": "" + "name": "PENDING", + "description": "settling" } ] } }, + { + "id": "l1uItcOfv7", + "name": "currency", + "required": false, + "description": "currency", + "type": "string", + "schema": { + "type": "string", + "examples": [ + "BTC", + "ETH", + "KCS" + ] + } + }, { "id": "NmPcuh0JUA", "name": "redeemOrderNo", "required": false, - "description": "Redeem order id", + "description": "Redeem order ID", "type": "string" }, { @@ -24510,13 +25595,13 @@ "id": "tnMkpHjno4", "name": "pageSize", "required": false, - "description": "Page size; 1<=pageSize<=100; default is 50", + "description": "Page size; 1<=pageSize<=50; default is 50", "type": "integer", "schema": { "type": "integer", "default": 50, "minimum": 1, - "maximum": 100 + "maximum": 50 } } ], @@ -24552,7 +25637,7 @@ }, "totalPage": { "type": "integer", - "description": "Total Page" + "description": "Total Pages" }, "items": { "type": "array", @@ -24570,11 +25655,11 @@ }, "purchaseOrderNo": { "type": "string", - "description": "Purchase order id" + "description": "Purchase order ID" }, "redeemOrderNo": { "type": "string", - "description": "Redeem order id" + "description": "Redeem order ID" }, "redeemSize": { "type": "string", @@ -24643,7 +25728,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis API endpoint provides pagination query for the redeem orders.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Credit\",\"sdk-method-name\":\"getRedeemOrders\",\"sdk-method-description\":\"This API endpoint provides pagination query for the redeem orders.\",\"api-rate-limit\":10}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"Credit\",\"sdk-method-name\":\"getRedeemOrders\",\"sdk-method-description\":\"This API endpoint provides pagination query for the redeem orders.\",\"api-rate-limit-weight\":10}" } } ] @@ -24660,33 +25745,32 @@ "method": "get", "path": "/api/v3/margin/currencies", "parameters": { + "path": [], "query": [ { "id": "hdWkGjjrz0", "name": "isIsolated", - "required": true, - "description": "true-isolated, false-cross", + "required": false, + "description": "True-isolated, false-cross", "example": "false", "type": "boolean", "schema": { "type": "boolean" - }, - "enable": true + } }, { "id": "Xmh3RZA5nf", "name": "currency", "required": false, - "description": "currency, This field is only required for cross margin", + "description": "Currency: This field is only required for cross margin", "example": "BTC", - "type": "string", - "enable": true + "type": "string" }, { "id": "AGxfMGvIk6", "name": "symbol", "required": false, - "description": "symbol, This field is only required for isolated margin", + "description": "Symbol: This field is only required for isolated margin", "type": "string", "schema": { "type": "string", @@ -24695,11 +25779,9 @@ "ETH-USDT", "KCS-USDT" ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -24751,7 +25833,7 @@ }, "precision": { "type": "integer", - "description": "CROSS MARGIN RESPONSES, Currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001" + "description": "CROSS MARGIN RESPONSES, Currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001" }, "borrowMinAmount": { "type": "string", @@ -24759,7 +25841,7 @@ }, "borrowMinUnit": { "type": "string", - "description": "CROSS MARGIN RESPONSES, Minimum unit for borrowing, the borrowed amount must be an integer multiple of this value" + "description": "CROSS MARGIN RESPONSES, Minimum unit for borrowing; the borrowed amount must be an integer multiple of this value" }, "borrowEnabled": { "type": "boolean", @@ -24795,11 +25877,11 @@ }, "basePrecision": { "type": "integer", - "description": "ISOLATED MARGIN RESPONSES, Base currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001" + "description": "ISOLATED MARGIN RESPONSES, Base currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001" }, "quotePrecision": { "type": "integer", - "description": "ISOLATED MARGIN RESPONSES, Quote currency precision. the minimum repayment amount of a single transaction should be >= currency precision, for example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001\n" + "description": "ISOLATED MARGIN RESPONSES, Quote currency precision. The minimum repayment amount of a single transaction should be >= currency precision. For example, the precision of ETH is 8, and the minimum repayment amount is 0.00000001\n" }, "baseBorrowMinAmount": { "type": "string", @@ -24873,8 +25955,8 @@ "example": "{\n \"currency\": \"USDT\",\n \"size\": 10,\n \"timeInForce\": \"FOK\",\n \"isIsolated\": false,\n \"isHf\": false\n}", "mediaType": "" }, - "description": ":::info[Description]\nRequest via this endpoint to get the Configure and Risk limit info of the margin.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"RiskLimit\",\"sdk-method-name\":\"getMarginRiskLimit\",\"sdk-method-description\":\"Request via this endpoint to get the Configure and Risk limit info of the margin.\",\"api-rate-limit\":20}" + "description": ":::info[Description]\nRequest Configure and Risk limit info of the margin via this endpoint.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Spot\",\"sdk-service\":\"Margin\",\"sdk-sub-service\":\"RiskLimit\",\"sdk-method-name\":\"getMarginRiskLimit\",\"sdk-method-description\":\"Request Configure and Risk limit info of the margin via this endpoint.\",\"api-rate-limit-weight\":20}" } } ] @@ -24898,7 +25980,6 @@ "method": "get", "path": "/api/v1/contracts/{symbol}", "parameters": { - "query": [], "path": [ { "id": "symbol#0", @@ -24906,10 +25987,10 @@ "required": true, "description": "Path Parameter. Symbol of the contract", "example": "XBTUSDTM", - "type": "string", - "enable": true + "type": "string" } ], + "query": [], "cookie": [], "header": [] }, @@ -24949,7 +26030,7 @@ }, "type": { "type": "string", - "description": "Type of the contract", + "description": "Type of contract", "enum": [ "FFWCSX", "FFICSX" @@ -24958,7 +26039,7 @@ { "value": "FFWCSX", "name": "FFWCSX", - "description": "Standardized swap contracts standard financial futures on swap, expiration swap funding rate" + "description": "Standardized swap contracts, standard financial futures on swaps, expiration swap funding rates" }, { "value": "FFICSX", @@ -24969,17 +26050,17 @@ }, "firstOpenDate": { "type": "integer", - "description": "First Open Date(millisecond)", + "description": "First Open Date (milliseconds)", "format": "int64" }, "expireDate": { "type": "integer", - "description": "Expiration date(millisecond). Null means it will never expire", + "description": "Expiration date (milliseconds) Null means it will never expire", "format": "int64" }, "settleDate": { "type": "integer", - "description": "Settlement date(millisecond). Null indicates that automatic settlement is not supported", + "description": "Settlement date (milliseconds) Null indicates that automatic settlement is not supported", "format": "int64" }, "baseCurrency": { @@ -25080,13 +26161,13 @@ { "value": "FairPrice", "name": "FairPrice", - "description": "Fair Price" + "description": "FairPrice" } ] }, "fairMethod": { "type": "string", - "description": "Fair price marking method, The Futures contract is null", + "description": "Fair price marking method; the Futures contract is null", "enum": [ "FundingRate" ], @@ -25100,7 +26181,7 @@ }, "fundingBaseSymbol": { "type": "string", - "description": "Ticker symbol of the based currency" + "description": "Ticker symbol of the base currency" }, "fundingQuoteSymbol": { "type": "string", @@ -25116,7 +26197,7 @@ }, "settlementSymbol": { "type": "string", - "description": "Settlement Symbol" + "description": "Settlement symbol" }, "status": { "type": "string", @@ -25144,7 +26225,7 @@ { "value": "BeingSettled", "name": "BeingSettled", - "description": "Setting" + "description": "Settling" }, { "value": "Settled", @@ -25178,11 +26259,11 @@ }, "fundingRateGranularity": { "type": "integer", - "description": "Funding interval(millisecond)" + "description": "Funding interval (milliseconds)" }, "openInterest": { "type": "string", - "description": "Open interest" + "description": "Open interest (unit: lots)" }, "turnoverOf24h": { "type": "number", @@ -25206,7 +26287,7 @@ }, "nextFundingRateTime": { "type": "integer", - "description": "Next funding rate time(millisecond)" + "description": "Next funding rate time (milliseconds)" }, "maxLeverage": { "type": "integer", @@ -25221,19 +26302,19 @@ }, "premiumsSymbol1M": { "type": "string", - "description": "Premium index symbol(1 minute)" + "description": "Premium index symbol (1 minute)" }, "premiumsSymbol8H": { "type": "string", - "description": "Premium index symbol(8 hours)" + "description": "Premium index symbol (8 hours)" }, "fundingBaseSymbol1M": { "type": "string", - "description": "Base currency interest rate symbol(1 minute)" + "description": "Base currency interest rate symbol (1 minute)" }, "fundingQuoteSymbol1M": { "type": "string", - "description": "Quote currency interest rate symbol(1 minute)" + "description": "Quote currency interest rate symbol (1 minute)" }, "lowPrice": { "type": "number", @@ -25245,7 +26326,7 @@ }, "priceChgPct": { "type": "number", - "description": "24-hour price change% " + "description": "24-hour % price change " }, "priceChg": { "type": "number", @@ -25269,6 +26350,14 @@ "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": [ @@ -25333,7 +26422,9 @@ "f", "mmrLimit", "mmrLevConstant", - "supportCross" + "supportCross", + "buyLimit", + "sellLimit" ] } }, @@ -25350,7 +26441,7 @@ "responseExamples": [ { "name": "Success", - "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"XBTUSDM\",\n \"rootSymbol\": \"XBT\",\n \"type\": \"FFWCSX\",\n \"firstOpenDate\": 1552638575000,\n \"expireDate\": null,\n \"settleDate\": null,\n \"baseCurrency\": \"XBT\",\n \"quoteCurrency\": \"USD\",\n \"settleCurrency\": \"XBT\",\n \"maxOrderQty\": 10000000,\n \"maxPrice\": 1000000.0,\n \"lotSize\": 1,\n \"tickSize\": 0.1,\n \"indexPriceTickSize\": 0.1,\n \"multiplier\": -1.0,\n \"initialMargin\": 0.014,\n \"maintainMargin\": 0.007,\n \"maxRiskLimit\": 1,\n \"minRiskLimit\": 1,\n \"riskStep\": 0,\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\": false,\n \"isInverse\": true,\n \"markMethod\": \"FairPrice\",\n \"fairMethod\": \"FundingRate\",\n \"fundingBaseSymbol\": \".XBTINT8H\",\n \"fundingQuoteSymbol\": \".USDINT8H\",\n \"fundingRateSymbol\": \".XBTUSDMFPI8H\",\n \"indexSymbol\": \".BXBT\",\n \"settlementSymbol\": null,\n \"status\": \"Open\",\n \"fundingFeeRate\": 1.75E-4,\n \"predictedFundingFeeRate\": 1.76E-4,\n \"fundingRateGranularity\": 28800000,\n \"openInterest\": \"61725904\",\n \"turnoverOf24h\": 209.56303473,\n \"volumeOf24h\": 1.4354731E7,\n \"markPrice\": 68336.7,\n \"indexPrice\": 68335.29,\n \"lastTradePrice\": 68349.3,\n \"nextFundingRateTime\": 17402942,\n \"maxLeverage\": 75,\n \"sourceExchanges\": [\n \"kraken\",\n \"bitstamp\",\n \"crypto\"\n ],\n \"premiumsSymbol1M\": \".XBTUSDMPI\",\n \"premiumsSymbol8H\": \".XBTUSDMPI8H\",\n \"fundingBaseSymbol1M\": \".XBTINT\",\n \"fundingQuoteSymbol1M\": \".USDINT\",\n \"lowPrice\": 67436.7,\n \"highPrice\": 69471.8,\n \"priceChgPct\": 0.0097,\n \"priceChg\": 658.7,\n \"k\": 2645000.0,\n \"m\": 1640000.0,\n \"f\": 1.3,\n \"mmrLimit\": 0.3,\n \"mmrLevConstant\": 75.0,\n \"supportCross\": true\n }\n}", + "data": "{\r\n \"code\": \"200000\",\r\n \"data\": {\r\n \"symbol\": \"XBTUSDTM\",\r\n \"rootSymbol\": \"USDT\",\r\n \"type\": \"FFWCSX\",\r\n \"firstOpenDate\": 1585555200000,\r\n \"expireDate\": null,\r\n \"settleDate\": null,\r\n \"baseCurrency\": \"XBT\",\r\n \"quoteCurrency\": \"USDT\",\r\n \"settleCurrency\": \"USDT\",\r\n \"maxOrderQty\": 1000000,\r\n \"maxPrice\": 1000000.0,\r\n \"lotSize\": 1,\r\n \"tickSize\": 0.1,\r\n \"indexPriceTickSize\": 0.01,\r\n \"multiplier\": 0.001,\r\n \"initialMargin\": 0.008,\r\n \"maintainMargin\": 0.004,\r\n \"maxRiskLimit\": 100000,\r\n \"minRiskLimit\": 100000,\r\n \"riskStep\": 50000,\r\n \"makerFeeRate\": 2.0E-4,\r\n \"takerFeeRate\": 6.0E-4,\r\n \"takerFixFee\": 0.0,\r\n \"makerFixFee\": 0.0,\r\n \"settlementFee\": null,\r\n \"isDeleverage\": true,\r\n \"isQuanto\": true,\r\n \"isInverse\": false,\r\n \"markMethod\": \"FairPrice\",\r\n \"fairMethod\": \"FundingRate\",\r\n \"fundingBaseSymbol\": \".XBTINT8H\",\r\n \"fundingQuoteSymbol\": \".USDTINT8H\",\r\n \"fundingRateSymbol\": \".XBTUSDTMFPI8H\",\r\n \"indexSymbol\": \".KXBTUSDT\",\r\n \"settlementSymbol\": \"\",\r\n \"status\": \"Open\",\r\n \"fundingFeeRate\": 5.2E-5,\r\n \"predictedFundingFeeRate\": 8.3E-5,\r\n \"fundingRateGranularity\": 28800000,\r\n \"openInterest\": \"6748176\",\r\n \"turnoverOf24h\": 1.0346431983265533E9,\r\n \"volumeOf24h\": 12069.225,\r\n \"markPrice\": 86378.69,\r\n \"indexPrice\": 86382.64,\r\n \"lastTradePrice\": 86364,\r\n \"nextFundingRateTime\": 17752926,\r\n \"maxLeverage\": 125,\r\n \"sourceExchanges\": [\r\n \"okex\",\r\n \"binance\",\r\n \"kucoin\",\r\n \"bybit\",\r\n \"bitmart\",\r\n \"gateio\"\r\n ],\r\n \"premiumsSymbol1M\": \".XBTUSDTMPI\",\r\n \"premiumsSymbol8H\": \".XBTUSDTMPI8H\",\r\n \"fundingBaseSymbol1M\": \".XBTINT\",\r\n \"fundingQuoteSymbol1M\": \".USDTINT\",\r\n \"lowPrice\": 82205.2,\r\n \"highPrice\": 89299.9,\r\n \"priceChgPct\": -0.028,\r\n \"priceChg\": -2495.9,\r\n \"k\": 490.0,\r\n \"m\": 300.0,\r\n \"f\": 1.3,\r\n \"mmrLimit\": 0.3,\r\n \"mmrLevConstant\": 125.0,\r\n \"supportCross\": true,\r\n \"buyLimit\": 90700.7115,\r\n \"sellLimit\": 82062.5485\r\n }\r\n}", "responseId": 10385, "ordering": 1 } @@ -25360,8 +26451,8 @@ "parameters": [], "mediaType": "" }, - "description": ":::info[Description]\nGet 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.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getSymbol\",\"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.\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nGet 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.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getSymbol\",\"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.\",\"api-rate-limit-weight\":3}" } }, { @@ -25371,8 +26462,8 @@ "method": "get", "path": "/api/v1/contracts/active", "parameters": { - "query": [], "path": [], + "query": [], "cookie": [], "header": [] }, @@ -25414,7 +26505,7 @@ }, "type": { "type": "string", - "description": "Type of the contract", + "description": "Type of contract", "enum": [ "FFWCSX", "FFICSX" @@ -25423,7 +26514,7 @@ { "value": "FFWCSX", "name": "FFWCSX", - "description": "Standardized swap contracts standard financial futures on swap, expiration swap funding rate" + "description": "Standardized swap contracts, standard financial futures on swaps, expiration swap funding rates" }, { "value": "FFICSX", @@ -25434,17 +26525,17 @@ }, "firstOpenDate": { "type": "integer", - "description": "First Open Date(millisecond)", + "description": "First Open Date (milliseconds)", "format": "int64" }, "expireDate": { "type": "integer", - "description": "Expiration date(millisecond). Null means it will never expire", + "description": "Expiration date (milliseconds) Null means it will never expire", "format": "int64" }, "settleDate": { "type": "integer", - "description": "Settlement date(millisecond). Null indicates that automatic settlement is not supported", + "description": "Settlement date (milliseconds) Null indicates that automatic settlement is not supported", "format": "int64" }, "baseCurrency": { @@ -25545,13 +26636,13 @@ { "value": "FairPrice", "name": "FairPrice", - "description": "Fair Price" + "description": "FairPrice" } ] }, "fairMethod": { "type": "string", - "description": "Fair price marking method, The Futures contract is null", + "description": "Fair price marking method; the Futures contract is null", "enum": [ "FundingRate" ], @@ -25565,7 +26656,7 @@ }, "fundingBaseSymbol": { "type": "string", - "description": "Ticker symbol of the based currency" + "description": "Ticker symbol of the base currency" }, "fundingQuoteSymbol": { "type": "string", @@ -25581,7 +26672,7 @@ }, "settlementSymbol": { "type": "string", - "description": "Settlement Symbol" + "description": "Settlement symbol" }, "status": { "type": "string", @@ -25609,7 +26700,7 @@ { "value": "BeingSettled", "name": "BeingSettled", - "description": "Setting" + "description": "Settling" }, { "value": "Settled", @@ -25643,11 +26734,11 @@ }, "fundingRateGranularity": { "type": "integer", - "description": "Funding interval(millisecond)" + "description": "Funding interval (milliseconds)" }, "openInterest": { "type": "string", - "description": "Open interest" + "description": "Open interest (unit: lots)" }, "turnoverOf24h": { "type": "number", @@ -25671,7 +26762,7 @@ }, "nextFundingRateTime": { "type": "integer", - "description": "Next funding rate time(millisecond)" + "description": "Next funding rate time (milliseconds)" }, "maxLeverage": { "type": "integer", @@ -25686,19 +26777,19 @@ }, "premiumsSymbol1M": { "type": "string", - "description": "Premium index symbol(1 minute)" + "description": "Premium index symbol (1 minute)" }, "premiumsSymbol8H": { "type": "string", - "description": "Premium index symbol(8 hours)" + "description": "Premium index symbol (8 hours)" }, "fundingBaseSymbol1M": { "type": "string", - "description": "Base currency interest rate symbol(1 minute)" + "description": "Base currency interest rate symbol (1 minute)" }, "fundingQuoteSymbol1M": { "type": "string", - "description": "Quote currency interest rate symbol(1 minute)" + "description": "Quote currency interest rate symbol (1 minute)" }, "lowPrice": { "type": "number", @@ -25710,7 +26801,7 @@ }, "priceChgPct": { "type": "number", - "description": "24-hour price change% " + "description": "24-hour % price change " }, "priceChg": { "type": "number", @@ -25734,6 +26825,14 @@ "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": [ @@ -25796,10 +26895,12 @@ "f", "mmrLimit", "mmrLevConstant", - "supportCross" + "supportCross", + "buyLimit", + "sellLimit" ] }, - "description": "the list of all contracts" + "description": "List of all contracts" } }, "required": [ @@ -25815,7 +26916,7 @@ "responseExamples": [ { "name": "Success", - "data": "{\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.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\": 1.53E-4,\n \"predictedFundingFeeRate\": 8.0E-5,\n \"fundingRateGranularity\": 28800000,\n \"openInterest\": \"6384957\",\n \"turnoverOf24h\": 5.788402220999069E8,\n \"volumeOf24h\": 8274.432,\n \"markPrice\": 69732.33,\n \"indexPrice\": 69732.32,\n \"lastTradePrice\": 69732,\n \"nextFundingRateTime\": 21265941,\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\": 68817.5,\n \"highPrice\": 71615.8,\n \"priceChgPct\": 6.0E-4,\n \"priceChg\": 48.0,\n \"k\": 490.0,\n \"m\": 300.0,\n \"f\": 1.3,\n \"mmrLimit\": 0.3,\n \"mmrLevConstant\": 125.0,\n \"supportCross\": true\n }\n ]\n}", + "data": "{\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}", "responseId": 10384, "ordering": 1 } @@ -25825,8 +26926,8 @@ "parameters": [], "mediaType": "" }, - "description": ":::info[Description]\nGet 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.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"GetAllSymbols\",\"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.\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nGet 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.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"GetAllSymbols\",\"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.\",\"api-rate-limit-weight\":3}" } }, { @@ -25836,12 +26937,13 @@ "method": "get", "path": "/api/v1/ticker", "parameters": { + "path": [], "query": [ { "id": "poTiPQkaFr", "name": "symbol", "required": true, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) \n\n", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) \n\n", "example": "", "type": "string", "schema": { @@ -25851,11 +26953,9 @@ "XBTUSDM", "ETHUSDTM" ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -25877,16 +26977,16 @@ "properties": { "sequence": { "type": "integer", - "description": "Sequence number, used to judge whether the messages pushed by Websocket is continuous.", + "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](apidog://link/endpoint/3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/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.", + "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" @@ -25934,7 +27034,7 @@ }, "ts": { "type": "integer", - "description": "Filled time(nanosecond)", + "description": "Filled time (nanoseconds)", "format": "int64" } }, @@ -25976,8 +27076,8 @@ "parameters": [], "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint returns \"last traded price/size\"、\"best bid/ask price/size\" etc. of a single symbol.\nThese messages can also be obtained through Websocket.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getTicker\",\"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.\",\"api-rate-limit\":2}" + "description": ":::info[Description]\nThis endpoint returns \"last traded price/size\", \"best bid/ask price/size\" etc. of a single symbol.\nThese messages can also be obtained through Websocket.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getTicker\",\"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.\",\"api-rate-limit-weight\":2}" } }, { @@ -26012,7 +27112,7 @@ "properties": { "sequence": { "type": "integer", - "description": "Sequence number, used to judge whether the messages pushed by Websocket is continuous.", + "description": "Sequence number, used to judge whether the messages pushed by Websocket are continuous.", "format": "int64" }, "symbol": { @@ -26041,7 +27141,7 @@ }, "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." + "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", @@ -26069,7 +27169,7 @@ }, "ts": { "type": "integer", - "description": "Filled time(nanosecond)", + "description": "Filled time (nanoseconds)", "format": "int64" } }, @@ -26112,8 +27212,8 @@ "parameters": [], "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint returns \"last traded price/size\"、\"best bid/ask price/size\" etc. of all symbol.\nThese messages can also be obtained through Websocket.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getAllTickers\",\"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.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nThis endpoint returns \"last traded price/size\", \"best bid/ask price/size\" etc. of all symbol.\nThese messages can also be obtained through Websocket.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getAllTickers\",\"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.\",\"api-rate-limit-weight\":5}" } }, { @@ -26123,18 +27223,17 @@ "method": "get", "path": "/api/v1/level2/snapshot", "parameters": { + "path": [], "query": [ { "id": "jVYCLbgfDY", "name": "symbol", "required": false, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) \n", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) \n", "example": "XBTUSDM", - "type": "string", - "enable": true + "type": "string" } ], - "path": [], "cookie": [], "header": [] }, @@ -26161,7 +27260,7 @@ }, "symbol": { "type": "string", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " }, "bids": { "type": "array", @@ -26188,7 +27287,7 @@ "ts": { "type": "integer", "format": "int64", - "description": "Timestamp(nanosecond)" + "description": "Timestamp (nanoseconds)" } }, "required": [ @@ -26223,8 +27322,8 @@ "parameters": [], "mediaType": "" }, - "description": ":::info[Discription]\nQuery for Full orderbook depth data. (aggregated by price)\n\nIt is generally used by professional traders because it uses more server resources and traffic, and we have strict access rate limit control.\n\nTo maintain up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getFullOrderBook\",\"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 up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook.\",\"api-rate-limit\":3}" + "description": ":::info[Discription]\nQuery for Full orderbook depth data (aggregated by price)\n\nIt is generally used by professional traders because it uses more server resources and traffic, and we have strict access rate limit controls.\n\nTo maintain an up-to-date Order Book, please use Websocket incremental feed after retrieving the OrderBook.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getFullOrderBook\",\"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.\",\"api-rate-limit-weight\":3}" } }, { @@ -26234,17 +27333,6 @@ "method": "get", "path": "/api/v1/level2/depth{size}", "parameters": { - "query": [ - { - "id": "jVYCLbgfDY", - "name": "symbol", - "required": true, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", - "example": "XBTUSDM", - "type": "string", - "enable": true - } - ], "path": [ { "id": "size#0", @@ -26271,8 +27359,17 @@ "description": "size" } ] - }, - "enable": true + } + } + ], + "query": [ + { + "id": "jVYCLbgfDY", + "name": "symbol", + "required": true, + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", + "example": "XBTUSDM", + "type": "string" } ], "cookie": [], @@ -26300,7 +27397,7 @@ }, "symbol": { "type": "string", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " }, "bids": { "type": "array", @@ -26326,7 +27423,7 @@ }, "ts": { "type": "integer", - "description": "Timestamp(nanosecond)", + "description": "Timestamp (nanoseconds)", "format": "int64" } }, @@ -26362,8 +27459,8 @@ "parameters": [], "mediaType": "" }, - "description": ":::info[Discription]\nQuery for part orderbook depth data. (aggregated by price)\n\nYou are recommended to request via this endpoint as the system reponse would be faster and cosume less traffic.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getPartOrderBook\",\"sdk-method-description\":\"Query for part orderbook depth data. (aggregated by price) You are recommended to request via this endpoint as the system reponse would be faster and cosume less traffic.\",\"api-rate-limit\":5}" + "description": ":::info[Discription]\nQuery for part orderbook depth data (aggregated by price).\n\nIt is recommended that you submit requests via this endpoint as the system response will be faster and consume less traffic.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getPartOrderBook\",\"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.\",\"api-rate-limit-weight\":5}" } }, { @@ -26373,18 +27470,17 @@ "method": "get", "path": "/api/v1/trade/history", "parameters": { + "path": [], "query": [ { "id": "jVYCLbgfDY", "name": "symbol", "required": true, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", "example": "XBTUSDM", - "type": "string", - "enable": true + "type": "string" } ], - "path": [], "cookie": [], "header": [] }, @@ -26428,7 +27524,7 @@ }, "ts": { "type": "integer", - "description": "Filled timestamp(nanosecond)", + "description": "Filled timestamp (nanosecond)", "format": "int64" }, "size": { @@ -26441,7 +27537,7 @@ }, "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.", + "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" @@ -26497,8 +27593,8 @@ "parameters": [], "mediaType": "" }, - "description": ":::info[Discription]\nRequest via this endpoint to get the trade history of the specified symbol, the returned quantity is the last 100 transaction records.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getTradeHistory\",\"sdk-method-description\":\"Request via this endpoint to get the trade history of the specified symbol, the returned quantity is the last 100 transaction records.\",\"api-rate-limit\":5}" + "description": ":::info[Discription]\nRequest the trade history of the specified symbol via this endpoint. The returned quantity is the last 100 transaction records.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getTradeHistory\",\"sdk-method-description\":\"Request the trade history of the specified symbol via this endpoint. The returned quantity is the last 100 transaction records.\",\"api-rate-limit-weight\":5}" } }, { @@ -26513,7 +27609,7 @@ "id": "jVYCLbgfDY", "name": "symbol", "required": true, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](apidog://link/endpoint/3470220) ", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol, indexSymbol, premiumsSymbol1M, premiumsSymbol8H](apidog://link/endpoint/3470220) ", "example": "", "type": "string", "schema": { @@ -26531,7 +27627,7 @@ "id": "jgqzFrzKqc", "name": "granularity", "required": true, - "description": "Type of candlestick patterns(minute)", + "description": "Type of candlestick patterns (minutes)", "example": "", "type": "integer", "schema": { @@ -26614,7 +27710,7 @@ "id": "DyCMyfR0e9", "name": "from", "required": false, - "description": "Start time (milisecond)", + "description": "Start time (milliseconds)", "example": "1728552342000", "type": "integer", "schema": { @@ -26627,7 +27723,7 @@ "id": "Z1XMrUW1vQ", "name": "to", "required": false, - "description": "End time (milisecond)", + "description": "End time (milliseconds)", "example": "1729243542000", "type": "integer", "schema": { @@ -26659,7 +27755,7 @@ "type": "array", "items": { "type": "number", - "description": "Start time of the candle cycle, opening price, highest price, Lowest price, closing price, Transaction volume" + "description": "Start time of the candle cycle, opening price, highest price, lowest price, closing price, transaction volume" } } } @@ -26687,8 +27783,8 @@ "parameters": [], "mediaType": "" }, - "description": ":::info[Description]\nGet the Kline of the symbol. Data are returned in grouped buckets based on requested type.\nFor each query, the system would return at most 500 pieces of data. To obtain more data, please page the data by time.\n:::\n\n:::tip[Tips]\nKlines data may be incomplete. No data is published for intervals where there are no ticks.\n\nIf the specified start/end time and the time granularity exceeds the maximum size allowed for a single request, the system will only return 500 pieces of data for your request. If you want to get fine-grained data in a larger time range, you will need to specify the time ranges and make multiple requests for multiple times.\n\nIf you’ve specified only the start time in your request, the system will return 500 pieces of data from the specified start time to the current time of the system; If only the end time is specified, the system will return 500 pieces of data closest to the end time; If neither the start time nor the end time is specified, the system will return the 500 pieces of data closest to the current time of the system.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getKlines\",\"sdk-method-description\":\"Get the Kline of the symbol. Data are returned in grouped buckets based on requested type. For each query, the system would return at most 500 pieces of data. To obtain more data, please page the data by time.\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nGet the symbol’s candlestick chart. Data are returned in grouped buckets based on requested type.\nFor each query, the system will return at most 500 pieces of data. To obtain more data, please page the data by time.\n:::\n\n:::tip[Tips]\nCandlestick chart data may be incomplete. No data is published for intervals where there are no ticks.\n\nIf the specified start/end time and the time granularity exceed the maximum size allowed for a single request, the system will only return 500 pieces of data for your request. If you want to get fine-grained data in a larger time range, you will need to specify the time ranges and make multiple requests for multiple times.\n\nIf you’ve specified only the start time in your request, the system will return 500 pieces of data from the specified start time to the current time of the system; if only the end time is specified, the system will return 500 pieces of data closest to the end time; if neither the start time nor the end time is specified, the system will return the 500 pieces of data closest to the current time of the system.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getKlines\",\"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.\",\"api-rate-limit-weight\":3}" } }, { @@ -26704,7 +27800,7 @@ "id": "symbol#0", "name": "symbol", "required": true, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", "example": "XBTUSDTM", "type": "string", "enable": true @@ -26730,15 +27826,15 @@ "properties": { "symbol": { "type": "string", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " }, "granularity": { "type": "integer", - "description": "Granularity (milisecond)" + "description": "Granularity (milliseconds)" }, "timePoint": { "type": "integer", - "description": "Time point (milisecond)", + "description": "Time point (milliseconds)", "format": "int64" }, "value": { @@ -26782,8 +27878,8 @@ "parameters": [], "mediaType": "" }, - "description": ":::info[Discription]\nGet current mark price\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getMarkPrice\",\"sdk-method-description\":\"Get current mark price\",\"api-rate-limit\":3}" + "description": ":::info[Discription]\nGet the current mark price (Update snapshots once per second, real-time query).\n:::\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getMarkPrice\",\"sdk-method-description\":\"Get the current mark price (Update snapshots once per second, real-time query).\",\"api-rate-limit-weight\":3}" } }, { @@ -26798,7 +27894,7 @@ "id": "jVYCLbgfDY", "name": "symbol", "required": true, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](apidog://link/endpoint/3470220) ", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](apidog://link/endpoint/3470220) ", "example": "", "type": "string", "schema": { @@ -26814,7 +27910,7 @@ "id": "rrbcWdUUs7", "name": "startAt", "required": false, - "description": "Start time (milisecond)", + "description": "Start time (milliseconds)", "type": "integer", "schema": { "type": "integer", @@ -26826,7 +27922,7 @@ "id": "cfuya1nYZr", "name": "endAt", "required": false, - "description": "End time (milisecond)", + "description": "End time (milliseconds)", "type": "integer", "schema": { "type": "integer", @@ -26838,7 +27934,7 @@ "id": "hkyyNIwpmM", "name": "reverse", "required": false, - "description": "This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default.", + "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.", "type": "boolean", "schema": { "type": "boolean", @@ -26862,7 +27958,7 @@ "id": "OfBs1uDNny", "name": "forward", "required": false, - "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", + "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.", "type": "boolean", "schema": { "type": "boolean", @@ -26874,7 +27970,7 @@ "id": "8wMDaYFMRS", "name": "maxCount", "required": false, - "description": "Max record count. The default record count is 10, The maximum length cannot exceed 100", + "description": "Max. record count. The default record count is 10; the maximum length cannot exceed 100", "type": "integer", "schema": { "type": "integer", @@ -26911,15 +28007,15 @@ "properties": { "symbol": { "type": "string", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: indexSymbol](apidog://link/endpoint/3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: indexSymbol](apidog://link/endpoint/3470220) " }, "granularity": { "type": "integer", - "description": "Granularity (milisecond)" + "description": "Granularity (milliseconds)" }, "timePoint": { "type": "integer", - "description": "Timestamp (milisecond)", + "description": "Timestamp (milliseconds)", "format": "int64" }, "value": { @@ -26996,8 +28092,8 @@ "parameters": [], "mediaType": "" }, - "description": ":::info[Discription]\nGet Spot Index price\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getSpotIndexPrice\",\"sdk-method-description\":\"Get Spot Index Price\",\"api-rate-limit\":2}" + "description": ":::info[Discription]\nGet Spot Index price (Update snapshots once per second, and there is a 5s cache when querying).\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getSpotIndexPrice\",\"sdk-method-description\":\"Get Spot Index Price (Update snapshots once per second, and there is a 5s cache when querying).\",\"api-rate-limit-weight\":2}" } }, { @@ -27012,7 +28108,7 @@ "id": "jVYCLbgfDY", "name": "symbol", "required": true, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](apidog://link/endpoint/3470220) ", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](apidog://link/endpoint/3470220) ", "example": "", "type": "string", "schema": { @@ -27030,7 +28126,7 @@ "id": "rrbcWdUUs7", "name": "startAt", "required": false, - "description": "Start time (milisecond)", + "description": "Start time (milliseconds)", "example": "1728663338000", "type": "integer", "schema": { @@ -27043,7 +28139,7 @@ "id": "cfuya1nYZr", "name": "endAt", "required": false, - "description": "End time (milisecond)", + "description": "End time (milliseconds)", "example": "1728692138000", "type": "integer", "schema": { @@ -27056,7 +28152,7 @@ "id": "hkyyNIwpmM", "name": "reverse", "required": false, - "description": "This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default.", + "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.", "example": "true", "type": "boolean", "schema": { @@ -27082,7 +28178,7 @@ "id": "OfBs1uDNny", "name": "forward", "required": false, - "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", + "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.", "example": "true", "type": "boolean", "schema": { @@ -27095,7 +28191,7 @@ "id": "8wMDaYFMRS", "name": "maxCount", "required": false, - "description": "Max record count. The default record count is 10, The maximum length cannot exceed 100", + "description": "Max. record count. The default record count is 10; the maximum length cannot exceed 100", "example": "10", "type": "integer", "schema": { @@ -27133,15 +28229,15 @@ "properties": { "symbol": { "type": "string", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](apidog://link/endpoint/3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: fundingBaseSymbol, fundingQuoteSymbol, fundingBaseSymbol1M, fundingQuoteSymbol1M](apidog://link/endpoint/3470220) " }, "granularity": { "type": "integer", - "description": "Granularity (milisecond)" + "description": "Granularity (milliseconds)" }, "timePoint": { "type": "integer", - "description": "Timestamp(milisecond)", + "description": "Timestamp (milliseconds)", "format": "int64" }, "value": { @@ -27191,8 +28287,8 @@ "parameters": [], "mediaType": "" }, - "description": ":::info[Discription]\nGet interest rate Index.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getInterestRateIndex\",\"sdk-method-description\":\"Get interest rate Index.\",\"api-rate-limit\":5}" + "description": ":::info[Discription]\nGet interest rate Index (real-time query).\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getInterestRateIndex\",\"sdk-method-description\":\"Get interest rate Index (real-time query).\",\"api-rate-limit-weight\":5}" } }, { @@ -27207,7 +28303,7 @@ "id": "jVYCLbgfDY", "name": "symbol", "required": true, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](apidog://link/endpoint/3470220) ", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](apidog://link/endpoint/3470220) ", "example": "", "type": "string", "schema": { @@ -27223,7 +28319,7 @@ "id": "rrbcWdUUs7", "name": "startAt", "required": false, - "description": "Start time (milisecond)", + "description": "Start time (milliseconds)", "example": "1728663338000", "type": "integer", "schema": { @@ -27236,7 +28332,7 @@ "id": "cfuya1nYZr", "name": "endAt", "required": false, - "description": "End time (milisecond)", + "description": "End time (milliseconds)", "example": "1728692138000", "type": "integer", "schema": { @@ -27249,7 +28345,7 @@ "id": "hkyyNIwpmM", "name": "reverse", "required": false, - "description": "This parameter functions to judge whether the lookup is reverse. True means “yes”. False means no. This parameter is set as True by default.", + "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.", "example": "true", "type": "boolean", "schema": { @@ -27275,7 +28371,7 @@ "id": "OfBs1uDNny", "name": "forward", "required": false, - "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", + "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.", "example": "true", "type": "boolean", "schema": { @@ -27288,7 +28384,7 @@ "id": "8wMDaYFMRS", "name": "maxCount", "required": false, - "description": "Max record count. The default record count is 10, The maximum length cannot exceed 100", + "description": "Max. record count. The default record count is 10; the maximum length cannot exceed 100", "example": "10", "type": "integer", "schema": { @@ -27326,15 +28422,15 @@ "properties": { "symbol": { "type": "string", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](apidog://link/endpoint/3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: premiumsSymbol1M, premiumsSymbol8H](apidog://link/endpoint/3470220) " }, "granularity": { "type": "integer", - "description": "Granularity(milisecond)" + "description": "Granularity (milliseconds)" }, "timePoint": { "type": "integer", - "description": "Timestamp(milisecond)", + "description": "Timestamp (milliseconds)", "format": "int64" }, "value": { @@ -27384,19 +28480,19 @@ "parameters": [], "mediaType": "" }, - "description": ":::info[Discription]\nSubmit request to get premium index.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getPremiumIndex\",\"sdk-method-description\":\"Submit request to get premium index.\",\"api-rate-limit\":3}" + "description": ":::info[Discription]\nSubmit request to get premium index (Update snapshots once per second, real-time query).\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getPremiumIndex\",\"sdk-method-description\":\"Submit request to get premium index (Update snapshots once per second, real-time query).\",\"api-rate-limit-weight\":3}" } }, { - "name": "Get 24hr Stats", + "name": "Get 24hr stats", "api": { "id": "3470228", "method": "get", "path": "/api/v1/trade-statistics", "parameters": { - "path": [], "query": [], + "path": [], "cookie": [], "header": [] }, @@ -27449,7 +28545,7 @@ "mediaType": "" }, "description": ":::info[Discription]\nGet the statistics of the platform futures trading volume in the last 24 hours.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"get24hrStats\",\"sdk-method-description\":\"Get the statistics of the platform futures trading volume in the last 24 hours.\",\"api-rate-limit\":3}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"get24hrStats\",\"sdk-method-description\":\"Get the statistics of the platform futures trading volume in the last 24 hours.\",\"api-rate-limit-weight\":3}" } }, { @@ -27459,8 +28555,8 @@ "method": "get", "path": "/api/v1/timestamp", "parameters": { - "path": [], "query": [], + "path": [], "cookie": [], "header": [] }, @@ -27479,7 +28575,7 @@ "data": { "type": "integer", "format": "int64", - "description": "ServerTime(millisecond)" + "description": "ServerTime (milliseconds)" } }, "required": [ @@ -27506,7 +28602,7 @@ "mediaType": "" }, "description": ":::info[Discription]\nGet the API server time. This is the Unix timestamp.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getServerTime\",\"sdk-method-description\":\"Get the API server time. This is the Unix timestamp.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getServerTime\",\"sdk-method-description\":\"Get the API server time. This is the Unix timestamp.\",\"api-rate-limit-weight\":2}" } }, { @@ -27541,7 +28637,7 @@ }, "status": { "type": "string", - "description": "Status of service: open:normal transaction, close:Stop Trading/Maintenance, cancelonly:can only cancel the order but not place order", + "description": "Status of service: open: normal transaction; close: Stop Trading/Maintenance; cancelonly: can only cancel the order but not place order", "enum": [ "open", "close", @@ -27596,7 +28692,7 @@ "mediaType": "" }, "description": ":::info[Discription]\nGet the service status.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getServiceStatus\",\"sdk-method-description\":\"Get the service status.\",\"api-rate-limit\":4}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Market\",\"sdk-method-name\":\"getServiceStatus\",\"sdk-method-description\":\"Get the service status.\",\"api-rate-limit-weight\":4}" } } ] @@ -27622,7 +28718,7 @@ { "id": "10399", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -27635,11 +28731,11 @@ "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." + "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." + "description": "The user self-defined order ID." } }, "required": [ @@ -27674,14 +28770,14 @@ "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(-)", + "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 (-).", "examples": [ "5c52e11203aa677f33e493fb" ] }, "side": { "type": "string", - "description": "specify if the order is to 'buy' or 'sell'", + "description": "Specify if the order is to 'buy' or 'sell'.", "enum": [ "buy", "sell" @@ -27704,7 +28800,7 @@ }, "symbol": { "type": "string", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", "examples": [ "XBTUSDTM" ] @@ -27718,7 +28814,7 @@ }, "type": { "type": "string", - "description": "specify if the order is an 'limit' order or 'market' order", + "description": "Specify if the order is a 'limit' order or 'market' order", "enum": [ "limit", "market" @@ -27742,11 +28838,11 @@ }, "remark": { "type": "string", - "description": "remark for the order, length cannot exceed 100 utf8 characters" + "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.", + "description": "Either 'down' or 'up'. If stop is used, parameter stopPrice and stopPriceType also need to be provided.", "enum": [ "down", "up" @@ -27760,7 +28856,7 @@ { "value": "up", "name": "up", - "description": "Triggers when the price reaches or goes above the stopPrice" + "description": "Triggers when the price reaches or goes above the stopPrice." } ] }, @@ -27781,18 +28877,18 @@ { "value": "MP", "name": "mark price", - "description": "MP for mark price, The mark price can be obtained through relevant OPEN API for index services" + "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" + "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. " + "description": "Needs to be defined if stop is specified. " }, "reduceOnly": { "type": "boolean", @@ -27806,12 +28902,12 @@ }, "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.", + "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](apidog://link/pages/338146) is divided into these strategies: CN, CO, CB. Not supported DC at the moment.", + "description": "[Self Trade Prevention](apidog://link/pages/338146) is divided into these strategies: CN, CO, CB. DC not currently supported.", "enum": [ "CN", "CO", @@ -27865,7 +28961,7 @@ }, "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." + "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", @@ -27879,41 +28975,41 @@ { "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." + "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." + "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.", + "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 chose, not allowed choose postOnly.", + "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 chose, not allowed choose postOnly.", + "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." + "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" + "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" + "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": [ @@ -27926,8 +29022,8 @@ "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}", "mediaType": "" }, - "description": ":::info[Description]\nPlace 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.\n:::\n\n:::tip[Tips]\nThe maximum limit orders for a single contract is 100 per account, and the maximum stop orders for a single contract is 200 per account.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOrder\",\"sdk-method-description\":\"Place 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.\",\"api-rate-limit\":2}" + "description": ":::info[Description]\nPlace 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.\n:::\n\n:::tip[Tips]\nThe maximum limit orders for a single contract are 100 per account, and the maximum stop orders for a single contract are 200 per account.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOrder\",\"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.\",\"api-rate-limit-weight\":2}" } }, { @@ -27946,7 +29042,7 @@ { "id": "10402", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -28229,7 +29325,7 @@ }, "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." + "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", @@ -28252,7 +29348,7 @@ "mediaType": "" }, "description": ":::info[Description]\nOrder test endpoint, the request parameters and return parameters of this endpoint are exactly the same as the order endpoint, and can be used to verify whether the signature is correct and other operations. After placing an order, the order will not enter the matching system, and the order cannot be queried.\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOrderTest\",\"sdk-method-description\":\"Place order to the futures trading system just for validation\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addOrderTest\",\"sdk-method-description\":\"Place order to the futures trading system just for validation\",\"api-rate-limit-weight\":2}" } }, { @@ -28271,7 +29367,7 @@ { "id": "10400", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -28586,7 +29682,6 @@ "required": [ "clientOid", "symbol", - "type", "side", "leverage" ] @@ -28596,7 +29691,7 @@ "mediaType": "" }, "description": ":::info[Description]\nPlace 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.\nYou can place up to 20 orders at one time, including limit orders, market orders, and stop orders\n\nPlease be noted that the system would hold the fees from the orders entered the orderbook in advance.\n\nDo NOT include extra spaces in JSON strings.\n\nPlace Order Limit\nThe maximum limit orders for a single contract is 100 per account, and the maximum stop orders for a single contract is 50 per account.\n:::\n\n:::tip[Tips]\n- The maximum limit orders for a single contract is 100 per account, and the maximum stop orders for a single contract is 50 per account.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"batchAddOrders\",\"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.\",\"api-rate-limit\":20}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"batchAddOrders\",\"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.\",\"api-rate-limit-weight\":20}" } }, { @@ -28615,7 +29710,7 @@ { "id": "10401", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -28874,7 +29969,7 @@ }, "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." + "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", @@ -28905,7 +30000,7 @@ "mediaType": "" }, "description": ":::info[Description]\nPlace 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.\n\nYou can place two 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.\n\nPlease be noted that the system would hold the fees from the orders entered the orderbook in advance. \n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addTPSLOrder\",\"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.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"addTPSLOrder\",\"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.\",\"api-rate-limit-weight\":2}" } }, { @@ -28933,7 +30028,7 @@ { "id": "10403", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -28986,7 +30081,7 @@ "mediaType": "" }, "description": ":::info[Description]\nCancel an order (including a stop order).\n\nYou will receive success message once the system has received the cancellation request. The cancellation request will be processed by matching engine in sequence. To know if the request has been processed, you may check the order status or update message from the websocket pushes.\n\nThe `orderId` is the server-assigned order id, not the specified clientOid.\n\nIf the order can not be canceled (already filled or previously canceled, etc), then an error response will indicate the reason in the message field.\n:::\n\n**API KEY PERMISSIONS**\nThis endpoint requires the Futures Trading permission.\n\n**REQUEST URL**\nThis endpoint support Futures URL\n\n**REQUEST RATE LIMIT**\nFutures weight:1\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderById\",\"sdk-method-description\":\"Cancel order by system generated orderId.\",\"api-rate-limit\":1}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderById\",\"sdk-method-description\":\"Cancel order by system generated orderId.\",\"api-rate-limit-weight\":1}" } }, { @@ -29024,7 +30119,7 @@ { "id": "10404", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -29073,7 +30168,7 @@ "mediaType": "" }, "description": ":::info[Description]\nCancel an order (including a stop order).\n\nYou will receive success message once the system has received the cancellation request. The cancellation request will be processed by matching engine in sequence. To know if the request has been processed, you may check the order status or update message from the pushes.\n\nResponse the ID created by the client (clientOid).\n\nIf the order can not be canceled (already filled or previously canceled, etc), then an error response will indicate the reason in the message field.\n:::\n\n**API KEY PERMISSIONS**\nThis endpoint requires the Futures Trading permission.\n\n**REQUEST URL**\nThis endpoint support Futures URL", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderByClientOid\",\"sdk-method-description\":\"Cancel order by client defined orderId.\",\"api-rate-limit\":1}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelOrderByClientOid\",\"sdk-method-description\":\"Cancel order by client defined orderId.\",\"api-rate-limit-weight\":1}" } }, { @@ -29092,7 +30187,7 @@ { "id": "10405", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -29188,7 +30283,7 @@ "mediaType": "" }, "description": ":::info[Description]\nUsing this endpoint, orders can be canceled in batches, If there are both normal orders and conditional orders with the same clientOid (it is not recommended to use the same clientOrderId), when cancelling orders in batches by clientOid, normal orders will be canceled and conditional orders will be retained.\n\nSupports batch cancellation of orders by orderId or clientOid. When orderIdsList and clientOidsList are used at the same time, orderIdsList shall prevail. A maximum of 10 orders can be canceled at a time.\n\nWhen using orderId to cancel order, the response will return the orderId.\nWhen using clientOid to cancel order, the response will return the clientOid.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"batchCancelOrders\",\"sdk-method-description\":\"Cancel a bach of orders by client defined orderId or system generated orderId\",\"api-rate-limit\":20}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"batchCancelOrders\",\"sdk-method-description\":\"Cancel a bach of orders by client defined orderId or system generated orderId\",\"api-rate-limit-weight\":20}" } }, { @@ -29217,7 +30312,7 @@ { "id": "10406", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -29270,7 +30365,7 @@ "mediaType": "" }, "description": ":::info[Description]\nUsing this endpoint, all open orders (excluding stop orders) can be canceled in batches.\n\nThe response is a list of orderIDs of the canceled orders.\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelAllOrdersV3\",\"sdk-method-description\":\"Cancel all open orders (excluding stop orders). The response is a list of orderIDs of the canceled orders.\",\"api-rate-limit\":10}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelAllOrdersV3\",\"sdk-method-description\":\"Cancel all open orders (excluding stop orders). The response is a list of orderIDs of the canceled orders.\",\"api-rate-limit-weight\":10}" } }, { @@ -29299,7 +30394,7 @@ { "id": "10407", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -29352,7 +30447,7 @@ "mediaType": "" }, "description": ":::info[Description]\nUsing this endpoint, all untriggered stop orders can be canceled in batches.\n\nSupports batch cancellation of untriggered stop orders by symbol. Cancel all all untriggered stop orders for a specific contract symbol only , If not specified, all the all untriggered stop orders will be canceled.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelAllStopOrders\",\"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'.\",\"api-rate-limit\":15}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"cancelAllStopOrders\",\"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'.\",\"api-rate-limit-weight\":15}" } }, { @@ -29381,7 +30476,7 @@ { "id": "10409", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -29739,7 +30834,7 @@ "mediaType": "" }, "description": ":::info[Description]\nGet a single order by order id (including a stop order).\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOrderByOrderId\",\"sdk-method-description\":\"Get a single order by order id (including a stop order).\",\"api-rate-limit\":5}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOrderByOrderId\",\"sdk-method-description\":\"Get a single order by order id (including a stop order).\",\"api-rate-limit-weight\":5}" } }, { @@ -29751,13 +30846,13 @@ "parameters": { "query": [ { - "required": false, - "description": "The user self-defined order id.", - "type": "string", "id": "hieQtTqErS", - "enable": true, "name": "clientOid", - "example": "5c52e11203aa677f33e493fb" + "required": true, + "description": "The user self-defined order ID.", + "example": "5c52e11203aa677f33e493fb", + "type": "string", + "enable": true } ], "path": [], @@ -29785,7 +30880,7 @@ }, "symbol": { "type": "string", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " }, "type": { "type": "string", @@ -29829,7 +30924,7 @@ }, "price": { "type": "string", - "description": "Order price" + "description": "Order Price" }, "size": { "type": "integer", @@ -29849,7 +30944,7 @@ }, "stp": { "type": "string", - "description": "[Self Trade Prevention](apidog://link/pages/338146) is divided into these strategies: CN, CO, CB. Not supported DC at the moment.", + "description": "[Self Trade Prevention](apidog://link/pages/338146) is divided into these strategies: CN, CO, CB. DC not currently supported.", "enum": [ "", "CN", @@ -29906,12 +31001,12 @@ { "value": "MP", "name": "mark price", - "description": "MP for mark price, The mark price can be obtained through relevant OPEN API for index services" + "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" + "description": "IP for index price. The index price can be obtained through relevant OPEN API for index services." } ] }, @@ -29945,7 +31040,7 @@ }, "forceHold": { "type": "boolean", - "description": "A mark to forcely hold the funds for an order\n" + "description": "A mark to force-hold the funds for an order\n" }, "closeOrder": { "type": "boolean", @@ -29957,7 +31052,7 @@ }, "clientOid": { "type": "string", - "description": "Unique order id created by users to identify their orders\n" + "description": "Unique order ID created by users to identify their orders\n" }, "remark": { "type": "string", @@ -29965,7 +31060,7 @@ }, "tags": { "type": "string", - "description": "tag order source\n" + "description": "Tag order source\n" }, "isActive": { "type": "boolean", @@ -29977,12 +31072,12 @@ }, "createdAt": { "type": "integer", - "description": "Time the order created\n", + "description": "Order creation time\n", "format": "int64" }, "updatedAt": { "type": "integer", - "description": "last update time\n", + "description": "Last update time\n", "format": "int64" }, "endAt": { @@ -29992,12 +31087,12 @@ }, "orderTime": { "type": "integer", - "description": "Order create time in nanosecond\n", + "description": "Order creation time in nanoseconds\n", "format": "int64" }, "settleCurrency": { "type": "string", - "description": "settlement currency\n" + "description": "Settlement currency\n" }, "marginMode": { "type": "string", @@ -30021,7 +31116,7 @@ }, "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" + "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", @@ -30126,8 +31221,8 @@ "example": "", "mediaType": "" }, - "description": ":::info[Description]\nGet a single order by client order id (including a stop order).\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOrderByClientOid\",\"sdk-method-description\":\"Get a single order by client order id (including a stop order).\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nGet a single order by client order ID (including a stop order).\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getOrderByClientOid\",\"sdk-method-description\":\"Get a single order by client order ID (including a stop order).\",\"api-rate-limit-weight\":5}" } }, { @@ -30141,7 +31236,7 @@ { "id": "2KbksGFfyd", "name": "status", - "required": true, + "required": false, "description": "active or done, done as default. Only list orders for a specific status", "example": "done", "type": "string", @@ -30177,7 +31272,7 @@ { "id": "uaSHeFQTjq", "name": "side", - "required": true, + "required": false, "description": "buy or sell", "type": "string", "schema": { @@ -30204,25 +31299,49 @@ { "id": "WUcubn1a2F", "name": "type", - "required": true, - "description": "limit, market, limit_stop or market_stop", + "required": false, + "description": "Order Type", "type": "string", "schema": { "type": "string", "enum": [ "limit", - "market" + "market", + "limit_stop", + "market_stop", + "oco_limit", + "oco_stop" ], "x-api-enum": [ { "value": "limit", - "name": "", - "description": "" + "name": "limit", + "description": "Limit order" }, { "value": "market", - "name": "", - "description": "" + "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" } ] }, @@ -30255,22 +31374,25 @@ { "id": "1CHlZrEtu0", "name": "currentPage", - "required": true, + "required": false, "description": "Current request page, The default currentPage is 1", "type": "integer", "schema": { - "type": "integer" + "type": "integer", + "default": 1 }, "enable": true }, { "id": "nlqXQHDnh5", "name": "pageSize", - "required": true, + "required": false, "description": "pageSize, The default pageSize is 50, The maximum cannot exceed 1000", "type": "integer", "schema": { - "type": "integer" + "type": "integer", + "default": 50, + "maximum": 1000 }, "enable": true } @@ -30283,7 +31405,7 @@ { "id": "10408", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -30551,7 +31673,7 @@ "mediaType": "" }, "description": ":::info[Description]\nList your current orders.\n\nAny limit order on the exchange order book is in active status. Orders removed from the order book will be marked with done status. After an order becomes done, there may be a few milliseconds latency before it’s fully settled.\n\nYou can check the orders in any status. If the status parameter is not specified, orders of done status will be returned by default.\n\nWhen you query orders in active status, there is no time limit. However, when you query orders in done status, the start and end time range cannot exceed 24 * 7 hours. An error will occur if the specified time window exceeds the range. If you specify the end time only, the system will automatically calculate the start time as end time minus 24 hours, and vice versa.\n\n**POLLING**\nFor high-volume trading, it is highly recommended that you maintain your own list of open orders and use one of the streaming market data feeds to keep it updated. You should poll the open orders endpoint to obtain the current state of any open order.\n\nIf you need to get your recent trade history with low latency, you may query the endpoint Get List of Orders Completed in 24h.\n:::\n\n**API KEY PERMISSIONS**\nThis endpoint requires the General permission.\n\n**REQUEST URL**\nThis endpoint support Futures URL\n\n**REQUEST RATE LIMIT**\nFutures weight:2", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"GetOrderList\",\"sdk-method-description\":\"List your current orders.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"GetOrderList\",\"sdk-method-description\":\"List your current orders.\",\"api-rate-limit-weight\":2}" } }, { @@ -30580,7 +31702,7 @@ { "id": "10410", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -30822,7 +31944,7 @@ "mediaType": "" }, "description": ":::info[Description]\nGet a list of recent 1000 closed orders in the last 24 hours.\n\nIf you need to get your recent traded order history with low latency, you may query this endpoint.\n\n\nAny limit order on the exchange order book is in active status. Orders removed from the order book will be marked with done status. After an order becomes done, there may be a few milliseconds latency before it’s fully settled.\n\nYou can check the orders in any status. If the status parameter is not specified, orders of done status will be returned by default.\n\nWhen you query orders in active status, there is no time limit. However, when you query orders in done status, the start and end time range cannot exceed 24*7 hours. An error will occur if the specified time window exceeds the range. If you specify the end time only, the system will automatically calculate the start time as end time minus 24 hours, and vice versa.\n\n**POLLING**\nFor high-volume trading, it is highly recommended that you maintain your own list of open orders and use one of the streaming market data feeds to keep it updated. You should poll the open orders endpoint to obtain the current state of any open order.\n\nIf you need to get your recent trade history with low latency, you may query the endpoint Get List of Orders Completed in 24h.\n:::\n\n**API KEY PERMISSIONS**\nThis endpoint requires the General permission.\n\n**REQUEST URL**\nThis endpoint support Futures URL\n\n**REQUEST RATE LIMIT**\nFutures weight:2\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"GetRecentClosedOrders\",\"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.\",\"api-rate-limit\":5}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"GetRecentClosedOrders\",\"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.\",\"api-rate-limit-weight\":5}" } }, { @@ -30953,7 +32075,7 @@ { "id": "10411", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -31221,7 +32343,7 @@ "mediaType": "" }, "description": ":::info[Description]\nGet the un-triggered stop orders list. Stop orders that have been triggered can be queried through the general order interface\n:::\n\nAny limit order on the exchange order book is in active status. Orders removed from the order book will be marked with done status. After an order becomes done, there may be a few milliseconds latency before it’s fully settled.\n\nYou can check the orders in any status. If the status parameter is not specified, orders of done status will be returned by default.\n\nWhen you query orders in active status, there is no time limit. However, when you query orders in done status, the start and end time range cannot exceed 24*7 hours. An error will occur if the specified time window exceeds the range. If you specify the end time only, the system will automatically calculate the start time as end time minus 24 hours, and vice versa.\n\nPOLLING\nFor high-volume trading, it is highly recommended that you maintain your own list of open orders and use one of the streaming market data feeds to keep it updated. You should poll the open orders endpoint to obtain the current state of any open order.\n\nIf you need to get your recent trade history with low latency, you may query the endpoint Get List of Orders Completed in 24h.", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"GetStopOrderList\",\"sdk-method-description\":\"Get the un-triggered stop orders list. Stop orders that have been triggered can be queried through the general order interface\",\"api-rate-limit\":6}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"GetStopOrderList\",\"sdk-method-description\":\"Get the un-triggered stop orders list. Stop orders that have been triggered can be queried through the general order interface\",\"api-rate-limit-weight\":6}" } }, { @@ -31231,18 +32353,17 @@ "method": "get", "path": "/api/v1/openOrderStatistics", "parameters": { + "path": [], "query": [ { "id": "4wXlXiQszi", "name": "symbol", "required": true, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", "example": "XBTUSDTM", - "type": "string", - "enable": true + "type": "string" } ], - "path": [], "cookie": [], "header": [] }, @@ -31250,7 +32371,7 @@ { "id": "10414", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -31263,23 +32384,23 @@ "properties": { "openOrderBuySize": { "type": "integer", - "description": "Total number of the unexecuted buy orders\n" + "description": "Total number of unexecuted buy orders\n" }, "openOrderSellSize": { "type": "integer", - "description": "Total number of the unexecuted sell orders\n" + "description": "Total number of unexecuted sell orders\n" }, "openOrderBuyCost": { "type": "string", - "description": "Value of all the unexecuted buy orders\n" + "description": "Value of all unexecuted buy orders\n" }, "openOrderSellCost": { "type": "string", - "description": "Value of all the unexecuted sell orders\n" + "description": "Value of all unexecuted sell orders\n" }, "settleCurrency": { "type": "string", - "description": "settlement currency\n" + "description": "Settlement currency\n" } }, "required": [ @@ -31319,8 +32440,8 @@ "example": "", "mediaType": "" }, - "description": ":::info[Description]\nYou can query this endpoint to get the the total number and value of the all your active orders.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"GetOpenOrderValue\",\"sdk-method-description\":\"You can query this endpoint to get the the total number and value of the all your active orders.\",\"api-rate-limit\":10}" + "description": ":::info[Description]\nYou can query this endpoint to get the total number and value of all your active orders.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"GetOpenOrderValue\",\"sdk-method-description\":\"You can query this endpoint to get the total number and value of all your active orders.\",\"api-rate-limit-weight\":10}" } }, { @@ -31330,18 +32451,17 @@ "method": "get", "path": "/api/v1/recentFills", "parameters": { + "path": [], "query": [ { "id": "4wXlXiQszi", "name": "symbol", "required": false, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", "example": "XBTUSDTM", - "type": "string", - "enable": true + "type": "string" } ], - "path": [], "cookie": [], "header": [] }, @@ -31349,7 +32469,7 @@ { "id": "10413", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -31364,7 +32484,7 @@ "properties": { "symbol": { "type": "string", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " }, "tradeId": { "type": "string", @@ -31396,7 +32516,7 @@ }, "liquidity": { "type": "string", - "description": "Liquidity- taker or maker\n", + "description": "Liquidity-taker or -maker\n", "enum": [ "taker", "maker" @@ -31448,7 +32568,7 @@ }, "fixFee": { "type": "string", - "description": "Fixed fees(Deprecated field, no actual use of the value field)\n" + "description": "Fixed fees (Deprecated field, no actual use of the value field)\n" }, "feeCurrency": { "type": "string", @@ -31456,7 +32576,7 @@ }, "tradeTime": { "type": "integer", - "description": "trade time in nanosecond\n", + "description": "Trade time in nanoseconds\n", "format": "int64" }, "subTradeType": { @@ -31562,7 +32682,7 @@ { "value": "cancel", "name": "cancel", - "description": "Partially filled and cancelled orders" + "description": "Partially filled and canceled orders" }, { "value": "liquid", @@ -31583,7 +32703,7 @@ }, "createdAt": { "type": "integer", - "description": "Time the order created\n", + "description": "Order creation time\n", "format": "int64" } }, @@ -31644,8 +32764,8 @@ "example": "", "mediaType": "" }, - "description": ":::info[Description]\nGet a list of recent 1000 fills in the last 24 hours. If you need to get your recent traded order history with low latency, you may query this endpoint.\n\nIf you need to get your recent traded order history with low latency, you may query this endpoint.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getRecentTradeHistory\",\"sdk-method-description\":\"Get a list of recent 1000 fills in the last 24 hours. If you need to get your recent traded order history with low latency, you may query this endpoint.\",\"api-rate-limit\":3}" + "description": ":::info[Description]\nGet 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.\n\nIf you need to get your recently traded order history with low latency, you may query this endpoint.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getRecentTradeHistory\",\"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.\"}" } }, { @@ -31655,23 +32775,22 @@ "method": "get", "path": "/api/v1/fills", "parameters": { + "path": [], "query": [ { "id": "2KbksGFfyd", "name": "orderId", "required": false, - "description": "List fills for a specific order only (If you specify orderId, other parameters can be ignored)", + "description": "List fills for a specific order only (if you specify orderId, other parameters can be ignored)", "example": "236655147005071361", - "type": "string", - "enable": true + "type": "string" }, { "id": "4wXlXiQszi", "name": "symbol", "required": false, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", - "type": "string", - "enable": true + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", + "type": "string" }, { "id": "uaSHeFQTjq", @@ -31679,7 +32798,6 @@ "required": false, "description": "Order side", "type": "string", - "enable": true, "schema": { "type": "string", "enum": [ @@ -31706,7 +32824,6 @@ "required": false, "description": "Order Type", "type": "string", - "enable": true, "schema": { "type": "string", "enum": [ @@ -31740,12 +32857,11 @@ } }, { - "required": false, - "description": "Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all type when empty", - "type": "string", "id": "n3uTl3OSFi", - "enable": true, "name": "tradeTypes", + "required": false, + "description": "Transaction type: trade, adl, liquid, settlement. Supports querying multiple types at the same time, separated by commas. Query all types when empty", + "type": "string", "schema": { "type": "string", "examples": [ @@ -31761,53 +32877,48 @@ "id": "92p8ibIf57", "name": "startAt", "required": false, - "description": "Start time (milisecond)", + "description": "Start time (milliseconds)", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "xa3hJqPSIi", "name": "endAt", "required": false, - "description": "End time (milisecond)", + "description": "End time (milliseconds)", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "1CHlZrEtu0", "name": "currentPage", "required": false, - "description": "Current request page, The default currentPage is 1", + "description": "Current request page. The default currentPage is 1", "type": "integer", "schema": { "type": "integer", "default": 1 - }, - "enable": true + } }, { "id": "nlqXQHDnh5", "name": "pageSize", "required": false, - "description": "pageSize, The default pageSize is 50, The maximum cannot exceed 1000", + "description": "pageSize, The default pageSize is 50; the maximum cannot exceed 1000", "type": "integer", "schema": { "type": "integer", "default": 50, "maximum": 1000 - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -31815,7 +32926,7 @@ { "id": "10412", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -31845,7 +32956,7 @@ "properties": { "symbol": { "type": "string", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " }, "tradeId": { "type": "string", @@ -31877,7 +32988,7 @@ }, "liquidity": { "type": "string", - "description": "Liquidity- taker or maker", + "description": "Liquidity-taker or -maker", "enum": [ "taker", "maker" @@ -31929,7 +33040,7 @@ }, "fixFee": { "type": "string", - "description": "Fixed fees(Deprecated field, no actual use of the value field)" + "description": "Fixed fees (Deprecated field, no actual use of the value field)" }, "feeCurrency": { "type": "string", @@ -31937,7 +33048,7 @@ }, "tradeTime": { "type": "integer", - "description": "trade time in nanosecond", + "description": "Trade time in nanoseconds", "format": "int64" }, "subTradeType": { @@ -31955,53 +33066,54 @@ { "value": "ISOLATED", "name": "ISOLATED", - "description": "Isolated Margin" + "description": "Isolated margin" }, { "value": "CROSS", "name": "CROSS", - "description": "Cross Margin" + "description": "Cross margin" } ] }, "settleCurrency": { "type": "string", - "description": "Settle Currency" + "description": "Settle currency" }, "displayType": { "type": "string", + "description": "Order type", "enum": [ "limit", "market", "limit_stop", "market_stop" ], - "description": "Order Type", "x-api-enum": [ { "value": "limit", "name": "limit", - "description": "Limit order" + "description": "limit order" }, { "value": "market", "name": "market", - "description": "Market order" + "description": "market order" }, { "value": "limit_stop", "name": "limit_stop", - "description": "Stop limit order" + "description": "stop limit order" }, { "value": "market_stop", "name": "market_stop", - "description": "Stop Market order" + "description": "stop market order" } ] }, "fee": { - "type": "string" + "type": "string", + "description": "Trading fee" }, "orderType": { "type": "string", @@ -32057,8 +33169,16 @@ }, "createdAt": { "type": "integer", - "description": "Time the order created\n", + "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": [ @@ -32080,9 +33200,11 @@ "tradeTime", "subTradeType", "marginMode", - "settleCurrency", + "openFeeTaxPay", + "closeFeeTaxPay", "displayType", "fee", + "settleCurrency", "orderType", "tradeType", "createdAt" @@ -32112,7 +33234,7 @@ "responseExamples": [ { "name": "Success", - "data": "{\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\": \"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 \"settleCurrency\": \"USDT\",\n \"fee\": \"0.04045854\",\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 \"settleCurrency\": \"USDT\",\n \"fee\": \"0.040467\",\n \"orderType\": \"market\",\n \"displayType\": \"market\",\n \"tradeType\": \"trade\",\n \"subTradeType\": null,\n \"tradeTime\": 1729155587944000000,\n \"createdAt\": 1729155588104\n }\n ]\n }\n}", + "data": "{\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}", "responseId": 10412, "ordering": 1 } @@ -32127,8 +33249,8 @@ "example": "", "mediaType": "" }, - "description": ":::info[Description]\nGet 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.\n:::\n\n**Data Time Range**\n\nThe system allows you to retrieve data up to one week (start from the last day by default). If the time period of the queried data exceeds one week (time range from the start time to end time exceeded 24*7 hours), the system will prompt to remind you that you have exceeded the time limit. If you only specified the start time, the system will automatically calculate the end time (end time = start time + 24 hours). On the contrary, if you only specified the end time, the system will calculate the start time (start time= end time - 24 hours) the same way.\n\n**Fee**\n\nOrders on KuCoin Futures platform are classified into two types, taker and maker. A taker order matches other resting orders on the exchange order book, and gets executed immediately after order entry. A maker order, on the contrary, stays on the exchange order book and awaits to be matched. Taker orders will be charged taker fees, while maker orders will receive maker rebates. Please note that market orders, iceberg orders and hidden orders are always charged taker fees.\n\nThe system will pre-freeze a predicted taker fee when you place an order.The liquidity field indicates if the fill was charged taker or maker fees.\n\nThe system will pre-freeze the predicted fees (including the maintenance margin needed for the position, entry fees and fees to close positions) if you added the position, and will not pre-freeze fees if you reduced the position. After the order is executed, if you added positions, the system will deduct entry fees from your balance, if you closed positions, the system will deduct the close fees.", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getTradeHistory\",\"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.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nGet 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.\n:::\n\n**Data Time Range**\n\nThe system allows you to retrieve up to one week’s worth of data (starting from the last day by default). If the time period of the queried data exceeds one week (time range from start time to end time exceeding 24 * 7 hours), the system will prompt to remind you that you have exceeded the time limit. If you only specified the start time, the system will automatically calculate the end time (end time = start time + 24 hours). Conversely, if you only specified the end time, the system will calculate the start time (start time = end time - 24 hours) the same way.\n\n**Fee**\n\nOrders on KuCoin Futures platform are classified into two types, taker and maker. A taker order matches other resting orders on the exchange order book, and gets executed immediately after order entry. A maker order, on the other hand, stays on the exchange order book and awaits to be matched. Taker orders will be charged taker fees, while maker orders will receive maker rebates. Please note that market orders, iceberg orders and hidden orders are always charged taker fees.\n\nThe system will pre-freeze a predicted taker fee when you place an order. The liquidity field indicates if the fill was charged taker or maker fees.\n\nThe system will pre-freeze the predicted fees (including the maintenance margin needed for the position, entry fees and fees to close positions) if you added the position, and will not pre-freeze fees if you reduced the position. After the order is executed, if you added positions, the system will deduct entry fees from your balance; if you closed positions, the system will deduct the close fees.", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Order\",\"sdk-method-name\":\"getTradeHistory\",\"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.\",\"api-rate-limit-weight\":5}" } } ] @@ -32235,7 +33357,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis interface can query the margin mode of the current symbol.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"getMarginMode\",\"sdk-method-description\":\"This interface can query the margin mode of the current symbol.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"getMarginMode\",\"sdk-method-description\":\"This interface can query the margin mode of the current symbol.\",\"api-rate-limit-weight\":2}" } }, { @@ -32359,7 +33481,7 @@ "mediaType": "" }, "description": ":::info[Description]\nModify the margin mode of the current symbol.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"switchMarginMode\",\"sdk-method-description\":\"This interface can modify the margin mode of the current symbol.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"switchMarginMode\",\"sdk-method-description\":\"This interface can modify the margin mode of the current symbol.\",\"api-rate-limit-weight\":2}" } }, { @@ -32374,7 +33496,7 @@ "id": "4wXlXiQszi", "name": "symbol", "required": true, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", "type": "string", "schema": { "type": "string", @@ -32390,7 +33512,7 @@ "id": "uaSHeFQTjq", "name": "price", "required": true, - "description": "Order price\n", + "description": "Order Price\n", "type": "string", "enable": true }, @@ -32414,7 +33536,7 @@ { "id": "10415", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -32427,15 +33549,15 @@ "properties": { "symbol": { "type": "string", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " }, "maxBuyOpenSize": { "type": "integer", - "description": "Maximum buy size\n" + "description": "Maximum buy size (unit: lot)\n" }, "maxSellOpenSize": { "type": "integer", - "description": "Maximum buy size\n" + "description": "Maximum buy size (unit: lot)\n" } }, "required": [ @@ -32474,7 +33596,7 @@ "mediaType": "" }, "description": ":::info[Description]\nGet Maximum Open Position Size.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"GetMaxOpenSize\",\"sdk-method-description\":\"Get Maximum Open Position Size.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"GetMaxOpenSize\",\"sdk-method-description\":\"Get Maximum Open Position Size.\",\"api-rate-limit-weight\":2}" } }, { @@ -32787,7 +33909,7 @@ "mediaType": "" }, "description": ":::info[Description]\nGet the position details of a specified position.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"GetPositionDetails\",\"sdk-method-description\":\"Get the position details of a specified position.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"GetPositionDetails\",\"sdk-method-description\":\"Get the position details of a specified position.\",\"api-rate-limit-weight\":2}" } }, { @@ -33111,7 +34233,7 @@ "mediaType": "" }, "description": ":::info[Description]\nGet the position details of a specified position.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"GetPositionList\",\"sdk-method-description\":\"Get the position details of a specified position.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"GetPositionList\",\"sdk-method-description\":\"Get the position details of a specified position.\",\"api-rate-limit-weight\":2}" } }, { @@ -33302,6 +34424,26 @@ "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": [ @@ -33320,7 +34462,12 @@ "closeTime", "openPrice", "closePrice", - "marginMode" + "marginMode", + "realisedGrossCostNew", + "tax", + "liquidAmount", + "liquidPrice", + "side" ] } } @@ -33347,7 +34494,7 @@ "responseExamples": [ { "name": "Success", - "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"currentPage\": 1,\n \"pageSize\": 10,\n \"totalNum\": 3,\n \"totalPage\": 1,\n \"items\": [\n {\n \"closeId\": \"500000000027312193\",\n \"userId\": \"633559791e1cbc0001f319bc\",\n \"symbol\": \"XBTUSDTM\",\n \"settleCurrency\": \"USDT\",\n \"leverage\": \"0.0\",\n \"type\": \"CLOSE_SHORT\",\n \"pnl\": \"-3.79237944\",\n \"realisedGrossCost\": \"3.795\",\n \"withdrawPnl\": \"0.0\",\n \"tradeFee\": \"0.078657\",\n \"fundingFee\": \"0.08127756\",\n \"openTime\": 1727073653603,\n \"closeTime\": 1729155587945,\n \"openPrice\": \"63650.0\",\n \"closePrice\": \"67445.0\",\n \"marginMode\": \"ISOLATED\"\n },\n {\n \"closeId\": \"500000000026809668\",\n \"userId\": \"633559791e1cbc0001f319bc\",\n \"symbol\": \"SUIUSDTM\",\n \"settleCurrency\": \"USDT\",\n \"leverage\": \"0.0\",\n \"type\": \"LIQUID_SHORT\",\n \"pnl\": \"-1.10919296\",\n \"realisedGrossCost\": \"1.11297635\",\n \"withdrawPnl\": \"0.0\",\n \"tradeFee\": \"0.00200295\",\n \"fundingFee\": \"0.00578634\",\n \"openTime\": 1726473389296,\n \"closeTime\": 1728738683541,\n \"openPrice\": \"1.1072\",\n \"closePrice\": \"2.22017635\",\n \"marginMode\": \"ISOLATED\"\n },\n {\n \"closeId\": \"500000000026819355\",\n \"userId\": \"633559791e1cbc0001f319bc\",\n \"symbol\": \"XBTUSDTM\",\n \"settleCurrency\": \"USDT\",\n \"leverage\": \"0.0\",\n \"type\": \"LIQUID_SHORT\",\n \"pnl\": \"-5.941896296\",\n \"realisedGrossCost\": \"5.86937042\",\n \"withdrawPnl\": \"0.0\",\n \"tradeFee\": \"0.074020096\",\n \"fundingFee\": \"0.00149422\",\n \"openTime\": 1726490775358,\n \"closeTime\": 1727061049859,\n \"openPrice\": \"58679.6\",\n \"closePrice\": \"64548.97042\",\n \"marginMode\": \"ISOLATED\"\n }\n ]\n }\n}", + "data": "{\r\n \"code\": \"200000\",\r\n \"data\": {\r\n \"currentPage\": 1,\r\n \"pageSize\": 10,\r\n \"totalNum\": 1,\r\n \"totalPage\": 1,\r\n \"items\": [\r\n {\r\n \"closeId\": \"500000000036305465\",\r\n \"userId\": \"633559791e1cbc0001f319bc\",\r\n \"symbol\": \"XBTUSDTM\",\r\n \"settleCurrency\": \"USDT\",\r\n \"leverage\": \"1.0\",\r\n \"type\": \"CLOSE_LONG\",\r\n \"pnl\": \"0.51214413\",\r\n \"realisedGrossCost\": \"-0.5837\",\r\n \"realisedGrossCostNew\": \"-0.5837\",\r\n \"withdrawPnl\": \"0.0\",\r\n \"tradeFee\": \"0.03766066\",\r\n \"fundingFee\": \"-0.03389521\",\r\n \"openTime\": 1735549162120,\r\n \"closeTime\": 1735589352069,\r\n \"openPrice\": \"93859.8\",\r\n \"closePrice\": \"94443.5\",\r\n \"marginMode\": \"CROSS\",\r\n \"tax\": \"0.0\",\r\n \"roe\": null,\r\n \"liquidAmount\": null,\r\n \"liquidPrice\": null,\r\n \"side\": \"LONG\"\r\n }\r\n ]\r\n }\r\n}", "responseId": 10418, "ordering": 1 } @@ -33363,7 +34510,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis interface can query position history information records.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"GetPositionsHistory\",\"sdk-method-description\":\"This interface can query position history information records.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"GetPositionsHistory\",\"sdk-method-description\":\"This interface can query position history information records.\",\"api-rate-limit-weight\":2}" } }, { @@ -33433,7 +34580,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis interface can query the maximum amount of margin that the current position supports withdrawal.\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"GetMaxWithdrawMargin\",\"sdk-method-description\":\"This interface can query the maximum amount of margin that the current position supports withdrawal.\",\"api-rate-limit\":10}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"GetMaxWithdrawMargin\",\"sdk-method-description\":\"This interface can query the maximum amount of margin that the current position supports withdrawal.\",\"api-rate-limit-weight\":10}" } }, { @@ -33517,7 +34664,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis interface can query the current symbol’s cross-margin leverage multiple.\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"getCrossMarginLeverage\",\"sdk-method-description\":\"This interface can query the current symbol’s cross-margin leverage multiple.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"getCrossMarginLeverage\",\"sdk-method-description\":\"This interface can query the current symbol’s cross-margin leverage multiple.\",\"api-rate-limit-weight\":2}" } }, { @@ -33536,7 +34683,7 @@ { "id": "10425", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -33545,19 +34692,7 @@ "type": "string" }, "data": { - "type": "object", - "properties": { - "symbol": { - "type": "string" - }, - "leverage": { - "type": "string" - } - }, - "required": [ - "symbol", - "leverage" - ] + "type": "boolean" } }, "required": [ @@ -33573,7 +34708,7 @@ "responseExamples": [ { "name": "Success", - "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"symbol\": \"XBTUSDTM\",\n \"leverage\": \"3\"\n }\n}", + "data": "{\r\n \"code\": \"200000\",\r\n \"data\": true\r\n}", "responseId": 10425, "ordering": 1 } @@ -33602,7 +34737,7 @@ "mediaType": "" }, "description": ":::info[Description]\nThis interface can modify the current symbol’s cross-margin leverage multiple.\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"ModifyMarginLeverage\",\"sdk-method-description\":\"This interface can modify the current symbol’s cross-margin leverage multiple.\",\"api-rate-limit\":2}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"ModifyMarginLeverage\",\"sdk-method-description\":\"This interface can modify the current symbol’s cross-margin leverage multiple.\",\"api-rate-limit-weight\":2}" } }, { @@ -33871,7 +35006,7 @@ "mediaType": "" }, "description": ":::info[Description]\nAdd Isolated Margin Manually.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"AddIsolatedMargin\",\"sdk-method-description\":\"Add Isolated Margin Manually.\",\"api-rate-limit\":4}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"AddIsolatedMargin\",\"sdk-method-description\":\"Add Isolated Margin Manually.\",\"api-rate-limit-weight\":4}" } }, { @@ -33945,7 +35080,7 @@ "mediaType": "" }, "description": ":::info[Description]\nRemove Isolated Margin Manually.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"RemoveIsolatedMargin\",\"sdk-method-description\":\"Remove Isolated Margin Manually.\",\"api-rate-limit\":10}" + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"RemoveIsolatedMargin\",\"sdk-method-description\":\"Remove Isolated Margin Manually.\",\"api-rate-limit-weight\":10}" } }, { @@ -33955,18 +35090,17 @@ "method": "get", "path": "/api/v1/contracts/risk-limit/{symbol}", "parameters": { - "query": [], "path": [ { "id": "symbol#0", "name": "symbol", "required": true, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", "example": "XBTUSDTM", - "type": "string", - "enable": true + "type": "string" } ], + "query": [], "cookie": [], "header": [] }, @@ -33974,7 +35108,7 @@ { "id": "10427", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -33989,15 +35123,15 @@ "properties": { "symbol": { "type": "string", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " }, "level": { "type": "integer", - "description": "level\n" + "description": "Level\n" }, "maxRiskLimit": { "type": "integer", - "description": "Upper limit USDT(includes)\n" + "description": "Upper limit USDT (included)\n" }, "minRiskLimit": { "type": "integer", @@ -34005,7 +35139,7 @@ }, "maxLeverage": { "type": "integer", - "description": "Max leverage\n" + "description": "Max. leverage\n" }, "initialMargin": { "type": "number", @@ -34056,8 +35190,8 @@ "example": "", "mediaType": "" }, - "description": ":::info[Description]\nThis interface can be used to obtain information about risk limit level of a specific contract(Only valid for isolated Margin).\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"getIsolatedMarginRiskLimit\",\"sdk-method-description\":\"This interface can be used to obtain information about risk limit level of a specific contract(Only valid for isolated Margin).\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nThis interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin).\n:::\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"NULL\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"getIsolatedMarginRiskLimit\",\"sdk-method-description\":\"This interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin).\",\"api-rate-limit-weight\":5}" } }, { @@ -34076,7 +35210,7 @@ { "id": "10428", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -34086,7 +35220,7 @@ }, "data": { "type": "boolean", - "description": "To adjust the level will cancel the open order, the response can only indicate whether the submit of the adjustment request is successful or not.\n" + "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": [ @@ -34115,11 +35249,11 @@ "properties": { "symbol": { "type": "string", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " }, "level": { "type": "integer", - "description": "level" + "description": "Level" } }, "required": [ @@ -34130,8 +35264,8 @@ "example": "{\n \"symbol\" : \"XBTUSDTM\",\n \"level\" : 2\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis interface is for the adjustment of the risk limit level(Only valid for isolated Margin). To adjust the level will cancel the open order, the response can only indicate whether the submit of the adjustment request is successful or not. The result of the adjustment can be achieved by WebSocket information: Position Change Events\n\n:::\n\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"modifyIsolatedMarginRiskLimt\",\"sdk-method-description\":\"This interface can be used to obtain information about risk limit level of a specific contract(Only valid for isolated Margin).\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nThis interface is for adjusting the risk limit level (only valid for Isolated Margin). Adjusting the level will result in the cancellation of any open orders. The response will indicate only whether the adjustment request was successfully submitted. The result of the adjustment can be obtained with information from Websocket: Position Change Events.\n\n:::\n\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"Positions\",\"sdk-method-name\":\"modifyIsolatedMarginRiskLimt\",\"sdk-method-description\":\"This interface can be used to obtain information about risk limit level of a specific contract (only valid for Isolated Margin).\",\"api-rate-limit-weight\":5}" } } ] @@ -34142,24 +35276,23 @@ "description": "", "items": [ { - "name": "Get Current Funding Rate", + "name": "Get Current Funding Rate.", "api": { "id": "3470265", "method": "get", "path": "/api/v1/funding-rate/{symbol}/current", "parameters": { - "query": [], "path": [ { "id": "symbol#0", "name": "symbol", "required": true, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", "example": "XBTUSDTM", - "type": "string", - "enable": true + "type": "string" } ], + "query": [], "cookie": [], "header": [] }, @@ -34184,11 +35317,11 @@ }, "granularity": { "type": "integer", - "description": "Granularity (milisecond)\n" + "description": "Granularity (milliseconds)\n" }, "timePoint": { "type": "integer", - "description": "The funding rate settlement time point of the previous cycle\n(milisecond)\n", + "description": "The funding rate settlement time point of the previous cycle\n(milliseconds)\n", "format": "int64" }, "value": { @@ -34247,8 +35380,8 @@ "example": "", "mediaType": "" }, - "description": ":::info[Description]\nGet Current Funding Rate\n\n\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"FundingFees\",\"sdk-method-name\":\"GetCurrentFundingRate\",\"sdk-method-description\":\"get Current Funding Rate\",\"api-rate-limit\":2}" + "description": ":::info[Description]\nGet Current Funding Rate.\n\n\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"FundingFees\",\"sdk-method-name\":\"getCurrentFundingRate\",\"sdk-method-description\":\"Get Current Funding Rate.\",\"api-rate-limit-weight\":2}" } }, { @@ -34258,44 +35391,41 @@ "method": "get", "path": "/api/v1/contract/funding-rates", "parameters": { + "path": [], "query": [ { "id": "6iUCMmMHEI", "name": "symbol", "required": true, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", "example": "XBTUSDTM", - "type": "string", - "enable": true + "type": "string" }, { "id": "uwjNpV9qGS", "name": "from", "required": true, - "description": "Begin time (milisecond)\n", + "description": "Begin time (milliseconds)\n", "example": "1700310700000", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "50Ttxnbf64", "name": "to", "required": true, - "description": "End time (milisecond)\n", + "description": "End time (milliseconds)\n", "example": "1702310700000", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -34303,7 +35433,7 @@ { "id": "10430", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -34318,7 +35448,7 @@ "properties": { "symbol": { "type": "string", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " }, "fundingRate": { "type": "number", @@ -34326,7 +35456,7 @@ }, "timepoint": { "type": "integer", - "description": "Time point (milisecond)\n\n", + "description": "Time point (milliseconds)\n\n", "format": "int64" } }, @@ -34366,8 +35496,8 @@ "example": "", "mediaType": "" }, - "description": ":::info[Description]\nQuery the funding rate at each settlement time point within a certain time range of the corresponding contract\n\n:::\n\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"FundingFees\",\"sdk-method-name\":\"GetPublicFundingHistory\",\"sdk-method-description\":\"Query the funding rate at each settlement time point within a certain time range of the corresponding contract\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nQuery the funding rate at each settlement time point within a certain time range of the corresponding contract.\n\n:::\n\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Public\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Public\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"FundingFees\",\"sdk-method-name\":\"getPublicFundingHistory\",\"sdk-method-description\":\"Query the funding rate at each settlement time point within a certain time range of the corresponding contract.\",\"api-rate-limit-weight\":5}" } }, { @@ -34377,52 +35507,49 @@ "method": "get", "path": "/api/v1/funding-history", "parameters": { + "path": [], "query": [ { "id": "6iUCMmMHEI", "name": "symbol", "required": true, - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) ", "example": "XBTUSDTM", - "type": "string", - "enable": true + "type": "string" }, { "id": "uwjNpV9qGS", - "name": "from", + "name": "startAt", "required": false, - "description": "Begin time (milisecond)\n", + "description": "Begin time (milliseconds)\n", "example": "1700310700000", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "50Ttxnbf64", - "name": "to", + "name": "endAt", "required": false, - "description": "End time (milisecond)\n", + "description": "End time (milliseconds)\n", "example": "1702310700000", "type": "integer", "schema": { "type": "integer", "format": "int64" - }, - "enable": true + } }, { "id": "kJsvMJGRDY", "name": "reverse", "required": false, - "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", + "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", "type": "boolean", "schema": { "type": "boolean" - }, - "enable": true + } }, { "id": "KHauDCacx3", @@ -34432,33 +35559,29 @@ "type": "integer", "schema": { "type": "integer" - }, - "enable": true + } }, { "id": "GK7ABGiIOn", "name": "forward", "required": false, - "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", + "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", "type": "boolean", "schema": { "type": "boolean" - }, - "enable": true + } }, { "id": "pUS4Rwbx6z", "name": "maxCount", "required": false, - "description": "Max record count. The default record count is 10", + "description": "Max. record count. The default record count is 10", "type": "integer", "schema": { "type": "integer" - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -34466,7 +35589,7 @@ { "id": "10431", "code": 200, - "name": "成功", + "name": "OK", "headers": [], "jsonSchema": { "type": "object", @@ -34484,16 +35607,16 @@ "properties": { "id": { "type": "integer", - "description": "id", + "description": "ID", "format": "int64" }, "symbol": { "type": "string", - "description": "Symbol of the contract, Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " + "description": "Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](apidog://link/endpoint/3470220) " }, "timePoint": { "type": "integer", - "description": "Time point (milisecond)\n", + "description": "Time point (milliseconds)\n", "format": "int64" }, "fundingRate": { @@ -34514,15 +35637,15 @@ }, "funding": { "type": "number", - "description": "Settled funding fees. A positive number means that the user received the funding fee, and vice versa.\n" + "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" + "description": "Settlement currency\n" }, "context": { "type": "string", - "description": "context" + "description": "Context" }, "marginMode": { "type": "string", @@ -34599,8 +35722,8 @@ "example": "", "mediaType": "" }, - "description": ":::info[Description]\nSubmit request to get the funding history.\n:::\n\n:::tip[Tips]\nThe **from time** and **to time** range cannot exceed 3 month. An error will occur if the specified time window exceeds the range. \n\nIf only **from time** is entered, the default **to time** is the current time. If it exceeds 3 months, an error will be reported.\n\nIf only **to time** is entered, the system will automatically calculate the start time as end time minus 3month.\n:::\n", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"FundingFees\",\"sdk-method-name\":\"getPrivateFundingHistory\",\"sdk-method-description\":\"Submit request to get the funding history.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nSubmit request to get the funding history.\n:::\n\n:::tip[Tips]\nThe **startAt** and **endAt** range cannot exceed 3 months. An error will occur if the specified time window exceeds the range. \n\nIf only **startAt** is entered, the default **endAt** is the current time. If it exceeds 3 months, an error will be reported.\n\nIf only **endAt** is entered, the system will automatically calculate the start time as end time minus 3 months.\n\n**Note:** Because data changes frequently, using offset-based pagination instead of time-based pagination (startAt and endAt) may lead to inaccurate or duplicated data. It is recommended to paginate using startAt and endAt for more reliable results. It is recommended to paginate by startAt and endAt\n:::\n\n", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Futures\",\"api-channel\":\"Private\",\"api-permission\":\"Futures\",\"api-rate-limit-pool\":\"Futures\",\"sdk-service\":\"Futures\",\"sdk-sub-service\":\"FundingFees\",\"sdk-method-name\":\"getPrivateFundingHistory\",\"sdk-method-description\":\"Submit request to get the funding history.\",\"api-rate-limit-weight\":5}" } } ] @@ -34613,14 +35736,14 @@ "description": "", "items": [ { - "name": "purchase", + "name": "Purchase", "api": { "id": "3470268", "method": "post", "path": "/api/v1/earn/orders", "parameters": { - "path": [], "query": [], + "path": [], "cookie": [], "header": [] }, @@ -34680,7 +35803,7 @@ "properties": { "productId": { "type": "string", - "description": "Product Id" + "description": "Product ID" }, "amount": { "type": "string", @@ -34716,8 +35839,8 @@ "example": "{\n \"productId\": \"2611\",\n \"amount\": \"1\",\n \"accountType\": \"TRADE\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint allows subscribing earn product\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Earn\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"purchase\",\"sdk-method-description\":\"This endpoint allows subscribing earn product\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nThis endpoint allows you to subscribe Earn products.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Earn\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"purchase\",\"sdk-method-description\":\"This endpoint allows you to subscribe Earn products.\",\"api-rate-limit-weight\":5}" } }, { @@ -34727,6 +35850,7 @@ "method": "get", "path": "/api/v1/earn/redeem-preview", "parameters": { + "path": [], "query": [ { "id": "11VNqPfoWf", @@ -34734,14 +35858,14 @@ "required": true, "description": "Holding ID", "example": "2767291", - "type": "string", - "enable": true + "type": "string" }, { "id": "xX3ypHaGD9", "name": "fromAccountType", "required": false, "description": "Account type: MAIN (funding account), TRADE (spot trading account). This parameter is valid only when orderId=ETH2", + "example": "MAIN", "type": "string", "schema": { "type": "string", @@ -34761,12 +35885,9 @@ "description": "" } ] - }, - "enable": true, - "example": "MAIN" + } } ], - "path": [], "cookie": [], "header": [] }, @@ -34859,8 +35980,8 @@ "example": "{\n \"productId\": \"2611\",\n \"amount\": \"1\",\n \"accountType\": \"TRADE\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint can get redemption preview information by holding ID. If the current holding is fully redeemed or in the process of being redeemed, it indicates that the holding does not exist.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Earn\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"getRedeemPreview\",\"sdk-method-description\":\"This endpoint allows subscribing earn products\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nThis endpoint can get redemption preview information by holding ID. If the current holding is fully redeemed or in the process of being redeemed, it means that the holding does not exist.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Earn\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"getRedeemPreview\",\"sdk-method-description\":\"This endpoint allows you to subscribe Earn products.\",\"api-rate-limit-weight\":5}" } }, { @@ -34870,6 +35991,7 @@ "method": "delete", "path": "/api/v1/earn/orders", "parameters": { + "path": [], "query": [ { "id": "11VNqPfoWf", @@ -34877,16 +35999,14 @@ "required": true, "description": "Holding ID", "example": "2767291", - "type": "string", - "enable": true + "type": "string" }, { "id": "GI8Yz7Wupe", "name": "amount", "required": true, "description": "Redemption amount", - "type": "string", - "enable": true + "type": "string" }, { "id": "xX3ypHaGD9", @@ -34912,8 +36032,7 @@ "description": "" } ] - }, - "enable": true + } }, { "id": "fBrSF9uyCK", @@ -34926,11 +36045,9 @@ "examples": [ "1" ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -35019,8 +36136,8 @@ "example": "{\n \"productId\": \"2611\",\n \"amount\": \"1\",\n \"accountType\": \"TRADE\"\n}", "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint allows initiating redemption by holding ID. If the current holding is fully redeemed or in the process of being redeemed, it indicates that the holding does not exist.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Earn\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"redeem\",\"sdk-method-description\":\"This endpoint allows initiating redemption by holding ID. If the current holding is fully redeemed or in the process of being redeemed, it indicates that the holding does not exist.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nThis endpoint allows you to redeem Earn products by using holding ID. If the current holding is fully redeemed or in the process of being redeemed, it means that the holding does not exist.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"Earn\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"redeem\",\"sdk-method-description\":\"This endpoint allows you to redeem Earn products by using holding ID. If the current holding is fully redeemed or in the process of being redeemed, it means that the holding does not exist.\",\"api-rate-limit-weight\":5}" } }, { @@ -35030,6 +36147,7 @@ "method": "get", "path": "/api/v1/earn/saving/products", "parameters": { + "path": [], "query": [ { "id": "aFTZ2xbIsT", @@ -35045,11 +36163,9 @@ "USDT", "KCS" ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -35123,15 +36239,15 @@ }, "productUpperLimit": { "type": "string", - "description": "Products total subscribe amount" + "description": "Products total subscription amount" }, "userUpperLimit": { "type": "string", - "description": "Max user subscribe amount" + "description": "Max. user subscription amount" }, "userLowerLimit": { "type": "string", - "description": "Min user subscribe amount" + "description": "Min. user subscribe amount" }, "redeemPeriod": { "type": "integer", @@ -35192,11 +36308,11 @@ }, "productRemainAmount": { "type": "string", - "description": "Products remain subscribe amount" + "description": "Remaining product subscription amount" }, "status": { "type": "string", - "description": "Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress)", + "description": "Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress)", "enum": [ "ONGOING", "PENDING", @@ -35274,7 +36390,7 @@ }, "interestDate": { "type": "integer", - "description": "Most recent interest date(millisecond)", + "description": "Most recent interest date (milliseconds)", "format": "int64" }, "duration": { @@ -35283,7 +36399,7 @@ }, "newUserOnly": { "type": "integer", - "description": "Whether the product is exclusive for new users: 0 (no), 1 (yes)", + "description": "Whether the product is exclusive to new users: 0 (no), 1 (yes)", "enum": [ 0, 1 @@ -35357,8 +36473,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint can get available savings products. If no products are available, an empty list is returned.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"getSavingsProducts\",\"sdk-method-description\":\"This endpoint can get available savings products. If no products are available, an empty list is returned.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nAvailable savings products can be obtained at this endpoint. If no products are available, an empty list is returned.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"getSavingsProducts\",\"sdk-method-description\":\"Available savings products can be obtained at this endpoint. If no products are available, an empty list is returned.\",\"api-rate-limit-weight\":5}" } }, { @@ -35368,6 +36484,7 @@ "method": "get", "path": "/api/v1/earn/promotion/products", "parameters": { + "path": [], "query": [ { "id": "aFTZ2xbIsT", @@ -35383,11 +36500,9 @@ "USDT", "KCS" ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -35461,15 +36576,15 @@ }, "productUpperLimit": { "type": "string", - "description": "Products total subscribe amount" + "description": "Products total subscription amount" }, "userUpperLimit": { "type": "string", - "description": "Max user subscribe amount" + "description": "Max. user subscription amount" }, "userLowerLimit": { "type": "string", - "description": "Min user subscribe amount" + "description": "Min. user subscribe amount" }, "redeemPeriod": { "type": "integer", @@ -35482,7 +36597,7 @@ }, "lockEndTime": { "type": "integer", - "description": "Product earliest interest end time, in milliseconds", + "description": "Earliest interest end time of product, in milliseconds", "format": "int64" }, "applyStartTime": { @@ -35530,11 +36645,11 @@ }, "productRemainAmount": { "type": "string", - "description": "Products remain subscribe amount" + "description": "Remaining product subscription amount" }, "status": { "type": "string", - "description": "Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress)", + "description": "Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress)", "enum": [ "ONGOING", "PENDING", @@ -35612,7 +36727,7 @@ }, "interestDate": { "type": "integer", - "description": "Most recent interest date(millisecond)", + "description": "Most recent interest date (milliseconds)", "format": "int64" }, "duration": { @@ -35621,7 +36736,7 @@ }, "newUserOnly": { "type": "integer", - "description": "Whether the product is exclusive for new users: 0 (no), 1 (yes)", + "description": "Whether the product is exclusive to new users: 0 (no), 1 (yes)", "enum": [ 0, 1 @@ -35695,324 +36810,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint can get available limited-time promotion products. If no products are available, an empty list is returned.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"getPromotionProducts\",\"sdk-method-description\":\"This endpoint can get available limited-time promotion products. If no products are available, an empty list is returned.\",\"api-rate-limit\":5}" - } - }, - { - "name": "Get Account Holding", - "api": { - "id": "3470273", - "method": "get", - "path": "/api/v1/earn/hold-assets", - "parameters": { - "query": [ - { - "id": "LjYQ1SgidS", - "name": "currency", - "required": false, - "description": "currency", - "example": "KCS", - "type": "string", - "fixedValue": false, - "enable": true - }, - { - "id": "moIoxDU7rD", - "name": "productId", - "required": false, - "description": "Product ID", - "example": "", - "type": "string", - "fixedValue": false, - "enable": true - }, - { - "id": "7zeZoCP06z", - "name": "productCategory", - "required": false, - "description": "Product category", - "example": "", - "type": "string", - "fixedValue": false, - "schema": { - "type": "string", - "enum": [ - "DEMAND", - "ACTIVITY", - "STAKING", - "KCS_STAKING", - "ETH2" - ], - "x-api-enum": [ - { - "value": "DEMAND", - "name": "DEMAND", - "description": "Savings" - }, - { - "value": "ACTIVITY", - "name": "ACTIVITY", - "description": "Activity" - }, - { - "value": "STAKING", - "name": "STAKING", - "description": "Staking" - }, - { - "value": "KCS_STAKING", - "name": "KCS_STAKING", - "description": "KCS Staking" - }, - { - "value": "ETH2", - "name": "ETH2", - "description": "ETHStaking" - } - ] - }, - "enable": true - }, - { - "id": "SW4VBTRIg2", - "name": "currentPage", - "required": false, - "description": "Current request page.", - "example": "1", - "type": "integer", - "fixedValue": false, - "schema": { - "type": "integer", - "default": 1 - }, - "enable": true - }, - { - "id": "6kBGqeIeUR", - "name": "pageSize", - "required": false, - "description": "Number of results per request. Minimum is 10, maximum is 500.", - "example": "10", - "type": "integer", - "fixedValue": false, - "schema": { - "type": "integer", - "default": 15, - "minimum": 10, - "maximum": 500 - }, - "enable": true - } - ], - "path": [], - "cookie": [], - "header": [] - }, - "responses": [ - { - "id": "10437", - "code": 200, - "name": "OK", - "headers": [], - "jsonSchema": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "data": { - "type": "object", - "properties": { - "totalNum": { - "type": "integer", - "description": "total number" - }, - "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "orderId": { - "type": "string", - "description": "Holding ID" - }, - "productId": { - "type": "string", - "description": "Product ID" - }, - "productCategory": { - "type": "string", - "description": "Product category" - }, - "productType": { - "type": "string", - "description": "Product sub-type" - }, - "currency": { - "type": "string", - "description": "currency", - "examples": [ - "BTC", - "ETH", - "KCS" - ] - }, - "incomeCurrency": { - "type": "string", - "description": "Income currency", - "examples": [ - "BTC", - "ETH", - "KCS" - ] - }, - "returnRate": { - "type": "string", - "description": "Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return" - }, - "holdAmount": { - "type": "string", - "description": "Holding amount" - }, - "redeemedAmount": { - "type": "string", - "description": "Redeemed amount" - }, - "redeemingAmount": { - "type": "string", - "description": "Redeeming amount" - }, - "lockStartTime": { - "type": "integer", - "description": "Product earliest interest start time, in milliseconds", - "format": "int64" - }, - "lockEndTime": { - "type": "integer", - "description": "Product maturity time, in milliseconds", - "format": "int64" - }, - "purchaseTime": { - "type": "integer", - "description": "Most recent subscription time, in milliseconds", - "format": "int64" - }, - "redeemPeriod": { - "type": "integer", - "description": "Redemption waiting period (days)" - }, - "status": { - "type": "string", - "description": "Status: LOCKED (holding), REDEEMING (redeeming)", - "enum": [ - "LOCKED", - "REDEEMING" - ], - "x-api-enum": [ - { - "value": "LOCKED", - "name": "", - "description": "" - }, - { - "value": "REDEEMING", - "name": "", - "description": "" - } - ] - }, - "earlyRedeemSupported": { - "type": "integer", - "description": "Whether the fixed product supports early redemption: 0 (no), 1 (yes)", - "enum": [ - 0, - 1 - ], - "x-api-enum": [ - { - "value": 0, - "name": "", - "description": "" - }, - { - "value": 1, - "name": "", - "description": "" - } - ] - } - }, - "required": [ - "orderId", - "productId", - "productCategory", - "productType", - "currency", - "incomeCurrency", - "returnRate", - "holdAmount", - "redeemedAmount", - "redeemingAmount", - "lockStartTime", - "purchaseTime", - "redeemPeriod", - "status", - "earlyRedeemSupported" - ] - } - }, - "currentPage": { - "type": "integer", - "description": "current page" - }, - "pageSize": { - "type": "integer", - "description": "page size" - }, - "totalPage": { - "type": "integer", - "description": "total page" - } - }, - "required": [ - "totalNum", - "items", - "currentPage", - "pageSize", - "totalPage" - ] - } - }, - "required": [ - "code", - "data" - ] - }, - "description": "", - "contentType": "json", - "mediaType": "" - } - ], - "responseExamples": [ - { - "name": "Success", - "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"currentPage\": 1,\n \"pageSize\": 15,\n \"items\": [\n {\n \"orderId\": \"2767291\",\n \"productId\": \"2611\",\n \"productCategory\": \"KCS_STAKING\",\n \"productType\": \"DEMAND\",\n \"currency\": \"KCS\",\n \"incomeCurrency\": \"KCS\",\n \"returnRate\": \"0.03471727\",\n \"holdAmount\": \"1\",\n \"redeemedAmount\": \"0\",\n \"redeemingAmount\": \"1\",\n \"lockStartTime\": 1701252000000,\n \"lockEndTime\": null,\n \"purchaseTime\": 1729257513000,\n \"redeemPeriod\": 3,\n \"status\": \"REDEEMING\",\n \"earlyRedeemSupported\": 0\n }\n ]\n }\n}", - "responseId": 10437, - "ordering": 1 - } - ], - "requestBody": { - "type": "none", - "parameters": [], - "jsonSchema": { - "type": "object", - "properties": {} - }, - "mediaType": "" - }, - "description": ":::info[Description]\nThis endpoint can get current holding assets information. If no current holding assets are available, an empty list is returned.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"getAccountHolding\",\"sdk-method-description\":\"This endpoint can get current holding assets information. If no current holding assets are available, an empty list is returned.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nAvailable limited-duration products can be obtained at this endpoint. If no products are available, an empty list is returned.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"getPromotionProducts\",\"sdk-method-description\":\"Available limited-duration products can be obtained at this endpoint. If no products are available, an empty list is returned.\"}" } }, { @@ -36022,6 +36821,7 @@ "method": "get", "path": "/api/v1/earn/staking/products", "parameters": { + "path": [], "query": [ { "id": "aFTZ2xbIsT", @@ -36037,11 +36837,9 @@ "USDT", "KCS" ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -36115,15 +36913,15 @@ }, "productUpperLimit": { "type": "string", - "description": "Products total subscribe amount" + "description": "Products total subscription amount" }, "userUpperLimit": { "type": "string", - "description": "Max user subscribe amount" + "description": "Max. user subscription amount" }, "userLowerLimit": { "type": "string", - "description": "Min user subscribe amount" + "description": "Min. user subscription amount" }, "redeemPeriod": { "type": "integer", @@ -36184,11 +36982,11 @@ }, "productRemainAmount": { "type": "string", - "description": "Products remain subscribe amount" + "description": "Remaining product subscription amount" }, "status": { "type": "string", - "description": "Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress)", + "description": "Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest accrual in progress)", "enum": [ "ONGOING", "PENDING", @@ -36266,7 +37064,7 @@ }, "interestDate": { "type": "integer", - "description": "Most recent interest date(millisecond)", + "description": "Most recent interest date (milliseconds)", "format": "int64" }, "duration": { @@ -36275,7 +37073,7 @@ }, "newUserOnly": { "type": "integer", - "description": "Whether the product is exclusive for new users: 0 (no), 1 (yes)", + "description": "Whether the product is exclusive to new users: 0 (no), 1 (yes)", "enum": [ 0, 1 @@ -36349,8 +37147,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint can get available staking products. If no products are available, an empty list is returned.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"getStakingProducts\",\"sdk-method-description\":\"This endpoint can get available staking products. If no products are available, an empty list is returned.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nAvailable staking products can be obtained at this endpoint. If no products are available, an empty list is returned.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"getStakingProducts\",\"sdk-method-description\":\"Available staking products can be obtained at this endpoint. If no products are available, an empty list is returned.\",\"api-rate-limit-weight\":5}" } }, { @@ -36360,6 +37158,7 @@ "method": "get", "path": "/api/v1/earn/kcs-staking/products", "parameters": { + "path": [], "query": [ { "id": "aFTZ2xbIsT", @@ -36375,11 +37174,9 @@ "USDT", "KCS" ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -36453,15 +37250,15 @@ }, "productUpperLimit": { "type": "string", - "description": "Products total subscribe amount" + "description": "Products total subscription amount" }, "userUpperLimit": { "type": "string", - "description": "Max user subscribe amount" + "description": "Max. user subscription amount" }, "userLowerLimit": { "type": "string", - "description": "Min user subscribe amount" + "description": "Min. user subscribe amount" }, "redeemPeriod": { "type": "integer", @@ -36522,11 +37319,11 @@ }, "productRemainAmount": { "type": "string", - "description": "Products remain subscribe amount" + "description": "Remaining product subscription amount" }, "status": { "type": "string", - "description": "Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress)", + "description": "Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress)", "enum": [ "ONGOING", "PENDING", @@ -36604,7 +37401,7 @@ }, "interestDate": { "type": "integer", - "description": "Most recent interest date(millisecond)", + "description": "Most recent interest date (milliseconds)", "format": "int64" }, "duration": { @@ -36613,7 +37410,7 @@ }, "newUserOnly": { "type": "integer", - "description": "Whether the product is exclusive for new users: 0 (no), 1 (yes)", + "description": "Whether the product is exclusive to new users: 0 (no), 1 (yes)", "enum": [ 0, 1 @@ -36685,8 +37482,8 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint can get available KCS staking products. If no products are available, an empty list is returned.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"getKcsStakingProducts\",\"sdk-method-description\":\"This endpoint can get available KCS staking products. If no products are available, an empty list is returned.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nAvailable KCS staking products can be obtained at this endpoint. If no products are available, an empty list is returned.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"getKcsStakingProducts\",\"sdk-method-description\":\"Available KCS staking products can be obtained at this endpoint. If no products are available, an empty list is returned.\",\"api-rate-limit-weight\":5}" } }, { @@ -36696,6 +37493,7 @@ "method": "get", "path": "/api/v1/earn/eth-staking/products", "parameters": { + "path": [], "query": [ { "id": "aFTZ2xbIsT", @@ -36711,11 +37509,9 @@ "USDT", "KCS" ] - }, - "enable": true + } } ], - "path": [], "cookie": [], "header": [] }, @@ -36796,19 +37592,19 @@ }, "userLowerLimit": { "type": "string", - "description": "Min user subscribe amount" + "description": "Min. user subscribe amount" }, "userUpperLimit": { "type": "string", - "description": "Max user subscribe amount" + "description": "Max. user subscription amount" }, "productUpperLimit": { "type": "string", - "description": "Products total subscribe amount" + "description": "Products total subscription amount" }, "productRemainAmount": { "type": "string", - "description": "Products remain subscribe amount" + "description": "Remaining product subscription amount" }, "redeemPeriod": { "type": "integer", @@ -36882,12 +37678,12 @@ }, "interestDate": { "type": "integer", - "description": "Most recent interest date(millisecond)", + "description": "Most recent interest date (milliseconds)", "format": "int64" }, "newUserOnly": { "type": "integer", - "description": "Whether the product is exclusive for new users: 0 (no), 1 (yes)", + "description": "Whether the product is exclusive to new users: 0 (no), 1 (yes)", "enum": [ 0, 1 @@ -36931,7 +37727,7 @@ }, "status": { "type": "string", - "description": "Product status: ONGOING(Subscription in progress), PENDING(Preheating Subscription), FULL(Subscribed), INTERESTING (Interest in progress)", + "description": "Product status: ONGOING (Subscription in progress), PENDING (Preheating Subscription), FULL (Subscribed), INTERESTING (Interest in progress)", "enum": [ "ONGOING", "PENDING", @@ -37013,8 +37809,319 @@ }, "mediaType": "" }, - "description": ":::info[Description]\nThis endpoint can get available ETH staking products. If no products are available, an empty list is returned.\n:::", - "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"getETHStakingProducts\",\"sdk-method-description\":\"This endpoint can get available ETH staking products. If no products are available, an empty list is returned.\",\"api-rate-limit\":5}" + "description": ":::info[Description]\nAvailable ETH staking products can be obtained at this endpoint. If no products are available, an empty list is returned.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"getETHStakingProducts\",\"sdk-method-description\":\"Available ETH staking products can be obtained at this endpoint. If no products are available, an empty list is returned.\",\"api-rate-limit-weight\":5}" + } + }, + { + "name": "Get Account Holding", + "api": { + "id": "3470273", + "method": "get", + "path": "/api/v1/earn/hold-assets", + "parameters": { + "path": [], + "query": [ + { + "id": "LjYQ1SgidS", + "name": "currency", + "required": false, + "description": "currency", + "example": "KCS", + "type": "string", + "fixedValue": false + }, + { + "id": "moIoxDU7rD", + "name": "productId", + "required": false, + "description": "Product ID", + "example": "", + "type": "string", + "fixedValue": false + }, + { + "id": "7zeZoCP06z", + "name": "productCategory", + "required": false, + "description": "Product category", + "example": "", + "type": "string", + "fixedValue": false, + "schema": { + "type": "string", + "enum": [ + "DEMAND", + "ACTIVITY", + "STAKING", + "KCS_STAKING", + "ETH2" + ], + "x-api-enum": [ + { + "value": "DEMAND", + "name": "DEMAND", + "description": "Savings" + }, + { + "value": "ACTIVITY", + "name": "ACTIVITY", + "description": "Activity" + }, + { + "value": "STAKING", + "name": "STAKING", + "description": "Staking" + }, + { + "value": "KCS_STAKING", + "name": "KCS_STAKING", + "description": "KCS Staking" + }, + { + "value": "ETH2", + "name": "ETH2", + "description": "ETHStaking" + } + ] + } + }, + { + "id": "SW4VBTRIg2", + "name": "currentPage", + "required": false, + "description": "Current request page.", + "example": "1", + "type": "integer", + "fixedValue": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "id": "6kBGqeIeUR", + "name": "pageSize", + "required": false, + "description": "Number of results per request. Minimum is 10, maximum is 500.", + "example": "10", + "type": "integer", + "fixedValue": false, + "schema": { + "type": "integer", + "default": 15, + "minimum": 10, + "maximum": 500 + } + } + ], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "10437", + "code": 200, + "name": "OK", + "headers": [], + "jsonSchema": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "totalNum": { + "type": "integer", + "description": "total number" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "orderId": { + "type": "string", + "description": "Holding ID" + }, + "productId": { + "type": "string", + "description": "Product ID" + }, + "productCategory": { + "type": "string", + "description": "Product category" + }, + "productType": { + "type": "string", + "description": "Product sub-type" + }, + "currency": { + "type": "string", + "description": "currency", + "examples": [ + "BTC", + "ETH", + "KCS" + ] + }, + "incomeCurrency": { + "type": "string", + "description": "Income currency", + "examples": [ + "BTC", + "ETH", + "KCS" + ] + }, + "returnRate": { + "type": "string", + "description": "Annualized Rate of Return, for example, 0.035 is equal to 3.5% annualized rate of return" + }, + "holdAmount": { + "type": "string", + "description": "Holding amount" + }, + "redeemedAmount": { + "type": "string", + "description": "Redeemed amount" + }, + "redeemingAmount": { + "type": "string", + "description": "Redeeming amount" + }, + "lockStartTime": { + "type": "integer", + "description": "Product earliest interest start time, in milliseconds", + "format": "int64" + }, + "lockEndTime": { + "type": "integer", + "description": "Product maturity time, in milliseconds", + "format": "int64" + }, + "purchaseTime": { + "type": "integer", + "description": "Most recent subscription time, in milliseconds", + "format": "int64" + }, + "redeemPeriod": { + "type": "integer", + "description": "Redemption waiting period (days)" + }, + "status": { + "type": "string", + "description": "Status: LOCKED (holding), REDEEMING (redeeming)", + "enum": [ + "LOCKED", + "REDEEMING" + ], + "x-api-enum": [ + { + "value": "LOCKED", + "name": "", + "description": "" + }, + { + "value": "REDEEMING", + "name": "", + "description": "" + } + ] + }, + "earlyRedeemSupported": { + "type": "integer", + "description": "Whether the fixed product supports early redemption: 0 (no), 1 (yes)", + "enum": [ + 0, + 1 + ], + "x-api-enum": [ + { + "value": 0, + "name": "", + "description": "" + }, + { + "value": 1, + "name": "", + "description": "" + } + ] + } + }, + "required": [ + "orderId", + "productId", + "productCategory", + "productType", + "currency", + "incomeCurrency", + "returnRate", + "holdAmount", + "redeemedAmount", + "redeemingAmount", + "lockStartTime", + "purchaseTime", + "redeemPeriod", + "status", + "earlyRedeemSupported" + ] + } + }, + "currentPage": { + "type": "integer", + "description": "current page" + }, + "pageSize": { + "type": "integer", + "description": "page size" + }, + "totalPage": { + "type": "integer", + "description": "total pages" + } + }, + "required": [ + "totalNum", + "items", + "currentPage", + "pageSize", + "totalPage" + ] + } + }, + "required": [ + "code", + "data" + ] + }, + "description": "", + "contentType": "json", + "mediaType": "" + } + ], + "responseExamples": [ + { + "name": "Success", + "data": "{\n \"code\": \"200000\",\n \"data\": {\n \"totalNum\": 1,\n \"totalPage\": 1,\n \"currentPage\": 1,\n \"pageSize\": 15,\n \"items\": [\n {\n \"orderId\": \"2767291\",\n \"productId\": \"2611\",\n \"productCategory\": \"KCS_STAKING\",\n \"productType\": \"DEMAND\",\n \"currency\": \"KCS\",\n \"incomeCurrency\": \"KCS\",\n \"returnRate\": \"0.03471727\",\n \"holdAmount\": \"1\",\n \"redeemedAmount\": \"0\",\n \"redeemingAmount\": \"1\",\n \"lockStartTime\": 1701252000000,\n \"lockEndTime\": null,\n \"purchaseTime\": 1729257513000,\n \"redeemPeriod\": 3,\n \"status\": \"REDEEMING\",\n \"earlyRedeemSupported\": 0\n }\n ]\n }\n}", + "responseId": 10437, + "ordering": 1 + } + ], + "requestBody": { + "type": "none", + "parameters": [], + "jsonSchema": { + "type": "object", + "properties": {} + }, + "mediaType": "" + }, + "description": ":::info[Description]\nInformation on currently held assets can be obtained at this endpoint. If no assets are currently held, an empty list is returned.\n:::", + "customApiFields": "{\"abandon\":\"normal\",\"domain\":\"Spot\",\"api-channel\":\"Private\",\"api-permission\":\"General\",\"api-rate-limit-pool\":\"Earn\",\"sdk-service\":\"Earn\",\"sdk-sub-service\":\"Earn\",\"sdk-method-name\":\"getAccountHolding\",\"sdk-method-description\":\"Information on currently held assets can be obtained at this endpoint. If no assets are currently held, an empty list is returned.\",\"api-rate-limit-weight\":5}" } } ] @@ -37025,14 +38132,119 @@ "description": "", "items": [ { - "name": "Get Account Detail", + "name": "Get Discount Rate Configs", + "api": { + "id": "3471463", + "method": "get", + "path": "/api/v1/otc-loan/discount-rate-configs", + "parameters": { + "query": [], + "path": [], + "cookie": [], + "header": [] + }, + "responses": [ + { + "id": "11801", + "code": 200, + "name": "OK", + "headers": [], + "jsonSchema": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "currency": { + "type": "string", + "examples": [ + "BTC", + "ETH" + ], + "description": "Currency" + }, + "usdtLevels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "left": { + "type": "integer", + "description": "Left end point of gradient interval, left